:root {
  --emerald-900: #051d17;
  --emerald-800: #0a3429;
  --emerald-700: #0f4b3c;
  --emerald-600: #1b6a4a;
  --emerald-500: #2ab977;
  --emerald-400: #8fe6a9;
  --gold-500: #f4c95d;
  --gold-700: #b98a22;
  --ink-900: #0d1114;
  --ink-800: #181d1f;
  --slate-50: #edf7ee;
  --slate-200: #dfe8df;
  --slate-400: #c5d5c9;
  --danger: #d95757;
  --danger-dark: #8f2d2d;
  --page-bg: #e7e7e2;
  --page-bg-2: #f5f4f0;
  --panel: rgba(18, 58, 47, 0.9);
  --panel-soft: rgba(18, 59, 46, 0.72);
}

* {
  box-sizing: border-box;
}

/* Classes com `display` explícito (inline-flex etc.) venceriam o atributo
   `hidden` do UA — regra única para esconvar de verdade. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: var(--slate-50);
  background:
    linear-gradient(180deg, rgba(10, 19, 16, 0.58), rgba(10, 19, 16, 0.7)),
    url("../assets/site/background.jpg?v=20260913b") center/cover no-repeat fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(3px);
}

img {
  max-width: 100%;
  display: block;
}

button,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 3px solid var(--gold-500);
  background: rgba(245, 244, 239, 0.94);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.14);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 18px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Botão "⋮" do header: só mobile (abre as ações do header em painel suspenso). */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 2px solid rgba(14, 86, 72, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: #1b2e2a;
  cursor: pointer;
  flex: 0 0 auto;
}

body.menu-open .mobile-menu-btn {
  background: var(--emerald-700);
  border-color: var(--emerald-700);
  color: var(--gold-500);
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-badge {
  width: 54px;
  height: 54px;
  border-radius: 0;
  overflow: visible;
  border: none;
  background: transparent;
  display: grid;
  place-items: center;
  box-shadow: none;
  text-decoration: none;
  position: relative;
  transition: transform 0.2s ease;
}

.brand-badge:hover {
  transform: scale(1.08) rotate(-3deg);
}

.brand-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
  filter: drop-shadow(0 3px 10px rgba(18, 41, 31, 0.22));
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

h1 {
  margin: 0;
  font-size: clamp(1.1rem, 1.8vw, 2rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1b2e2a;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---- Dropdown de filtro (See all ▾) --------------------------------------- */
.filter-menu {
  position: relative;
  display: inline-flex;
}

.filter-menu-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 60;
  min-width: 220px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: 14px;
  background: rgba(12, 18, 18, 0.96);
  border: 1px solid rgba(244, 201, 93, 0.45);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.filter-menu:hover .filter-menu-list,
.filter-menu.open .filter-menu-list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.filter-option {
  border: none;
  border-radius: 10px;
  padding: 9px 12px;
  background: transparent;
  color: var(--slate-200);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.filter-option:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--slate-50);
}

.filter-option.selected {
  background: rgba(244, 201, 93, 0.16);
  color: var(--gold-500);
}

/* ---- Seletor de idioma (bandeiras) ---------------------------------------- */
/* Bandeira única de idioma: mostra o idioma atual; o clique vira a bandeira
   para o país do próximo idioma (BR→EUA = inglês; EUA→BR = PT-BR). */
.lang-flag {
  appearance: none;
  border: 2px solid transparent;
  border-radius: 999px;
  background: transparent;
  padding: 0;
  line-height: 0;
  cursor: pointer;
  opacity: 0.85;
  display: inline-flex;
  transition: opacity 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.lang-flag svg {
  border-radius: 999px;
  display: none;
}

/* Mostra só a bandeira do idioma ativo (data-locale vem do JS). */
.lang-flag[data-locale="pt"] .flag-svg-pt,
.lang-flag[data-locale="en"] .flag-svg-en {
  display: block;
}

.lang-flag:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.lang-flag:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 2px;
}

/* Botão de compartilhar: agora só o ícone de link. */
.share-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
}

.header-refresh-btn {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #16352d;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
  padding: 0;
  flex-shrink: 0;
}

.header-refresh-btn:hover {
  transform: rotate(90deg);
  filter: brightness(1.05);
}

.header-refresh-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
}

.pill-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  background: rgb(14 86 72);
  color: #f7faf7;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.pill-btn.active {
  background: linear-gradient(180deg, rgba(0,0,0,0.9), rgba(28, 29, 31, 0.96));
  box-shadow: 0 0 0 2px rgba(244, 201, 93, 0.2);
}

.share-btn {
  background: linear-gradient(180deg, var(--gold-500), var(--gold-700));
  color: #0b1010;
}

