:root {
  --bg: #08090f;
  --panel: rgba(17, 19, 31, 0.78);
  --panel-strong: rgba(23, 25, 40, 0.92);
  --ink: #f5f1ff;
  --muted: #a79fb8;
  --line: rgba(220, 196, 255, 0.16);
  --accent: #a855f7;
  --accent-2: #21e6a3;
  --accent-3: #32f58a;
  --soft: rgba(168, 85, 247, 0.12);
  --warn: rgba(255, 184, 77, 0.14);
  --danger: rgba(33, 230, 163, 0.12);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
  --gradient: linear-gradient(100deg, #8b5cf6 0%, #b66cff 42%, #21e6a3 100%);
  --gradient-muted: linear-gradient(100deg, rgba(139, 92, 246, 0.2), rgba(33, 230, 163, 0.16));
  --selected-tile-bg:
    radial-gradient(circle at 88% 18%, rgba(126, 216, 255, 0.12), transparent 34%),
    linear-gradient(90deg, rgba(27, 34, 54, 0.92), rgba(30, 47, 62, 0.82));
  --selected-tile-border: rgba(126, 216, 255, 0.34);
  --selected-tile-hover: rgba(126, 216, 255, 0.46);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -20%, rgba(168, 85, 247, 0.18), transparent 34%),
    linear-gradient(180deg, #10111b 0%, var(--bg) 54%, #05060a 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 74%);
}

body::after {
  z-index: -1;
  background:
    linear-gradient(115deg, transparent 0 42%, rgba(168, 85, 247, 0.08) 47%, transparent 54% 100%),
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 5px);
  opacity: 0.44;
}

button,
input {
  font: inherit;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(33, 230, 163, 0.42) rgba(255, 255, 255, 0.035);
}

[hidden] {
  display: none !important;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.035);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  border: 2px solid rgba(12, 14, 24, 0.94);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(33, 230, 163, 0.58), rgba(168, 85, 247, 0.58));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(33, 230, 163, 0.74), rgba(168, 85, 247, 0.72));
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  border-radius: 7px;
  padding: 10px 14px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

button:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.12);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.app-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 22px 0 40px;
}

.newsletter-bar {
  position: sticky;
  bottom: 10px;
  z-index: 35;
  overflow: hidden;
  isolation: isolate;
  margin: 14px auto 0;
  border: 1px solid color-mix(in srgb, var(--accent-2) 26%, var(--line));
  border-radius: 8px;
  background:
    radial-gradient(circle at 86% 18%, rgba(33, 230, 163, 0.14), transparent 36%),
    linear-gradient(100deg, rgba(20, 23, 38, 0.96), rgba(23, 30, 43, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 18px 48px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
  padding: 10px;
}

.newsletter-bar::before,
.newsletter-bar::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
}

.newsletter-bar::before {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(168, 85, 247, 0.12), transparent 34% 66%, rgba(33, 230, 163, 0.12)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 12px);
  opacity: 0.62;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.9) 28%, rgba(0, 0, 0, 0.9) 72%, rgba(0, 0, 0, 0.35));
}

.newsletter-bar::after {
  width: 190px;
  height: 190px;
  right: 18px;
  top: 50%;
  border: 1px solid rgba(33, 230, 163, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 34%, rgba(33, 230, 163, 0.1) 35% 36%, transparent 37%),
    linear-gradient(0deg, transparent 45%, rgba(245, 241, 255, 0.12) 46% 52%, transparent 53%),
    radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.1), transparent 64%);
  box-shadow:
    0 0 42px rgba(33, 230, 163, 0.14),
    inset 0 0 30px rgba(168, 85, 247, 0.08);
  opacity: 0.56;
  transform: translateY(-50%) rotate(-12deg);
}

.newsletter-form {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(220px, 320px) auto minmax(130px, auto);
  gap: 10px;
  align-items: center;
}

.newsletter-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.newsletter-copy strong {
  color: var(--ink);
  font-size: 14px;
}

.newsletter-copy small,
.newsletter-message {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.newsletter-form label {
  min-width: 0;
}

.newsletter-form input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(143, 168, 221, 0.08), rgba(33, 230, 163, 0.035)),
    rgba(255, 255, 255, 0.045);
  color: var(--ink);
  padding: 8px 10px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.newsletter-form input:focus {
  border-color: rgba(33, 230, 163, 0.66);
  box-shadow: 0 0 0 3px rgba(33, 230, 163, 0.12);
}

.newsletter-form button {
  min-height: 38px;
  border-color: color-mix(in srgb, var(--accent-2) 42%, var(--line));
  background:
    radial-gradient(circle at 18% 20%, rgba(33, 230, 163, 0.2), transparent 42%),
    rgba(255, 255, 255, 0.045);
  white-space: nowrap;
}

.newsletter-message {
  min-height: 14px;
}

.app-legal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px 12px;
  flex-wrap: wrap;
  margin: 12px auto 0;
  color: rgba(167, 159, 184, 0.68);
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}

.app-legal-footer span {
  display: inline-flex;
  align-items: center;
}

.app-legal-footer span + span::before {
  content: "";
  width: 3px;
  height: 3px;
  margin-right: 12px;
  border-radius: 999px;
  background: rgba(33, 230, 163, 0.35);
}

.upload-panel,
.dashboard {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.upload-panel {
  min-height: calc(100vh - 56px);
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 26px;
  align-items: stretch;
  padding: 24px;
}

.landing-header {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.brand-wordmark {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 950;
  line-height: 1.14;
  letter-spacing: 0;
  background: var(--gradient);
  background-size: 180% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(217, 70, 239, 0.24));
  padding-bottom: 4px;
}

.brand-wordmark strong {
  font-weight: 950;
}

.info-rotator {
  flex: 0 0 auto;
  min-width: 236px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(217, 70, 239, 0.26);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  padding: 9px 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.info-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.15), 0 0 18px rgba(33, 230, 163, 0.3);
}

.info-rotator.is-changing span:last-child {
  opacity: 0;
  transform: translateY(3px);
}

#rotatingInfo {
  transition: opacity 180ms ease, transform 180ms ease;
  white-space: nowrap;
}

.landing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.72fr);
  gap: 34px;
  align-items: center;
}

.upload-copy {
  align-self: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-3);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 620px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1;
  color: var(--ink);
}

h2 {
  font-size: 32px;
  line-height: 1.1;
}

h3 {
  font-size: 17px;
}

.lead {
  max-width: 560px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.feature-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.feature-strip span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 11px;
}

.landing-privacy-note {
  width: fit-content;
  margin: 22px 0 0;
  border: 1px solid color-mix(in srgb, var(--accent-2) 26%, var(--line));
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.035);
  color: color-mix(in srgb, var(--ink) 82%, var(--muted));
  font-size: 0.92rem;
}

.drop-zone {
  min-height: 340px;
  border: 2px dashed rgba(217, 70, 239, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    var(--soft);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
  cursor: pointer;
  padding: 28px;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.drop-zone.dragging {
  border-color: var(--accent);
  background: rgba(168, 85, 247, 0.18);
  transform: translateY(-2px);
  box-shadow: 0 18px 48px rgba(168, 85, 247, 0.16);
}

.drop-zone.is-analyzing {
  cursor: default;
  border-color: rgba(33, 230, 163, 0.42);
  background:
    radial-gradient(circle at 50% 44%, rgba(33, 230, 163, 0.1), transparent 38%),
    rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 0 0 1px rgba(33, 230, 163, 0.08), 0 20px 48px rgba(8, 9, 15, 0.3);
}

.drop-zone.is-analyzing > :not(input):not(.import-progress) {
  display: none;
}

.drop-zone input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.drop-icon {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: var(--panel-strong);
  border: 1px solid rgba(33, 230, 163, 0.34);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.drop-title {
  font-weight: 800;
}

.drop-subtitle,
.muted {
  color: var(--muted);
}

.import-progress {
  width: min(290px, 100%);
  display: grid;
  gap: 13px;
  text-align: left;
}

.import-progress-label {
  color: var(--ink);
  font-size: 17px;
  font-weight: 650;
}

.import-progress-track,
.dashboard-prep-track {
  display: block;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.import-progress-track i,
.dashboard-prep-track i {
  display: block;
  width: var(--progress, 8%);
  height: 100%;
  border-radius: inherit;
  background: var(--gradient);
  box-shadow: 0 0 16px rgba(33, 230, 163, 0.34);
  transition: width 260ms ease;
}

.import-progress-step {
  color: var(--muted);
  font-size: 12px;
}

#accountMeta {
  color: var(--accent-3);
}

.share-friend-code {
  margin: 5px 0 0;
  width: fit-content;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-color: rgba(168, 85, 247, 0.36);
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 12px;
  padding: 6px 10px;
}

.share-friend-code:disabled {
  cursor: default;
  box-shadow: none;
}

.share-friend-pencil {
  width: 12px;
  height: 12px;
  display: inline-block;
  transform: rotate(-35deg);
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.25);
}

.share-friend-pencil::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 3px;
  border-left: 5px solid var(--ink);
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
}

.account-meta-item,
.header-share-item {
  position: relative;
}

.share-edit-mode .header-share-item > .visibility-toggle {
  margin-left: 7px;
}

.header-share-item.share-hidden {
  color: transparent !important;
  text-shadow: 0 0 18px rgba(245, 241, 255, 0.64);
  user-select: none;
}

.header-share-item.share-hidden .visibility-toggle {
  color: var(--accent-2);
  filter: none;
  text-shadow: none;
}

#accountMeta .meta-muted {
  color: var(--muted);
}

#accountMeta .meta-separator {
  color: var(--accent-3);
}

.dashboard {
  padding: 20px;
  background: var(--panel-strong);
  animation: dashboardIn 220ms ease-out;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.dashboard-prep {
  --progress: 12%;
  display: grid;
  grid-template-columns: auto auto minmax(110px, 190px);
  justify-content: end;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 9px 0 0;
  color: rgba(167, 159, 184, 0.9);
  font-size: 12px;
}

.dashboard-prep-pulse {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(33, 230, 163, 0.12);
  animation: preparationPulse 1200ms ease-in-out infinite;
}

.dashboard-prep-track {
  width: 100%;
}

.account-header-main {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 34vw);
  gap: 18px;
  align-items: stretch;
}

.account-identity {
  min-width: 0;
  position: relative;
  z-index: 2;
}

#trainerName {
  font-family: "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
  font-size: 34px;
  font-weight: 560;
  line-height: 1.08;
  letter-spacing: 0;
  color: #f8f7ff;
  text-shadow:
    0 2px 2px rgba(0, 0, 0, 0.58),
    0 0 10px rgba(255, 255, 255, 0.08);
}

.team-showcase {
  --team-color: #f7d54a;
  --team-deep: #3b3420;
  min-height: 150px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 0 8px 8px 0;
  background:
    linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--team-color) 2%, transparent) 20%, color-mix(in srgb, var(--team-color) 12%, transparent) 64%, color-mix(in srgb, var(--team-deep) 52%, transparent) 100%),
    radial-gradient(circle at 78% 44%, color-mix(in srgb, var(--team-color) 24%, transparent), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012));
  opacity: 0.96;
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.08) 18%, rgba(0, 0, 0, 0.48) 42%, rgba(0, 0, 0, 1) 100%);
}

.team-showcase::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.055)),
    repeating-linear-gradient(115deg, transparent 0 18px, rgba(255, 255, 255, 0.035) 18px 19px, transparent 19px 36px);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.25) 38%, rgba(0, 0, 0, 1) 100%);
}

.team-showcase::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid color-mix(in srgb, var(--team-color) 18%, transparent);
  border-left-color: transparent;
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.06) 34%, rgba(0, 0, 0, 0.64) 62%, rgba(0, 0, 0, 1) 100%);
  pointer-events: none;
}

.team-showcase img {
  position: absolute;
  right: clamp(18px, 3.4vw, 46px);
  top: 50%;
  width: min(154px, 42%);
  max-height: 136px;
  object-fit: contain;
  transform: translateY(-50%);
  opacity: 0.66;
  filter:
    drop-shadow(0 0 20px color-mix(in srgb, var(--team-color) 34%, transparent))
    drop-shadow(0 16px 28px rgba(0, 0, 0, 0.34));
}

.team-showcase.team-valor {
  --team-color: #ff8a35;
  --team-deep: #4f060b;
}

.team-showcase.team-instinct {
  --team-color: #ffe75c;
  --team-deep: #4c4219;
}

.team-showcase.team-mystic {
  --team-color: #6cc8ff;
  --team-deep: #052e63;
}

.team-showcase.share-hidden {
  opacity: 0.42;
  user-select: none;
}

.header-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.share-only {
  display: none;
}

.preview-only {
  display: none;
}

.share-edit-mode .share-only {
  display: block;
}

#offlineButton[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--accent-2) 62%, var(--line));
  background:
    radial-gradient(circle at 18% 22%, rgba(33, 230, 163, 0.24), transparent 46%),
    linear-gradient(135deg, rgba(33, 230, 163, 0.22), rgba(20, 87, 67, 0.34)),
    rgba(12, 34, 28, 0.86);
  color: var(--ink);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.045),
    0 0 22px rgba(33, 230, 163, 0.12);
}

#offlineButton[aria-pressed="true"]:hover {
  border-color: color-mix(in srgb, var(--accent-2) 78%, var(--line));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.055),
    0 0 28px rgba(33, 230, 163, 0.18);
}

.public-mode .header-actions {
  display: none;
}

.preview-only.is-visible {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 180;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid color-mix(in srgb, var(--accent-2) 52%, var(--line));
  border-radius: 999px;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 16%, rgba(122, 240, 173, 0.18), transparent 44%),
    linear-gradient(135deg, rgba(34, 47, 68, 0.96), rgba(25, 32, 48, 0.96));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34), 0 0 26px rgba(33, 230, 163, 0.1);
}

.preview-only.is-visible:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent-2) 74%, var(--line));
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 0;
}

.tab {
  white-space: nowrap;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.tab.active {
  background: var(--selected-tile-bg);
  border-color: var(--selected-tile-border);
  color: #fff;
}

.tab-panel {
  display: grid;
  gap: 14px;
}

.tab-panel:not(.hidden) {
  animation: panelIn 160ms ease-out;
}

.tab-panel.content-arriving > * {
  animation: contentReadyIn 210ms ease-out both;
}

.visibility-toggle {
  display: none;
}

.share-edit-mode .visibility-toggle {
  position: relative;
  width: 30px;
  height: 20px;
  flex: 0 0 auto;
  display: inline-block;
  margin-left: 9px;
  vertical-align: -5px;
  cursor: pointer;
  opacity: 0.86;
}

.share-edit-mode .card > .visibility-toggle {
  position: absolute;
  top: 14px;
  right: 14px;
  margin-left: 0;
}

.share-edit-mode .card:has(> .visibility-toggle) h3,
.share-edit-mode .card:has(> .visibility-toggle) .metric-label {
  padding-right: 34px;
}

.visibility-toggle::before {
  content: "";
  position: absolute;
  inset: 2px 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 40'%3E%3Cpath d='M4 20C11.5 8.5 21 4 32 4s20.5 4.5 28 16c-7.5 11.5-17 16-28 16S11.5 31.5 4 20Z' fill='none' stroke='black' stroke-width='5.2' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 40'%3E%3Cpath d='M4 20C11.5 8.5 21 4 32 4s20.5 4.5 28 16c-7.5 11.5-17 16-28 16S11.5 31.5 4 20Z' fill='none' stroke='black' stroke-width='5.2' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.visibility-toggle::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 62% 32%, var(--panel) 0 2px, transparent 2.4px),
    currentColor;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--panel) 82%, transparent);
}

.share-mode #dumpTime {
  display: inline-block;
  padding: 7px 10px;
  border: 1px solid rgba(33, 230, 163, 0.35);
  border-radius: 7px;
  background: rgba(33, 230, 163, 0.08);
  box-shadow: 0 0 28px rgba(33, 230, 163, 0.08);
}

.share-mode.share-offline .tab-panel,
.share-mode.share-offline .tabs,
.share-mode.share-offline #accountMeta,
.share-mode.share-offline #trainerName,
.share-mode.share-offline #teamShowcase {
  opacity: 0.28;
  filter: blur(10px);
  pointer-events: none;
  user-select: none;
}

