/* =============================================
   Zoomalia Magnets — Collection Vault v5
   ============================================= */

:root {
  /* Magnimalia Light Theme — Logo-matched */
  --bg: #5BC8E8;
  --bg2: #4AB8D8;
  --surface: #FFFFFF;
  --surface-hi: #EEF8FC;
  --text: #1A2B3C;
  --text-soft: #6B8899;
  --amber: #F5A020;
  --amber-glow: rgba(245,160,32,0.25);
  --green: #4CAF7D;
  --green-glow: rgba(76,175,125,0.2);
  --blue: #5BC8E8;
  --orange: #F5A020;
  --orange-hover: #E08B00;
  --purple: #9B8FD8;
  --pink: #F783AC;
  --red: #E85D5D;
  --gold: #F5A020;
  --gold-glow: rgba(245,160,32,0.3);
  --missing: #D6EEF5;
  --missing-bg: #F5FAFE;
  --border: #D6EEF5;
  --r-card: 16px;
  --r-pill: 50px;
  --font-title: 'Fredoka', sans-serif;
  --font-body: 'Nunito', sans-serif;
  --max-w: 1280px;
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-weight: 500;
}

/* =============================================
   SITE HEADER — Clean White Bar
   ============================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 130px;
  background: var(--bg);
  transition: box-shadow 0.3s;
}

.site-header--scrolled {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.site-header__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-header__logo-img {
  height: 120px;
  width: auto;
  display: block;
}

/* Progress bar integrated in header */
.site-header__progress {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 420px;
  margin: 0 24px;
}

.site-header__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-header__rank {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: rgba(245,160,32,0.12);
  color: var(--amber);
  font-size: 0.8rem;
  font-weight: 700;
}

.site-header__user {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
}

.site-header__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-hi);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--amber);
  text-transform: uppercase;
}

.site-header__username {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.site-header__dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 6px 0;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  z-index: 1001;
}

.site-header__dropdown.open {
  display: block;
}

.site-header__dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.85rem;
  font-family: var(--font-body);
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  border-radius: 0;
}

.site-header__dropdown-item:hover {
  background: var(--surface-hi);
}

/* CTA Button — Orange pill, used globally */
.btn--cta {
  padding: 10px 24px;
  border-radius: var(--r-pill);
  border: none;
  background: var(--amber);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.btn--cta:hover {
  background: var(--orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--amber-glow);
}

/* Language toggle */
.lang-toggle {
  padding: 6px 12px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.2);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.lang-toggle:hover {
  background: rgba(255,255,255,0.35);
  color: var(--amber);
}

@media (max-width: 480px) {
  .site-header { height: 56px; }
  .site-header__inner { padding: 0 12px; }
  .site-header__logo-img { height: 44px; }
  .site-header__progress { max-width: 120px; margin: 0 8px; }
  .progress__bar { height: 4px; }
  .progress__count { font-size: 0.65rem; }
  .filterbar { top: 56px; }
  .seduction-banner { top: 56px; }
  .site-header__username { display: none; }
  .btn--cta { padding: 6px 12px; font-size: 0.72rem; }
  .lang-toggle { width: 28px; height: 28px; font-size: 0.65rem; }
}

/* =============================================
   MAGNET DU MOIS — Floating Widget (Desktop)
   ============================================= */

.motm-widget {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 190px;
  background: #FFFFFF;
  border: 2px solid var(--amber);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(245,160,32,0.15);
  z-index: 500;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: opacity 0.3s, transform 0.3s;
}

.motm-widget.collapsed {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.9);
}

.motm-widget__sparkle-label {
  font-family: var(--font-title);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber);
}

.motm-widget__img-wrap {
  position: relative;
  width: 120px;
  height: 160px;
}

.motm-widget__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--surface-hi);
  display: block;
  transform: rotate(5deg);
  animation: widgetBob 3s ease-in-out infinite;
}

@keyframes widgetBob {
  0%, 100% { transform: rotate(5deg) translateY(0); }
  50% { transform: rotate(5deg) translateY(-4px); }
}

.motm-widget__name {
  font-family: var(--font-title);
  font-size: 0.95rem;
  color: var(--text);
  text-align: center;
  line-height: 1.2;
}

.motm-widget__animal {
  font-size: 0.72rem;
  color: var(--text-soft);
  text-align: center;
}

/* Free tag — info badge (not a CTA) */
.motm-widget__free-tag {
  display: inline-block;
  background: rgba(76,175,125,0.12);
  color: var(--green);
  font-family: var(--font-title);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 14px;
  border-radius: var(--r-pill);
  text-align: center;
  border: 1.5px solid rgba(76,175,125,0.3);
}

.motm-widget__countdown {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-soft);
  text-align: center;
}

.motm-widget__countdown.urgent {
  color: var(--amber);
  font-weight: 700;
  animation: urgentPulse 2s ease-in-out infinite;
}

.motm-widget__badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.motm-widget__badge--new {
  background: rgba(76,175,125,0.12);
  color: var(--green);
}

.motm-widget__badge--reedition {
  background: rgba(155,143,216,0.12);
  color: var(--purple);
}

.motm-widget__year {
  font-size: 0.65rem;
  color: var(--text-soft);
}

.motm-widget__cta {
  width: 100%;
  padding: 8px 0;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--amber);
  background: rgba(245,160,32,0.08);
  color: var(--amber);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.motm-widget__cta:hover {
  background: rgba(245,160,32,0.15);
}

.motm-widget__cta.owned {
  background: var(--green);
  color: #FFFFFF;
  border-color: var(--green);
}

/* Affiliate CTA in widget */
.motm-widget__aff-text {
  font-size: 0.7rem;
  color: var(--text);
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
  margin-top: 2px;
}