.share-btn:hover {
  filter: brightness(1.08);
}

.shared-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto 16px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.8rem;
  background: rgba(12, 18, 18, 0.92);
  border: 1px solid rgba(244, 201, 93, 0.45);
  color: var(--slate-50);
}

.shared-banner-clear {
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  background: rgba(255,255,255,0.1);
  color: var(--slate-50);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14);
  transition: background 0.15s ease;
}

.shared-banner-clear:hover {
  background: rgba(255,255,255,0.18);
}

.shared-banner-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shared-banner-import {
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  color: #0b1010;
  background: linear-gradient(180deg, var(--gold-500), var(--gold-700));
  transition: filter 0.15s ease;
}

.shared-banner-import:hover {
  filter: brightness(1.08);
}

.share-hint {
  margin: 0 0 14px;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--slate-400);
}

.share-hint strong {
  color: var(--slate-50);
}

.share-link-output {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.35);
  color: var(--emerald-400);
  font-family: "Consolas", "Menlo", monospace;
  font-size: 0.72rem;
  line-height: 1.5;
  padding: 10px 12px;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.share-link-output:focus {
  outline: 2px solid var(--gold-500);
  outline-offset: 1px;
}

.share-warn {
  margin: 8px 0 0;
  font-size: 0.72rem;
  color: var(--gold-500);
}

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

.progress-band {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 18px 18px;
}

/* Barra clicável: alterna % ↔ contagem de cartas (hover também espreita). */
#progressBar {
  cursor: pointer;
}

#progressBar:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 2px;
}

.progress-wrap {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 1100px;
  margin: 0 auto;
}

.progress-meta {
  display: none;
}

.progress-bar {
  position: relative;
  width: 100%;
  height: 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(244, 201, 93, 0.8);
  overflow: hidden;
  box-shadow: inset 0 0 12px rgba(0,0,0,0.2);
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--emerald-400) 0%, var(--emerald-500) 42%, var(--gold-500) 100%);
  transition: width 0.35s ease;
  box-shadow: inset 0 0 14px rgba(255,255,255,0.2);
}

.progress-percent-center {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  z-index: 2;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  color: #101010;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.1;
  white-space: nowrap;
}

.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 18px 60px;
}

.collection-panel {
  border-radius: 18px;
  background: rgba(255,255,255,0.12);
  padding: 18px 16px 22px;
}

.panel-header {
  margin-bottom: 18px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.section-tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #1a2a28;
  font-weight: 800;
}

.search-input {
  width: min(280px, 100%);
  padding: 9px 14px;
  border: 2px solid rgba(14, 86, 72, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  color: #0d1114;
  outline: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input:focus,
.search-input.has-text {
  opacity: 1;
  pointer-events: auto;
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 3px rgba(42, 185, 119, 0.18);
}

.search-input:focus {
  pointer-events: auto;
}

.search-input::placeholder {
  color: #7c8a85;
}

.panel-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Lupinha de busca: só em mobile (a busca sempre visível no desktop é o input). */
.search-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 2px solid rgba(14, 86, 72, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: #0d1114;
  cursor: pointer;
  flex: 0 0 auto;
}

@media (max-width: 760px) {
  /* Linha única: valor + lupa + barra de pesquisa, tudo no mesmo fôlego. */
  .panel-header {
    gap: 10px;
    flex-wrap: nowrap;
  }

  .panel-search {
    flex: 1 1 auto;
    min-width: 0;
  }

  .search-toggle {
    display: inline-flex;
  }

  .search-input {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    opacity: 1;
    pointer-events: auto;
  }

  body.search-open .search-input {
    opacity: 1;
    pointer-events: auto;
    border-color: var(--emerald-600);
    box-shadow: 0 0 0 3px rgba(42, 185, 119, 0.18);
  }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  width: 100%;
  aspect-ratio: 2.5 / 3.5;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: transparent;
  border: none;
  box-shadow: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  transform-style: preserve-3d;
  perspective: 1500px;
}

/* Foco pelo teclado (Tab): mesmo destaque do hover + contorno dourado */
.card:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 4px;
  border-radius: 14px;
}

.card:hover {
  /* Sem rotate aqui: o rodapé (# número) fica estático; só a imagem inclina. */
  transform: translateY(-7px) scale(1.012);
  box-shadow: 0 18px 28px rgba(0,0,0,0.18), 0 0 0 1px rgba(14, 76, 63, 0.2);
}

.card.uncollected {
  filter: saturate(0.8) contrast(0.92);
}

.card.revealed {
  background: transparent;
}

.card-visual {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  /* Moldura transparente: antes era uma borda preta grossa; agora só a leve
     linha interna (::after) e a sombra definem o card. O tilt do ponteiro
     vive AQUI — só a imagem inclina; o rodapé com o # fica estático. */
  border: 3px solid transparent;
  border-radius: 15px;
  background-clip: padding-box;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(0,0,0,0.15), inset 0 0 16px rgba(255,255,255,0.04);
  transform: perspective(1500px) rotateX(var(--card-rotate-x, 0deg)) rotateY(var(--card-rotate-y, 0deg));
  transition: transform 0.18s ease;
  transform-style: preserve-3d;
  background: linear-gradient(135deg, #171b1d, #2f3c46);
}

.card-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../assets/site/pokemon-tcg-card-back.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  filter: grayscale(0.15) brightness(0.9) contrast(1);
  transition: transform 0.24s ease, filter 0.24s ease;
}

.card-visual::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.18);
  pointer-events: none;
}