.share-edit-mode.share-offline .dashboard-header,
.share-edit-mode.share-offline .header-actions,
.share-edit-mode.share-offline #dumpTime {
  opacity: 1;
  filter: none;
  pointer-events: auto;
}

.share-mode.share-offline::after {
  content: "Page hors ligne";
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 20;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(33, 230, 163, 0.38);
  border-radius: 8px;
  background: rgba(10, 12, 22, 0.94);
  color: var(--ink);
  padding: 18px 22px;
  font-size: 22px;
  font-weight: 850;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.52);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(4, 6, 14, 0.68);
  backdrop-filter: blur(12px);
  padding: 18px;
}

.modal-card {
  width: min(440px, 100%);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 0, rgba(168, 85, 247, 0.14), transparent 42%),
    rgba(14, 16, 28, 0.98);
  color: var(--ink);
  padding: 18px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.58);
}

.modal-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.modal-card p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.5;
}

.modal-card input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  font-size: 18px;
  letter-spacing: 0;
  padding: 8px 10px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.tab.share-hidden,
.card.share-hidden,
.tab-panel.share-hidden {
  opacity: 0.55;
}

.public-mode .header-share-item.share-hidden,
.share-preview-mode .header-share-item.share-hidden,
.public-mode .team-showcase.share-hidden,
.share-preview-mode .team-showcase.share-hidden,
.public-mode .card.share-hidden,
.share-preview-mode .card.share-hidden {
  display: none !important;
}

.tab.share-hidden {
  color: transparent;
  text-shadow: 0 0 16px rgba(245, 241, 255, 0.66);
}

.tab.share-hidden .visibility-toggle {
  color: var(--accent-2);
  text-shadow: none;
}

.card.share-hidden {
  position: relative;
}

.card.share-hidden > *:not(.visibility-toggle),
.tab-panel.share-hidden > * {
  opacity: 0.16;
  filter: none;
  user-select: none;
}

.card.share-hidden::after {
  content: "Masqué du partage";
  position: absolute;
  left: 14px;
  bottom: 12px;
  max-width: calc(100% - 28px);
  color: color-mix(in srgb, var(--muted) 86%, var(--ink));
  font-size: 12px;
  line-height: 1.2;
  pointer-events: none;
}