.motm-widget__aff-btn {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--r-pill);
  background: var(--amber);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.motm-widget__aff-btn:hover {
  background: var(--orange-hover);
  transform: translateY(-1px);
}

.motm-widget__aff-btn.urgent {
  animation: urgentPulse 2s ease-in-out infinite;
}

@keyframes urgentPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245,160,32,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(245,160,32,0); }
}


/* Email capture form in widget */
.email-capture {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.email-capture__headline {
  font-family: var(--font-title);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  line-height: 1.3;
}

/* Compact email capture inside widget */
.motm-widget .email-capture {
  gap: 4px;
  margin-top: 6px;
  padding-top: 6px;
}

.email-capture__input {
  width: 100%;
  padding: 7px 10px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--border);
  background: #FFFFFF;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.7rem;
  outline: none;
  transition: border-color 0.2s;
}

.email-capture__input:focus {
  border-color: var(--amber);
}

.email-capture__input.error {
  border-color: var(--red);
  animation: shake 0.3s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.email-capture__rgpd {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  font-size: 0.55rem;
  color: var(--text-soft);
  cursor: pointer;
  line-height: 1.3;
}

.email-capture__checkbox {
  margin-top: 1px;
  flex-shrink: 0;
}

.email-capture__btn {
  width: 100%;
  padding: 7px 0;
  border-radius: var(--r-pill);
  border: none;
  background: var(--green);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.email-capture__btn:hover {
  background: #3D9A6A;
}

.email-capture__success {
  font-size: 0.65rem;
  color: var(--green);
  text-align: center;
  padding: 4px 0;
  font-weight: 600;
}

/* Collapsed sparkle tab */
.motm-tab {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: var(--amber);
  border-radius: 10px 0 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 500;
  box-shadow: -2px 0 12px rgba(245,160,32,0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.motm-tab.visible {
  opacity: 1;
  pointer-events: all;
}

.motm-tab:hover {
  width: 44px;
}

/* Hide widget on mobile */
@media (max-width: 768px) {
  .motm-widget,
  .motm-tab {
    display: none !important;
  }
}

/* =============================================
   MAGNET DU MOIS — Mobile Banner
   ============================================= */

.motm-banner {
  display: none;
  background: var(--amber);
  color: #FFFFFF;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 16px;
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 600;
}

.motm-banner__text {
  flex: 1;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.motm-banner__badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.25);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  animation: bannerPulse 2s ease-out infinite;
}

@keyframes bannerPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.4); }
  50% { box-shadow: 0 0 0 4px rgba(255,255,255,0); }
}

.motm-banner__voir {
  background: rgba(255,255,255,0.25);
  border: none;
  color: #FFFFFF;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.motm-banner__voir:hover {
  background: rgba(255,255,255,0.4);
}

.motm-banner__close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.motm-banner__close:hover {
  color: #FFFFFF;
}

@media (max-width: 768px) {
  .motm-banner {
    display: flex;
  }
}

/* =============================================
   PROGRESS BAR — Inline in Header
   ============================================= */

.progress__bar {
  position: relative;
  flex: 1;
  height: 12px;
  background: rgba(255,255,255,0.5);
  border-radius: var(--r-pill);
  overflow: hidden;
}

.progress__fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--amber), #FFB84D);
  border-radius: var(--r-pill);
  transition: width 0.6s cubic-bezier(0.22,1,0.36,1);
  box-shadow: 0 0 8px rgba(245,160,32,0.4);
}

.progress__count {
  font-size: 0.85rem;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* =============================================
   FILTER BAR — Sticker Label Style
   ============================================= */

.filterbar {
  position: sticky;
  top: 130px;
  z-index: 100;
  background: #FFFFFF;
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.filterbar__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Row 1 — Status tabs */
.filterbar__row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.status-tab {
  padding: 7px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-pill);
  background: #FFFFFF;
  color: var(--text-soft);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.status-tab:hover {
  color: var(--text);
  border-color: var(--amber);
}

.status-tab.active {
  background: var(--amber);
  color: #FFFFFF;
  border-color: var(--amber);
}

.status-tab.active::after {
  display: none;
}

/* Row 2 — Species + Year + Search */
.filterbar__row2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.species-chips {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
}

.species-chips__label {
  font-size: 0.7rem;
  color: var(--text-soft);
  font-weight: 600;
  margin-right: 4px;
}

.species-chip {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.species-chip:hover {
  border-color: var(--amber);
  background: var(--surface-hi);
  transform: scale(1.08);
}

.species-chip.active {
  border-color: var(--amber);
  background: rgba(245,160,32,0.12);
  box-shadow: 0 0 0 2px rgba(245,160,32,0.15);
}

.species-chip[title]::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #FFFFFF;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 10;
}

.species-chip:hover::after {
  opacity: 1;
}

/* Shop filter toggle (green) */
.shop-filter-toggle {
  padding: 5px 12px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--border);
  background: #FFFFFF;
  color: var(--text-soft);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}

.shop-filter-toggle:hover {
  border-color: var(--green);
  color: var(--green);
}

.shop-filter-toggle.active {
  background: var(--green);
  border-color: var(--green);
  color: #FFFFFF;
  box-shadow: 0 0 0 3px var(--green-glow);
}

.filterbar__row2-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Year dropdown */
.year-dropdown {
  padding: 7px 28px 7px 12px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--border);
  background: #FFFFFF;
  color: var(--text-soft);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236B8899'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 0.2s;
}

.year-dropdown:hover { border-color: var(--amber); color: var(--text); }
.year-dropdown:focus { border-color: var(--amber); color: var(--amber); outline: none; }

.year-dropdown option {
  background: #FFFFFF;
  color: var(--text);
}

/* Search */
.search-box {
  position: relative;
}

.search-box__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  pointer-events: none;
  opacity: 0.5;
}