.card.revealed .card-visual::before {
  display: none;
}

.card-art {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 2.5 / 3.5;
}

.card-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  object-fit: cover;
  background: #0d1d1a;
  border-radius: 12px;
}

.card.uncollected .card-visual::before,
.card.uncollected .card-visual::after {
  opacity: 1;
}

.card-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  background: transparent;
  border-top: none;
  transform: none;
  padding-bottom: 2px;
}

.card-number {
  position: static;
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--gold-500);
  text-shadow: 1px 1px 0 rgba(0,0,0,0.75);
  transform: none;
}

.card-name {
  position: absolute;
  z-index: 2;
  left: 10px;
  right: 10px;
  bottom: 12px;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f7faf7;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.7);
}

.card.revealed .card-photo {
  display: block;
}

/* ---- Preços ----------------------------------------------------------------
   Badge no canto superior direito da carta coletada, pill no preview do modal e
   preço alinhado à direita em cada variante. Conteúdo vem de prices.min.json
   (TCGplayer USD / Cardmarket EUR) convertido para R$ no navegador. */
.card-price {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 2;
  /* .card usa preserve-3d e o tilt move a arte ~30px à frente do plano; sem
     translateZ o rotateY cobriria o badge. Avançar o badge garante que o preço
     fica sempre sobreposto à rotação do mouse. */
  transform: translateZ(64px);
  pointer-events: none;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: rgba(12, 18, 18, 0.88);
  border: 1px solid rgba(244, 201, 93, 0.5);
  color: var(--slate-50);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.variant-price {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--gold-500);
  white-space: nowrap;
  padding-left: 8px;
}

/* Variantes clicáveis: badge da grade, pill do preview e preço da linha da
   lista abrem a loja (TCGplayer/Cardmarket) em nova aba. */