.card.share-hidden .visibility-toggle,
.tab-panel.share-hidden .visibility-toggle {
  color: var(--accent-2);
  filter: none;
  pointer-events: auto;
  text-shadow: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  position: relative;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.tab-panel .grid > .metric:nth-child(1) {
  grid-column: span 4;
  background:
    var(--gradient-muted),
    var(--panel);
}

.tab-panel .grid > .metric:nth-child(2),
.tab-panel .grid > .metric:nth-child(3) {
  grid-column: span 4;
}

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.metric {
  display: grid;
  gap: 6px;
  min-height: 82px;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.overview-band {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin: 4px 0 -2px;
  padding: 4px 2px 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.overview-band h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
}

.overview-band p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.card:hover,
.metric:hover,
.tcg-card:hover {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  box-shadow: inset 0 0 0 1px rgba(33, 230, 163, 0.055);
}

.tcg-card.is-exportable {
  cursor: pointer;
}

.tcg-card.is-drillable {
  cursor: pointer;
}

.tcg-card.is-exportable:hover::after {
  content: "Exporter";
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  border: 1px solid color-mix(in srgb, var(--card-type, #8fa8dd) 42%, var(--line));
  border-radius: 999px;
  padding: 4px 8px;
  color: var(--ink);
  background: rgba(12, 12, 22, 0.72);
  box-shadow: 0 0 18px color-mix(in srgb, var(--card-type, #8fa8dd) 20%, transparent);
  font-size: 11px;
}

.tcg-card-action {
  justify-self: end;
  padding: 4px 8px;
  border: 1px solid rgba(33, 230, 163, 0.36);
  border-radius: 999px;
  background: rgba(8, 10, 18, 0.78);
  color: var(--accent-2);
  font-size: 10px;
  line-height: 1;
  transition: opacity 160ms ease, transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.tcg-card.is-drillable:hover .tcg-card-action {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 54%, var(--line));
  box-shadow: 0 0 18px rgba(33, 230, 163, 0.16);
}

#pokemon .grid > .metric:nth-child(-n + 3) {
  min-height: 0;
  padding-block: 12px;
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
}

.metric-value {
  font-size: 25px;
  font-weight: 850;
  line-height: 1.05;
}

.metric-note {
  color: var(--muted);
  font-size: 12px;
}

.dense-point-main {
  min-width: 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.dense-point-place {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 8px 8px;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.no-table-header table {
  min-width: 0;
}

.activity-two-column-table {
  overflow-x: hidden;
}

.activity-two-column-table table {
  min-width: 0;
  table-layout: fixed;
}

.activity-two-column-table th:first-child,
.activity-two-column-table td:first-child {
  width: 76%;
}

.activity-two-column-table th:last-child,
.activity-two-column-table td:last-child {
  width: 24%;
}

.medal-table {
  overflow: visible;
}

.medal-table table {
  min-width: 0;
  table-layout: fixed;
}

.medal-table th,
.medal-table td {
  padding-inline: 6px;
}

.medal-table th:nth-child(1),
.medal-table td:nth-child(1) {
  width: 22%;
  padding-right: 3px;
}

.medal-table th:nth-child(2),
.medal-table td:nth-child(2) {
  width: 9%;
  padding-left: 3px;
}

.medal-table th:nth-child(3),
.medal-table td:nth-child(3) {
  width: 10%;
}

.medal-table th:nth-child(4),
.medal-table td:nth-child(4) {
  width: 14%;
}

.medal-table th:nth-child(5),
.medal-table td:nth-child(5) {
  width: 45%;
}

.medal-name {
  display: grid;
  gap: 1px;
  line-height: 1.12;
}

.medal-name strong {
  color: var(--ink);
}

.medal-name small {
  color: var(--muted);
  font-size: 11px;
}

.bar-list {
  display: grid;
  gap: 10px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(92px, 150px) 1fr minmax(64px, auto);
  align-items: center;
  gap: 10px;
}

.bar-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.medal-grade {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.medal-icon {
  position: relative;
  width: 16px;
  height: 16px;
  display: inline-block;
  border-radius: 999px;
  background: #566070;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.medal-icon::before,
.medal-icon::after {
  content: "";
  position: absolute;
  top: 12px;
  width: 5px;
  height: 8px;
  background: inherit;
  opacity: 0.78;
}

.medal-icon::before {
  left: 3px;
  transform: rotate(18deg);
}

.medal-icon::after {
  right: 3px;
  transform: rotate(-18deg);
}

.medal-bronze .medal-icon {
  background: linear-gradient(145deg, #d08a48, #7a431f);
}

.medal-argent .medal-icon {
  background: linear-gradient(145deg, #f4f6fb, #8f99aa);
}

.medal-or .medal-icon {
  background: linear-gradient(145deg, #ffe27a, #c48218);
}

.medal-platine .medal-icon {
  background: linear-gradient(145deg, #dff7ff, #8b5cf6 52%, #21e6a3);
  box-shadow: 0 0 16px rgba(33, 230, 163, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.medal-scale {
  min-width: 220px;
  display: grid;
  gap: 10px;
}

.scale-track {
  position: relative;
  height: 34px;
  margin-top: 4px;
}

.scale-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 12px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.scale-fill {
  position: absolute;
  left: 0;
  top: 10px;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  min-width: 0;
}

.scale-tick {
  position: absolute;
  top: -5px;
  width: 22px;
  height: 36px;
  transform: translateX(-50%);
  cursor: default;
  z-index: 2;
}

.scale-tick i {
  position: absolute;
  left: 50%;
  top: 7px;
  width: 1px;
  height: 22px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.38);
}

.scale-bronze i {
  color: #b87333;
  background: #b87333;
}

.scale-argent i {
  color: #cfd5df;
  background: #cfd5df;
}

.scale-or i {
  color: #f5c542;
  background: #f5c542;
}

.scale-platine i {
  color: #8fe9ff;
  background: #8fe9ff;
}

.scale-tick.reached i {
  box-shadow: 0 0 10px currentColor;
}

.scale-tick em {
  position: absolute;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  line-height: 1;
  white-space: nowrap;
}

.scale-tick::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: 38px;
  z-index: 8;
  transform: translate(-50%, 4px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(10, 12, 22, 0.96);
  color: var(--ink);
  padding: 5px 7px;
  font-size: 11px;
  white-space: nowrap;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
  transition: opacity 120ms ease, transform 120ms ease;
}

.scale-tick.tooltip-active::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.global-tooltip {
  position: fixed;
  z-index: 10000;
  max-width: min(280px, calc(100vw - 24px));
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  border: 1px solid rgba(126, 216, 255, 0.28);
  border-radius: 7px;
  background: rgba(10, 12, 22, 0.96);
  color: var(--ink);
  padding: 7px 9px;
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38), 0 0 18px rgba(33, 230, 163, 0.08);
  transition: opacity 120ms ease, transform 120ms ease;
}

.global-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

[data-tooltip-rich].tooltip-active,
[data-tooltip].tooltip-active,
[data-native-title].tooltip-active,
[data-map-tooltip].tooltip-active {
  outline: 1px solid rgba(33, 230, 163, 0.42);
  outline-offset: 3px;
  filter: brightness(1.14);
}

.global-tooltip .tooltip-accent {
  color: #7ed8ff;
  font-weight: 400;
}

.scale-caption {
  color: var(--muted);
  font-size: 12px;
}

.map-card {
  overflow: hidden;
}

.world-map {
  position: relative;
  width: 100%;
  aspect-ratio: 2.05 / 1;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.14), transparent 62%),
    #0b0d16;
  background-size: 48px 48px, 48px 48px, auto, auto;
  touch-action: auto;
}

.world-coast {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  opacity: 1;
  pointer-events: none;
}

.map-point {
  position: absolute;
  z-index: 1;
  display: block;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08), 0 0 18px currentColor;
  cursor: default;
}

.map-point.tooltip-active {
  z-index: 40;
}

.map-point.cool {
  color: #8b5cf6;
  background: #8b5cf6;
}

.map-point.warm {
  color: #21e6a3;
  background: #21e6a3;
}

.map-point.hot {
  color: #f7d154;
  background: #f7d154;
}

.map-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 50;
  min-width: 190px;
  transform: translate(-50%, 6px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 12, 22, 0.94);
  color: var(--ink);
  padding: 10px 11px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.42);
  transition: opacity 140ms ease, transform 140ms ease;
}

.map-tooltip.tip-right {
  left: 0;
  transform: translate(0, 6px);
}

.map-tooltip.tip-left {
  left: 100%;
  transform: translate(-100%, 6px);
}

.map-tooltip.tip-bottom {
  top: calc(100% + 10px);
  bottom: auto;
}

.map-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -5px) rotate(45deg);
  background: rgba(10, 12, 22, 0.94);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.map-tooltip.tip-right::after {
  left: 14px;
}

.map-tooltip.tip-left::after {
  left: calc(100% - 14px);
}

.map-tooltip.tip-bottom::after {
  top: auto;
  bottom: 100%;
  transform: translate(-50%, 5px) rotate(45deg);
  border-right: 0;
  border-bottom: 0;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.map-tooltip strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}

.map-tooltip em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.map-point.tooltip-active .map-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.map-point.tooltip-active .map-tooltip.tip-right {
  transform: translate(0, 0);
}

.map-point.tooltip-active .map-tooltip.tip-left {
  transform: translate(-100%, 0);
}

.map-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.pokemon-browser {
  display: grid;
  gap: 14px;
}

.pokemon-browser-head,
.pokemon-controls {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pokemon-controls label,
.search-control {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: stretch;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-radius: 12px;
  background:
    radial-gradient(circle at 10% 0%, rgba(33, 230, 163, 0.08), transparent 34%),
    rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.search-box:focus-within {
  border-color: rgba(33, 230, 163, 0.72);
  box-shadow:
    0 0 0 4px rgba(33, 230, 163, 0.12),
    0 0 26px rgba(168, 85, 247, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.search-box input {
  min-height: 45px;
  width: 100%;
  border: 0 !important;
  border-radius: 12px 0 0 12px !important;
  background: transparent !important;
  color: var(--ink) !important;
  padding: 11px 13px !important;
  font: inherit;
  outline: none;
}

.search-box input::placeholder {
  color: color-mix(in srgb, var(--muted) 82%, transparent);
}

.search-action {
  position: relative;
  min-height: 45px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0 12px 12px 0;
  background:
    radial-gradient(circle at 32% 28%, rgba(33, 230, 163, 0.2), transparent 42%),
    rgba(255, 255, 255, 0.035);
  color: var(--accent-2);
  cursor: pointer;
}

.search-action span {
  position: absolute;
  left: 13px;
  top: 12px;
  width: 15px;
  height: 15px;
  border: 2px solid var(--accent-2);
  border-radius: 999px;
}

.search-action span::after {
  content: "";
  position: absolute;
  right: -7px;
  bottom: -5px;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent-2);
  transform: rotate(45deg);
}

.search-suggestions {
  min-height: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.search-suggestions button {
  min-height: 22px;
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--muted);
  font-size: 11px;
  background: rgba(255, 255, 255, 0.04);
}

.search-suggestions button:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 11%, rgba(255, 255, 255, 0.04));
}

.pokemon-controls input,
.pokemon-controls select {
  min-height: 39px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  padding: 8px 10px;
}

.custom-select-label {
  min-width: 132px;
}

.custom-select {
  position: relative;
  display: block;
}

.custom-select-button {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
  text-align: left;
}

.custom-select-button::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.78;
}

.custom-select.open .custom-select-button,
.custom-select-button:focus-visible {
  outline: none;
  border-color: rgba(33, 230, 163, 0.66);
  box-shadow: 0 0 0 3px rgba(33, 230, 163, 0.12);
}

.custom-select-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 5px);
  z-index: 12;
  display: none;
  overflow: hidden auto;
  border: 1px solid rgba(168, 85, 247, 0.34);
  border-radius: 8px;
  background: rgba(18, 20, 34, 0.98);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  max-height: 230px;
}

.custom-select.open .custom-select-menu {
  display: grid;
  transform-origin: top;
  animation: dropdownPop 130ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.custom-select-menu button {
  justify-content: flex-start;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  padding: 7px 10px;
  font: inherit;
  font-size: 13px;
  text-align: left;
}

.custom-select-menu button:hover,
.custom-select-menu button[aria-selected="true"] {
  background: var(--selected-tile-bg);
  color: #fff;
}

.pokemon-controls input[type="checkbox"] {
  min-height: 0;
  width: 15px;
  height: 15px;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

#pokemonSearch:focus {
  outline: none;
  border-color: rgba(33, 230, 163, 0.78);
  box-shadow:
    0 0 0 4px rgba(33, 230, 163, 0.13),
    0 0 24px rgba(168, 85, 247, 0.18);
}

.pokemon-controls .search-control {
  flex: 1 1 250px;
}

.inline-check {
  min-height: 39px;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  line-height: 1;
  color: var(--ink) !important;
}

.pokemon-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pokemon-filters .filter-toggle {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  line-height: 1;
  padding: 8px 14px;
  cursor: pointer;
  user-select: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.pokemon-filters .filter-toggle::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 44%, transparent);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.035);
  transition: background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.pokemon-filters .filter-toggle.active::before {
  background: var(--accent-2);
  box-shadow:
    0 0 0 4px rgba(33, 230, 163, 0.11),
    0 0 18px rgba(33, 230, 163, 0.42);
  transform: scale(1.08);
}

.pokemon-filters .filter-toggle:active {
  transform: translateY(1px) scale(0.985);
}

.pokemon-count {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.pokemon-load-sentinel {
  height: 1px;
}

.pokemon-list {
  display: grid;
  gap: 8px;
  max-height: 680px;
  overflow: auto;
  padding-right: 8px;
}

.pokemon-row,
.species-family,
.species-node {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.pokemon-row summary,
.species-family > summary,
.species-node > summary {
  cursor: pointer;
  list-style: none;
}

.pokemon-row summary::-webkit-details-marker,
.species-family summary::-webkit-details-marker,
.species-node summary::-webkit-details-marker {
  display: none;
}

.pokemon-row summary {
  min-height: 58px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
}

.pokeball-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  image-rendering: pixelated;
  filter:
    drop-shadow(0 1px 0 rgba(255, 255, 255, 0.18))
    drop-shadow(0 0 8px rgba(0, 0, 0, 0.24));
}

.pokeball-icon.unknown {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.2) 0 2px, transparent 3px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.13) 0 48%, rgba(255, 255, 255, 0.04) 49% 100%);
  opacity: 0.42;
}

.pokemon-title {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.pokemon-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pokemon-title strong span,
.pokemon-title small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.type-mark {
  --type-color: #8c8f9a;
  width: 18px;
  height: 18px;
  display: inline-block;
  margin-left: 4px;
  position: relative;
  transform: translateY(-1px);
  border: 1px solid color-mix(in srgb, var(--type-color) 68%, white 22%);
  border-radius: 5px;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.34), transparent 34%),
    color-mix(in srgb, var(--type-color) 82%, #11131f);
  vertical-align: middle;
  box-shadow: 0 0 12px color-mix(in srgb, var(--type-color) 30%, transparent);
}

.type-normal { --type-color: #8c8f9a; }
.type-combat { --type-color: #ce416b; }
.type-vol { --type-color: #8fa8dd; }
.type-poison { --type-color: #aa6bc8; }
.type-sol { --type-color: #d97845; }
.type-roche { --type-color: #c5b78c; }
.type-insecte { --type-color: #91c12f; }
.type-spectre { --type-color: #735797; }
.type-acier { --type-color: #5a8ea2; }
.type-feu { --type-color: #ff9d55; }
.type-eau { --type-color: #5090d6; }
.type-plante { --type-color: #63bc5a; }
.type-electrik { --type-color: #f4d23c; }
.type-psy { --type-color: #fa7179; }
.type-glace { --type-color: #73cec0; }
.type-dragon { --type-color: #0b6dc3; }
.type-tenebres { --type-color: #5a5465; }
.type-fee { --type-color: #ec8fe6; }

.type-mark svg {
  width: 100%;
  height: 100%;
  display: block;
  padding: 3px;
  color: #fff;
  fill: currentColor;
  stroke: currentColor;
}

.type-text-normal { color: #b9bbc4; }
.type-text-combat { color: #ff7a9f; }
.type-text-vol { color: #b9cbff; }
.type-text-poison { color: #d9a1f2; }
.type-text-sol { color: #eda277; }
.type-text-roche { color: #e1d4a8; }
.type-text-insecte { color: #bee870; }
.type-text-spectre { color: #c5a6ff; }
.type-text-acier { color: #9ed0df; }
.type-text-feu { color: #ffb06d; }
.type-text-eau { color: #8cc7ff; }
.type-text-plante { color: #98e78f; }
.type-text-electrik { color: #ffe167; }
.type-text-psy { color: #ff9aa1; }
.type-text-glace { color: #a6f0e6; }
.type-text-dragon { color: #82b9ff; }
.type-text-tenebres { color: #b9b0ca; }
.type-text-fee { color: #f5a8ef; }

.pokemon-badges {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.pokemon-badges > * {
  order: 20;
}

.pokemon-badges .shiny {
  order: 1;
}

.pokemon-badges .poke-badge {
  order: 90;
}

.pokemon-badges .poke-badge.mega {
  order: 80;
}

.pokemon-badges .poke-badge.iv {
  order: 100;
}

.poke-badge,
.poke-symbol {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 7px;
}

.poke-symbol {
  width: 24px;
  padding: 0;
}

.poke-symbol.favorite {
  border-color: rgba(247, 209, 84, 0.45);
  color: #f7d154;
}

.poke-symbol.shiny {
  border-color: rgba(247, 209, 84, 0.45);
  color: #f7d154;
}

.poke-symbol.lucky {
  border-color: rgba(33, 230, 163, 0.42);
  color: var(--accent-2);
}

.poke-symbol.not-tradeable {
  position: relative;
  border-color: rgba(239, 68, 68, 0.42);
  color: #ff9b9b;
}

.poke-symbol.not-tradeable::before {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.poke-symbol.not-tradeable::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-38deg);
}

.poke-symbol.buddy {
  position: relative;
  border-color: rgba(247, 209, 84, 0.45);
  background: rgba(247, 209, 84, 0.08);
}

.poke-symbol.buddy::before {
  content: "";
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  border-radius: 2px 50% 50%;
  background: #f7d154;
}

.poke-badge.iv {
  min-width: 54px;
  border-color: color-mix(in srgb, var(--iv-color) 48%, transparent);
  color: var(--iv-color);
  font-weight: 500;
  text-align: center;
  justify-content: center;
  padding-inline: 8px;
}

.iv-value {
  color: var(--iv-color);
  font-weight: 500;
}

.iv-tier-zero { --iv-color: #ff425a; }
.iv-tier-mid { --iv-color: #35d676; }
.iv-tier-blue { --iv-color: #42a5ff; }
.iv-tier-high { --iv-color: #ff38b6; }
.iv-tier-perfect { --iv-color: #ff9f1a; }

.pokemon-detail .iv-value {
  text-shadow: 0 0 12px color-mix(in srgb, var(--iv-color) 28%, transparent);
}

.poke-badge.elite,
.poke-badge.mega {
  border-color: rgba(168, 85, 247, 0.5);
  color: #d9c5ff;
}

.poke-symbol.elite-move {
  position: relative;
  overflow: hidden;
  border-color: rgba(168, 85, 247, 0.55);
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.95) 0 3px, transparent 4px),
    conic-gradient(from 45deg, #8b5cf6, #21e6a3, #8b5cf6);
}

.poke-symbol.elite-move::before {
  content: "";
  width: 13px;
  height: 13px;
  background: #11131f;
  clip-path: polygon(50% 0, 62% 35%, 100% 35%, 69% 56%, 82% 100%, 50% 72%, 18% 100%, 31% 56%, 0 35%, 38% 35%);
}

.poke-symbol.rocket,
.trait-icon-rocket,
.shadow-flame-icon,
.pvp-shadow-flame {
  display: inline-block;
  flex: 0 0 auto;
  width: .78em;
  height: .9em;
  border: 0;
  border-radius: 0;
  background: url("assets/icons/shadow-flame-source.png") center / contain no-repeat;
  box-shadow: none;
  transform: translateY(.05em);
}

.poke-symbol.imposing {
  position: relative;
  overflow: hidden;
  border-color: rgba(98, 125, 74, 0.58);
  background:
    radial-gradient(circle at 32% 30%, #7a8f5a 0 10%, transparent 11%),
    radial-gradient(circle at 68% 30%, #45573a 0 12%, transparent 13%),
    radial-gradient(circle at 42% 72%, #2f3f2b 0 16%, transparent 17%),
    linear-gradient(135deg, #5e7143, #253520);
  box-shadow: 0 0 12px rgba(98, 125, 74, 0.24);
}

.poke-symbol.imposing::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 2px solid rgba(245, 247, 238, 0.88);
  border-radius: 999px;
}

.poke-symbol.imposing::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 10px;
  height: 2px;
  background: rgba(245, 247, 238, 0.88);
  box-shadow: 0 0 0 3px rgba(16, 22, 15, 0.16);
}

.poke-symbol.dynamax,
.poke-symbol.gigantamax {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 92, 183, 0.58);
  background: rgba(255, 92, 183, 0.08);
  color: #ff8fd0;
  box-shadow: 0 0 14px rgba(255, 92, 183, 0.18);
}

.poke-symbol.gigantamax {
  border-color: rgba(137, 32, 60, 0.72);
  background: rgba(137, 32, 60, 0.16);
  color: #a82046;
  box-shadow: 0 0 14px rgba(137, 32, 60, 0.22);
}

.poke-symbol.dynamax::before,
.poke-symbol.dynamax::after,
.poke-symbol.gigantamax::before,
.poke-symbol.gigantamax::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 10px color-mix(in srgb, currentColor 46%, transparent);
}

.poke-symbol.dynamax::before,
.poke-symbol.gigantamax::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.poke-symbol.dynamax::after,
.poke-symbol.gigantamax::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.pokemon-art-field.is-imposing {
  border-color: rgba(98, 125, 74, 0.22);
}

.pokemon-art-field.is-dynamax {
  border-color: rgba(255, 92, 183, 0.22);
}

.pokemon-art-field.is-gigantamax {
  border-color: rgba(137, 32, 60, 0.28);
}

.poke-symbol.egg {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 93, 118, 0.48);
  border-radius: 54% 54% 47% 47%;
  background:
    radial-gradient(circle at 36% 34%, rgba(255, 236, 242, 0.95) 0 2px, transparent 3px),
    radial-gradient(circle at 66% 58%, rgba(255, 236, 242, 0.72) 0 2px, transparent 3px),
    radial-gradient(circle at 42% 70%, rgba(86, 45, 111, 0.78) 0 3px, transparent 4px),
    linear-gradient(150deg, #ff6f7a 0 38%, #b5325b 39% 65%, #5e2a68 66% 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 0 14px rgba(255, 93, 118, 0.18);
}

.poke-symbol.egg::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  height: 6px;
  border-radius: 50% 50% 45% 45%;
  background: rgba(255, 235, 241, 0.86);
  clip-path: polygon(0 58%, 16% 18%, 34% 62%, 50% 24%, 66% 62%, 84% 18%, 100% 58%, 100% 100%, 0 100%);
}

.poke-symbol.egg::after {
  content: "";
  position: absolute;
  inset: 3px 5px 11px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 38%, #ffffff 0 2px, transparent 2.5px),
    radial-gradient(circle at 66% 44%, #ffffff 0 1.8px, transparent 2.3px);
  opacity: 0.92;
}

.poke-symbol.tea-label,
.trait-icon-tea-label {
  position: relative;
  border-color: rgba(224, 183, 98, 0.46);
  background: linear-gradient(135deg, rgba(224, 183, 98, 0.18), rgba(33, 230, 163, 0.08));
}

.poke-symbol.tea-label::before,
.trait-icon-tea-label::before {
  content: "";
  width: 15px;
  height: 10px;
  border: 2px solid #e0b762;
  border-radius: 2px 2px 6px 6px;
  border-top: 0;
}

.poke-symbol.tea-label::after,
.trait-icon-tea-label::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 6px;
  right: 3px;
  top: 7px;
  border: 2px solid #e0b762;
  border-left: 0;
  border-radius: 0 8px 8px 0;
}

.poke-symbol.landscape {
  position: relative;
  overflow: hidden;
  border-color: rgba(126, 216, 255, 0.4);
  background:
    linear-gradient(180deg, #4f8bd8 0 42%, #9fd6ff 43% 54%, #2f7f57 55% 100%);
  box-shadow: 0 0 14px rgba(126, 216, 255, 0.14);
}

.poke-symbol.landscape::before,
.poke-symbol.landscape::after {
  content: "";
  position: absolute;
  bottom: 5px;
  width: 14px;
  height: 10px;
  background: linear-gradient(135deg, #d9f3ff 0 24%, #6f88a8 25% 100%);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.poke-symbol.landscape::before {
  left: 3px;
}

.poke-symbol.landscape::after {
  right: 2px;
  width: 12px;
  height: 8px;
  opacity: 0.82;
}

.poke-symbol.party-hat {
  position: relative;
  border-color: rgba(239, 68, 68, 0.42);
  background: rgba(255, 255, 255, 0.04);
}

.poke-symbol.party-hat::before {
  content: "";
  width: 16px;
  height: 18px;
  transform: translateY(1px) rotate(-8deg);
  border-radius: 3px 3px 2px 2px;
  background:
    radial-gradient(circle at 50% 8%, #f7d154 0 2px, transparent 3px),
    repeating-linear-gradient(135deg, #ef4444 0 4px, #f7d154 4px 7px, #38bdf8 7px 10px);
  clip-path: polygon(50% 0, 92% 86%, 8% 86%);
}

.poke-symbol.party-hat::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 2px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #fff;
}

.pokemon-detail {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
}

.pokemon-detail dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 0;
}

.pokemon-detail dl div {
  min-width: 0;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.pokemon-detail dt {
  color: var(--muted);
  font-size: 11px;
}

.pokemon-detail dd {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 13px;
}

.pokemon-detail .moves-field {
  grid-column: 1 / -1;
}

.pokemon-detail .capture-field.span-full {
  grid-column: 1 / -1;
}

.pokemon-art-field {
  --type-color: #7c8cff;
  position: relative;
  min-height: 112px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, 0.12), transparent 13%),
    radial-gradient(circle at 50% 58%, color-mix(in srgb, var(--type-color) 30%, transparent), transparent 42%),
    linear-gradient(135deg,
      color-mix(in srgb, var(--type-color) 18%, rgba(255, 255, 255, 0.035)),
      rgba(255, 255, 255, 0.012) 58%,
      color-mix(in srgb, var(--type-color) 10%, rgba(0, 0, 0, 0.12)));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -18px 48px rgba(0, 0, 0, 0.18);
}

.pokemon-art-field::before {
  content: "";
  position: absolute;
  inset: 0 20%;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent, color-mix(in srgb, var(--type-color) 34%, transparent), transparent);
  filter: blur(18px);
  opacity: 0.72;
}

.pokemon-art-field::after {
  content: "";
  position: absolute;
  inset: auto 20% 7px;
  height: 12px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.32);
  filter: blur(7px);
}

.pokemon-art-field.is-shadow {
  border-color: rgba(168, 85, 247, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -18px 48px rgba(0, 0, 0, 0.18),
    0 0 34px rgba(168, 85, 247, 0.16);
}

.pokemon-art-field.is-shadow .pokemon-art-aura {
  border-color: rgba(168, 85, 247, 0.62);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.12), transparent 30%),
    rgba(168, 85, 247, 0.22);
  box-shadow:
    0 0 42px rgba(168, 85, 247, 0.46),
    inset 0 0 30px rgba(255, 80, 214, 0.12);
}

.pokemon-art-aura {
  position: absolute;
  width: 124px;
  height: 86px;
  border: 1px solid color-mix(in srgb, var(--type-color) 34%, transparent);
  border-radius: 42% 58% 52% 48%;
  transform: rotate(-18deg);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.14), transparent 30%),
    color-mix(in srgb, var(--type-color) 10%, transparent);
  box-shadow:
    0 0 32px color-mix(in srgb, var(--type-color) 22%, transparent),
    inset 0 0 24px rgba(255, 255, 255, 0.05);
}

.pokemon-art-field img {
  position: relative;
  z-index: 1;
  width: min(174px, 76%);
  max-height: 128px;
  object-fit: contain;
  transform: translateY(2px);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 220ms ease;
  filter:
    saturate(1.08)
    contrast(1.18)
    drop-shadow(0 2px 0 rgba(255, 255, 255, 0.18))
    drop-shadow(0 9px 0 rgba(0, 0, 0, 0.28))
    drop-shadow(0 0 10px color-mix(in srgb, var(--type-color) 22%, transparent));
}

.pokemon-art-field.type-normal { --type-color: #8c8f9a; }
.pokemon-art-field.type-combat { --type-color: #ce416b; }
.pokemon-art-field.type-vol { --type-color: #8fa8dd; }
.pokemon-art-field.type-poison { --type-color: #aa6bc8; }
.pokemon-art-field.type-sol { --type-color: #d97845; }
.pokemon-art-field.type-roche { --type-color: #c5b78c; }
.pokemon-art-field.type-insecte { --type-color: #91c12f; }
.pokemon-art-field.type-spectre { --type-color: #735797; }
.pokemon-art-field.type-acier { --type-color: #5a8ea2; }
.pokemon-art-field.type-feu { --type-color: #ff9d55; }
.pokemon-art-field.type-eau { --type-color: #5090d6; }
.pokemon-art-field.type-plante { --type-color: #63bc5a; }
.pokemon-art-field.type-electrik { --type-color: #f4d23c; }
.pokemon-art-field.type-psy { --type-color: #fa7179; }
.pokemon-art-field.type-glace { --type-color: #73cec0; }
.pokemon-art-field.type-dragon { --type-color: #0b6dc3; }
.pokemon-art-field.type-tenebres { --type-color: #5a5465; }
.pokemon-art-field.type-fee { --type-color: #ec8fe6; }

.pokemon-detail .pokemon-traits {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
  gap: 4px;
}

.pokemon-detail .pokemon-traits > span {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  padding: 6px 7px;
}

.pokemon-detail .pokemon-traits .iv-value {
  display: inline;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.pokemon-detail .pokemon-traits .trait-signal {
  --signal-color: var(--accent-2);
  position: relative;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--signal-color) 28%, var(--line));
  background:
    radial-gradient(circle at 82% 18%, color-mix(in srgb, var(--signal-color) 24%, transparent), transparent 34%),
    linear-gradient(135deg, color-mix(in srgb, var(--signal-color) 15%, transparent), transparent 62%),
    rgba(255, 255, 255, 0.035);
}

.pokemon-detail .pokemon-traits .trait-signal-shiny { --signal-color: #f4c542; }
.pokemon-detail .pokemon-traits .trait-signal-mega { --signal-color: #ff6fae; }
.pokemon-detail .pokemon-traits .trait-signal-background { --signal-color: #7ed8ff; }
.pokemon-detail .pokemon-traits .trait-signal-rocket { --signal-color: #a855f7; }
.pokemon-detail .pokemon-traits .trait-signal-buddy { --signal-color: #f7d154; }
.pokemon-detail .pokemon-traits .trait-signal-tea { --signal-color: #e0b762; }
.pokemon-detail .pokemon-traits .trait-signal-imposing { --signal-color: #8ea75d; }
.pokemon-detail .pokemon-traits .trait-signal-dynamax { --signal-color: #ff8fd0; }
.pokemon-detail .pokemon-traits .trait-signal-gigantamax { --signal-color: #a82046; }

.pokemon-detail .pokemon-traits dt,
.pokemon-detail .pokemon-traits dd {
  min-width: 0;
  position: relative;
  z-index: 1;
}

.pokemon-detail .pokemon-traits dd {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
  font-size: 12px;
}

.pokemon-detail .trait-signal dd {
  display: block;
}

.pokemon-detail .trait-signal small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.pokemon-detail .trait-signal dd:empty {
  display: none;
}

.trait-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: inline-block;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.pokemon-detail .trait-signal .trait-icon {
  position: absolute;
  right: -8px;
  bottom: -13px;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 0;
  opacity: 0.16;
  z-index: 0;
  filter: saturate(1.15) contrast(1.05);
}

.pokemon-detail .trait-signal .trait-icon-shiny {
  background: transparent;
  color: #f4c542;
  opacity: 0.22;
}

.pokemon-detail .trait-signal .trait-icon-shiny::before {
  content: "✦";
  position: absolute;
  inset: -4px;
  display: grid;
  place-items: center;
  font-size: 58px;
  line-height: 1;
  transform: rotate(14deg);
  text-shadow: 0 0 24px rgba(244, 197, 66, 0.22);
}

.trait-icon-mega {
  border-color: rgba(255, 92, 183, 0.5);
  background:
    conic-gradient(from 210deg, transparent 0 32%, #ff6fae 33% 72%, transparent 73% 100%),
    rgba(255, 92, 183, 0.09);
  box-shadow: 0 0 12px rgba(255, 92, 183, 0.22);
}

.trait-icon-landscape {
  border-color: rgba(126, 216, 255, 0.38);
  background:
    linear-gradient(180deg, #4f8bd8 0 42%, #9fd6ff 43% 54%, #2f7f57 55% 100%);
}

.trait-icon-landscape::before,
.trait-icon-landscape::after {
  content: "";
  position: absolute;
  bottom: 3px;
  width: 10px;
  height: 8px;
  background: linear-gradient(135deg, #e2f7ff 0 24%, #7189a7 25% 100%);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.trait-icon-landscape::before {
  left: 2px;
}

.trait-icon-landscape::after {
  right: 1px;
  width: 8px;
  height: 6px;
  opacity: 0.82;
}

.trait-icon-rocket {
  background: url("assets/icons/shadow-flame-source.png") center / contain no-repeat;
}

.trait-icon-buddy {
  border-color: rgba(247, 209, 84, 0.45);
  background:
    radial-gradient(circle at 50% 36%, #f7d154 0 5px, transparent 5.5px),
    radial-gradient(circle at 50% 72%, #f7d154 0 7px, transparent 7.5px),
    rgba(247, 209, 84, 0.08);
}

.pokemon-detail .trait-signal .trait-icon-rocket {
  background: url("assets/icons/shadow-flame-source.png") center / contain no-repeat;
  opacity: 0.22;
}

.trait-icon-imposing {
  border-color: rgba(98, 125, 74, 0.58);
  background:
    radial-gradient(circle at 32% 30%, #7a8f5a 0 10%, transparent 11%),
    radial-gradient(circle at 68% 30%, #45573a 0 12%, transparent 13%),
    radial-gradient(circle at 42% 72%, #2f3f2b 0 16%, transparent 17%),
    linear-gradient(135deg, #5e7143, #253520);
}

.trait-icon-dynamax,
.trait-icon-gigantamax {
  border-color: rgba(255, 92, 183, 0.58);
  background: rgba(255, 92, 183, 0.08);
  color: #ff8fd0;
}

.trait-icon-gigantamax {
  border-color: rgba(137, 32, 60, 0.72);
  background: rgba(137, 32, 60, 0.16);
  color: #a82046;
}

.trait-icon-dynamax::before,
.trait-icon-dynamax::after,
.trait-icon-gigantamax::before,
.trait-icon-gigantamax::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 8px color-mix(in srgb, currentColor 46%, transparent);
}

.trait-icon-dynamax::before,
.trait-icon-gigantamax::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.trait-icon-dynamax::after,
.trait-icon-gigantamax::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.pokemon-detail .trait-signal .trait-icon-dynamax::before,
.pokemon-detail .trait-signal .trait-icon-dynamax::after,
.pokemon-detail .trait-signal .trait-icon-gigantamax::before,
.pokemon-detail .trait-signal .trait-icon-gigantamax::after {
  width: 40px;
  height: 6px;
}

.showcase-score {
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 650;
}

.collection-beta-scores {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.rarity-beta-score {
  border-left: 1px solid rgba(167, 159, 184, .2);
  padding-left: 10px;
  color: #d7b7ff;
  font-size: 11px;
  font-weight: 600;
  cursor: default;
}

.pokemon-detail .type-relations-field {
  grid-column: 1 / -1;
  border-top: 0;
  padding-top: 0;
}

.pokemon-detail .type-relations-field dd {
  margin-top: 0;
}

.pokemon-detail .id-field {
  grid-column: 1 / -1;
}

.pokemon-detail .id-field dd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.capture-flag {
  width: 20px;
  height: 15px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.045);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 14px rgba(126, 216, 255, 0.08);
  vertical-align: -2px;
  overflow: hidden;
}

.capture-flag img {
  width: 17px;
  height: 12px;
  display: block;
  object-fit: cover;
  border-radius: 3px;
  filter: saturate(1.05) contrast(1.04);
}

.capture-flag.compact {
  width: 18px;
  height: 14px;
  border-radius: 5px;
}

.capture-flag.compact img {
  width: 15px;
  height: 11px;
  border-radius: 3px;
}

.stats-field {
  grid-column: 1 / -1;
}

.stats-field dd {
  margin-top: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 20px;
  justify-content: stretch;
}

.stat-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
  justify-content: stretch;
}

.stat-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 9px 10px 8px;
}

.stat-panel em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  text-align: left;
}

.stat-gauge {
  --stat-color: var(--accent);
  position: relative;
  display: inline-grid;
  justify-items: center;
  width: 62px;
  height: 45px;
}

.stat-gauge svg {
  position: absolute;
  inset: 0 0 auto;
  width: 62px;
  height: 34px;
  overflow: visible;
}

.stat-track,
.stat-fill {
  fill: none;
  stroke-width: 5.5;
  stroke-linecap: round;
}

.stat-track {
  stroke: rgba(255, 255, 255, 0.09);
}

.stat-fill {
  stroke: var(--stat-color);
  stroke-dasharray: var(--dash) var(--gap);
  filter: drop-shadow(0 0 7px color-mix(in srgb, var(--stat-color) 30%, transparent));
}

.stat-gauge strong {
  position: relative;
  margin-top: 13px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 760;
}

.stat-gauge small {
  position: relative;
  color: var(--muted);
  font-size: 9px;
}

.stat-attack { --stat-color: #ff657a; }
.stat-defense { --stat-color: #6ea8ff; }
.stat-stamina { --stat-color: #21e6a3; }

.cp-max-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}

.cp-max-panel-single {
  grid-template-columns: 1fr;
}

.cp-max-tile {
  position: relative;
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 9px 112px 8px 10px;
  color: var(--ink);
}

.cp-max-tile small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.cp-max-tile strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 760;
}

.cp-max-primary strong {
  font-size: 22px;
}

.cp-species-corner {
  position: absolute;
  right: 12px;
  top: 10px;
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
  color: var(--muted);
  font-size: 10px;
}

.cp-species-corner b {
  color: var(--ink);
  font-size: 12px;
}

.cp-arc-gauge {
  --cp-color: #f4f7ff;
  --cp-rest: #3153a4;
  position: absolute;
  right: 18px;
  top: 50%;
  width: 92px;
  height: 60px;
  display: grid;
  justify-items: center;
  transform: translateY(-50%);
  pointer-events: none;
}

.cp-arc-gauge svg {
  width: 92px;
  height: 50px;
  overflow: visible;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--cp-rest) 34%, transparent));
}

.cp-arc-gauge path {
  fill: none;
  stroke-linecap: round;
  stroke-width: 8;
}

.cp-arc-track {
  stroke: var(--cp-rest);
}

.cp-arc-fill {
  stroke: var(--cp-color);
  stroke-dasharray: var(--dash) var(--gap);
}

.cp-arc-gauge strong {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--ink);
  font-size: 14px;
  font-weight: 760;
  text-align: center;
}

.cp-arc-gauge small {
  position: absolute;
  top: 35px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.cp-mega-gauge {
  --cp-color: #ff6f9b;
  --cp-rest: #4a314e;
}

.type-relations {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.type-relations section {
  min-width: 0;
}

.type-relations h4 {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.type-relations section > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.type-relation-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 3px 7px 3px 4px;
  color: var(--ink);
  font-size: 11px;
}

.type-relation-chip.weakness {
  background: rgba(255, 83, 112, 0.12);
  border-color: rgba(255, 83, 112, 0.24);
}

.type-relation-chip.resistance {
  background: rgba(33, 230, 163, 0.1);
  border-color: rgba(33, 230, 163, 0.22);
}

.type-relation-chip .type-mark {
  width: 18px;
  height: 18px;
}

.type-relation-chip strong {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.empty-inline {
  color: var(--muted);
  font-size: 11px;
}

.level-roadmap-card {
  display: grid;
  gap: 14px;
}

.level-roadmap-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.level-roadmap-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.level-roadmap-head > strong {
  color: var(--accent-2);
  font-size: 28px;
  line-height: 1;
}

.level-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.level-summary-grid span {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.026);
}

.level-summary-grid em,
.level-step-xp em,
.level-step li small {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.level-summary-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 20px;
}

.level-roadmap-scale {
  position: relative;
  height: 52px;
  margin: 4px 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.level-roadmap-scale::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 21px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}

.level-roadmap-fill {
  position: absolute;
  left: 0;
  top: 21px;
  height: 7px;
  border-radius: 999px;
  pointer-events: none;
}

.level-roadmap-fill {
  width: var(--xp-progress);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 22px rgba(33, 230, 163, 0.18);
}

.level-roadmap-tick {
  position: absolute;
  top: 6px;
  transform: translateX(-50%);
  min-width: 18px;
  text-align: center;
  color: var(--muted);
}

.level-roadmap-tick i {
  display: block;
  width: 1px;
  height: 24px;
  margin: 8px auto 2px;
  background: rgba(255, 255, 255, 0.22);
}

.level-roadmap-tick.reached i {
  background: var(--accent-2);
  box-shadow: 0 0 12px rgba(33, 230, 163, 0.32);
}

.level-roadmap-tick em {
  font-size: 10px;
  font-style: normal;
}

.level-step-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 8px;
}

.level-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.level-step.is-done {
  border-color: rgba(33, 230, 163, 0.22);
  background: rgba(33, 230, 163, 0.035);
}

.level-step.is-gated {
  border-color: rgba(183, 132, 255, 0.25);
  background: rgba(183, 132, 255, 0.04);
}

.level-step summary {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  padding: 10px 12px;
}

.level-step summary strong {
  color: var(--accent-2);
}

.level-step-xp {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px 10px;
  color: var(--ink);
  font-size: 12px;
}

.level-step ul {
  margin: 0;
  padding: 0 12px 12px;
  color: var(--muted);
  font-size: 12px;
}

.level-step li {
  display: grid;
  gap: 2px;
  padding: 7px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  list-style: none;
}

.level-step li span,
.level-step li small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.level-step li span {
  font-size: 0.76rem;
}

.level-step li.is-unknown {
  padding-block: 9px;
}

.level-task-bar {
  display: block;
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.065);
}

.level-task-bar b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.move-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "fast charged-one"
    "fast charged-two";
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.move-entry {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: var(--selected-tile-bg);
}

.move-entry:nth-child(2n + 1) {
  border-right: 1px solid var(--line);
}

.move-entry:nth-child(n + 3),
.move-charged-two,
.move-unlock {
  border-top: 1px solid var(--line);
}

.move-fast {
  grid-area: fast;
}

.move-charged-one {
  grid-area: charged-one;
}

.move-charged-two,
.move-unlock {
  grid-area: charged-two;
}

.move-entry .type-mark {
  margin-left: 0;
  flex: 0 0 auto;
}

.move-entry span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.move-entry small,
.move-entry em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.move-entry strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.move-entry.elite-active {
  background:
    linear-gradient(90deg, rgba(33, 230, 163, 0.12), transparent 72%),
    var(--selected-tile-bg);
  box-shadow: inset 3px 0 0 rgba(33, 230, 163, 0.7);
}

.move-entry.elite-active strong {
  color: var(--accent-2);
  font-weight: 500;
  text-shadow: 0 0 12px rgba(33, 230, 163, 0.35);
}

.move-entry.elite-active em {
  color: rgba(33, 230, 163, 0.78);
}

.unlock-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid rgba(33, 230, 163, 0.34);
  border-radius: 5px;
  color: var(--accent-2);
  font-weight: 900;
  line-height: 1;
  padding-bottom: 1px;
}

.unlock-icon.unavailable {
  position: relative;
  border-color: rgba(239, 68, 68, 0.42);
  color: #ff7887;
}

.unlock-icon.unavailable::before {
  content: "";
  width: 11px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.unlock-icon.unavailable::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-38deg);
}

.move-unavailable strong,
.move-unavailable em {
  color: #ff7887;
}

.species-family,
.species-node {
  padding: 10px;
}

.species-family > summary,
.species-node > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  font-weight: 850;
}

.species-family-name {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.species-family-name small,
.species-node-name small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.species-family-name .vertical-separator {
  height: 18px;
  flex: 0 0 auto;
}

.species-family-meta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.family-complete-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(33, 230, 163, 0.28);
  border-radius: 999px;
  background:
    radial-gradient(circle at 22% 50%, rgba(33, 230, 163, 0.18), transparent 42%),
    rgba(33, 230, 163, 0.07);
  color: #8ff7bd;
  width: 38px;
  height: 24px;
  padding: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.family-complete-badge i {
  position: relative;
  width: 26px;
  height: 12px;
  flex: 0 0 auto;
}

.family-complete-badge i::before {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 5px;
  height: 1px;
  background: linear-gradient(90deg, rgba(33, 230, 163, 0.1), rgba(33, 230, 163, 0.7), rgba(168, 85, 247, 0.55));
  box-shadow: 0 0 9px rgba(33, 230, 163, 0.18);
}

.family-complete-badge i::after {
  content: "";
  position: absolute;
  inset: 1px 0 auto;
  height: 10px;
  background:
    radial-gradient(circle at 3px 5px, #8ff7bd 0 2px, transparent 2.5px),
    radial-gradient(circle at 13px 5px, #d7b7ff 0 2px, transparent 2.5px),
    radial-gradient(circle at 23px 5px, #8ff7bd 0 2px, transparent 2.5px);
}

.species-node {
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.species-node-single {
  margin-top: 0;
}

.species-node-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.species-node-meta {
  min-width: 0;
  flex: 0 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.species-node-meta .pokemon-badges {
  max-width: min(56vw, 520px);
  flex-wrap: nowrap;
  overflow: hidden;
}

.species-node .pokemon-row {
  margin-top: 8px;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 13px;
}

.warning {
  background: var(--warn);
  border-color: rgba(255, 184, 77, 0.28);
}

.danger {
  background: var(--danger);
  border-color: rgba(33, 230, 163, 0.24);
}

.empty {
  color: var(--muted);
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.panel-preparation {
  display: grid;
  gap: 16px;
  min-height: 194px;
  padding: 20px;
}

.panel-preparation-head {
  display: grid;
  gap: 5px;
}

.panel-preparation-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.loading-shimmer {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.055);
}

.loading-shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 0 32%, rgba(126, 216, 255, 0.12) 48%, transparent 64%);
  transform: translateX(-110%);
  animation: loadingSweep 1350ms ease-in-out infinite;
}

.panel-skeleton-rows {
  display: grid;
  gap: 9px;
}

.panel-skeleton-rows i {
  display: block;
  height: 14px;
  border-radius: 6px;
}

.panel-skeleton-rows i:nth-child(1) { width: 74%; }
.panel-skeleton-rows i:nth-child(2) { width: 92%; }
.panel-skeleton-rows i:nth-child(3) { width: 66%; }

.raid-ranking-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 14px 18px;
  color: var(--muted);
  font-size: .92rem;
}

.raid-ranking-loading .dashboard-prep-pulse {
  flex: 0 0 auto;
}

.raid-ranking-loading .loading-shimmer {
  display: block;
  flex: 1 1 auto;
  height: 10px;
  max-width: 240px;
  margin-left: auto;
  border-radius: 999px;
}

.raid-boss-counters .raid-ranking-loading {
  min-height: 38px;
  padding: 6px 0;
  font-size: .8rem;
}

.pvp-loading {
  display: grid;
  gap: 14px;
}

.pvp-loading-tabs,
.pvp-loading-rows {
  display: grid;
  gap: 8px;
}

.pvp-loading-tabs {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.pvp-loading-tabs i {
  height: 42px;
  border-radius: 999px;
}

.pvp-loading-rows i {
  display: block;
  height: 68px;
  border-radius: 8px;
}

@keyframes dashboardIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes preparationPulse {
  0%, 100% { opacity: 0.45; transform: scale(0.86); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes loadingSweep {
  to { transform: translateX(110%); }
}

@keyframes contentReadyIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes prototypeViewIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.994);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes prototypeItemIn {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pokemonDetailReveal {
  from {
    opacity: 0;
    transform: translateY(-6px) scaleY(0.985);
    clip-path: inset(0 0 18px 0);
  }
  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
    clip-path: inset(0);
  }
}

@keyframes dropdownPop {
  from {
    opacity: 0;
    transform: translateY(-4px) scaleY(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

.error-panel {
  margin-top: 16px;
  border: 1px solid rgba(33, 230, 163, 0.24);
  background: var(--danger);
  border-radius: 8px;
  padding: 14px;
}

.reference-update {
  margin: 10px 4px 0;
  color: rgba(167, 159, 184, 0.74);
  font-size: 11px;
  text-align: right;
}

.hidden {
  display: none !important;
}

.pvp-grid {
  align-items: start;
}

.pvp-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 20%, rgba(33, 230, 163, 0.12), transparent 26%),
    radial-gradient(circle at 8% 86%, rgba(168, 85, 247, 0.12), transparent 28%),
    var(--panel);
}

.pvp-intro p,
.pvp-league-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.pvp-source {
  min-width: 150px;
  display: grid;
  gap: 4px;
  justify-items: end;
  color: var(--muted);
}

.pvp-source strong {
  color: var(--accent-2);
}

.pvp-league {
  display: grid;
  gap: 14px;
}

.pvp-league-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
}

.pvp-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.pvp-mode-tabs button {
  min-height: 34px;
  border-radius: 8px;
  color: var(--muted);
}

.pvp-mode-tabs button.active {
  border-color: rgba(33, 230, 163, 0.5);
  background: var(--selected-tile-bg);
  color: var(--ink);
  box-shadow: 0 0 20px rgba(33, 230, 163, 0.1);
}

.pvp-role-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.pvp-role-tabs button {
  min-height: 31px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
}

.pvp-role-tabs button.active {
  border-color: var(--selected-tile-border);
  background: var(--selected-tile-bg);
  color: var(--ink);
}

.pvp-league-tabs button {
  min-width: 0;
  min-height: 32px;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 13px;
}

.pvp-league-tabs button.active {
  border-color: var(--selected-tile-border);
  background: var(--selected-tile-bg);
  color: var(--ink);
}

.pvp-league-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.pvp-league-head > strong {
  min-width: 72px;
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(33, 230, 163, 0.24);
  border-radius: 999px;
  background: rgba(33, 230, 163, 0.08);
  color: var(--accent-2);
}

.pvp-candidates {
  display: grid;
  gap: 8px;
}

.pvp-candidate {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)),
    rgba(255, 255, 255, 0.018);
  overflow: hidden;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.pvp-candidate:hover {
  border-color: rgba(126, 216, 255, 0.24);
  box-shadow: inset 0 0 0 1px rgba(126, 216, 255, 0.08);
}

.pvp-candidate summary {
  display: grid;
  grid-template-columns: minmax(244px, 1.5fr) minmax(168px, 0.86fr) minmax(120px, 0.58fr) minmax(148px, 0.7fr) minmax(166px, 0.82fr) minmax(138px, 0.68fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  cursor: pointer;
  transition: background 180ms ease;
}

.pvp-candidate[open] summary {
  background: rgba(255, 255, 255, 0.018);
}

.pvp-compact-moves {
  grid-column: 1 / -1;
  display: grid;
  gap: 3px;
  padding-left: 40px;
  color: var(--muted);
  font-size: 11px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease, max-height 180ms ease, padding 180ms ease;
}

.pvp-candidate[open] .pvp-compact-moves {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
}

.pvp-compact-moves > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.pvp-compact-move {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.pvp-compact-move .type-mark {
  width: 15px;
  height: 15px;
  margin-left: 0;
}

.pvp-compact-move.is-ok span {
  color: rgba(33, 230, 163, 0.86);
}

.pvp-compact-move.is-wrong span {
  color: #ff7f8f;
}

.pvp-compact-moves i {
  width: 13px;
  height: 1px;
  display: inline-block;
  background: rgba(167, 159, 184, 0.48);
}

.pvp-candidate summary::-webkit-details-marker {
  display: none;
}

.pvp-candidate-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.pvp-candidate-main strong,
.pvp-target strong,
.pvp-score strong {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pvp-shadow-flame {
  position: relative;
  margin-left: -1px;
}

.pvp-candidate-main span,
.pvp-target span,
.pvp-score span,
.pvp-meta span {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pvp-candidate-main .pvp-shadow-flame,
.pvp-target .pvp-shadow-flame {
  display: inline-block;
  overflow: visible;
  min-width: 0;
  color: inherit;
  font-size: 1em;
}

.pvp-score strong {
  color: var(--accent-2);
}

.pvp-score {
  border-radius: 8px;
}

.pvp-score-composite strong {
  color: #d7b7ff;
  font-size: 1.24rem;
  text-shadow: 0 0 18px rgba(168, 85, 247, 0.2);
}

.pvp-score-composite span {
  color: rgba(215, 183, 255, 0.86);
}

.pvp-target {
  position: relative;
  min-width: 0;
  padding-left: 38px;
}

.pvp-candidate.is-current-target .pvp-target {
  visibility: hidden;
}

.pvp-target strong {
  min-height: 22px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pvp-evolution-arrow {
  width: 30px;
  height: 10px;
  display: block;
  position: absolute;
  left: 0;
  top: 20px;
  flex: 0 0 auto;
}

.pvp-evolution-arrow svg {
  width: 30px;
  height: 10px;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 0 9px rgba(33, 230, 163, 0.18));
}

.pvp-evolution-full-arrow {
  opacity: 0.98;
}

.pvp-evolution-bridge {
  position: absolute;
  left: 50%;
  top: 1px;
  width: 12px;
  height: 14px;
  transform: translateX(-50%);
  cursor: default;
}

.pvp-evolution-bridge::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0;
  width: 2px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(126, 216, 255, 0.82), rgba(33, 230, 163, 0.88));
}

.pvp-evolution-bridge.tooltip-active::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 7px);
  z-index: 8;
  transform: translateX(-50%);
  border: 1px solid rgba(126, 216, 255, 0.28);
  border-radius: 7px;
  padding: 5px 8px;
  background: rgba(16, 18, 31, 0.98);
  color: var(--ink);
  font-size: 11px;
  white-space: nowrap;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.36);
}

.pvp-current-name.is-muted {
  color: rgba(167, 159, 184, 0.62);
}

.pvp-controls {
  align-items: center;
  padding-bottom: 2px;
}

.pvp-league-badge {
  flex: 0 0 auto;
  border: 1px solid rgba(126, 216, 255, 0.24);
  border-radius: 999px;
  padding: 2px 7px;
  background: rgba(126, 216, 255, 0.08);
  color: #7ed8ff !important;
  font-size: 11px !important;
  font-weight: 700;
}

.pvp-grade {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid color-mix(in srgb, var(--grade-color) 38%, transparent);
  border-radius: 999px;
  max-width: 100%;
  padding: 5px 8px;
  background:
    radial-gradient(circle at 14% 20%, color-mix(in srgb, var(--grade-color) 32%, transparent), transparent 36%),
    linear-gradient(90deg, color-mix(in srgb, var(--grade-color) 18%, transparent), rgba(255, 255, 255, 0.02));
  color: color-mix(in srgb, var(--grade-color) 82%, #ffffff);
  font-size: 11px;
  white-space: nowrap;
}

.pvp-grade-must { --grade-color: #21e6a3; }
.pvp-grade-excellent { --grade-color: #7ed8ff; }
.pvp-grade-good { --grade-color: #d7b7ff; }
.pvp-grade-context { --grade-color: #f4c542; }

.pvp-meta {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(180px, auto) minmax(0, 1fr);
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pvp-detail {
  padding: 0 10px 10px;
  animation: pvp-detail-in 190ms ease both;
}

.pvp-detail-types {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 0 2px 8px;
}

.pvp-detail-type-icons {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  min-width: 72px;
}

.pvp-detail-types section,
.pvp-coverage section {
  min-width: 0;
}

.pvp-detail-types h4,
.pvp-coverage h4 {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
}

.pvp-detail-types section > div,
.pvp-coverage section > div {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  overflow: hidden;
}

.pvp-move-selectors {
  display: none;
}

.pvp-move-picker .custom-select-button {
  width: 100%;
}

.pvp-floating-move-menu {
  position: fixed;
  z-index: 80;
  display: grid;
  max-height: 240px;
}

.pvp-floating-move-menu button {
  justify-content: flex-start;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 7px 10px;
  color: var(--ink);
  text-align: left;
}

.pvp-floating-move-menu button:hover {
  background: var(--selected-tile-bg);
}

.pvp-floating-move-menu button:has(em) {
  border-color: rgba(190, 198, 220, 0.42);
  background:
    linear-gradient(90deg, rgba(190, 198, 220, 0.1), rgba(190, 198, 220, 0.04)),
    rgba(14, 15, 28, 0.94);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.pvp-move-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "fast charged-one"
    "fast charged-two";
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.pvp-move-line {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border: 0;
  padding: 10px 12px;
  background: var(--selected-tile-bg);
  color: var(--ink);
  text-align: left;
  transition: background 160ms ease, color 160ms ease;
  cursor: pointer;
}

.pvp-recommended-corner {
  position: absolute;
  top: 8px;
  right: 10px;
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(215, 183, 255, 0.72);
  font-size: 10px;
  font-weight: 500;
  pointer-events: none;
}

.pvp-move-line:hover {
  border-color: var(--selected-tile-hover);
  background: var(--selected-tile-bg);
}

.pvp-move-line:first-child {
  grid-area: fast;
  border-right: 1px solid var(--line);
}

.pvp-move-line:nth-child(2) {
  grid-area: charged-one;
}

.pvp-move-line:nth-child(3) {
  grid-area: charged-two;
  border-top: 1px solid var(--line);
}

.pvp-move-line.is-ok strong {
  color: rgba(33, 230, 163, 0.88);
}

.pvp-move-line.is-wrong strong {
  color: #ff7f8f;
}

.pvp-move-line .type-mark {
  margin-left: 0;
  flex: 0 0 auto;
}

.pvp-move-line > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.pvp-move-line small,
.pvp-move-line em {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: normal;
  line-height: 1.25;
}

.pvp-move-line .elite-inline {
  color: var(--accent-2);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.15;
}

.stab-inline {
  color: var(--muted);
  font-style: italic;
  font-weight: 400;
  text-transform: uppercase;
}

.pvp-move-line .move-effect {
  color: var(--accent-2);
  font-weight: 400;
}

.pvp-move-line strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.pvp-charge-gauge {
  display: grid;
  gap: 4px;
  margin-top: 4px;
}

.pvp-charge-line {
  position: relative;
  display: block;
  height: 14px;
}

.pvp-charge-line::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 6px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(126, 216, 255, 0.3), rgba(33, 230, 163, 0.78));
}

.pvp-charge-line i {
  position: absolute;
  top: 2px;
  width: 2px;
  height: 10px;
  border-radius: 999px;
  background: rgba(246, 244, 255, 0.78);
  transform: translateX(-1px);
}

.pvp-charge-line b {
  position: absolute;
  left: 100%;
  top: 6px;
  height: 2px;
  border-radius: 999px;
  background: rgba(33, 230, 163, 0.95);
  box-shadow: 0 0 10px rgba(33, 230, 163, 0.24);
}

.pvp-move-line.is-locked {
  background:
    radial-gradient(circle at 5% 22%, rgba(168, 85, 247, 0.12), transparent 34%),
    var(--selected-tile-bg);
}

.pvp-compact-move.is-locked span,
.pvp-move-line.is-locked small {
  color: #d7b7ff;
}

.pvp-move-line.is-locked strong,
.pvp-builder-move-tile.is-locked strong {
  color: #7ed8ff;
}

.pvp-level-target {
  display: grid;
  gap: 8px;
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(126, 216, 255, 0.035);
}

.pvp-level-target h4 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.pvp-level-target-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pvp-level-target-head > small {
  color: var(--muted);
  font-size: 11px;
}

.pvp-level-target-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.pvp-level-target-values {
  display: flex;
  gap: 28px;
  align-items: center;
}

.pvp-level-target span {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.pvp-level-target small {
  color: var(--muted);
  font-size: 11px;
}

.pvp-level-target strong {
  color: var(--ink);
  font-size: 15px;
}

.pvp-level-cost {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  margin: 0 0 0 auto;
}

.pvp-level-cost span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  color: rgba(246, 244, 255, 0.9);
}

.pvp-resource-icon {
  position: relative;
  display: inline-block;
  flex: none;
  width: 12px;
  height: 12px;
  color: #94ecce;
}

.pvp-resource-icon.is-candy::before,
.pvp-resource-icon.is-candy-xl::before {
  content: "";
  position: absolute;
  inset: 2px 3px;
  border-radius: 999px;
  background: currentColor;
}

.pvp-resource-icon.is-candy::after,
.pvp-resource-icon.is-candy-xl::after {
  content: "";
  position: absolute;
  inset: 2px 0;
  background:
    linear-gradient(135deg, transparent 42%, currentColor 43% 58%, transparent 59%) left center / 4px 100% no-repeat,
    linear-gradient(315deg, transparent 42%, currentColor 43% 58%, transparent 59%) right center / 4px 100% no-repeat;
}

.pvp-resource-icon.is-candy-xl {
  color: #83d7ff;
}

.pvp-resource-icon.is-dust {
  color: #d7b7ff;
}

.pvp-resource-icon.is-dust::before,
.pvp-resource-icon.is-dust::after {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

.pvp-resource-icon.is-dust::after {
  inset: 3px;
  color: #f6f4ff;
}

.pvp-resource-icon.is-dust {
  filter: drop-shadow(0 0 5px rgba(215, 183, 255, 0.32));
}

.pvp-level-arrow {
  position: relative;
  width: 30px;
  height: 10px;
}

.pvp-level-arrow::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 0;
  width: 23px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(126, 216, 255, 0.48), rgba(33, 230, 163, 0.9));
}

.pvp-level-arrow::after {
  content: "";
  position: absolute;
  top: 1px;
  right: 0;
  border: 4px solid transparent;
  border-left-color: rgba(33, 230, 163, 0.9);
}

.pvp-coverage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.pvp-coverage section:last-child {
  text-align: right;
}

.pvp-coverage section:last-child > div {
  justify-content: flex-end;
}

.pvp-builder {
  display: grid;
  gap: 10px;
}

.pvp-builder-style-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 6px;
}

.pvp-builder-style-tabs button {
  min-height: 32px;
  border-radius: 999px;
  color: var(--muted);
}

.pvp-builder-style-tabs button.active {
  border-color: var(--selected-tile-border);
  background: var(--selected-tile-bg);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(33, 230, 163, 0.08), 0 0 18px rgba(33, 230, 163, 0.08);
}

.pvp-builder-actions {
  display: flex;
  justify-content: flex-end;
}

.pvp-builder-actions button {
  min-height: 36px;
  border-color: rgba(126, 216, 255, 0.24);
  border-radius: 999px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.pvp-move-advice {
  display: grid;
  gap: 4px;
  align-self: center;
  color: #d7b7ff;
  font-size: 12px;
}

.pvp-move-advice span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pvp-builder-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.86fr) minmax(128px, 0.24fr) minmax(360px, 1.1fr) auto;
  gap: 8px;
  align-items: stretch;
  transition: opacity 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.pvp-builder-slot-style {
  min-width: 0;
  align-self: stretch;
}

.pvp-builder-slot-style .custom-select-label {
  min-width: 0;
  height: 100%;
  display: grid;
  align-content: stretch;
  gap: 4px;
}

.pvp-builder-slot-style .custom-select-label > span:first-child {
  color: var(--muted);
  font-size: 11px;
}

.pvp-builder-slot-style .custom-select,
.pvp-builder-slot-style .custom-select-button {
  height: 100%;
}

.pvp-builder-slot-style .custom-select-button {
  min-height: 54px;
  padding-inline: 10px;
}

.pvp-builder-row.is-dragging {
  opacity: 0.55;
}

.pvp-builder-row.is-drop-target {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(33, 230, 163, 0.34), 0 0 22px rgba(33, 230, 163, 0.08);
}

.pvp-builder-pick {
  position: relative;
  min-height: 78px;
  display: grid;
  justify-content: stretch;
  align-content: center;
  gap: 4px;
  border: 1px solid rgba(33, 230, 163, 0.22);
  border-radius: 9px;
  padding: 12px 16px 32px;
  background:
    radial-gradient(circle at 92% 18%, rgba(33, 230, 163, 0.14), transparent 34%),
    linear-gradient(90deg, rgba(126, 216, 255, 0.055), rgba(168, 85, 247, 0.055));
  text-align: left;
}

.pvp-builder-accept {
  align-self: center;
  min-width: 44px;
  min-height: 34px;
  padding: 5px 12px;
  border-color: rgba(33, 230, 163, 0.38);
  border-radius: 999px;
  background:
    radial-gradient(circle at 28% 20%, rgba(33, 230, 163, 0.22), transparent 38%),
    rgba(33, 230, 163, 0.08);
  color: var(--accent-2);
  font-weight: 800;
  font-size: 12px;
}

.pvp-builder-pick span,
.pvp-builder-pick em {
  color: var(--muted);
  font-style: normal;
}

.pvp-builder-pick strong {
  color: var(--ink);
  font-size: 26px;
}

.pvp-builder-pick.is-suggested {
  border-color: rgba(126, 216, 255, 0.34);
}

.pvp-role-advice {
  color: rgba(185, 180, 203, 0.72) !important;
  font-size: 12px;
}

.pvp-builder-identity {
  position: absolute;
  right: 14px;
  bottom: 9px;
  left: 16px;
  overflow: hidden;
  color: rgba(185, 180, 203, 0.74);
  font-size: 11px;
  font-weight: 400;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pvp-builder-moves {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.pvp-builder-moves.is-preview .pvp-builder-move-tile {
  cursor: default;
}

.pvp-builder-moves.is-preview .pvp-builder-move-tile:hover {
  transform: none;
}

.pvp-builder-move-tile {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 9px;
  padding: 10px;
  background: var(--selected-tile-bg);
  color: var(--ink);
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.pvp-builder-move-tile.has-recommendation {
  padding-top: 29px;
}

.pvp-builder-move-tile .pvp-recommended-corner {
  left: 10px;
  right: 10px;
  max-width: none;
  text-align: right;
  overflow: visible;
  text-overflow: clip;
}

.pvp-builder-move-tile:hover,
.pvp-builder-move-tile.tooltip-active {
  transform: translateY(-1px);
  border-color: var(--selected-tile-hover);
}

.pvp-builder-move-tile.is-ok strong,
.pvp-compact-move.is-ok b,
.pvp-move-line.is-ok .elite-inline {
  color: var(--accent-2);
}

.pvp-builder-move-tile.is-locked strong {
  color: #7ed8ff;
}

.pvp-builder-move-tile.is-wrong strong {
  color: #ff8fa3;
}

.pvp-builder-move-tile small,
.pvp-builder-move-tile em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
}

.pvp-builder-move-tile em {
  color: var(--accent-2);
  font-weight: 500;
}

.pvp-builder-move-tile strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.pvp-moveset-basis {
  margin-top: 5px;
  color: rgba(126, 216, 255, .78) !important;
  font-size: 12px !important;
}

.custom-select-menu [data-value] {
  justify-content: space-between;
  gap: 10px;
}

.custom-select-menu [data-value] em,
.custom-select-menu [data-value] b {
  color: var(--accent-2);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.custom-multi-select-label {
  min-width: 180px;
}

.custom-multi-select .custom-select-menu {
  max-height: 260px;
  overflow: auto;
}

.custom-multi-select [data-multi-value] {
  justify-content: space-between;
  gap: 10px;
}

.custom-multi-select [data-multi-value]::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.custom-multi-select [data-multi-value][aria-selected="true"]::after {
  background: var(--accent-2);
  box-shadow: 0 0 10px rgba(33, 230, 163, 0.34);
}

.pvp-team-result {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(126, 216, 255, 0.2);
  border-radius: 9px;
  padding: 12px;
  background:
    radial-gradient(circle at 90% 12%, rgba(33, 230, 163, 0.12), transparent 34%),
    rgba(255, 255, 255, 0.02);
}

.pvp-team-overview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.pvp-team-overview > div,
.pvp-team-columns section {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.pvp-team-overview span,
.pvp-team-columns h4,
.pvp-team-columns em {
  color: var(--muted);
  font-style: normal;
}

.pvp-team-overview strong {
  display: block;
  color: var(--accent-2);
  font-size: 24px;
}

.pvp-team-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pvp-team-columns section {
  display: grid;
  gap: 7px;
}

.pvp-team-columns h4 {
  margin: 0;
  font-size: 12px;
}

.pvp-team-columns span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.pvp-team-type-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.pvp-team-type-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
}

.pvp-team-type-chip .type-mark {
  pointer-events: none;
}

.pvp-builder-team-details {
  display: grid;
  gap: 8px;
}

.pvp-builder-team-details h4 {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.pvp-floating-builder-menu {
  position: fixed;
  z-index: 80;
  display: grid;
  max-height: 260px;
}

.pvp-menu-search {
  display: block;
  padding: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pvp-menu-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--ink);
  padding: 8px 10px;
}

.pvp-builder-suggestions {
  margin-top: 6px;
  min-height: 0;
}

.pvp-builder-suggestions:empty {
  display: none;
}

.pvp-menu-options {
  display: grid;
  overflow: hidden auto;
}

.pvp-floating-builder-menu button {
  justify-content: flex-start;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 7px 10px;
  color: var(--ink);
  text-align: left;
}

.pvp-floating-builder-menu button:hover {
  background: linear-gradient(90deg, rgba(33, 230, 163, 0.2), rgba(168, 85, 247, 0.16));
}

@keyframes pvp-detail-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.pvp-footer-note {
  margin: 0;
  color: rgba(167, 159, 184, 0.74);
  font-size: 11px;
  text-align: right;
}

.pvp-update {
  margin: 0;
}

.pokedex-album {
  display: grid;
  gap: 14px;
}

.pokedex-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.pokedex-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.pokedex-head strong {
  color: var(--accent-2);
  font-size: 22px;
}

.pokedex-collection-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.pokedex-collection-tabs button {
  min-height: 30px;
  border-radius: 999px;
  padding: 5px 11px;
  color: var(--muted);
  white-space: nowrap;
}

.pokedex-collection-tabs button.active {
  border-color: var(--selected-tile-border);
  color: var(--ink);
  background: var(--selected-tile-bg);
}

.pokedex-region-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.pokedex-region-tabs button {
  --region-color: #7f8aa3;
  min-height: 30px;
  border-color: color-mix(in srgb, var(--region-color) 28%, var(--line));
  border-radius: 999px;
  padding: 5px 11px;
  background:
    radial-gradient(circle at 18% 20%, color-mix(in srgb, var(--region-color) 18%, transparent), transparent 38%),
    rgba(255, 255, 255, 0.028);
  color: var(--muted);
  white-space: nowrap;
}

.pokedex-region-tabs button.active {
  border-color: color-mix(in srgb, var(--region-color) 62%, rgba(255, 255, 255, 0.18));
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, color-mix(in srgb, var(--region-color) 34%, transparent), transparent 38%),
    linear-gradient(90deg, color-mix(in srgb, var(--region-color) 22%, transparent), rgba(33, 230, 163, 0.1));
}

.pokedex-missing-toggle {
  width: fit-content;
  min-height: 32px;
  border-radius: 999px;
  padding: 5px 12px;
  color: var(--muted);
  white-space: nowrap;
  background:
    radial-gradient(circle at 18% 20%, rgba(143, 168, 221, 0.12), transparent 42%),
    rgba(255, 255, 255, 0.035);
}

.pokedex-missing-toggle.active {
  color: var(--ink);
  border-color: var(--selected-tile-border);
  background: var(--selected-tile-bg);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), 0 0 18px rgba(33, 230, 163, 0.12);
}

.pokedex-source {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.collection-prototype {
  gap: 16px;
}

.collection-prototype .prototype-controls {
  display: grid;
  grid-template-columns: minmax(220px, .95fr) auto minmax(92px, .4fr) minmax(104px, .46fr) minmax(108px, .5fr) minmax(108px, .5fr) minmax(118px, .56fr) auto;
  align-items: end;
  column-gap: 10px;
  row-gap: 12px;
}

.collection-prototype .prototype-controls .search-control,
.collection-prototype .prototype-controls .custom-select-label,
.collection-prototype .prototype-controls .custom-multi-select-label {
  width: 100%;
  min-width: 0;
}

.collection-prototype .prototype-controls .inline-check {
  align-self: end;
  justify-self: start;
  margin-bottom: 0;
  white-space: nowrap;
}

.collection-prototype .prototype-controls .custom-select-label,
.collection-prototype .prototype-controls .custom-multi-select-label,
.collection-prototype .prototype-controls .inline-check {
  background: transparent !important;
  box-shadow: none !important;
}

.collection-prototype .prototype-controls .inline-check {
  border-color: transparent;
}

.collection-prototype .prototype-controls .inline-check:hover,
.collection-prototype .prototype-controls .inline-check:has(input:checked) {
  background: transparent !important;
  box-shadow: none !important;
  transform: none;
}

.collection-prototype .prototype-controls .inline-check.is-disabled {
  color: color-mix(in srgb, var(--muted) 72%, transparent) !important;
  cursor: default;
}

.collection-prototype .prototype-controls .inline-check.is-disabled input {
  cursor: default;
  opacity: .48;
}

.prototype-mode-toggle {
  align-self: end;
  min-height: 45px;
  justify-self: end;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 0%, rgba(168, 85, 247, .16), transparent 44%),
    rgba(255, 255, 255, .035);
  color: var(--text);
  padding: 8px 14px;
  font-weight: 650;
  white-space: nowrap;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.prototype-mode-toggle:hover,
.prototype-mode-toggle[aria-pressed="true"] {
  border-color: var(--selected-tile-border);
  background: var(--selected-tile-bg);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .045), 0 0 18px rgba(33, 230, 163, .1);
}

.prototype-mode-toggle:hover {
  transform: translateY(-1px);
}

.collection-prototype .prototype-controls .search-control {
  position: relative;
}

.collection-prototype .prototype-controls .search-suggestions {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-height: 0;
  pointer-events: auto;
}

.collection-share-filter {
  display: grid;
  gap: 12px;
  margin: 14px 0 16px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 10px;
  background:
    radial-gradient(circle at 8% 20%, rgba(168, 85, 247, .14), transparent 36%),
    linear-gradient(105deg, rgba(143, 168, 221, .08), rgba(33, 230, 163, .055)),
    rgba(255, 255, 255, .025);
}

.collection-share-filter-head,
.collection-share-filter-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.collection-share-filter-head strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.collection-share-filter-head .share-selection-note {
  display: block;
  max-width: 760px;
  color: var(--text) !important;
  line-height: 1.35;
}

.collection-share-filter-head span,
.collection-share-filter p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.collection-share-reset {
  min-height: 32px;
  border-radius: 999px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, .035);
}

.collection-share-reset:not(:disabled):hover {
  border-color: color-mix(in srgb, var(--accent) 54%, var(--line));
  color: var(--ink);
  background: var(--selected-tile-bg);
}

.collection-share-reset:disabled {
  opacity: .46;
  cursor: default;
}

.share-type-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 520px;
}

.share-type-picker button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, .035);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.share-type-picker button:hover,
.share-type-picker button.active {
  border-color: color-mix(in srgb, var(--accent) 56%, var(--line));
  background: var(--selected-tile-bg);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04), 0 0 18px rgba(33, 230, 163, .09);
}

.share-type-picker button:hover {
  transform: translateY(-1px);
}

.share-type-picker .type-mark {
  width: 18px;
  height: 18px;
}

.share-missing-toggle {
  align-self: end;
}

@media (max-width: 1180px) {
  .collection-prototype .prototype-controls {
    grid-template-columns: minmax(260px, 1.25fr) auto repeat(4, minmax(118px, 1fr));
  }
}

@media (max-width: 780px) {
  .collection-prototype .prototype-controls {
    grid-template-columns: 1fr;
  }
}

.prototype-album-shell,
.prototype-detail-shell {
  animation: prototypeViewIn 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.prototype-detail-shell {
  display: grid;
  gap: 12px;
}

.prototype-detail-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    radial-gradient(circle at 88% 18%, rgba(33, 230, 163, 0.12), transparent 36%),
    rgba(255, 255, 255, 0.028);
  animation: prototypeItemIn 180ms ease-out both;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.prototype-detail-head > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.prototype-detail-head strong {
  overflow: hidden;
  color: var(--text);
  font-size: 1.08rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prototype-detail-head small {
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.prototype-back {
  min-height: 34px;
  border-radius: 999px;
  padding: 6px 12px;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.prototype-back:hover {
  border-color: color-mix(in srgb, var(--accent) 54%, var(--line));
  background: var(--selected-tile-bg);
  box-shadow: 0 0 18px rgba(33, 230, 163, 0.11);
  transform: translateY(-1px);
}

.prototype-back:active,
.collection-prototype .pokedex-missing-toggle:active,
.collection-prototype .custom-select-button:active,
.collection-prototype .search-action:active {
  transform: translateY(1px) scale(0.99);
}

.prototype-pokemon-list {
  max-height: 720px;
}

.collection-prototype .tcg-card,
.collection-prototype .pokemon-row {
  animation: prototypeItemIn 190ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.collection-prototype .tcg-card {
  content-visibility: auto;
  contain-intrinsic-size: 178px 232px;
}

.collection-prototype .tcg-card.is-drillable:hover {
  transform: translateY(-2px);
}

.collection-prototype .tcg-card.is-drillable:hover .pokemon-art-field img,
.collection-prototype .pokemon-row:hover .pokemon-art-field img {
  transform: translateY(-2px) scale(1.025);
}

.collection-prototype .tcg-card.is-drillable:active {
  transform: translateY(0) scale(0.988);
}

.collection-prototype .pokemon-row {
  overflow: clip;
}

.collection-prototype .pokemon-row[open] {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  box-shadow:
    inset 0 0 0 1px rgba(33, 230, 163, 0.05),
    0 16px 42px rgba(0, 0, 0, 0.16);
}

.pokemon-row[open] .pokemon-detail,
.species-node[open] > .pokemon-list,
.species-family[open] > .species-node {
  transform-origin: top;
  animation: pokemonDetailReveal 240ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.tcg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 12px;
}

.tcg-card {
  --card-type: #7f8aa3;
  font-family: "Gill Sans", "Trebuchet MS", "Arial Narrow", system-ui, sans-serif;
  position: relative;
  contain: layout paint style;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  min-width: 0;
  display: grid;
  grid-template-rows: auto 124px auto;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--card-type) 38%, var(--line));
  border-radius: 10px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--card-type) 15%, transparent), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 10px;
}

.tcg-card.mega-card {
  border-color: rgba(255, 82, 135, 0.34);
  background:
    radial-gradient(circle at 82% 16%, rgba(255, 82, 135, 0.16), transparent 34%),
    linear-gradient(145deg, color-mix(in srgb, var(--card-type) 15%, transparent), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
}

.tcg-card.mega-card .pokemon-art-field {
  box-shadow: inset 0 0 0 1px rgba(255, 82, 135, 0.18);
}

.region-all,
.pokedex-region-tabs .region-all { --region-color: #8fa8dd; }
.region-metro,
.pokedex-region-tabs .region-metro { --region-color: #7ed8ff; }
.region-heritage,
.pokedex-region-tabs .region-heritage { --region-color: #d7b7ff; }
.region-tropical,
.pokedex-region-tabs .region-tropical { --region-color: #21e6a3; }
.region-alpine,
.pokedex-region-tabs .region-alpine { --region-color: #b7d4ff; }
.region-city,
.pokedex-region-tabs .region-city { --region-color: #8f9cff; }
.region-elegant,
.pokedex-region-tabs .region-elegant { --region-color: #ec8fe6; }
.region-island,
.pokedex-region-tabs .region-island { --region-color: #63b3ff; }
.region-sport,
.pokedex-region-tabs .region-sport { --region-color: #f03a3a; }
.region-ancient,
.pokedex-region-tabs .region-ancient { --region-color: #e0b762; }
.region-sunset,
.pokedex-region-tabs .region-sunset { --region-color: #ff9d55; }

.tcg-card.type-plante { --card-type: #21e6a3; }
.tcg-card.type-feu { --card-type: #ff8a50; }
.tcg-card.type-eau { --card-type: #63b3ff; }
.tcg-card.type-insecte { --card-type: #99c95a; }
.tcg-card.type-normal { --card-type: #aab0be; }
.tcg-card.type-poison { --card-type: #b774ff; }
.tcg-card.type-electrik { --card-type: #f7d154; }
.tcg-card.type-sol { --card-type: #c59b5b; }
.tcg-card.type-fee { --card-type: #ec8fe6; }

.tcg-card-top {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: start;
}

.tcg-card-top strong {
  min-width: 0;
  flex: 1 1 auto;
  color: var(--ink);
  font-size: clamp(8.5px, 0.92vw, 11px);
  line-height: 1.08;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tcg-count {
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--card-type) 44%, var(--line));
  border-radius: 999px;
  padding: 2px 6px;
  color: var(--accent-2);
  font-size: 10.5px;
  font-family: inherit;
  font-weight: 800;
}

.tcg-count.empty {
  border-color: rgba(255, 103, 132, .48);
  color: #ff8fa3;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 103, 132, .2), transparent 58%),
    rgba(255, 70, 105, .08);
}

.tcg-illustration {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: transparent;
}

.tcg-illustration::before {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: -20px;
  height: 50px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--card-type) 22%, rgba(255, 255, 255, 0.05));
}

.tcg-illustration img {
  position: relative;
  z-index: 2;
  width: min(118px, 86%);
  height: 108px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.38));
}

.tcg-illustration.pokemon-art-field {
  min-height: 0;
  padding: 0;
}

.tcg-illustration.pokemon-art-field::before {
  inset: 0 12%;
}

.tcg-illustration.pokemon-art-field::after {
  inset: auto 16% 6px;
}

.tcg-illustration.pokemon-art-field img {
  width: min(118px, 86%);
  max-height: 108px;
}

.tcg-card.seen .tcg-illustration img:not(.is-silhouette) {
  filter: brightness(0) opacity(0.42) drop-shadow(0 12px 18px rgba(0, 0, 0, 0.38));
}

.tcg-card.unknown .tcg-illustration {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.045) 0 8px, transparent 8px 16px),
    rgba(255, 255, 255, 0.025);
}

.tcg-card.unknown {
  opacity: 0.6;
}

.tcg-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.tcg-card-body p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
}

.tcg-types,
.tcg-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.tcg-status {
  width: max-content;
  border: 1px solid color-mix(in srgb, var(--card-type) 34%, var(--line));
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--ink);
  font-size: 10px;
}

.tcg-card.is-drillable .tcg-status {
  grid-column: 1 / -1;
}

.event-source-note {
  margin: 6px 0 0;
  color: var(--muted);
}

.event-plan-card {
  display: grid;
  gap: 14px;
}

.event-plan-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.event-plan-head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.event-plan-head > span {
  max-width: 260px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.event-targets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.event-targets > span,
.event-actions p {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.026);
}

.event-targets strong,
.event-targets em,
.event-targets small {
  display: block;
}

.event-targets em,
.event-targets small {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.event-actions {
  display: grid;
  gap: 8px;
}

.event-actions p {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 10px;
  margin: 0;
}

.event-actions strong {
  color: var(--accent-2);
  text-transform: capitalize;
}

.event-action-secondaire strong {
  color: #d7b7ff;
}

.event-action-facultatif strong {
  color: var(--muted);
}

.event-action-perfectionniste strong {
  color: var(--muted);
}

.event-mode-tabs {
  grid-column: span 12;
  margin-bottom: 4px;
}

.event-mode-tabs.pvp-mode-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.event-source-note {
  margin: 0;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 860px) {
  .app-shell {
    width: min(100vw - 20px, 1180px);
    padding-top: 10px;
  }

  .upload-panel {
    padding: 18px;
    gap: 24px;
  }

  .landing-header {
    display: grid;
    justify-items: start;
  }

  .brand-wordmark {
    font-size: 34px;
  }

  .landing-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .drop-zone {
    min-height: 280px;
  }

  .dashboard-header {
    display: grid;
  }

  .pvp-intro,
  .pvp-league-head {
    display: grid;
  }

  .pvp-source {
    justify-items: start;
  }

  .pvp-league-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 14px;
  }

  .pvp-candidate summary,
  .pvp-meta {
    grid-template-columns: 1fr;
  }

  .pvp-team-overview,
  .pvp-team-columns,
  .pvp-builder-row {
    grid-template-columns: 1fr;
  }

  .level-summary-grid,
  .level-step-list {
    grid-template-columns: 1fr;
  }

  .pvp-move-grid {
    grid-template-columns: 1fr;
    grid-template-areas: none;
  }

  .pvp-move-line:first-child,
  .pvp-move-line:nth-child(2),
  .pvp-move-line:nth-child(3) {
    grid-area: auto;
    border-right: 0;
  }

  .pvp-move-line:nth-child(n + 2) {
    border-top: 1px solid var(--line);
  }

  .pvp-grade {
    justify-self: start;
  }

  .account-header-main {
    grid-template-columns: 1fr;
  }

  .team-showcase {
    min-height: 112px;
  }

  .span-3,
  .span-4,
  .span-6,
  .span-8,
  .tab-panel .grid > .metric:nth-child(1),
  .tab-panel .grid > .metric:nth-child(2),
  .tab-panel .grid > .metric:nth-child(3) {
    grid-column: span 12;
  }

  .bar-row {
    grid-template-columns: minmax(80px, 120px) 1fr;
  }

  .bar-row strong:last-child {
    grid-column: 2;
  }

  .pokemon-detail dl {
    grid-template-columns: 1fr;
  }

  .pokemon-detail .pokemon-traits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pokemon-art-field {
    min-height: 106px;
  }

  .stats-field {
    grid-template-columns: 1fr;
  }

  .stats-field dd {
    grid-template-columns: 1fr;
  }

  .pvp-builder-row {
    grid-template-columns: 1fr;
  }

  .pvp-builder-style-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pvp-builder-moves {
    grid-template-columns: 1fr;
  }

  .stat-panels {
    grid-template-columns: 1fr;
    justify-content: flex-start;
  }

  .cp-max-panel {
    grid-template-columns: 1fr;
  }

  .type-relations {
    grid-template-columns: 1fr;
  }

  .move-list {
    grid-template-columns: 1fr;
    grid-template-areas: none;
  }

  .move-fast,
  .move-charged-one,
  .move-charged-two,
  .move-unlock {
    grid-area: auto;
  }

  .move-entry:nth-child(2n + 1) {
    border-right: 0;
  }

.move-entry:nth-child(n + 2) {
    border-top: 1px solid var(--line);
  }
}

.raid-test-rank {
  color: var(--accent-2);
  font-weight: 800;
}

.raid-test-score {
  display: grid;
  gap: 3px;
  align-content: start;
  justify-items: end;
}

.raid-test-score strong {
  color: var(--text);
}

.raid-counter-row .raid-test-score strong {
  font-size: 1.32rem;
  line-height: 1.05;
}

.raid-counter-row .raid-test-score small {
  order: -1;
}

.raid-test-score small {
  color: var(--muted);
}

.raid-upgrade-chip {
  display: inline-flex;
  width: fit-content;
  padding: 3px 8px;
  border: 1px solid rgba(255, 121, 121, 0.42);
  border-radius: 999px;
  background: rgba(255, 93, 118, 0.12);
  color: #ff9aa9;
  font-size: 0.72rem;
  font-style: normal;
}

@keyframes raidFadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.raid-control-card {
  display: grid;
  gap: 18px;
}

.raid-controls {
  display: block;
}

.raid-type-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.raid-type-picker button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 0%, rgba(143, 168, 221, .12), transparent 50%),
    rgba(255, 255, 255, .035);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.raid-type-picker button:hover,
.raid-type-picker button.active {
  border-color: color-mix(in srgb, var(--accent) 56%, var(--line));
  background: var(--selected-tile-bg);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04), 0 0 18px rgba(33, 230, 163, .09);
}

.raid-type-picker button:hover {
  transform: translateY(-1px);
}

.raid-type-picker .type-mark {
  width: 20px;
  height: 20px;
}

.raid-control-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.raid-duplicate-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 20%, rgba(33, 230, 163, .12), transparent 42%),
    rgba(255, 255, 255, .035);
  color: var(--muted);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.raid-duplicate-toggle:hover,
.raid-duplicate-toggle:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 54%, var(--line));
  background:
    linear-gradient(90deg, rgba(168, 85, 247, .18), rgba(33, 230, 163, .12)),
    rgba(255, 255, 255, .04);
  color: var(--text);
}

.raid-duplicate-toggle input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
}

.raid-reset-button {
  min-height: 34px;
  padding: 6px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--line));
  border-radius: 999px;
  background:
    radial-gradient(circle at 18% 20%, rgba(33, 230, 163, .18), transparent 42%),
    linear-gradient(90deg, rgba(143, 168, 221, .13), rgba(33, 230, 163, .08));
  color: var(--text);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.raid-reset-button:hover {
  border-color: color-mix(in srgb, var(--accent) 72%, var(--line));
  box-shadow: 0 0 18px rgba(33, 230, 163, .12);
  transform: translateY(-1px);
}

.raid-boss-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.raid-boss-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 84%, black);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  animation: raidFadeUp 220ms ease both;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.raid-boss-button:hover,
.raid-boss-button.active {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--panel)), var(--panel));
  transform: translateY(-1px);
}

.raid-boss-button > span:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.raid-boss-button > span:last-child {
  display: flex;
  gap: 5px;
}

.raid-boss-button .type-mark {
  width: 22px;
  height: 22px;
}

.raid-boss-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.raid-bosses-card h3 {
  margin-bottom: 14px;
}

.raid-boss-showcase {
  position: relative;
  overflow: hidden;
  min-height: 440px;
  border: 1px solid color-mix(in srgb, var(--card-type, var(--accent)) 36%, var(--line));
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 18%, color-mix(in srgb, var(--card-type, var(--accent)) 28%, transparent), transparent 38%),
    linear-gradient(180deg, color-mix(in srgb, var(--card-type, var(--accent)) 18%, var(--panel)), var(--panel) 54%, color-mix(in srgb, black 18%, var(--panel)));
  box-shadow: 0 18px 48px rgba(0, 0, 0, .24);
  animation: raidFadeUp 260ms ease both;
}

.raid-boss-showcase.type-insecte { --card-type: #74c56a; }
.raid-boss-showcase.type-combat { --card-type: #e36b66; }
.raid-boss-showcase.type-electrik { --card-type: #f2d55b; }
.raid-boss-showcase.type-glace { --card-type: #81d9ee; }
.raid-boss-showcase.type-psy { --card-type: #e779bd; }
.raid-boss-showcase.type-feu { --card-type: #f28b54; }
.raid-boss-showcase.type-spectre { --card-type: #8c77d6; }
.raid-boss-showcase.type-tenebres { --card-type: #7f718e; }
.raid-boss-showcase.type-dragon { --card-type: #7d8cff; }

.raid-boss-showcase header {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px 0;
}

.raid-level-pill {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--card-type, var(--accent)) 52%, var(--line));
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .08), transparent),
    rgba(8, 10, 20, .44);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .08),
    0 0 18px color-mix(in srgb, var(--card-type, var(--accent)) 16%, transparent);
  color: color-mix(in srgb, #f6f7ff 86%, var(--card-type, var(--accent)));
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
}

.raid-heads {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 5px 7px;
  border: 1px solid color-mix(in srgb, var(--card-type, var(--accent)) 46%, var(--line));
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .06), transparent),
    rgba(8, 10, 20, .42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

.raid-heads span {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
}

.raid-heads svg {
  width: 19px;
  height: 19px;
  overflow: visible;
  filter:
    drop-shadow(0 0 8px color-mix(in srgb, var(--card-type, var(--accent)) 42%, transparent))
    drop-shadow(0 1px 0 rgba(255, 255, 255, .18));
}

.raid-head-shape {
  fill: color-mix(in srgb, #eef3ff 90%, var(--card-type, var(--accent)));
}

.raid-head-face {
  fill: #111522;
  opacity: .92;
}

.raid-boss-types {
  display: flex;
  gap: 6px;
}

.raid-boss-types .type-mark {
  width: 26px;
  height: 26px;
}

.raid-boss-hero {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 205px;
  padding: 12px 18px 4px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.raid-boss-hero:hover,
.raid-boss-hero:active,
.raid-boss-hero:focus,
.raid-boss-hero:focus-visible {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none;
}

.raid-boss-glow {
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--card-type, var(--accent)) 34%, transparent), transparent 66%);
  filter: blur(6px);
}

.raid-boss-hero img {
  position: relative;
  z-index: 1;
  width: min(170px, 70%);
  height: 145px;
  object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .38));
  transition: transform 180ms ease;
}

.raid-boss-hero:hover img {
  transform: translateY(-4px) scale(1.03);
}

.raid-boss-hero strong {
  position: relative;
  z-index: 2;
  margin-top: -4px;
  color: var(--text);
  font-size: 1.45rem;
  letter-spacing: 0;
}

.raid-selected-boss {
  position: relative;
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 190px;
  padding: 18px;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(circle at 50% 44%, color-mix(in srgb, var(--type-color, var(--accent)) 24%, transparent), transparent 42%),
    linear-gradient(135deg, color-mix(in srgb, var(--type-color, var(--accent)) 10%, var(--panel)), var(--panel));
}

.raid-selected-boss .raid-boss-glow {
  width: 220px;
  height: 220px;
  opacity: .8;
}

.raid-selected-boss img {
  position: relative;
  z-index: 1;
  width: min(190px, 42vw);
  height: 140px;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .4));
}

.raid-selected-boss > div {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.raid-selected-boss strong {
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
}

.raid-selected-boss .type-mark {
  width: 23px;
  height: 23px;
}

.raid-boss-counters {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 10px 14px 16px;
  list-style: none;
}

.raid-boss-counters li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, white 6%, var(--line));
  border-radius: 10px;
  background: rgba(8, 10, 20, .36);
  backdrop-filter: blur(10px);
}

.raid-counter-position {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--card-type, var(--accent)) 28%, transparent);
  color: var(--accent-2);
  font-size: 0.76rem;
  font-weight: 800;
}

.raid-boss-counters strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.raid-boss-counters span:not(.raid-counter-position),
.raid-boss-counters em {
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.raid-counter-list {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.raid-counter-row {
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--panel) 95%, var(--accent)), var(--panel));
  overflow: hidden;
  animation: raidFadeUp 220ms ease both;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.raid-counter-row:nth-child(even) {
  background:
    linear-gradient(135deg, rgba(143, 168, 221, .035), transparent 48%),
    color-mix(in srgb, var(--panel) 89%, black);
}

.raid-counter-row:last-child {
  border-bottom: 0;
}

.raid-counter-row:hover {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 34%, transparent);
}

.raid-counter-row:hover summary {
  box-shadow: inset 0 0 0 1px rgba(33, 230, 163, .08);
}

.raid-counter-row.is-shadow {
  background:
    radial-gradient(circle at 80px 50%, rgba(139, 92, 246, .18), transparent 42%),
    linear-gradient(135deg, rgba(50, 34, 78, .28), color-mix(in srgb, var(--panel) 92%, black));
}

.raid-counter-row.is-mega {
  background:
    radial-gradient(circle at 82px 50%, rgba(255, 111, 174, .16), transparent 38%),
    linear-gradient(135deg, rgba(76, 43, 92, .24), color-mix(in srgb, var(--panel) 91%, black));
}

.raid-counter-row.is-tagged-other {
  filter: saturate(.72);
}

.raid-counter-row.is-tagged-current summary {
  box-shadow: inset 4px 0 0 rgba(33, 230, 163, .72);
}

.raid-counter-row.is-tagged-other summary {
  box-shadow: inset 4px 0 0 rgba(143, 168, 221, .34);
}

.raid-counter-row summary {
  display: grid;
  grid-template-columns: 58px minmax(340px, 1.05fr) minmax(380px, 1.18fr) minmax(150px, .38fr);
  gap: 16px;
  align-items: stretch;
  padding: 12px 16px;
  cursor: pointer;
  list-style: none;
}

.raid-counter-row summary::-webkit-details-marker {
  display: none;
}

.raid-counter-row[open] summary {
  border-bottom: 1px solid var(--line-soft);
}

.raid-counter-row .pokemon-detail {
  border: 0;
  border-radius: 0;
  background: transparent;
  animation: raidFadeUp 180ms ease both;
}

.raid-upgrade-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 16px 12px;
  background: transparent;
}

.raid-upgrade-panel > span {
  position: relative;
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.raid-upgrade-panel .raid-set-current {
  border-color: var(--selected-tile-border);
  background: var(--selected-tile-bg);
}

.raid-upgrade-panel .raid-set-best-target {
  border-color: color-mix(in srgb, var(--type-color, var(--accent-2)) 52%, var(--line));
  background:
    radial-gradient(circle at 92% 20%, color-mix(in srgb, var(--type-color, var(--accent-2)) 18%, transparent), transparent 34%),
    color-mix(in srgb, var(--type-color, var(--accent-2)) 7%, rgba(255, 255, 255, 0.025));
}

.raid-upgrade-panel .raid-set-best-absolute {
  border-color: color-mix(in srgb, var(--accent-2) 48%, var(--line));
  background:
    radial-gradient(circle at 92% 20%, rgba(33, 230, 163, 0.13), transparent 34%),
    rgba(33, 230, 163, 0.035);
}

.raid-upgrade-panel small,
.raid-upgrade-panel em {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.raid-upgrade-panel strong {
  position: relative;
  z-index: 1;
  overflow: hidden;
  color: var(--text);
  font-size: 1.08rem;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.raid-set-moves {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.raid-set-move {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.raid-set-move .type-mark {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.raid-set-move em {
  overflow: hidden;
  color: var(--text);
  font-size: inherit;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.raid-set-moves b {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: .95rem;
  font-weight: 800;
}

.raid-set-empty {
  color: var(--muted);
}

.raid-upgrade-panel .raid-set-best-target::after,
.raid-upgrade-panel .raid-set-best-absolute::after {
  content: attr(data-gain);
  position: absolute;
  right: 10px;
  top: 50%;
  z-index: 0;
  transform: translateY(-50%);
  color: rgba(33, 230, 163, 0.12);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.raid-upgrade-panel .raid-set-best-absolute::after {
  color: rgba(33, 230, 163, 0.13);
}

.raid-gains-card {
  position: relative;
  display: grid;
  gap: 12px;
  margin: 0 16px 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background:
    radial-gradient(circle at 94% 12%, rgba(33, 230, 163, .14), transparent 32%),
    linear-gradient(135deg, rgba(168, 85, 247, .08), rgba(33, 230, 163, .045)),
    rgba(255, 255, 255, .025);
  overflow: hidden;
}

.raid-gains-card::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 18px;
  width: 190px;
  height: 74px;
  opacity: 0.16;
  background:
    linear-gradient(135deg, transparent 0 21%, var(--accent-2) 22% 25%, transparent 26% 43%, var(--accent-2) 44% 47%, transparent 48% 67%, var(--accent-2) 68% 72%, transparent 73%),
    linear-gradient(45deg, transparent 0 70%, var(--accent-2) 71% 75%, transparent 76%);
  clip-path: polygon(0 76%, 18% 56%, 32% 64%, 52% 34%, 66% 43%, 88% 10%, 100% 21%, 90% 23%, 67% 59%, 54% 48%, 35% 78%, 20% 70%, 4% 90%);
  pointer-events: none;
}

.raid-gains-card > small,
.raid-gains-card em {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-style: normal;
}

.raid-gains-card > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.raid-gains-card > div > span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(7, 9, 18, 0.28);
}

.raid-gains-card strong {
  position: relative;
  z-index: 1;
  color: #ffb0bd;
  font-size: 1.08rem;
}

.raid-detail-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 12px;
  padding: 0 16px 16px;
}

.raid-detail-facts {
  display: grid;
  gap: 12px;
  align-content: start;
}

.raid-detail-facts > span {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
}

.raid-detail-facts small {
  color: var(--muted);
}

.raid-detail-facts strong {
  color: var(--text);
}

.raid-detail-facts em {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

.raid-detail-facts em span {
  white-space: nowrap;
}

.raid-counter-main {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.raid-counter-name {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.raid-counter-name strong {
  overflow: hidden;
  color: var(--text);
  font-size: 1.16rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.raid-counter-main small {
  color: var(--muted);
}

.raid-counter-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 76px;
  height: 68px;
  isolation: isolate;
}

.raid-counter-art > span {
  position: absolute;
  width: 62px;
  height: 42px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(143, 168, 221, .16), transparent 70%);
  filter: blur(6px);
}

.raid-counter-art.is-shadow > span {
  display: none;
}

.raid-counter-art.is-mega > span {
  background:
    radial-gradient(circle at 72% 28%, rgba(255, 111, 174, .32), transparent 38%),
    radial-gradient(circle, rgba(103, 232, 249, .16), transparent 70%);
}

.raid-counter-art img {
  position: relative;
  z-index: 1;
  max-width: 76px;
  max-height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .38));
}

.raid-config-tag {
  width: fit-content;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: .72rem;
  font-style: normal;
}

.raid-config-tag.active {
  background: rgba(33, 230, 163, .12);
  color: var(--accent-2);
}

.raid-config-tag.muted {
  background: rgba(143, 168, 221, .08);
  color: var(--muted);
}

.raid-tag-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: end;
  min-height: 27px;
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 999px;
  background: rgba(33, 230, 163, .08);
  color: var(--accent-2);
  cursor: pointer;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 150ms ease, transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.raid-counter-row:hover .raid-tag-button,
.raid-counter-row.is-tagged-current .raid-tag-button,
.raid-counter-row.is-tagged-other .raid-tag-button {
  opacity: 1;
  transform: translateY(0);
}

.raid-tag-button:hover {
  border-color: color-mix(in srgb, var(--accent-2) 70%, var(--line));
  background: rgba(33, 230, 163, .16);
}

.raid-counter-moves {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.raid-move-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 1px 6px;
  min-height: 50px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--selected-tile-bg);
}

.raid-move-chip.good {
  border-color: color-mix(in srgb, var(--accent-2) 55%, var(--line));
  background:
    radial-gradient(circle at 12% 20%, rgba(33, 230, 163, .14), transparent 38%),
    var(--selected-tile-bg);
}

.raid-move-chip.bad {
  border-color: color-mix(in srgb, #ff7373 42%, var(--line));
}

.raid-move-chip .type-mark {
  grid-row: span 2;
  width: 19px;
  height: 19px;
  align-self: center;
  margin-left: 0;
}

.raid-move-chip span {
  min-width: 0;
}

.raid-move-chip small,
.raid-move-chip em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.75rem;
}

.raid-move-chip strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.raid-move-chip em {
  grid-column: 2;
}

.raid-activated-moves {
  display: grid;
  gap: 12px;
  align-content: start;
}

.raid-detail-move {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 82px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--selected-tile-bg);
}

.raid-detail-move.good {
  border-color: color-mix(in srgb, var(--accent-2) 45%, var(--line));
  background:
    radial-gradient(circle at 12% 20%, rgba(33, 230, 163, .14), transparent 38%),
    var(--selected-tile-bg);
}

.raid-detail-move.bad {
  border-color: color-mix(in srgb, #ff7373 40%, var(--line));
}

.raid-detail-move .type-mark {
  width: 28px;
  height: 28px;
  margin-left: 0;
}

.raid-detail-move span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.raid-detail-move small,
.raid-detail-move em {
  color: var(--muted);
  font-style: normal;
}

.raid-detail-move strong {
  overflow: hidden;
  color: var(--text);
  font-size: 1.14rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Cross-tab interaction polish, aligned with the Raids list language. */
.pokemon-row,
.species-family,
.species-node,
.pvp-candidate,
.event-plan-card,
.tcg-card {
  border-color: var(--line);
  background: linear-gradient(135deg, color-mix(in srgb, var(--panel) 95%, var(--accent)), var(--panel));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease, filter 180ms ease;
}

.pokemon-row:nth-child(even),
.pvp-candidate:nth-child(even),
.event-plan-card:nth-child(even),
.tcg-card:nth-child(even) {
  background:
    linear-gradient(135deg, rgba(143, 168, 221, .035), transparent 48%),
    color-mix(in srgb, var(--panel) 89%, black);
}

.pokemon-row:hover,
.species-family:hover,
.species-node:hover,
.pvp-candidate:hover,
.event-plan-card:hover,
.tcg-card:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  box-shadow: inset 0 0 0 1px rgba(33, 230, 163, .07);
}

.pokemon-row summary,
.species-family > summary,
.species-node > summary,
.pvp-candidate summary,
.event-plan-head,
.tcg-card {
  font-size: 0.95rem;
  color: var(--text);
}

.pokemon-title strong,
.species-family summary strong,
.species-node summary strong,
.pvp-candidate-main strong,
.pvp-target strong,
.pvp-score strong,
.event-plan-head strong,
.tcg-card strong {
  color: var(--text);
  font-size: 1.05rem;
  letter-spacing: 0;
}

.pokemon-title small,
.pvp-candidate-main span,
.pvp-target span,
.pvp-score span,
.pvp-meta span,
.event-plan-head p,
.event-targets small,
.event-actions p {
  color: var(--muted);
  font-size: 0.78rem;
}

.pvp-score-composite {
  margin: -2px -7px;
  padding: 2px 7px;
  border-radius: 7px;
  background: linear-gradient(100deg, rgba(168, 85, 247, .1), rgba(33, 230, 163, .045));
}

.pvp-score-composite span {
  color: rgba(215, 183, 255, .9);
  line-height: 1.1;
}

.pvp-score-composite strong {
  color: #d7b7ff;
  font-size: 1.16rem;
  line-height: 1.05;
  text-shadow: 0 0 18px rgba(168, 85, 247, .22);
}

.pvp-target strong {
  font-size: .94rem;
  font-weight: 600;
}

.pokemon-controls input[type="checkbox"],
.pvp-controls input[type="checkbox"],
.raid-control-actions input[type="checkbox"],
.event-mode-tabs input[type="checkbox"] {
  width: 15px;
  height: 15px;
  min-height: 0;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.inline-check,
.pokemon-filters .filter-toggle,
.pvp-controls label:not(.search-control),
.event-mode-tabs button,
.pokedex-missing-toggle,
.raid-duplicate-toggle {
  border-color: var(--line);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.inline-check:hover,
.pokemon-filters .filter-toggle:hover,
.pvp-controls label:not(.search-control):hover,
.event-mode-tabs button:hover,
.pokedex-missing-toggle:hover,
.raid-duplicate-toggle:hover {
  border-color: color-mix(in srgb, var(--accent) 54%, var(--line));
  background:
    linear-gradient(90deg, rgba(168, 85, 247, .16), rgba(33, 230, 163, .1)),
    rgba(255, 255, 255, .04);
  color: var(--text);
  transform: translateY(-1px);
}

.inline-check:has(input:checked),
.pokemon-filters .filter-toggle.active,
.pvp-controls label:not(.search-control):has(input:checked),
.pokedex-missing-toggle.active,
.raid-duplicate-toggle:has(input:checked) {
  border-color: var(--selected-tile-border);
  background: var(--selected-tile-bg);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .045), 0 0 18px rgba(33, 230, 163, .1);
}

.pokemon-row,
.pvp-candidate,
.event-plan-card,
.tcg-card {
  animation: raidFadeUp 220ms ease both;
}

.pokemon-row[open] summary,
.pvp-candidate[open] summary,
.species-family[open] > summary,
.species-node[open] > summary {
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .018);
}

.pokemon-art-field.is-shadow {
  --type-color: #8b5cf6;
  border-color: rgba(168, 85, 247, .42);
  background:
    radial-gradient(circle at 50% 58%, rgba(139, 92, 246, .22), transparent 48%),
    linear-gradient(135deg, rgba(23, 18, 38, .96), rgba(11, 12, 22, .98) 58%, rgba(33, 20, 55, .92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .045),
    inset 0 -22px 56px rgba(0, 0, 0, .34),
    0 0 42px rgba(168, 85, 247, .26);
}

.pokemon-art-field.is-shadow::before {
  display: none;
}

.pokemon-art-field.is-shadow .pokemon-art-aura {
  display: none;
}

.raid-reference-note {
  margin: 0 4px;
  color: rgba(167, 159, 184, .74);
  font-size: 11px;
  text-align: right;
}

@media (max-width: 980px) {
  .newsletter-form {
    grid-template-columns: 1fr;
  }

  .newsletter-message {
    min-height: 0;
  }

  .raid-controls,
  .raid-counter-row summary,
  .raid-counter-moves,
  .raid-detail-panel,
  .raid-upgrade-panel,
  .raid-gains-card > div {
    grid-template-columns: 1fr;
  }

  .raid-counter-moves,
  .raid-test-score {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .raid-boss-button,
  .raid-boss-showcase,
  .raid-counter-row,
  .raid-counter-row .pokemon-detail,
  .pokemon-row,
  .pvp-candidate,
  .event-plan-card,
  .tcg-card {
    animation: none;
    transition: none;
  }
}