.search-box__input {
  padding: 7px 12px 7px 32px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--border);
  background: #FFFFFF;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  width: 160px;
  outline: none;
  transition: border-color 0.2s, width 0.3s;
}

.search-box__input::placeholder { color: var(--text-soft); }
.search-box__input:focus {
  border-color: var(--amber);
  width: 200px;
}

/* Floating filter button (FAB) — mobile only */
.filter-fab {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 16px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--amber);
  color: #FFFFFF;
  font-size: 1.1rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(245,160,32,0.4), 0 2px 4px rgba(0,0,0,0.1);
  z-index: 500;
  transition: transform 0.2s, box-shadow 0.2s;
}

.filter-fab:active {
  transform: scale(0.92);
}

.filter-fab.active {
  background: var(--text);
}

.filter-fab__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #E74C3C;
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  pointer-events: none;
}

/* Secondary filter panel */
.filterbar__secondary {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filterbar__secondary-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filterbar__secondary-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* =============================================
   GRID — Card Layout
   ============================================= */

.grid-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem;
}

/* Missing summary bar */
.missing-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  margin-bottom: 1rem;
  border-radius: var(--r-card);
  background: rgba(76,175,125,0.1);
  border: 1.5px solid rgba(76,175,125,0.3);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  flex-wrap: wrap;
}

.missing-bar.hidden { display: none; }

.missing-bar__cta {
  padding: 4px 12px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--green);
  background: var(--green);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.missing-bar__cta:hover {
  background: #3a9e6a;
  border-color: #3a9e6a;
}

.magnet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

/* =============================================
   MAGNET CARDS — Sticker Style
   ============================================= */

.magnet-card {
  position: relative;
  background: #FFFFFF;
  border: 2px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  contain: layout style paint;
}

.magnet-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.magnet-card.flipping {
  transition: none !important;
}

.magnet-card.flip-play {
  transition: transform 0.5s cubic-bezier(0.22,1,0.36,1) !important;
}

/* Owned state */
.magnet-card[data-status="owned"] {
  border-color: var(--amber);
  box-shadow: 0 4px 12px rgba(245,160,32,0.15);
}

.magnet-card[data-status="owned"]:hover {
  box-shadow: 0 8px 24px rgba(245,160,32,0.2);
}

/* Missing state */
.magnet-card[data-status="none"] {
  background: var(--missing-bg);
  border-color: var(--border);
}

.magnet-card__img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--surface-hi);
}

.magnet-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.3s;
}

/* Missing cards — desaturated with ? overlay */
.magnet-card[data-status="none"] .magnet-card__img {
  filter: grayscale(0.85) opacity(0.5);
}
/* MOTM card stays vibrant even when not owned */
.magnet-card--motm[data-status="none"] .magnet-card__img {
  filter: none;
}

.magnet-card[data-status="none"] .magnet-card__img-wrap::after {
  content: '?';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-size: 3rem;
  color: var(--border);
  pointer-events: none;
}
/* No ? overlay on MOTM card */
.magnet-card--motm[data-status="none"] .magnet-card__img-wrap::after {
  display: none;
}

/* No image placeholder */
.magnet-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--border);
  background: var(--surface-hi);
}

.magnet-card__placeholder .ph-icon {
  font-size: 2rem;
  opacity: 0.3;
}

/* -- Shine sweep on hover (owned) -- */

.magnet-card__shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
}

.magnet-card__shine::after {
  content: '';
  position: absolute;
  top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.magnet-card:hover .magnet-card__shine::after {
  left: 160%;
}

.magnet-card[data-status="none"] .magnet-card__shine::after { display: none; }

.magnet-card__body {
  padding: 10px 12px 12px;
}

.magnet-card__name {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

.magnet-card__animal {
  font-size: 0.75rem;
  color: var(--text-soft);
  margin-top: 2px;
}

.card__buy-btn {
  display: inline-block;
  margin-top: 4px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--green);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
}

.card__buy-btn:hover {
  background: #3a9e6a;
  transform: scale(1.05);
}

.magnet-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
}

.magnet-card__year {
  font-size: 0.7rem;
  color: var(--text-soft);
  font-weight: 600;
}

.magnet-card__tag {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--surface-hi);
  color: var(--text-soft);
  font-weight: 600;
}

/* -- Card info (legacy compat) -- */

.magnet-card__info {
  padding: 0.5rem 0.6rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Special star */
.magnet-card__star {
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--amber);
  font-size: 1rem;
  text-shadow: 0 1px 4px rgba(245,160,32,0.3);
  z-index: 2;
}

/* Shop available icon */
.magnet-card__shop-icon {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 0.85rem;
  opacity: 0.7;
  z-index: 2;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

/* Wishlist heart */
.card__wishlist-heart {
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--pink);
  font-size: 1.1rem;
  text-shadow: 0 1px 4px rgba(247,131,172,0.3);
  z-index: 2;
}

/* Extras badge on card */
.magnet-card__extras {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--amber);
  color: #FFFFFF;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  z-index: 2;
}

/* -- Extras badge (legacy) -- */

.magnet-card__extras-badge {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--amber);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2em 0.5em;
  border-radius: var(--r-pill);
  z-index: 6;
  display: none;
}

.magnet-card[data-extras]:not([data-extras="0"]) .magnet-card__extras-badge { display: block; }
.magnet-card[data-extras]:not([data-extras="0"]) .magnet-card__badges { top: 26px; }

/* Special cards — animated orange-blue-gold gradient border */
.magnet-card--special {
  background: #FFFFFF;
  border: 2px solid transparent;
  background-clip: padding-box;
  position: relative;
}

.magnet-card--special::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--r-card) + 2px);
  background: linear-gradient(135deg, #F5A020, #F783AC, #5BC8E8, #9B8FD8);
  background-size: 300% 300%;
  animation: specialBorder 3s ease infinite;
  z-index: -1;
}