.card-price-link {
  pointer-events: auto;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.card-price-link:hover,
.card-price-link:focus-visible {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 2px rgba(244, 201, 93, 0.35), 0 2px 6px rgba(0, 0, 0, 0.35);
  transform: translateZ(64px) translateY(-1px);
}

.price-pill {
  text-decoration: none;
}

a.price-pill {
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

a.price-pill:hover,
a.price-pill:focus-visible {
  border-color: var(--gold-500);
  background: rgba(244, 201, 93, 0.14);
}

.variant-price-link {
  cursor: pointer;
  border-bottom: 1px dashed rgba(244, 201, 93, 0.45);
}

.variant-price-link:hover,
.variant-price-link:focus-visible {
  color: var(--slate-50);
  border-bottom-color: var(--gold-500);
}

.summary-pill.price-pill {
  border-color: rgba(244, 201, 93, 0.65);
  color: var(--gold-500);
  font-weight: 800;
}

/* ---- Modo planejamento ------------------------------------------------------
   Botão "Plan" vive no header, à esquerda do Rayquaza. Rascunho não salva:
   nada toca o localStorage, a barra de progresso continua no checklist salvo,
   e as artes ficam translúcidas para deixar claro que a tela é provisória.
   Rascunhos desta sessão (nunca salvos) ganham borda tracejada. */
.plan-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(12, 18, 18, 0.55);
  color: #cfe0d6;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.plan-toggle:hover {
  background: rgba(12, 18, 18, 0.75);
  color: #f7faf7;
}

.plan-toggle.active {
  background: linear-gradient(180deg, var(--gold-500), var(--gold-700));
  color: #0b1010;
  box-shadow: 0 0 0 2px rgba(244, 201, 93, 0.35);
}

body.plan-mode .card.revealed .card-photo {
  opacity: 0.55;
}

body.plan-mode .card.revealed .card-visual {
  border-style: dashed;
  border-color: rgba(244, 201, 93, 0.85);
}

body.plan-mode .card.plan-draft .card-visual {
  border-color: rgba(244, 201, 93, 1);
  box-shadow: 0 0 0 2px rgba(244, 201, 93, 0.25), 0 8px 18px rgba(0,0,0,0.15);
}

body.plan-mode .card.revealed .card-art::after {
  opacity: 0 !important;
}

@media (max-width: 760px) {
  .progress-band {
    flex-direction: column;
    gap: 8px;
  }

  .plan-toggle {
    align-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.plan-mode .card.revealed .card-photo {
    transition: none;
  }
}

/* ---- Brilho holográfico (grade) -------------------------------------------
   Carta holo ganha um brilho que segue o ponteiro junto com o tilt; reverse
   é um sheen mais discreto. Os botões de raridade do modal alimentam a classe
   finish-holo/finish-reverse em `.card` e em `.preview-stage`. */
.card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.card.finish-holo .card-art::after,
.card.finish-reverse .card-art::after {
  background:
    radial-gradient(circle at var(--card-mx, 50%) var(--card-my, 50%),
      rgba(255, 255, 255, 0.55) 0%,
      rgba(255, 214, 120, 0.28) 22%,
      rgba(140, 255, 200, 0.22) 40%,
      transparent 65%);
  mix-blend-mode: color-dodge;
}

.card.finish-holo:hover .card-art::after,
.card.finish-holo:focus-visible .card-art::after {
  opacity: 0.9;
}

/* Na grade, o reverse fica apenas na moldura ao redor da arte (fora do
   quadrado do Pokémon): o brilho é recortado num anel via mask-composite. */
.card.finish-reverse .card-art::after {
  border: 16px solid transparent;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.card.finish-reverse:hover .card-art::after,
.card.finish-reverse:focus-visible .card-art::after {
  opacity: 0.5;
}

/* O mesmo brilho no preview grande do modal: sem ponteiro dedicado ali, um
   pulso lento de brilho indica a raridade escolhida. */
.preview-stage.finish-holo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  pointer-events: none;
  background: radial-gradient(circle at 50% 42%,
      rgba(255, 255, 255, 0.35) 0%,
      rgba(255, 214, 120, 0.16) 30%,
      rgba(140, 255, 200, 0.12) 50%,
      transparent 70%);
  mix-blend-mode: screen;
  opacity: 0.85;
  animation: holoPulse 3.2s ease-in-out infinite;
}

/* Reverse: o brilho fica APENAS fora do quadrado da arte — atrás da imagem
   (z-index) ele só aparece no fundo ao redor da carta, nunca por cima dela. */
.preview-stage.finish-reverse::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 12px;
  pointer-events: none;
  background: radial-gradient(circle at 50% 42%,
      rgba(255, 255, 255, 0.35) 0%,
      rgba(255, 214, 120, 0.16) 30%,
      rgba(140, 255, 200, 0.12) 50%,
      transparent 70%);
  mix-blend-mode: screen;
  opacity: 0.45;
  animation: holoPulse 3.2s ease-in-out infinite;
}

.preview-stage .preview-image {
  position: relative;
  z-index: 1;
}

@keyframes holoPulse {
  0%, 100% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
}

@media (prefers-reduced-motion: reduce) {
  .preview-stage.finish-holo::after,
  .preview-stage.finish-reverse::after {
    animation: none;
  }
}

.card.uncollected .card-photo {
  display: none;
}

.card.revealed .card-name,
.card.revealed .card-status {
  display: none;
}

.card.is-flipping .card-visual {
  animation: flipCard 0.8s ease;
}

@keyframes flipCard {
  0% { transform: perspective(1200px) rotateY(0deg) rotateX(0deg); }
  35% { transform: perspective(1200px) rotateY(110deg) scale(1.03); }
  100% { transform: perspective(1200px) rotateY(0deg) rotateX(0deg); }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.7);
  padding: 16px;
  overflow-y: auto;
}

.modal-backdrop.hidden {
  display: none;
}

.modal {
  width: min(94vw, 760px);
  /* Até quase a tela toda: o teto antigo (820px) cortava os botões ✓ ↩ ✕
     depois que entraram raridade + qualidade */
  max-height: 96vh;
  max-height: 96dvh;
  display: flex;
  flex-direction: column;
  /* Tela baixa demais para tudo: rola o modal em vez de cortar a lista de
     variantes (que não encolhe — ver .variant-list) */
  overflow-x: hidden;
  overflow-y: auto;
  padding: 22px 18px 18px;
  border-radius: 22px;
  border: 3px solid var(--gold-500);
  background: linear-gradient(180deg, rgba(18, 57, 46, 0.98), rgba(10, 29, 22, 0.96));
  box-shadow: 0 20px 40px rgba(0,0,0,0.28);
}

