/* ---------- Desenhos ---------- */
.badge-art { display: block; flex: none; overflow: visible; filter: drop-shadow(0 6px 10px rgb(52 31 120 / 18%)); }
.badge-art.is-locked { filter: grayscale(1); opacity: .42; }
.badge-art .badge-ring-track { stroke: var(--surface-3); }
.badge-art .badge-ring { stroke: var(--primary); transition: stroke-dashoffset .6s ease; }
.badge-art .badge-label { font: 800 11px var(--font); fill: #fff; letter-spacing: .02em; }
.badge-art .badge-secret-bg { fill: var(--surface-3); }
.badge-art .badge-secret-ring { stroke: var(--text-3); }
:root { --badge-secret-fg: #8b88a0; }
[data-theme='dark'] { --badge-secret-fg: #a59fc6; }
[data-theme='dark'] .badge-art.is-locked { opacity: .35; }

.stamp-art { display: block; flex: none; overflow: visible; filter: drop-shadow(0 6px 10px rgb(52 31 120 / 20%)); }
.stamp-art .stamp-paper { fill: #fffdf8; }
.stamp-art.is-gold .stamp-paper { fill: #fff3cf; }
.stamp-art .stamp-title { font: 800 8.5px var(--font); fill: #17161f; letter-spacing: .02em; }
.stamp-art .stamp-sub { font: 500 7px var(--font); fill: #5d5a73; }
.stamp-art .stamp-initials { font: 800 22px var(--font-display); fill: rgb(255 255 255 / 85%); }
.stamp-art.is-locked { filter: grayscale(1); opacity: .4; }

/* ---------- Página ---------- */
.ach-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.ach-scopes { margin-top: -4px; }
.ach-section { display: grid; gap: 12px; }
.ach-section h2 { margin: 6px 0 0; }
.ach-section > .muted.small { margin: -6px 0 0; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.ach-card {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center;
  padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
}
.ach-card.is-locked { background: transparent; border-style: dashed; }
.ach-card-body { display: grid; gap: 4px; min-width: 0; }
.ach-card-body header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-right: 26px; }
.ach-card-body strong { font-size: .98rem; }
.ach-desc { margin: 0; font-size: .82rem; color: var(--text-2); line-height: 1.4; }
.ach-card-body small { font-size: .78rem; font-variant-numeric: tabular-nums; }
.ach-progress { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 2px; }
.ach-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #db2777); }
.ach-progress.is-large { height: 10px; }
.ach-card.is-locked .ach-progress span { background: var(--text-3); }

.tier-chip { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.tier-1 { background: #f8e3cf; color: #8a4f22; }
.tier-2 { background: #e8ecf2; color: #4a5568; }
.tier-3 { background: #fdf0c4; color: #92400e; }
.tier-4 { background: #d8f1fb; color: #0e5a6e; }
.tier-5 { background: #ede4ff; color: #6d28d9; }
.tier-secret { background: var(--surface-3); color: var(--text-2); }
[data-theme='dark'] .tier-1 { background: #3a2718; color: #f3c9a0; }
[data-theme='dark'] .tier-2 { background: #2a2f38; color: #d7dde6; }
[data-theme='dark'] .tier-3 { background: #3b2e10; color: #fde68a; }
[data-theme='dark'] .tier-4 { background: #12313b; color: #bae6fd; }
[data-theme='dark'] .tier-5 { background: #2d2350; color: #c4b5fd; }

.ach-pin {
  position: absolute; top: 10px; right: 10px; width: 28px; height: 28px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: none; color: var(--text-3); cursor: pointer;
}
.ach-pin svg { width: 15px; height: 15px; }
.ach-pin:hover { background: var(--surface-2); color: var(--text); }
.ach-pin.on { color: var(--primary); background: var(--primary-soft); }
.ach-pin.on svg { fill: currentColor; }
.ach-pin.is-inline { position: static; }
.ach-tip { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--text-2); margin: 0; }
.ach-tip svg { width: 15px; height: 15px; }

/* Vitrine */
.ach-shelf {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 20px;
  border-radius: 24px; background: radial-gradient(110% 90% at 50% 0%, var(--stage-2), var(--stage-1) 70%); color: #efeaff;
  box-shadow: 0 30px 60px -34px rgb(59 31 120 / 60%);
}
.shelf-slot { display: grid; justify-items: center; align-content: start; gap: 6px; text-align: center; padding: 8px 4px; min-width: 0; }
.shelf-slot strong { color: #fff; font-family: var(--font-display); font-size: 1rem; line-height: 1.25; }
.shelf-slot small { color: #c8bff0; font-size: .8rem; }
.shelf-slot.is-empty { align-content: center; border: 1.5px dashed rgb(255 255 255 / 22%); border-radius: var(--r-lg); color: #c8bff0; font-size: .85rem; min-height: 150px; padding: 16px; }
.shelf-slot.is-empty svg { width: 22px; height: 22px; opacity: .7; }
.shelf-remove { color: #c4b5fd; font-size: .78rem; }

/* Sequência */
.streak-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; padding: 16px 18px;
  border-radius: var(--r-lg); background: linear-gradient(135deg, #fff4e5, #ffe4d1); border: 1px solid #fcd9b8;
}
[data-theme='dark'] .streak-card { background: linear-gradient(135deg, #3a2414, #2a1a17); border-color: #4d2f1c; }
.streak-card.is-cold { background: var(--surface); border-color: var(--border); }
.streak-flame { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(180deg, #fde047, #ea580c); color: #fff; box-shadow: 0 10px 20px -8px rgb(234 88 12 / 60%); }
.streak-card.is-cold .streak-flame { background: var(--surface-3); color: var(--text-3); box-shadow: none; }
.streak-flame svg { width: 30px; height: 30px; }
.streak-num { margin: 0; font-size: 1rem; }
.streak-num strong { font-family: var(--font-display); font-size: 1.8rem; font-variant-numeric: tabular-nums; margin-right: 2px; }
.streak-meta { margin: 2px 0 0; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; color: var(--text-2); font-size: .85rem; }
.streak-shields { display: inline-flex; align-items: center; gap: 4px; }
.streak-shields svg { width: 16px; height: 16px; color: var(--text-3); }
.streak-shields svg.on { color: #0e7490; fill: #bae6fd; }
.streak-hint { margin: 6px 0 0; font-size: .82rem; color: var(--text-2); max-width: 70ch; }
.streak-chip { display: inline-flex; align-items: center; gap: 3px; font-size: .78rem; font-weight: 700; padding: 2px 8px 2px 6px; border-radius: 99px; background: #fff1e6; color: #c2410c; font-variant-numeric: tabular-nums; }
.streak-chip svg { width: 13px; height: 13px; }
.streak-chip.is-cold { background: var(--surface-2); color: var(--text-3); }
.streak-chip.is-large { font-size: .9rem; padding: 4px 12px 4px 8px; }
[data-theme='dark'] .streak-chip:not(.is-cold) { background: #3a2414; color: #fdba74; }

/* Desafios */
.challenges-card { display: grid; gap: 10px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.challenges-card header { display: flex; align-items: center; gap: 12px; }
.challenges-card header > div { display: grid; flex: 1; }
.challenges-card header small { color: var(--text-2); }
.challenges-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.challenges-icon svg { width: 20px; height: 20px; }
.challenge-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.challenge-list li { display: flex; align-items: center; gap: 10px; font-size: .92rem; }
.challenge-list svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.challenge-list li.done svg { color: var(--success); }
.challenge-list li.done span:not(.sr-only) { color: var(--text-2); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text-2) 50%, transparent); }
.challenges-foot { margin: 0; font-size: .82rem; color: var(--text-2); }

/* Selos e temporadas */
.stamp-album { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 18px 12px; }
.stamp-album li { display: grid; justify-items: center; gap: 4px; text-align: center; }
.stamp-album strong { font-size: .85rem; }
.stamp-album small { font-size: .75rem; }
.stamp-album li.is-missing strong { color: var(--text-3); }
.season-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.season-row li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); }
.season-row span { display: grid; gap: 2px; }
.season-row small { font-size: .8rem; }

/* ---------- Clube ---------- */
.club-ach { display: grid; gap: 22px; }
.club-level { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; padding: 18px 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.club-level > div { display: grid; gap: 6px; max-width: 520px; }
.club-level-title { margin: 0; font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; }
.club-level .muted.small { margin: 2px 0 0; }
.pennants { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 12px; }
.pennant { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 12px 8px; border-radius: var(--r-md); }
.pennant strong { font-size: .9rem; }
.pennant small { font-size: .76rem; line-height: 1.35; }
.showcase { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.showcase-row {
  width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center;
  padding: 8px 12px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.showcase-row:hover:not(:disabled) { border-color: var(--border-strong); }
.showcase-row:disabled { cursor: default; }
.showcase-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.showcase-badges { display: flex; gap: 4px; align-items: center; min-height: 34px; }
.member-chips { display: inline-flex; align-items: center; gap: 4px; }
.member-ach { display: grid; gap: 18px; }
.member-ach-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.member-ach .ach-shelf { padding: 14px; }
.mini-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.mini-badge { display: grid; justify-items: center; gap: 4px; text-align: center; }
.mini-badge small { font-size: .74rem; color: var(--text-2); line-height: 1.3; }

/* ---------- Comemoração ---------- */
.celebrate {
  position: fixed; z-index: 80; left: 50%; bottom: 24px; transform: translateX(-50%); width: min(460px, calc(100vw - 24px));
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; padding: 18px 44px 18px 18px;
  border-radius: 22px; color: #efeaff; background: radial-gradient(120% 120% at 0% 0%, var(--stage-2), var(--stage-1) 70%);
  box-shadow: 0 30px 60px -20px rgb(20 10 50 / 60%), 0 0 0 1px rgb(255 255 255 / 8%);
  animation: celebrate-in .45s cubic-bezier(.2, .9, .3, 1.2);
}
.celebrate-art { position: relative; display: grid; place-items: center; }
.celebrate-art::before {
  content: ''; position: absolute; inset: -18px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, rgb(251 191 36 / 35%), transparent 30%, rgb(167 139 250 / 35%), transparent 60%, rgb(251 191 36 / 30%), transparent 90%);
  animation: celebrate-rays 6s linear infinite; z-index: -1; filter: blur(2px);
}
.celebrate-art svg { animation: celebrate-pop .6s cubic-bezier(.2, .9, .3, 1.4) .1s both; }
.celebrate-body { display: grid; gap: 4px; min-width: 0; }
.celebrate-body small { color: #c8bff0; font-size: .8rem; }
.celebrate-body strong { font-family: var(--font-display); font-size: 1.25rem; color: #fff; line-height: 1.2; }
.celebrate-tier { color: #fbbf24; font-size: 1rem; }
.celebrate-body p { margin: 0; font-size: .86rem; color: #ddd6fe; }
.celebrate-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.btn.on-stage { color: #efeaff; border-color: rgb(255 255 255 / 20%); background: rgb(255 255 255 / 6%); }
.btn.on-stage:hover { background: rgb(255 255 255 / 14%); }
.celebrate-close { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border: 0; border-radius: 50%; display: grid; place-items: center; background: none; color: #c8bff0; cursor: pointer; }
.celebrate-close:hover { background: rgb(255 255 255 / 10%); color: #fff; }
.celebrate-close svg { width: 18px; height: 18px; }
@keyframes celebrate-in { from { opacity: 0; transform: translate(-50%, 24px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes celebrate-pop { from { transform: scale(.3) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes celebrate-rays { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .celebrate, .celebrate-art svg, .celebrate-art::before { animation: none; }
}

@media (max-width: 760px) {
  .ach-shelf { gap: 6px; padding: 14px 8px; }
  .shelf-slot strong { font-size: .85rem; }
  .shelf-slot.is-empty { min-height: 120px; font-size: .75rem; padding: 10px; }
  .ach-grid { grid-template-columns: 1fr; }
  .celebrate { bottom: 84px; }
  .club-level { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .showcase-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .showcase-badges { grid-column: 2 / -1; }
}