@keyframes specialBorder {
  0% { background-position: 0% 50%; }
  33% { background-position: 50% 100%; }
  66% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Legacy special card support */
.magnet-card[data-special="true"] {
  overflow: visible;
  border: none;
}

.magnet-card[data-special="true"]::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--r-card) + 2px);
  background: linear-gradient(135deg, #F5A020, #F783AC, #5BC8E8, #9B8FD8);
  background-size: 300% 300%;
  animation: specialBorder 3s ease infinite;
  z-index: -1;
}

.magnet-card[data-special="true"]::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: calc(var(--r-card) + 4px);
  background: linear-gradient(135deg, rgba(245,160,32,0.15), rgba(247,131,172,0.15), rgba(91,200,232,0.15), rgba(155,143,216,0.15));
  background-size: 300% 300%;
  animation: specialBorder 3s ease infinite, specialGlow 2s ease-in-out infinite;
  z-index: -2;
  pointer-events: none;
}

@keyframes specialGlow {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

.magnet-card[data-special="true"]:hover::before {
  animation-duration: 1s;
}

/* Permanent subtle sheen on special cards */
.magnet-card[data-special="true"] .magnet-card__shimmer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  overflow: hidden;
  border-radius: var(--r-card) var(--r-card) 0 0;
}

.magnet-card[data-special="true"] .magnet-card__shimmer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    30deg,
    transparent 30%,
    rgba(255,255,255,0.06) 45%,
    rgba(255,255,255,0.12) 50%,
    rgba(255,255,255,0.06) 55%,
    transparent 70%
  );
  transition: left 0.6s ease;
}

.magnet-card[data-special="true"]:hover .magnet-card__shimmer::after {
  left: 150%;
}

/* Special badge — pennant at top-center */
.magnet-card__special-badge {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8;
  background: var(--amber);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.3em 0.7em;
  border-radius: var(--r-pill);
  box-shadow: 0 2px 8px rgba(245,160,32,0.3);
  white-space: nowrap;
  display: none;
}

.magnet-card[data-special="true"] .magnet-card__special-badge {
  display: block;
}

.magnet-card__special-badge .star {
  display: inline-block;
  animation: starPulse 1.5s ease-in-out infinite;
}

.magnet-card__special-badge .star:last-child {
  animation-delay: 0.75s;
}