.modal:focus {
  outline: none;
}

.modal h2 {
  margin: 0 0 10px;
  text-align: center;
  font-size: 1.12rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-500);
}

.modal-summary {
  display: block;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

/* Raridade | arte | qualidade (as setas ficam na linha das bandeiras). No
   celular as colunas descem para baixo da arte, lado a lado. */
.preview-shell {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) 116px;
  grid-template-areas: "left stage right";
  align-items: center;
  gap: 12px;
}

.preview-shell .preview-stage { grid-area: stage; }
.option-column-left { grid-area: left; }
.option-column-right { grid-area: right; }

.option-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: center;
}

.option-square {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 9px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(12, 18, 18, 0.6);
  color: var(--slate-200);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.option-square:hover:not(:disabled) {
  border-color: rgba(244, 201, 93, 0.7);
  color: var(--slate-50);
}

.option-square:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 1px;
}

/* O quadradinho de marcar: vazio, ou preenchido com um ponto quando escolhido */
.option-box {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(244, 201, 93, 0.65);
  border-radius: 3px;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.option-square[aria-checked="true"] {
  border-color: var(--emerald-400);
  background: rgba(43, 185, 119, 0.16);
  color: var(--emerald-400);
}

/* Preço daquele acabamento, à direita da letra */
.option-price {
  margin-left: auto;
  font-size: 0.6rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gold-500);
  white-space: nowrap;
}

/* Acabamento que a impressão não tem: apagado e sem clique */
.option-square:disabled {
  opacity: 0.32;
  cursor: not-allowed;
}

.option-square[aria-checked="true"] .option-box {
  border-color: var(--emerald-400);
  background: var(--emerald-400);
  box-shadow: inset 0 0 0 2px rgba(10, 29, 22, 0.95);
}

@media (max-width: 640px) {
  .preview-shell {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "stage stage"
      "left right";
  }

  .option-column {
    align-self: start;
  }
}

.preview-nav {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(244, 201, 93, 0.6);
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.7);
  color: var(--gold-500);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.preview-nav svg {
  width: 20px;
  height: 20px;
  display: block;
}

.preview-nav:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 201, 93, 0.95);
  background: rgba(244, 201, 93, 0.1);
}

.preview-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  padding: 10px 8px 6px;
  border-radius: 12px;
  background: rgba(0,0,0,0.18);
  touch-action: pan-y;
}

.preview-image {
  display: block;
  /* 22vh de largura ≈ 31vh de altura: em telas baixas a arte diminui e o
     resto do modal (variantes, raridade, qualidade) cabe sem rolar */
  width: min(100%, 245px, 22vh);
  aspect-ratio: 2.5 / 3.5;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 18px 35px rgba(0,0,0,0.34);
  transform: perspective(1000px) rotateX(1deg) rotateY(-3deg);
}

.summary-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
  text-align: center;
}

.summary-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(244, 201, 93, 0.12);
  color: var(--gold-500);
  font-weight: 800;
}

.summary-pill.no-image-pill {
  background: rgba(217, 87, 87, 0.16);
  color: var(--danger);
  text-transform: lowercase;
  letter-spacing: 0.06em;
}

.preview-stage.no-image .preview-image {
  filter: brightness(0.55) saturate(0.6);
}

.no-image-badge {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(12, 18, 18, 0.88);
  border: 1px solid rgba(217, 87, 87, 0.6);
  color: var(--danger);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

.variant-label .variant-no-image {
  display: block;
  margin-top: 2px;
  font-style: normal;
  font-weight: 800;
  color: var(--danger);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.56rem;
}

.field-label {
  display: block;
  margin: 12px 0 8px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-200);
}

.variant-list {
  /* Sem isso o flex do modal espremia a lista quando entrou a linha de
     qualidade, e as cartas saíam cortadas */
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  gap: 10px;
  margin-top: 12px;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 4px 10px 2px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(244, 201, 93, 0.5) transparent;
}

.variant-list::-webkit-scrollbar {
  height: 8px;
}

.variant-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.variant-list::-webkit-scrollbar-thumb {
  background: rgba(244, 201, 93, 0.45);
  border-radius: 999px;
}

.variant-option {
  appearance: none;
  border: 1px solid rgba(244, 201, 93, 0.5);
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  color: var(--slate-50);
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  width: max-content;
  max-width: 340px;
  min-height: 64px;
  padding: 10px 12px;
  scroll-snap-align: start;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.variant-option:hover {
  transform: translateY(-1px);
  border-color: rgba(244, 201, 93, 0.9);
}

.variant-option.selected {
  background: rgba(244, 201, 93, 0.12);
  border-color: rgba(244, 201, 93, 1);
}

.variant-thumb {
  width: 32px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.12);
  flex-shrink: 0;
  display: block;
  background: rgba(0,0,0,0.15);
}

.variant-label {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
  word-break: break-word;
}

/* N / H / R: acabamentos que a impressão tem */
.finish-badges {
  display: flex;
  gap: 3px;
  margin-top: 4px;
}

.finish-badge {
  min-width: 16px;
  padding: 1px 4px;
  border-radius: 4px;
  border: 1px solid rgba(43, 185, 119, 0.55);
  color: var(--emerald-400);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
}

@media (max-width: 540px) {
  .modal {
    width: min(96vw, 540px);
  }
}

.modal-actions {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* Modal da carta: ↩ ✓ ✕ grudados no pé; em tela baixa (celular) o conteúdo
   rola por trás e os botões continuam à vista. As margens negativas cobrem o
   padding do .modal para o conteúdo não aparecer embaixo deles. */
#cardModal .modal-actions {
  position: sticky;
  bottom: -18px;
  z-index: 2;
  margin: 16px -18px -18px;
  padding: 12px 18px 18px;
  background: rgb(10, 29, 22);
  box-shadow: 0 -10px 16px -10px rgba(0, 0, 0, 0.55);
}

/* Interruptor do placeholder (canto inferior esquerdo do modal): o slider do
   iPhone antigo (iOS 6) — trilho com sombra interna, faixa que desliza com
   "I" verde / "O" cinza e botão branco brilhante — no verde do site. */
.ph-switch {
  position: absolute;
  left: 18px;
  top: 19px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.ph-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.ph-switch-track {
  position: relative;
  width: 64px;
  height: 27px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.55);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.12);
  /* isola o filtro de máscara do Safari com overflow + border-radius */
  transform: translateZ(0);
}

.ph-switch-slide {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  width: 101px;          /* 2 × trilho − botão */
  height: 100%;
  transform: translateX(-37px);
  transition: transform 0.22s cubic-bezier(0.4, 0.1, 0.2, 1);
}

.ph-switch input:checked + .ph-switch-track .ph-switch-slide {
  transform: translateX(0);
}

.ph-switch-on,
.ph-switch-off {
  flex: 0 0 37px;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 800 0.8rem/1 "Helvetica Neue", Helvetica, Arial, sans-serif;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.45);
}

.ph-switch-on {
  /* metade sob o botão: o "I" fica no meio da parte verde visível */
  padding-right: 13px;
  margin-right: -13px;
  flex-basis: 50px;
  color: #f2fff6;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.45);
  background: linear-gradient(180deg, #0f4b3c 0%, var(--emerald-600) 45%, var(--emerald-500) 100%);
}

.ph-switch-off {
  padding-left: 13px;
  margin-left: -13px;
  flex-basis: 50px;
  color: #8a948e;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
  background: linear-gradient(180deg, #c9cfcb 0%, #eef1ef 55%, #fdfdfd 100%);
}

.ph-switch-knob {
  position: relative;
  z-index: 1;
  flex: 0 0 27px;
  height: 27px;
  margin-top: -1px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.35);
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.95) 0 38%, rgba(255, 255, 255, 0) 62%),
    linear-gradient(180deg, #ffffff 0%, #e2e6e3 55%, #c4cbc6 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5), inset 0 -1px 1px rgba(0, 0, 0, 0.12);
}

.ph-switch-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-400);
  transition: color 0.2s ease;
}

.ph-switch input:checked ~ .ph-switch-label {
  color: var(--emerald-400);
}

.ph-switch input:focus-visible + .ph-switch-track {
  outline: 2px solid var(--gold-500);
  outline-offset: 2px;
}

@media (max-width: 460px) {
  .ph-switch-label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ph-switch-slide {
    transition: none;
  }
}

/* Selo do placeholder na carta (canto superior esquerdo), à frente do tilt
   como o badge de preço */
.card-placeholder {
  position: absolute;
  top: 5px;
  left: 5px;
  z-index: 2;
  width: 28px;
  height: 28px;
  transform: translateZ(64px);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55));
}

.card-placeholder svg {
  display: block;
  width: 100%;
  height: 100%;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn-primary {
  background: linear-gradient(180deg, var(--gold-500), var(--gold-700));
  color: #0b1010;
}

.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--slate-50);
  border: 1px solid rgba(255,255,255,0.08);
}

.btn-danger {
  background: linear-gradient(180deg, var(--danger), var(--danger-dark));
  color: #fff;
}