@keyframes starPulse {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

/* -- Card badges -- */

.magnet-card__badges {
  position: absolute;
  top: 8px; left: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 5;
}

.badge {
  display: inline-block;
  padding: 0.3em 0.65em;
  border-radius: var(--r-pill);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.badge--motm { background: var(--amber); color: #FFFFFF; }
.badge--new { background: var(--green); color: #FFFFFF; }
.badge--reedition { background: var(--purple); color: #FFFFFF; }
.badge--dispo {
  background: var(--green);
  color: #FFFFFF;
  animation: dispoPulse 2.5s ease-in-out infinite;
}
@keyframes dispoPulse {
  0%, 100% { box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
  50% { box-shadow: 0 1px 8px var(--green-glow), 0 0 0 3px var(--green-glow); }
}

/* -- Status indicator (top-right) -- */

.magnet-card__status-indicator {
  position: absolute;
  top: 6px; right: 6px;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem; font-weight: 700;
  color: #FFFFFF;
  z-index: 5;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.3s, transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

.magnet-card[data-status="owned"] .magnet-card__status-indicator {
  opacity: 1; transform: scale(1); background: var(--amber);
}

/* -- Hover action tray -- */

.magnet-card__actions {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(255,255,255,0.95) 30%);
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  padding: 2rem 0.5rem 0.5rem;
  z-index: 10;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}

.magnet-card:hover .magnet-card__actions {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.action-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: #FFFFFF;
  color: var(--text-soft);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.action-btn:hover {
  border-color: var(--amber);
  background: var(--surface-hi);
  transform: scale(1.1);
}

.action-btn.active--owned { border-color: var(--amber); color: var(--amber); background: rgba(245,160,32,0.1); }

/* Entrance animation */
.magnet-card.entrance {
  animation: cardEntrance 0.4s cubic-bezier(0.22,1,0.36,1) both;
  animation-delay: calc(var(--i) * 50ms);
}

@keyframes cardEntrance {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Magnet du Mois in grid */
.magnet-card--motm {
  position: relative;
  overflow: visible;
}

.magnet-card--motm .magnet-card__img-wrap {
  box-shadow: 0 0 24px rgba(245,160,32,0.2);
  animation: motmGlow 3s ease-in-out infinite;
}

@keyframes motmGlow {
  0%, 100% { box-shadow: 0 0 16px rgba(245,160,32,0.15); }
  50% { box-shadow: 0 0 32px rgba(245,160,32,0.3); }
}

/* Hide old crown and floating label — replaced by ribbon */
.magnet-card__crown,
.magnet-card__motm-label {
  display: none !important;
}

/* Hide stacked badge pills on MOTM card — ribbon handles it */
.magnet-card--motm .magnet-card__badges {
  display: none;
}

/* MOTM Ribbon — bottom of image */
.magnet-card__motm-ribbon {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--amber), #F7B731);
  color: #FFFFFF;
  text-align: center;
  padding: 5px 4px 4px;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.magnet-card__motm-ribbon__title {
  font-family: var(--font-title);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
}

.magnet-card__motm-ribbon__free {
  font-family: var(--font-body);
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.92;
  line-height: 1.2;
}

/* Acquire animation */
@keyframes acquireGlow {
  0% { box-shadow: 0 0 0 0 rgba(245,160,32,0.4); }
  50% { box-shadow: 0 0 20px 4px rgba(245,160,32,0.3); }
  100% { box-shadow: 0 4px 12px rgba(245,160,32,0.15); }
}

.magnet-card.acquire-animate {
  animation: acquireGlow 0.6s ease-out;
}

.magnet-card.acquiring {
  animation: acquireGlow 0.6s ease-out;
  z-index: 50;
}

.acquire-flash {
  position: absolute; inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.5), rgba(245,160,32,0.1), transparent 70%);
  z-index: 11; pointer-events: none;
  border-radius: var(--r-card);
  animation: flashFade 1s ease-out forwards;
}

@keyframes flashFade {
  0% { opacity: 0; }
  25% { opacity: 1; }
  100% { opacity: 0; }
}

.sparkle {
  position: absolute;
  pointer-events: none;
  z-index: 12;
  animation: sparkleUp 1.4s ease-out forwards;
}

@keyframes sparkleUp {
  0% { transform: translate(-50%,-50%) scale(0); opacity: 0; }
  20% { transform: translate(-50%,-50%) scale(1.2); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) - 30px)) scale(0); opacity: 0; }
}

@keyframes checkPop {
  0% { transform: scale(0.5); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.action-btn.just-activated {
  animation: checkPop 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

/* Grid nudge */
.grid-nudge {
  text-align: center;
  color: var(--text-soft);
  font-size: 0.85rem;
  padding: 12px 0 4px;
  font-weight: 500;
}

.grid-nudge.hidden { display: none; }

/* =============================================
   MODAL — White Card, Rounded
   ============================================= */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,43,60,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 5000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-overlay.active .modal {
  animation: modalSpring 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes modalSpring {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.modal {
  background: #0F2234;
  border-radius: 24px;
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 0 0 1px rgba(91,200,232,0.08);
  position: relative;
}

/* Improvement 3: Owned/missing ambient glow */
.modal[data-status="owned"] {
  box-shadow: 0 24px 64px rgba(0,0,0,0.5), 0 0 40px rgba(245,160,32,0.1);
  border: 1px solid rgba(245,160,32,0.15);
}
.modal[data-status="none"] {
  border: 1px solid rgba(255,255,255,0.04);
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(13,27,42,0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  z-index: 10;
}

.modal__close:hover {
  background: rgba(13,27,42,0.7);
  color: #FFFFFF;
}

.modal__img-wrap,
.modal__image-wrap {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 24px 24px 0 0;
  background: #0F2234;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.modal__img,
.modal__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal__img-wrap::after,
.modal__image-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, #0F2234);
  pointer-events: none;
  z-index: 1;
}

.modal__image-wrap .magnet-card__badges { top: 14px; left: 14px; z-index: 3; }
.modal__image-wrap .badge { font-size: 0.7rem; padding: 0.25em 0.75em; background: linear-gradient(135deg, var(--amber), #F7B731); color: #FFFFFF; border: none; box-shadow: 0 2px 8px rgba(245,160,32,0.3); }

.modal__body {
  padding: 24px 28px 32px;
  margin-top: -40px;
  position: relative;
  z-index: 2;
}

.modal__name {
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: #FFFFFF;
  line-height: 1.1;
}

.modal__animal {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}

.modal__pills,
.modal__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.modal__pill {
  padding: 4px 12px;
  border-radius: var(--r-pill);
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid;
}

.modal__pill--year {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
  border-color: rgba(255,255,255,0.1);
}

.modal__pill--tag {
  background: rgba(91,200,232,0.1);
  color: var(--blue);
  border-color: rgba(91,200,232,0.15);
}

.modal__pill--status {
  background: rgba(245,160,32,0.1);
  color: var(--amber);
  border-color: rgba(245,160,32,0.2);
}

.modal__pill--special {
  background: linear-gradient(135deg, rgba(245,160,32,0.15), rgba(247,183,49,0.1));
  color: var(--amber);
  border-color: rgba(245,160,32,0.25);
}

.modal__desc {
  margin-top: 12px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.5;
}

/* MOTM modal section */
.modal__motm-section {
  margin-top: 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(245,160,32,0.15), rgba(245,160,32,0.08));
  border: 1.5px solid rgba(245,160,32,0.3);
  border-radius: 14px;
  text-align: center;
}

.modal__motm-explainer {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  margin: 0 0 6px;
  line-height: 1.4;
}

.modal__motm-urgency {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--amber);
  margin: 0 0 10px;
}

.modal__motm-cta {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--amber), #F7B731);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(245,160,32,0.25);
}

.modal__motm-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(245,160,32,0.35);
}

/* Modal controls */
.modal__controls {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* J'ai + Commande row */
.modal__status-row {
  display: flex;
  gap: 8px;
}

.modal-toggle {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--r-pill);
  border: 1.5px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.6);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-toggle:hover { border-color: var(--amber); }

.modal-toggle .toggle-icon { font-size: 1.1rem; transition: transform 0.3s; }
.modal-toggle .toggle-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: transparent;
  transition: all 0.25s;
}

.modal-toggle.on .toggle-check { opacity: 1; transform: scale(1); }

.modal-toggle.on .toggle-check {
  animation: checkPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-toggle.on--owned {
  border-color: var(--amber);
  background: rgba(245,160,32,0.08);
  color: var(--amber);
}
.modal-toggle.on--owned .toggle-check { background: var(--amber); color: #FFFFFF; }
.modal-toggle.on--owned .toggle-check { display: none; }

/* Wishlist button in modal */
.modal__wish-btn {
  padding: 8px 16px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--pink);
  background: transparent;
  color: var(--pink);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.modal__wish-btn.active {
  background: var(--pink);
  color: #FFFFFF;
}

.modal__wish-btn:hover {
  background: rgba(247,131,172,0.15);
}

/* Shop link in modal */
.modal__shop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.modal__shop-btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: var(--r-pill);
  background: var(--green);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.modal__shop-btn:hover {
  background: #3D9A6A;
  transform: translateY(-1px);
}

.modal__shop-disclosure {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.4);
}

/* Extras stepper */
.modal__extras {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
}

.modal__extras-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
}

.modal__extras-stepper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.extras-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.extras-btn:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: rgba(245,160,32,0.1);
}

.extras-btn:active {
  transform: scale(0.9);
}

.extras-count {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--amber);
  min-width: 28px;
  text-align: center;
}

.modal__extras-hint {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  margin-left: auto;
}

/* Legal modal — keep white */
.modal--legal {
  background: #FFFFFF;
  box-shadow: 0 24px 64px rgba(0,0,0,0.12);
  border: none;
}
.modal--legal .modal__close {
  background: var(--surface-hi);
  color: var(--text-soft);
  border: none;
  backdrop-filter: none;
}

/* Auth modal */
.modal--auth {
  max-width: 420px;
  padding: 32px;
  background: #FFFFFF;
  box-shadow: 0 24px 64px rgba(0,0,0,0.12);
  border: none;
}

.auth__title {
  font-family: var(--font-title);
  font-size: 1.6rem;
  text-align: center;
  margin-bottom: 24px;
  color: var(--text);
}

.auth__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-soft);
}

.auth__input {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: #FFFFFF;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  outline: none;
  transition: border-color 0.2s;
}

.auth__input:focus {
  border-color: var(--amber);
}

.auth__hint {
  font-size: 0.75rem;
  color: var(--text-soft);
}

.auth__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-soft);
  cursor: pointer;
}