/* Ações do modal viraram só ícone (voltar / certinho / X) — mantém o fundo
   colorido de cada variante e garante área de toque confortável. */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  flex-shrink: 0;
}

.btn-icon svg {
  display: block;
}

/* Botão de copiar link do modal de compartilhamento: ícone de corrente por
   padrão; ao copiar, vira certinho branco num fundo verde por 2s. */
.share-copy-btn .share-copied-icon {
  display: none;
}

.share-copy-btn.copied {
  background: var(--emerald-500);
  color: #fff;
}

.share-copy-btn.copied .share-copy-icon {
  display: none;
}

.share-copy-btn.copied .share-copied-icon {
  display: block;
}

.sync-notification {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(360px, calc(100vw - 24px));
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: rgba(12, 18, 18, 0.96);
  border: 1px solid rgba(244, 201, 93, 0.45);
  box-shadow: 0 18px 36px rgba(0,0,0,0.35);
  color: var(--slate-50);
}

.sync-notification.hidden {
  display: none !important;
}

.sync-notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-500);
}

.sync-close-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--slate-50);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}

.sync-close-btn:hover {
  opacity: 1;
}

.sync-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.72rem;
  color: var(--slate-200);
}

.sync-progress-bar {
  position: relative;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.sync-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--emerald-400), var(--gold-500));
  transition: width 0.2s ease;
}

.sync-status-text {
  min-height: 20px;
  font-size: 0.72rem;
  color: var(--slate-200);
}

.sync-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sync-last-updated-status {
  margin-top: 4px;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  color: rgba(237, 247, 238, 0.65);
}

.sync-details-link {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold-500);
  text-decoration: none;
  border-bottom: 1px solid rgba(244, 201, 93, 0.5);
  padding-bottom: 1px;
}

.sync-details-link:hover {
  color: var(--gold-700);
}

/* "Parar" da coleta da Liga: mesmo visual do link "Detalhes", em vermelho */
.sync-stop-btn {
  margin-left: auto;
  border-top: none;
  border-left: none;
  border-right: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
  color: #e08a82;
  border-bottom-color: rgba(224, 138, 130, 0.5);
}

.sync-stop-btn:hover {
  color: #f2b0a9;
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero-panel {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  /* Mobile: header limpo — só Rayquaza + título à esquerda e o menu (⋮) à
     direita. As ações do header viram um painel suspenso quando abertas. */
  .header-inner {
    position: relative;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .header-right {
    display: none;
  }

  body.menu-open .header-right {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    position: absolute;
    top: calc(100% + 2px);
    right: 12px;
    z-index: 70;
    min-width: 210px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(12, 18, 18, 0.97);
    border: 1px solid rgba(244, 201, 93, 0.45);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.4);
  }

  body.menu-open .header-right .pill-btn,
  body.menu-open .header-right .plan-toggle,
  body.menu-open .header-right .lang-flag,
  body.menu-open .header-right .header-refresh-btn,
  body.menu-open .header-right .filter-menu,
  body.menu-open .header-right .preset-menu {
    width: 100%;
    justify-content: center;
  }

  body.menu-open .filter-menu-list,
  body.menu-open .preset-menu-list {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: 0;
    border: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.06);
  }

  .mobile-menu-btn {
    display: inline-flex;
  }

  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .main-nav {
    gap: 10px 14px;
  }
}

@media (max-width: 520px) {
  .page-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .brand-group {
    width: 100%;
  }

  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .card-name {
    font-size: 0.58rem;
  }

  .card-number {
    font-size: 0.56rem;
  }

  .card-status {
    font-size: 0.46rem;
  }
}

/* ---- Soma do painel (substituiu o header "Checklist") ----------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* O próprio valor é o botão de esconder/mostrar (sem ícone de olho). */
button.total-value {
  appearance: none;
  border: none;
  background: transparent;
  padding: 2px 4px;
  margin-left: -4px;
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 800;
}

.total-value {
  color: var(--gold-500);
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

button.total-value:hover {
  color: #fff;
}

button.total-value[aria-pressed="true"] {
  color: #93a79c;
}

/* ---- Seletor de idioma da arte (modal) ------------------------------------- */
/* ‹ nas pontas, bandeiras no meio: as setas ficam acima das colunas de
   raridade (esquerda) e qualidade (direita) */
.modal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  padding: 0 12px;
}

.modal-title-row h2 {
  margin: 0;
}

.card-lang-picker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.card-lang-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 26px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.card-lang-flag:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.45);
}

.card-lang-flag[aria-pressed="true"] {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 2px rgba(244, 201, 93, 0.35);
}