.auth__checkbox input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--amber);
}

.auth__error {
  color: var(--red);
  font-size: 0.85rem;
  min-height: 1.2em;
}

.auth__submit {
  width: 100%;
  padding: 15px;
  font-size: 1.05rem;
  margin-top: 8px;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 20px var(--amber-glow);
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.auth__submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(245,160,32,0.4);
}

.auth__switch {
  background: none;
  border: none;
  color: var(--amber);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  padding: 4px;
}

.auth__switch:hover {
  text-decoration: underline;
}

.auth__sent-icon {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 16px;
}

.auth__sent-msg {
  text-align: center;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* =============================================
   FOOTER — Light Theme
   ============================================= */

.footer {
  background: var(--bg);
  border-top: 1px solid rgba(255,255,255,0.3);
  padding: 1.5rem 1.5rem 1rem;
}

.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  text-align: center;
}

.footer__links {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.footer__link {
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s;
}

.footer__link:hover {
  opacity: 0.7;
  text-decoration: underline;
}

.footer__sep {
  color: rgba(255,255,255,0.4);
  font-size: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.9rem;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}

.btn--export { background: #FFFFFF; color: var(--bg); }
.btn--export:hover { box-shadow: 0 2px 12px rgba(76,175,125,0.2); }
.btn--import { background: rgba(255,255,255,0.15); color: #FFFFFF; border: 1px solid rgba(255,255,255,0.3); }
.btn--import:hover { background: rgba(255,255,255,0.25); color: #FFFFFF; }
.btn--suggest { background: #FFFFFF; color: var(--bg); font-weight: 700; margin-top: 0.4rem; }


.footer__credits { text-align: center; font-size: 0.65rem; color: rgba(255,255,255,0.4); margin: 0; line-height: 1.8; }
.footer__legal-link { color: rgba(255,255,255,0.35); text-decoration: underline; text-underline-offset: 2px; }
.footer__legal-link:hover { color: rgba(255,255,255,0.6); }
.footer__version { font-size: 0.55rem; color: rgba(255,255,255,0.2); margin-left: 0.5rem; }

/* =============================================
   VIEW TOGGLE — Light Theme
   ============================================= */

.filterbar__row1-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.view-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--border);
  background: #FFFFFF;
  cursor: pointer;
  transition: border-color 0.2s;
}

.view-toggle:hover { border-color: var(--amber); }

.view-toggle__icon {
  font-size: 1rem;
  color: var(--text-soft);
  transition: color 0.2s;
  line-height: 1;
}

.view-toggle__icon.active {
  color: var(--amber);
}

/* =============================================
   TABLE VIEW — Light Theme
   ============================================= */

.magnet-table-wrap {
  overflow-x: auto;
  border-radius: var(--r-card);
  border: 1px solid var(--border);
  background: #FFFFFF;
}

.magnet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.magnet-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.magnet-table__th {
  background: var(--surface-hi);
  color: var(--text-soft);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.magnet-table__th:first-child { border-radius: var(--r-card) 0 0 0; width: 60px; }
.magnet-table__th:last-child { border-radius: 0 var(--r-card) 0 0; }

.magnet-table__th--sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}

.magnet-table__th--sortable:hover { color: var(--amber); }

.magnet-table__th--sortable::after {
  content: '';
  display: inline;
  margin-left: 4px;
  opacity: 0.3;
}

.magnet-table__th--sortable.sort-asc::after { content: ' \2191'; opacity: 0.8; color: var(--amber); }
.magnet-table__th--sortable.sort-desc::after { content: ' \2193'; opacity: 0.8; color: var(--amber); }

.magnet-table__row {
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border);
}

.magnet-table__row:hover { background: var(--surface-hi); }
.magnet-table__row:nth-child(even) { background: rgba(91,200,232,0.03); }
.magnet-table__row:nth-child(even):hover { background: var(--surface-hi); }

.magnet-table__row td {
  padding: 8px 12px;
  vertical-align: middle;
}

.magnet-table__thumb-cell {
  width: 48px;
}

.magnet-table__thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  border: 1.5px solid var(--border);
}

.magnet-table__thumb-placeholder {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-hi);
  border-radius: 10px;
  font-size: 1rem;
  color: var(--border);
}