/* Variante aberta não existe nesse idioma: bandeira apagada (ainda clicável —
   a preferência de idioma vale para as próximas cartas). */
.card-lang-flag.is-unavailable {
  opacity: 0.35;
  filter: grayscale(0.8);
}

.card-lang-flag svg {
  display: block;
  border-radius: 4px;
}

/* ---- Ações do fim da página: voltar ao topo + reset ------------------------ */
.fab-actions {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
}

.fab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.2s ease;
}

.fab-btn:hover {
  transform: translateY(-2px);
}

.fab-top {
  background: rgba(12, 18, 18, 0.82);
  color: var(--gold-500);
}

.fab-top:hover {
  background: rgba(12, 18, 18, 0.95);
  color: #fff;
}

/* No topo da página a setinha não tem função: some suavemente. */
.fab-actions.at-top .fab-top {
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
}

.fab-reset {
  background: linear-gradient(180deg, #b0362f, #7c1f1a);
  color: #ffe9e6;
}

.fab-reset:hover {
  background: linear-gradient(180deg, #c4433b, #8e2721);
  color: #fff;
}

@media (max-width: 760px) {
  .fab-actions {
    right: 12px;
    bottom: 12px;
  }

  .fab-btn {
    width: 40px;
    height: 40px;
  }

  .modal-title-row {
    gap: 10px;
  }
}

/* ---- Presets da coleção (disquete à esquerda do compartilhar) -------------- */
.preset-menu {
  position: relative;
  display: inline-flex;
}

.preset-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
}

.preset-menu-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 61;
  min-width: 230px;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: 14px;
  background: rgba(12, 18, 18, 0.96);
  border: 1px solid rgba(244, 201, 93, 0.45);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.preset-menu.open .preset-menu-list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.preset-option {
  display: flex;
  align-items: center;
  gap: 9px;
  border: none;
  border-radius: 10px;
  padding: 9px 12px;
  background: transparent;
  color: var(--slate-200);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.preset-option:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--slate-50);
}

.preset-option svg {
  flex: 0 0 auto;
  color: var(--gold-500);
}

.preset-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preset-option em {
  margin-left: auto;
  font-style: normal;
  font-weight: 700;
  font-size: 0.62rem;
  color: #8aa296;
  white-space: nowrap;
}

/* Linha do preset: o botão que carrega e o "×" que apaga são irmãos (um
   botão dentro do outro é HTML inválido e confunde leitor de tela). */
.preset-row {
  display: flex;
  align-items: center;
  gap: 2px;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.preset-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.preset-row .preset-option {
  flex: 1;
  min-width: 0;
}

.preset-row .preset-option:hover {
  background: transparent;
}

.preset-delete {
  flex: 0 0 auto;
  margin-right: 8px;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  line-height: 1;
  color: #c98f88;
  transition: background 0.15s ease, color 0.15s ease;
}

.preset-delete:hover,
.preset-delete:focus-visible {
  background: rgba(176, 54, 47, 0.35);
  color: #fff;
  outline: none;
}

.preset-save-new {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px 10px 4px 4px;
  color: var(--gold-500);
}

.preset-empty {
  padding: 10px 12px;
  font-size: 0.7rem;
  color: #8aa296;
  text-align: center;
}

.preset-name-input {
  width: 100%;
  margin: 4px 0 2px;
  opacity: 1;
  pointer-events: auto;
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 600;
}

.preset-name-input:focus {
  opacity: 1;
  pointer-events: auto;
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 3px rgba(42, 185, 119, 0.18);
}

/* ---- Preço da Liga Pokemon (via extensão Hoenn Hunter) ---------------
   O preço exibido vem da Liga; enquanto a busca não volta, o valor do
   TCGplayer fica pulsando. O pill "Liga ⚠" do preview só aparece quando a
   Liga pede a verificação do Cloudflare. */
.summary-pill.liga-pill {
  border: 1px solid rgba(217, 87, 87, 0.55);
  background: rgba(217, 87, 87, 0.16);
  color: var(--danger);
  text-decoration: none;
  cursor: pointer;
}

.card-price.is-loading,
.price-pill.is-loading,
.variant-price.is-loading {
  animation: liga-pulse 1.2s ease-in-out infinite;
}

@keyframes liga-pulse {
  50% { opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
  .card-price.is-loading,
  .price-pill.is-loading,
  .variant-price.is-loading {
    animation: none;
  }
}

/* Aviso curto (ex.: compartilhar sem nenhuma carta marcada) */
.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 1000;
  max-width: min(92vw, 420px);
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  color: var(--slate-50);
  background: rgba(10, 29, 22, 0.96);
  border: 1px solid rgba(244, 201, 93, 0.55);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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