/* Hover preview */
.magnet-table__preview {
  position: fixed;
  width: 180px;
  height: 270px;
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  z-index: 9999;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  border: 2px solid var(--border);
  background: #FFFFFF;
}

.magnet-table__preview.visible {
  opacity: 1;
  transform: scale(1);
}

.magnet-table__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.magnet-table__name {
  font-weight: 700;
  color: var(--text);
}

.magnet-table__row[data-status="none"] .magnet-table__name {
  color: var(--text-soft);
}

.magnet-table__row[data-status="none"] .magnet-table__thumb {
  filter: grayscale(0.8) opacity(0.5);
}

.magnet-table__status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 700;
}

.magnet-table__status-pill--owned { background: rgba(245,160,32,0.12); color: var(--amber); }
.magnet-table__status-pill--none { background: var(--surface-hi); color: var(--text-soft); }

.magnet-table__extras-cell { color: var(--amber); font-weight: 700; }

.magnet-table__stepper {
  display: flex;
  align-items: center;
  gap: 4px;
}

.magnet-table__step-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: #FFFFFF;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.magnet-table__step-btn:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.magnet-table__step-btn:active { transform: scale(0.85); }

.magnet-table__step-count {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--amber);
  min-width: 18px;
  text-align: center;
}

.magnet-table__desc { color: var(--text-soft); font-size: 0.72rem; max-width: 200px; }

.magnet-table__tag-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--surface-hi);
  color: var(--text-soft);
}

.magnet-table__special-star { color: var(--amber); margin-left: 0.25rem; }

/* Special row — orange-to-blue gradient border */
.magnet-table__row--special {
  background: linear-gradient(90deg,
    rgba(245,160,32,0.06) 0%,
    rgba(91,200,232,0.06) 50%,
    rgba(245,160,32,0.06) 100%
  );
  background-size: 200% 100%;
  animation: specialRowShift 4s ease infinite;
}

.magnet-table__row--special:hover {
  background: linear-gradient(90deg,
    rgba(245,160,32,0.1) 0%,
    rgba(91,200,232,0.1) 50%,
    rgba(245,160,32,0.1) 100%
  );
  background-size: 200% 100%;
  animation: specialRowShift 4s ease infinite;
}

@keyframes specialRowShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Special row missing — faded */
.magnet-table__row--special[data-status="none"] {
  opacity: 0.45;
}

@media (max-width: 480px) {
  .magnet-table__desc { display: none; }
}

/* =============================================
   TOAST + SEDUCTION — Light Theme
   ============================================= */

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #FFFFFF;
  color: var(--text);
  padding: 12px 24px;
  border-radius: var(--r-card);
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 2000;
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Seduction Flow */
.seduction-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #FFFFFF;
  color: var(--text);
  padding: 14px 20px;
  border-radius: var(--r-card);
  border: 2px solid var(--amber);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.4s, transform 0.4s;
  z-index: 1500;
  max-width: 90vw;
}

.seduction-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.seduction-toast__cta {
  white-space: nowrap;
  font-size: 0.8rem;
  padding: 7px 14px;
}

.seduction-toast__dismiss {
  background: none;
  border: none;
  color: var(--text-soft);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
}

.seduction-banner {
  position: fixed;
  top: 130px;
  left: 0;
  right: 0;
  background: #FFFFFF;
  border-bottom: 2px solid var(--amber);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--amber);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.4s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.seduction-banner.visible {
  opacity: 1;
}

/* =============================================
   WAVE DIVIDERS
   ============================================= */

.wave-divider {
  display: block;
  width: 100%;
  height: 24px;
  position: relative;
  overflow: hidden;
  line-height: 0;
}

.wave-divider--white-to-blue {
  background: #FFFFFF;
}

.wave-divider--white-to-blue svg {
  fill: var(--bg);
  display: block;
  width: 100%;
  height: 100%;
}

.wave-divider--blue-to-white {
  background: var(--bg);
}

.wave-divider--blue-to-white svg {
  fill: #FFFFFF;
  display: block;
  width: 100%;
  height: 100%;
}

/* =============================================
   ONBOARDING FLOW — Game-like 4 Steps
   ============================================= */

.onboarding-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,43,60,0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 6000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.onboarding-overlay.active {
  display: flex;
}

.onboarding {
  background: linear-gradient(145deg, #1B2A3D 0%, #0D1B2A 100%);
  border-radius: 24px;
  max-width: 560px;
  width: 100%;
  padding: 2rem 2rem 1.5rem;
  box-shadow: 0 24px 64px rgba(0,0,0,0.15);
  animation: modalSpring 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  text-align: center;
  color: #FFFFFF;
}

.onboarding__step-indicator {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}

.onboarding__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: background 0.3s, transform 0.3s;
}

.onboarding__dot.active {
  background: var(--amber);
  transform: scale(1.2);
}

.onboarding__dot.done {
  background: var(--green);
}

.onboarding__title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.onboarding__subtitle {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 24px;
}

.onboarding__options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.onboarding__emoji-btn {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  border: 2px solid rgba(255,255,255,0.15);
  background: transparent;
  color: #FFF;
  font-size: 1.8rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.onboarding__emoji-btn:hover {
  border-color: var(--amber);
  transform: scale(1.08);
}

.onboarding__emoji-btn.selected {
  border-color: var(--amber);
  background: rgba(245,160,32,0.1);
  box-shadow: 0 0 0 3px rgba(245,160,32,0.15);
}

.onboarding__radio-btn {
  padding: 12px 20px;
  border-radius: var(--r-pill);
  border: 2px solid rgba(255,255,255,0.15);
  background: transparent;
  color: rgba(255,255,255,0.8);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.onboarding__radio-btn:hover {
  border-color: var(--amber);
}

.onboarding__radio-btn.selected {
  border-color: var(--amber);
  background: var(--amber);
  color: #FFFFFF;
}

.onboarding__nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.onboarding__skip {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 10px 20px;
}

.onboarding__skip:hover {
  color: rgba(255,255,255,0.8);
}

.onboarding__next {
  padding: 10px 28px;
  border-radius: var(--r-pill);
  border: none;
  background: var(--amber);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.onboarding__next:hover {
  background: var(--orange-hover);
  transform: translateY(-1px);
}

.onboarding__next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Hero image for intro screen */
.onboarding__hero {
  margin-bottom: 1.5rem;
}
.onboarding__hero-img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  border-radius: 50%;
  border: 3px solid var(--amber);
  box-shadow: 0 0 30px rgba(245,160,32,0.3);
  animation: heroGlow 2s ease-in-out infinite alternate;
}
@keyframes heroGlow {
  from { box-shadow: 0 0 20px rgba(245,160,32,0.2); }
  to { box-shadow: 0 0 40px rgba(245,160,32,0.4); }
}

/* Fact pills */
.onboarding__facts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 1.5rem;
}
.onboarding__fact {
  padding: 10px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--r-pill);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
}

/* Larger CTA button */
.onboarding__next--large {
  padding: 14px 36px;
  font-size: 1.05rem;
}

/* Stacked nav for CTA screen */
.onboarding__nav--stacked {
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* Title with margin-top (merged screen) */
.onboarding__title--mt {
  margin-top: 1.5rem;
}

/* Compact options for merged screen */
.onboarding__options--compact {
  gap: 6px;
  margin-bottom: 12px;
}

/* Progress bar preview */
.onboarding__progress-preview {
  margin: 1.5rem 0;
}
.onboarding__progress-bar {
  height: 8px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
}
.onboarding__progress-fill {
  height: 100%;
  background: var(--amber);
  border-radius: 4px;
  transition: width 1s ease;
  min-width: 2px;
}
.onboarding__progress-label {
  margin-top: 8px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* Header "how it works" link */
.header-how-link {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-family: var(--font-body);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.15s;
}
.header-how-link:hover {
  color: var(--amber);
}


/* Responsive onboarding */
@media (max-width: 480px) {
  .onboarding {
    padding: 1.5rem 1rem 1rem;
    border-radius: 16px;
  }
  .onboarding__hero-img {
    width: 100px;
    height: 100px;
  }
  .onboarding__title {
    font-size: 1.25rem;
  }
}

/* =============================================
   RESPONSIVE — Mobile Adjustments
   ============================================= */

@media (max-width: 768px) {
  .magnet-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
  }

  .filterbar__row1 {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .filterbar__secondary-top {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  /* Hide "How it works" in header */
  .header-how-link { display: none; }

  /* Hide view toggle on mobile — grid only */
  .view-toggle { display: none; }

  /* Hide secondary tabs (Trades, Wishlist) — available in filter panel */
  .status-tab--secondary { display: none; }

  /* Compact filter bar */
  .filterbar { padding: 8px 0; }
  .filterbar__inner { padding: 0 12px; gap: 8px; }

  /* Status tabs: no scroll, fit on one line */
  .status-tabs {
    flex-wrap: nowrap;
    gap: 5px;
  }
  .status-tab {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  /* Show floating filter button */
  .filter-fab {
    display: flex;
    bottom: env(safe-area-inset-bottom, 24px);
  }

  /* Collapsible secondary filter panel */
  .filterbar__secondary {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.22s ease;
  }
  .filterbar__secondary.open {
    max-height: 280px;
    opacity: 1;
  }

  .filterbar__secondary-top {
    flex-wrap: wrap;
    gap: 8px;
  }
  .search-box { flex: 1; min-width: 120px; }
  .search-box__input { width: 100%; }
  .search-box__input:focus { width: 100%; }

  /* Species chips horizontal scroll */
  .species-chips {
    overflow-x: auto;
    scrollbar-width: none;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .species-chips::-webkit-scrollbar { display: none; }
  .species-chip {
    flex-shrink: 0;
    min-width: 44px;
    min-height: 44px;
    font-size: 1.2rem;
  }

  /* 3-column grid on mobile */
  .magnet-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px;
  }

  /* MOTM banner bigger touch targets */
  .motm-banner__voir { padding: 8px 14px; font-size: 0.75rem; }
  .motm-banner__close { min-width: 44px; min-height: 44px; font-size: 1.2rem; }

  /* Modal as bottom sheet */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal {
    max-height: 95vh;
    border-radius: 20px 20px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 16px);
  }
  .modal::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
    margin: 10px auto 0;
    position: sticky;
    top: 0;
    z-index: 11;
  }
  .modal__close {
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
  }
  .modal__img-wrap,
  .modal__image-wrap {
    aspect-ratio: 1/1;
  }
  .modal-toggle {
    padding: 12px 14px;
    background: rgba(245,160,32,0.12);
    border-color: var(--amber);
    color: var(--amber);
  }
  .extras-btn {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
  }

  /* Footer stacked on mobile */
  .footer__links {
    flex-direction: column;
    gap: 4px;
  }
  .footer__link {
    padding: 8px 0;
    font-size: 0.85rem;
  }
  .footer__sep { display: none; }
  .footer {
    padding-bottom: env(safe-area-inset-bottom, 16px);
  }

  /* Safe area insets */
  .site-header {
    padding-top: env(safe-area-inset-top, 0px);
  }
}

@media (max-width: 480px) {
  .magnet-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .status-tab {
    padding: 6px 10px;
    font-size: 0.7rem;
  }

  /* P2-14: Onboarding animal picker bigger */
  .onboarding__animal-btn {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
  }
}

@media (min-width: 640px) {
  .footer__inner { grid-template-columns: repeat(3, 1fr); }
}

/* Utilities */
.hidden { display: none !important; }
