:root {
  --bg: #020717;
  --bg-soft: #081127;
  --panel: rgba(6, 12, 28, 0.92);
  --panel-2: rgba(8, 17, 39, 0.96);
  --line: rgba(102, 205, 255, 0.18);
  --line-strong: rgba(102, 205, 255, 0.42);
  --glow: rgba(80, 194, 255, 0.28);
  --text: #e9f7ff;
  --muted: #90abc5;
  --cyan: #59c8ff;
  --cyan-bright: #8be5ff;
  --blue: #2f78ff;
  --red: #ff4e68;
  --green: #4edaa2;
  --shadow: 0 22px 60px rgba(1, 6, 18, 0.55);
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 999px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Rajdhani", sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(89, 200, 255, 0.04), transparent 18%),
    radial-gradient(circle at top left, rgba(47, 120, 255, 0.18), transparent 22%),
    linear-gradient(180deg, #040a17, #020715 68%, #01040d);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.7;
}

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    border-color 160ms ease,
    opacity 160ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  transform: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.app-shell {
  width: min(1600px, calc(100% - 24px));
  margin: 0 auto;
  padding: 14px 0 24px;
}

.topbar,
.panel,
.metric-card,
.dex-entry,
.subcard,
.select-shell select,
.search-stack input {
  background:
    linear-gradient(180deg, rgba(13, 26, 52, 0.92), rgba(5, 10, 24, 0.96)),
    var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border-radius: 18px;
}

.current-scan-shell {
  position: sticky;
  top: 12px;
  z-index: 18;
  margin-top: 12px;
}

.current-scan-ribbon {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(18, 34, 66, 0.92), rgba(7, 14, 31, 0.98)),
    var(--panel);
  border: 1px solid rgba(89, 200, 255, 0.18);
  box-shadow: var(--shadow);
}

.current-scan-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 0;
  text-align: left;
  color: var(--text);
  background: transparent;
  border: 0;
}

.current-scan-ribbon.is-empty {
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
  align-items: flex-start;
  gap: 10px;
  border-style: dashed;
  background:
    linear-gradient(180deg, rgba(10, 20, 40, 0.88), rgba(5, 10, 23, 0.96)),
    var(--panel);
}

.current-scan-ribbon.is-empty .current-scan-main {
  grid-template-columns: minmax(0, 1fr);
  align-items: flex-start;
}

.current-scan-ribbon.is-empty .current-scan-copy {
  width: min(100%, 520px);
  max-width: 520px;
}

.current-scan-ribbon.is-empty .current-scan-meta {
  max-width: 52ch;
  line-height: 1.45;
}

.current-scan-ribbon.is-empty .current-scan-types {
  display: none;
}

.current-scan-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.current-scan-copy strong {
  font-size: 1.15rem;
}

.current-scan-meta {
  color: var(--muted);
  font-family: "Oxanium", sans-serif;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
}

.current-scan-types {
  justify-content: flex-end;
}

.current-scan-clear {
  align-self: stretch;
  min-width: 88px;
  padding: 0 16px;
  border-radius: 14px;
  color: #ffd6df;
  background: rgba(255, 82, 122, 0.16);
  border: 1px solid rgba(255, 102, 145, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 198, 214, 0.08);
}

.current-scan-clear:not(.hidden) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.current-scan-clear:hover,
.current-scan-clear:focus-visible {
  color: #fff1f5;
  background: rgba(255, 82, 122, 0.24);
  border-color: rgba(255, 126, 163, 0.4);
}

.current-scan-ribbon.is-empty .current-scan-clear {
  display: none;
}

.current-scan-sprite {
  width: 64px;
  height: 64px;
  object-fit: contain;
  image-rendering: pixelated;
  border-radius: 16px;
  background: rgba(89, 200, 255, 0.08);
  border: 1px solid rgba(89, 200, 255, 0.14);
  padding: 6px;
}

.current-scan-sprite.is-hidden {
  display: none;
}

.brand-lockup {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.sensor-cluster {
  display: grid;
  grid-template-columns: 52px 14px 14px;
  grid-template-rows: repeat(2, 14px);
  gap: 6px;
  padding: 6px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.16));
  border: 1px solid rgba(89, 200, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.sensor-main,
.sensor-dot {
  display: block;
  border-radius: 999px;
}

.sensor-main {
  grid-row: 1 / span 2;
  width: 52px;
  height: 52px;
  background:
    radial-gradient(circle at 35% 35%, #ffc7d2, #ff6a7d 36%, #c11539 68%, #540012);
  border: 3px solid #d9f5ff;
  box-shadow:
    0 0 0 5px rgba(95, 217, 255, 0.12),
    0 0 28px rgba(255, 78, 104, 0.28);
}

.sensor-dot {
  width: 14px;
  height: 14px;
  box-shadow: 0 0 14px currentColor;
}

.sensor-blue {
  color: #8be5ff;
  background: radial-gradient(circle at 35% 35%, #dbfaff, #69d4ff 55%, #134ea8);
}

.sensor-gold {
  color: #ffd776;
  background: radial-gradient(circle at 35% 35%, #fff4cb, #ffcb52 55%, #a16010);
}

.sensor-green {
  color: #89ffb6;
  background: radial-gradient(circle at 35% 35%, #dbffe6, #65e88f 55%, #0c824c);
}

.ghost-button,
.nav-tab,
.bank-button,
.primary-action,
.secondary-action,
.form-chip,
.toolbar-pill,
.type-chip,
.matchup-chip,
.dex-tag {
  font-family: "Oxanium", sans-serif;
  letter-spacing: 0.06em;
}

.brand-block h1,
.section-label,
.subcard-heading h3,
.entry-number,
.entry-status,
.results-summary,
.toolbar-pill,
.meta-label {
  font-family: "Oxanium", sans-serif;
}

.brand-block h1 {
  font-size: 1.7rem;
  letter-spacing: 0.08em;
}

.brand-block h1 span {
  color: var(--cyan);
}

.brand-block p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-tab,
.ghost-button,
.bank-button,
.primary-action,
.secondary-action,
.form-chip,
.toolbar-pill {
  border-radius: var(--radius-sm);
}

.nav-tab,
.ghost-button,
.bank-button,
.form-chip {
  padding: 10px 14px;
  color: var(--text);
  background: rgba(89, 200, 255, 0.06);
  border: 1px solid transparent;
}

.nav-tab.active,
.bank-button.active,
.form-chip.active {
  color: var(--text);
  background: linear-gradient(180deg, rgba(89, 200, 255, 0.24), rgba(47, 120, 255, 0.16));
  border-color: var(--line-strong);
  box-shadow: 0 0 0 1px rgba(89, 200, 255, 0.18), 0 0 24px rgba(80, 194, 255, 0.16);
}

.ghost-button {
  color: var(--cyan-bright);
  justify-self: end;
}

.system-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.system-chip {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--cyan-bright);
  background: rgba(89, 200, 255, 0.07);
  border: 1px solid rgba(89, 200, 255, 0.14);
  font-family: "Oxanium", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.system-chip.online {
  color: #ffd7df;
  background: rgba(255, 78, 104, 0.12);
  border-color: rgba(255, 78, 104, 0.22);
}

.workspace-shell.app-view,
.systems-grid.app-view {
  display: none;
}

.workspace-shell.app-view.active,
.systems-grid.app-view.active {
  display: grid;
}

.workspace-shell {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.landing-shell {
  width: min(1380px, 100%);
  margin-inline: auto;
}

.landing-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 16px;
  align-items: start;
}

.landing-hero-panel,
.landing-hunt-panel {
  display: grid;
  gap: 18px;
}

.landing-hero-panel {
  align-content: start;
  min-height: 100%;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(89, 200, 255, 0.16), transparent 28%),
    radial-gradient(circle at bottom left, rgba(255, 78, 104, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(13, 26, 52, 0.94), rgba(5, 10, 24, 0.98)),
    var(--panel);
}

.landing-welcome {
  font-family: "Oxanium", sans-serif;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  line-height: 0.95;
}

.landing-summary {
  max-width: 56ch;
  color: rgba(233, 247, 255, 0.78);
  font-size: 1rem;
  line-height: 1.55;
}

.landing-metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.landing-metric-grid .metric-card strong {
  font-size: 1.45rem;
}

.landing-hunt-panel .subcard-heading {
  align-items: center;
}

.landing-hunt-stack {
  display: grid;
  gap: 14px;
}

.suggested-board {
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(89, 200, 255, 0.14);
  background:
    radial-gradient(circle at top right, rgba(89, 200, 255, 0.1), transparent 24%),
    linear-gradient(180deg, rgba(14, 31, 63, 0.92), rgba(7, 14, 30, 0.98));
}

.suggested-board--living {
  box-shadow: inset 0 0 0 1px rgba(118, 218, 255, 0.04);
}

.suggested-board--shiny {
  background:
    radial-gradient(circle at top right, rgba(255, 210, 107, 0.12), transparent 22%),
    linear-gradient(180deg, rgba(18, 36, 72, 0.92), rgba(8, 15, 31, 0.98));
}

.suggested-board-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.suggested-board-note {
  display: inline-block;
  margin-top: 6px;
  color: var(--muted);
  font-family: "Oxanium", sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
}

.suggested-board-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.suggested-board-grid--shiny {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.suggested-hunt-tile {
  padding: 0;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
}

.suggested-hunt-pod {
  position: relative;
  width: min(100%, 112px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(10, 30, 67, 0.98), rgba(8, 21, 47, 0.98));
  border: 1px solid rgba(89, 200, 255, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 32px rgba(2, 7, 20, 0.28);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.suggested-board--shiny .suggested-hunt-pod {
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 251, 219, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(17, 31, 64, 0.98), rgba(10, 18, 36, 0.98));
}

.suggested-hunt-tile:hover .suggested-hunt-pod,
.suggested-hunt-tile:focus-visible .suggested-hunt-pod,
.suggested-hunt-tile.is-selected .suggested-hunt-pod {
  border-color: rgba(139, 229, 255, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 2px rgba(89, 200, 255, 0.14),
    0 18px 34px rgba(7, 17, 38, 0.34);
  transform: translateY(-2px) scale(1.02);
}

.suggested-board--shiny .suggested-hunt-tile:hover .suggested-hunt-pod,
.suggested-board--shiny .suggested-hunt-tile:focus-visible .suggested-hunt-pod,
.suggested-board--shiny .suggested-hunt-tile.is-selected .suggested-hunt-pod {
  border-color: rgba(255, 220, 125, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 2px rgba(255, 220, 125, 0.12),
    0 18px 34px rgba(19, 14, 32, 0.34);
}

.suggested-hunt-sprite {
  width: 76%;
  height: 76%;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.24));
}

.suggested-hunt-dex {
  position: absolute;
  inset: auto 8px 8px auto;
  min-width: 48px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(4, 14, 32, 0.82);
  border: 1px solid rgba(89, 200, 255, 0.18);
  color: rgba(233, 247, 255, 0.82);
  font-family: "Oxanium", sans-serif;
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-align: center;
}

.suggested-board-actions {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.suggested-board-selection {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.suggested-board-selection span {
  color: var(--muted);
  font-family: "Oxanium", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.suggested-board-selection strong {
  font-size: 1rem;
}

.suggested-board-button-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.archive-workspace {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.scan-detail-panel {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.scan-detail-panel .screen-frame {
  min-height: 320px;
}

.scan-detail-panel .screen-frame img {
  width: min(72%, 360px);
  height: min(72%, 360px);
}

.archive-stack {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 420px;
  gap: 16px;
  align-items: start;
}

.panel {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 18px;
  min-height: calc(100vh - 110px);
  min-width: 0;
}

.panel::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: calc(var(--radius-xl) - 8px);
  border: 1px solid rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

.control-panel,
.results-panel {
  overflow: hidden;
}

.control-panel {
  position: sticky;
  top: 14px;
  max-height: calc(100vh - 28px);
  overflow: auto;
}

.detail-panel {
  background:
    linear-gradient(180deg, rgba(255, 92, 122, 0.08), transparent 20%),
    linear-gradient(180deg, rgba(13, 26, 52, 0.92), rgba(5, 10, 24, 0.96)),
    var(--panel);
}

.panel-section + .panel-section {
  margin-top: 18px;
}

.section-label {
  color: var(--cyan-bright);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.search-stack {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.search-stack input,
.select-shell select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--text);
}

.search-stack input::placeholder {
  color: rgba(144, 171, 197, 0.72);
}

.search-stack input:focus,
.select-shell select:focus {
  outline: 2px solid rgba(102, 205, 255, 0.36);
  outline-offset: 2px;
}

.action-row,
.button-bank,
.toolbar-row,
.identity-strip,
.type-row,
.chip-row,
.form-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 116px;
}

.primary-action,
.secondary-action {
  min-height: 48px;
  padding: 12px 14px;
  color: white;
}

.primary-action {
  background: linear-gradient(180deg, #2d89ff, #225ad0);
  box-shadow: 0 10px 24px rgba(45, 137, 255, 0.28);
}

.primary-action.compact {
  min-height: 42px;
  min-width: 158px;
}

.primary-action.caught {
  background: linear-gradient(180deg, #48d5a0, #1d9b71);
  box-shadow: 0 10px 24px rgba(72, 213, 160, 0.22);
}

.secondary-action {
  background: linear-gradient(180deg, #ff6c7d, #d73f58);
  box-shadow: 0 10px 24px rgba(215, 63, 88, 0.24);
}

.status-text,
.results-summary,
.entry-status,
.meta-label,
.matchup-label {
  color: var(--muted);
}

.status-text {
  margin-top: 10px;
}

.button-bank {
  margin-top: 10px;
}

.button-bank.compact .bank-button {
  flex: 1 1 calc(50% - 10px);
}

.bank-button {
  flex: 1 1 calc(33.333% - 10px);
  min-height: 42px;
  border: 1px solid rgba(89, 200, 255, 0.08);
}

.select-shell {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.select-shell span {
  color: var(--muted);
  font-size: 0.92rem;
}

.panel-footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(89, 200, 255, 0.12);
  color: var(--muted);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-footer p + p {
  margin-top: 6px;
}

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

.signal-card {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(89, 200, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(21, 38, 72, 0.74), rgba(9, 16, 34, 0.92));
}

.signal-card span {
  display: block;
  color: var(--muted);
  font-family: "Oxanium", sans-serif;
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.signal-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.2rem;
}

.results-header {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
  align-items: start;
}

.results-header h2 {
  margin-top: 8px;
  font-family: "Oxanium", sans-serif;
  font-size: clamp(2.8rem, 6vw, 4.3rem);
  line-height: 0.9;
}

.results-summary {
  margin-top: 8px;
  line-height: 1.45;
}

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

.metric-card {
  padding: 14px 16px;
  border-radius: var(--radius-lg);
}

.metric-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.9rem;
  line-height: 1;
  word-break: break-word;
}

.toolbar-row {
  justify-content: space-between;
  margin-top: 16px;
}

.toolbar-pill {
  padding: 8px 12px;
  color: var(--cyan-bright);
  background: rgba(89, 200, 255, 0.06);
  border: 1px solid rgba(89, 200, 255, 0.12);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.result-list {
  margin-top: 16px;
  min-height: 420px;
  height: calc(100vh - 312px);
  overflow: auto;
  padding-right: 6px;
}

.result-list::-webkit-scrollbar,
.form-bank::-webkit-scrollbar {
  width: 10px;
}

.result-list::-webkit-scrollbar-thumb,
.form-bank::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(89, 200, 255, 0.18);
}

.result-tail {
  margin: 8px 0 18px;
  padding: 12px 14px;
  border: 1px dashed rgba(89, 200, 255, 0.14);
  border-radius: 16px;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.dex-entry {
  --entry-accent: rgba(89, 200, 255, 0.2);
  --entry-accent-strong: #8ddfff;
  --entry-accent-surface: rgba(89, 200, 255, 0.08);
  --entry-accent-border: rgba(89, 200, 255, 0.18);
  --entry-toggle-width: 64px;
  position: relative;
  display: grid;
  grid-template-columns: var(--entry-toggle-width) minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  padding: 0;
  border-radius: 18px;
  margin-bottom: 10px;
  overflow: hidden;
}

.dex-entry.selected {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 1px rgba(89, 200, 255, 0.18), var(--shadow);
}

.dex-entry.caught {
  border-color: rgba(78, 218, 162, 0.42);
  background:
    linear-gradient(90deg, rgba(78, 218, 162, 0.2), transparent 22%),
    linear-gradient(180deg, rgba(15, 44, 49, 0.94), rgba(5, 18, 22, 0.98)),
    var(--panel);
  box-shadow:
    inset 0 0 0 1px rgba(78, 218, 162, 0.14),
    0 14px 32px rgba(6, 18, 24, 0.28);
}

.dex-entry.is-form {
  border-color: var(--entry-accent-border);
  background:
    linear-gradient(90deg, var(--entry-accent-surface), transparent 18%),
    linear-gradient(180deg, rgba(13, 26, 52, 0.92), rgba(5, 10, 24, 0.96)),
    var(--panel);
}

.dex-entry.is-form.caught {
  border-color: color-mix(in srgb, var(--entry-accent-border) 42%, rgba(78, 218, 162, 0.58));
  background:
    linear-gradient(90deg, rgba(78, 218, 162, 0.18), transparent 20%),
    linear-gradient(90deg, var(--entry-accent-surface), transparent 42%),
    linear-gradient(180deg, rgba(14, 39, 48, 0.94), rgba(5, 18, 22, 0.98)),
    var(--panel);
}

.dex-entry.is-form[data-accent="form"] {
  --entry-accent: rgba(89, 200, 255, 0.24);
  --entry-accent-strong: #91deff;
  --entry-accent-surface: rgba(89, 200, 255, 0.12);
  --entry-accent-border: rgba(89, 200, 255, 0.24);
}

.dex-entry.is-form[data-accent="gmax"] {
  --entry-accent: rgba(255, 86, 86, 0.28);
  --entry-accent-strong: #ff7b7b;
  --entry-accent-surface: rgba(255, 86, 86, 0.14);
  --entry-accent-border: rgba(255, 86, 86, 0.26);
}

.dex-entry.is-form[data-accent="mega"] {
  --entry-accent: rgba(255, 168, 84, 0.28);
  --entry-accent-strong: #ffb869;
  --entry-accent-surface: rgba(255, 168, 84, 0.14);
  --entry-accent-border: rgba(255, 168, 84, 0.26);
}

.dex-entry.is-form[data-accent="regional"] {
  --entry-accent: rgba(78, 218, 162, 0.28);
  --entry-accent-strong: #70f0bf;
  --entry-accent-surface: rgba(78, 218, 162, 0.14);
  --entry-accent-border: rgba(78, 218, 162, 0.24);
}

.dex-entry.is-form[data-accent="special"] {
  --entry-accent: rgba(173, 120, 255, 0.28);
  --entry-accent-strong: #c39bff;
  --entry-accent-surface: rgba(173, 120, 255, 0.14);
  --entry-accent-border: rgba(173, 120, 255, 0.24);
}

.dex-entry.is-form[data-accent="appearance"] {
  --entry-accent: rgba(255, 208, 112, 0.28);
  --entry-accent-strong: #ffe08a;
  --entry-accent-surface: rgba(255, 208, 112, 0.14);
  --entry-accent-border: rgba(255, 208, 112, 0.24);
}

.dex-entry.is-form[data-accent="gender"] {
  --entry-accent: rgba(255, 129, 200, 0.28);
  --entry-accent-strong: #ffaddb;
  --entry-accent-surface: rgba(255, 129, 200, 0.14);
  --entry-accent-border: rgba(255, 129, 200, 0.24);
}

.entry-toggle {
  position: relative;
  display: block;
  align-self: stretch;
  cursor: pointer;
  min-height: 100%;
}

.entry-checkbox {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.entry-toggle-bar {
  --pokeball-center-fill: rgb(45 61 124);
  min-height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 0;
  border-radius: 18px 0 0 18px;
  border: 1px solid rgba(89, 200, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(55, 73, 143, 0.92), rgba(34, 45, 109, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 24px rgba(8, 13, 32, 0.16);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.dex-entry.is-form .entry-toggle-bar {
  --pokeball-center-fill: rgb(36 50 102);
  border-color: color-mix(in srgb, var(--entry-accent-border) 60%, rgba(89, 200, 255, 0.14));
  background:
    linear-gradient(180deg, rgba(42, 58, 118, 0.94), rgba(26, 35, 88, 0.98));
}

.check-core {
  position: relative;
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  color: rgba(232, 243, 255, 0.88);
  transition:
    color 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

.check-core::before {
  content: "";
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  border: 3px solid currentColor;
  border-radius: 999px;
  background:
    linear-gradient(currentColor, currentColor) left center / calc(50% - 4px) 3px no-repeat,
    linear-gradient(currentColor, currentColor) right center / calc(50% - 4px) 3px no-repeat;
  opacity: 1;
  transition:
    opacity 150ms ease,
    transform 150ms ease;
}

.check-core::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  box-sizing: border-box;
  border: 3px solid currentColor;
  border-radius: 999px;
  background: var(--pokeball-center-fill);
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  transition:
    opacity 150ms ease,
    transform 150ms ease;
}

.entry-checkbox:checked + .entry-toggle-bar {
  --pokeball-center-fill: rgb(37 205 108);
  border-color: rgba(78, 218, 162, 0.62);
  background: linear-gradient(180deg, #31d772, #1fc96b);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 12px 26px rgba(31, 201, 107, 0.22);
  transform: translateX(-1px);
}

.entry-checkbox:checked + .entry-toggle-bar .check-core {
  color: rgba(255, 255, 255, 0.96);
  opacity: 1;
  transform: scale(1.02);
}

.entry-checkbox:checked + .entry-toggle-bar .check-core::before,
.entry-checkbox:checked + .entry-toggle-bar .check-core::after {
  opacity: 1;
}

.entry-checkbox:checked + .entry-toggle-bar .check-core::after {
  transform: translate(-50%, -50%) scale(1);
}

.dex-entry-button {
  min-width: 0;
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px 12px 16px;
  color: inherit;
  text-align: left;
  background: transparent;
}

.entry-visual {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.entry-sprite-frame {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid rgba(89, 200, 255, 0.14);
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.12), transparent 52%),
    rgba(89, 200, 255, 0.06);
}

.dex-entry.is-form .entry-sprite-frame {
  border-color: var(--entry-accent-border);
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.12), transparent 52%),
    var(--entry-accent-surface);
}

.dex-entry.caught .entry-sprite-frame {
  border-color: rgba(78, 218, 162, 0.38);
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.16), transparent 52%),
    linear-gradient(180deg, rgba(78, 218, 162, 0.18), rgba(78, 218, 162, 0.08));
  box-shadow:
    inset 0 0 0 1px rgba(78, 218, 162, 0.14),
    0 12px 24px rgba(16, 61, 49, 0.18);
}

.entry-sprite {
  width: 52px;
  height: 52px;
  object-fit: contain;
  image-rendering: pixelated;
}

.entry-sprite.is-missing {
  opacity: 0;
}

.entry-number {
  color: var(--cyan-bright);
  font-size: 0.76rem;
}

.dex-entry.is-form .entry-number {
  color: var(--entry-accent-strong);
}

.entry-copy {
  min-width: 0;
  display: grid;
}

.entry-name {
  font-size: 1.08rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dex-entry.caught .entry-name {
  color: #e8fff5;
}

.entry-status {
  margin-top: 2px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dex-entry.caught .entry-status {
  color: #86efc4;
}

.dex-entry.caught .entry-status::before {
  content: "✓ ";
}

.entry-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.tag-chip,
.type-chip,
.matchup-chip,
.dex-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.tag-chip {
  color: var(--cyan-bright);
  background: rgba(89, 200, 255, 0.08);
  border: 1px solid rgba(89, 200, 255, 0.1);
}

.dex-entry.caught .tag-chip {
  border-color: rgba(78, 218, 162, 0.2);
  background: rgba(78, 218, 162, 0.1);
}

.tag-chip--form {
  color: #91deff;
  background: rgba(89, 200, 255, 0.1);
  border-color: rgba(89, 200, 255, 0.2);
}

.tag-chip--gmax {
  color: #ff8a8a;
  background: rgba(255, 86, 86, 0.12);
  border-color: rgba(255, 86, 86, 0.22);
}

.tag-chip--mega {
  color: #ffbe76;
  background: rgba(255, 168, 84, 0.12);
  border-color: rgba(255, 168, 84, 0.22);
}

.tag-chip--regional {
  color: #79efc1;
  background: rgba(78, 218, 162, 0.12);
  border-color: rgba(78, 218, 162, 0.22);
}

.tag-chip--special {
  color: #ceb0ff;
  background: rgba(173, 120, 255, 0.12);
  border-color: rgba(173, 120, 255, 0.22);
}

.tag-chip--appearance {
  color: #ffe299;
  background: rgba(255, 208, 112, 0.12);
  border-color: rgba(255, 208, 112, 0.22);
}

.tag-chip--gender {
  color: #ffbbdf;
  background: rgba(255, 129, 200, 0.12);
  border-color: rgba(255, 129, 200, 0.22);
}

.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.detail-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.detail-ghost {
  min-height: 42px;
}

.detail-ghost.active {
  color: #ffd776;
  border-color: rgba(255, 215, 118, 0.26);
  background: rgba(255, 215, 118, 0.1);
}

.detail-clear-button {
  color: #ffb3c7;
  border-color: rgba(255, 102, 145, 0.22);
  background: rgba(255, 102, 145, 0.08);
}

.detail-clear-button:hover,
.detail-clear-button:focus-visible {
  color: #ffe5ec;
  border-color: rgba(255, 134, 168, 0.34);
  background: rgba(255, 102, 145, 0.14);
}

.detail-head h2,
.subcard-heading h3 {
  font-family: "Oxanium", sans-serif;
}

.detail-head h2 {
  margin-top: 8px;
  font-size: 2rem;
}

.empty-state {
  margin-top: 18px;
  padding: 26px;
  border-radius: 18px;
  border: 1px dashed rgba(89, 200, 255, 0.18);
  color: var(--muted);
  text-align: center;
}

.hidden,
[hidden] {
  display: none !important;
}

.detail-content {
  margin-top: 18px;
  display: grid;
  gap: 16px;
}

.detail-content.hidden {
  display: none;
}

.screen-frame {
  display: grid;
  place-items: center;
  min-height: 250px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.88), transparent 44%),
    linear-gradient(180deg, rgba(89, 200, 255, 0.3), rgba(8, 17, 39, 0.1)),
    #dff7ff;
  border: 1px solid rgba(124, 228, 255, 0.3);
  box-shadow: inset 0 0 32px rgba(47, 120, 255, 0.08);
}

.screen-frame img {
  width: min(78%, 300px);
  height: min(78%, 300px);
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.18));
}

.identity-strip {
  align-items: center;
}

.detail-link-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-tab-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-tab {
  min-height: 42px;
}

.detail-link-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.detail-link-button.active {
  color: #ffd776;
  border-color: rgba(255, 215, 118, 0.28);
  background: rgba(255, 215, 118, 0.1);
}

.dex-tag {
  color: var(--cyan-bright);
  background: rgba(89, 200, 255, 0.08);
}

.type-row,
.chip-row,
.form-bank {
  gap: 8px;
}

.type-chip,
.matchup-chip {
  color: white;
}

.flavor-text {
  color: rgba(233, 247, 255, 0.84);
  font-size: 1.03rem;
  line-height: 1.45;
}

.pokedex-entry-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.pokedex-entry-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(89, 200, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(18, 34, 66, 0.76), rgba(8, 15, 31, 0.94));
}

.pokedex-entry-source {
  display: block;
  color: var(--cyan-bright);
  font-family: "Oxanium", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pokedex-entry-text {
  margin-top: 10px;
  color: rgba(233, 247, 255, 0.84);
  line-height: 1.5;
}

.detail-pane {
  display: none;
  gap: 16px;
}

.detail-pane.active {
  display: grid;
}

.meta-grid,
.detail-grid {
  display: grid;
  gap: 12px;
}

.meta-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.meta-grid div,
.subcard {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(89, 200, 255, 0.14);
  background: rgba(10, 21, 44, 0.8);
}

.meta-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 1.08rem;
}

.detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.subcard-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.subcard-heading span {
  color: var(--muted);
}

.stats-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.stat-row {
  display: grid;
  grid-template-columns: 84px 1fr 40px;
  gap: 10px;
  align-items: center;
}

.stat-row strong {
  font-size: 0.92rem;
}

.stat-bar {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(144, 171, 197, 0.16);
}

.stat-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #8be5ff, #2f78ff 56%, #ff4e68);
}

.matchup-stack {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.matchup-label {
  margin-bottom: 7px;
  font-size: 0.9rem;
}

.availability-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
  align-items: start;
}

.availability-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(89, 200, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(17, 31, 60, 0.88), rgba(8, 16, 34, 0.98));
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.availability-card.available {
  border-color: rgba(91, 231, 171, 0.34);
  box-shadow: inset 0 0 0 1px rgba(91, 231, 171, 0.08);
}

.availability-card.active {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(11, 17, 35, 0.24);
}

.availability-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.availability-card-head strong {
  font-family: "Oxanium", sans-serif;
  font-size: 1.04rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.availability-card-name,
.availability-card-note {
  color: rgba(233, 247, 255, 0.72);
  font-size: 0.95rem;
  line-height: 1.4;
}

.availability-card-note {
  color: rgba(233, 247, 255, 0.56);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.availability-segment-row {
  display: grid;
  gap: 10px;
}

.availability-segment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(89, 200, 255, 0.12);
  background: rgba(13, 24, 48, 0.82);
}

.availability-segment.main {
  border-color: rgba(89, 200, 255, 0.18);
}

.availability-segment.dlc {
  border-color: rgba(255, 192, 98, 0.18);
}

.availability-segment.available.main {
  background: rgba(25, 55, 88, 0.75);
  box-shadow: inset 0 0 0 1px rgba(89, 200, 255, 0.14);
}

.availability-segment.available.dlc {
  background: rgba(72, 45, 11, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 192, 98, 0.16);
}

.availability-segment.unavailable {
  opacity: 0.7;
}

.availability-segment.syncing {
  opacity: 0.86;
}

.availability-segment-copy {
  display: grid;
  gap: 2px;
}

.availability-segment-copy strong {
  font-size: 0.88rem;
  line-height: 1.2;
}

.availability-segment-copy span {
  color: rgba(233, 247, 255, 0.5);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.availability-segment-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(97, 116, 140, 0.22);
  color: rgba(233, 247, 255, 0.82);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.availability-segment.available .availability-segment-state {
  background: rgba(91, 231, 171, 0.18);
  color: #8ff3c1;
}

.availability-segment.dlc.available .availability-segment-state {
  background: rgba(255, 205, 111, 0.16);
  color: #ffd27f;
}

.availability-segment.unavailable .availability-segment-state {
  background: rgba(255, 93, 120, 0.14);
  color: #ff9bac;
}

.availability-segment.syncing .availability-segment-state {
  background: rgba(89, 200, 255, 0.16);
  color: #8de5ff;
}

.availability-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(97, 116, 140, 0.22);
  color: rgba(233, 247, 255, 0.82);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.availability-badge.available {
  background: rgba(91, 231, 171, 0.18);
  color: #8ff3c1;
}

.availability-badge.unavailable {
  background: rgba(255, 93, 120, 0.14);
  color: #ff9bac;
}

.availability-badge.syncing {
  background: rgba(89, 200, 255, 0.16);
  color: #8de5ff;
}

.availability-badge.owned {
  background: rgba(255, 205, 111, 0.14);
  color: #ffd27f;
}

.availability-badge.version-exclusive {
  background: rgba(168, 127, 255, 0.16);
  color: #d6c0ff;
}

.availability-badge.version-exclusive.version-violet {
  background: rgba(138, 102, 255, 0.2);
  color: #dcc7ff;
}

.availability-badge.version-exclusive.version-scarlet {
  background: rgba(255, 100, 100, 0.18);
  color: #ffcbc4;
}

.availability-badge.version-exclusive.version-shield {
  background: rgba(255, 78, 90, 0.18);
  color: #ffc2ca;
}

.availability-badge.version-exclusive.version-sword {
  background: rgba(91, 180, 255, 0.18);
  color: #bfe7ff;
}

.availability-badge.version-exclusive.version-brilliant-diamond {
  background: rgba(116, 166, 255, 0.18);
  color: #cde0ff;
}

.availability-badge.version-exclusive.version-shining-pearl {
  background: rgba(255, 160, 214, 0.18);
  color: #ffd4eb;
}

.availability-badge.version-exclusive.version-lets-go-pikachu {
  background: rgba(255, 211, 74, 0.2);
  color: #fff0ac;
}

.availability-badge.version-exclusive.version-lets-go-eevee {
  background: rgba(183, 133, 94, 0.22);
  color: #f7d9b8;
}

.availability-badge.version-exclusive.multi-version-exclusive {
  background: linear-gradient(135deg, rgba(120, 155, 255, 0.2), rgba(214, 192, 255, 0.18));
  color: #dce5ff;
}

.availability-card-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.availability-footnote {
  margin-top: 14px;
  color: rgba(233, 247, 255, 0.6);
  line-height: 1.45;
}

.form-bank {
  margin-top: 16px;
  max-height: 230px;
  overflow: auto;
  padding-right: 4px;
}

.form-chip {
  align-items: center;
  padding: 10px 12px;
  color: var(--text);
}

.form-chip.caught {
  border-color: rgba(78, 218, 162, 0.3);
}

.form-copy {
  display: grid;
  justify-items: start;
  gap: 2px;
}

.form-copy strong {
  font-size: 0.96rem;
}

.form-note {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.evolution-list,
.location-list,
.collection-list,
.shiny-checklist,
.game-checklist-grid {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.location-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(89, 200, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(18, 34, 66, 0.82), rgba(8, 15, 31, 0.97));
}

.location-card-head,
.location-map-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.location-card-head strong,
.location-map-meta strong {
  font-family: "Oxanium", sans-serif;
  letter-spacing: 0.06em;
}

.location-card-status,
.location-map-status {
  color: var(--muted);
  font-family: "Oxanium", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: right;
}

.location-map-shell {
  --map-accent: rgba(89, 200, 255, 0.9);
  position: relative;
  overflow: hidden;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(89, 200, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(11, 20, 43, 0.96), rgba(6, 11, 25, 0.99));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    0 10px 30px rgba(3, 10, 22, 0.24);
}

.location-map-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 14%, color-mix(in srgb, var(--map-accent) 18%, transparent), transparent 26%),
    linear-gradient(135deg, color-mix(in srgb, var(--map-accent) 10%, transparent), transparent 52%);
  opacity: 0.7;
}

.location-map-shell::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--map-accent) 70%, transparent), transparent 82%);
  opacity: 0.8;
}

.location-map-shell--lgpe {
  --map-accent: rgba(116, 227, 137, 0.95);
}

.location-map-shell--swsh {
  --map-accent: rgba(84, 216, 255, 0.95);
}

.location-map-shell--bdsp {
  --map-accent: rgba(255, 205, 107, 0.95);
}

.location-map-shell--pla {
  --map-accent: rgba(255, 160, 102, 0.95);
}

.location-map-shell--sv {
  --map-accent: rgba(255, 108, 125, 0.95);
}

.location-map-shell--lza {
  --map-accent: rgba(124, 231, 255, 0.96);
}

.location-map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.location-map-toolbar strong {
  font-family: "Oxanium", sans-serif;
  font-size: 1.02rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.location-map-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(53, 60, 96, 0.72);
  color: rgba(244, 248, 255, 0.94);
  font-size: 0.86rem;
  line-height: 1.2;
}

.location-surface-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.location-surface-tab {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(49, 56, 95, 0.42);
  color: rgba(243, 247, 255, 0.9);
  font-family: "Oxanium", sans-serif;
  font-size: 0.92rem;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.location-surface-tab.active {
  border-color: color-mix(in srgb, var(--map-accent) 72%, transparent);
  background: color-mix(in srgb, var(--map-accent) 18%, rgba(49, 56, 95, 0.6));
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--map-accent) 20%, transparent);
}

.location-surface-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(15, 20, 39, 0.5);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.location-map-stage-wrap {
  position: relative;
}

.location-map-stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: var(--map-aspect, 5 / 4);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    radial-gradient(circle at 18% 18%, rgba(118, 196, 255, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(29, 45, 75, 0.88), rgba(12, 20, 38, 0.98));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 0 80px rgba(0, 0, 0, 0.18);
}

.location-map-stage::before,
.location-map-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.location-map-stage::before {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(3, 7, 16, 0.04), rgba(3, 7, 16, 0.34)),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.08), transparent 34%);
}

.location-map-stage::after {
  z-index: 1;
  background:
    radial-gradient(circle at 82% 18%, rgba(94, 192, 255, 0.14), transparent 28%),
    radial-gradient(circle at 16% 84%, rgba(255, 208, 117, 0.08), transparent 26%);
  opacity: 0.92;
}

.location-map-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  filter: saturate(1.02) contrast(1.02) brightness(0.96);
  z-index: 0;
  pointer-events: none;
  user-select: none;
  transform-origin: center center;
  transform: scale(var(--map-zoom, 1));
  transition: transform 180ms ease;
}

.location-map-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: center center;
  transform: scale(var(--map-zoom, 1));
  transition: transform 180ms ease;
  z-index: 2;
}

.location-map-controls {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  gap: 10px;
  z-index: 2;
}

.location-map-control {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(55, 63, 109, 0.88);
  color: rgba(246, 249, 255, 0.96);
  font-family: "Oxanium", sans-serif;
  font-size: 1.2rem;
  box-shadow: 0 10px 24px rgba(4, 9, 24, 0.24);
}

.location-map-control--reset {
  background: rgba(77, 27, 48, 0.92);
}

.location-map-zone rect,
.location-map-zone circle {
  fill: color-mix(in srgb, var(--map-accent) 50%, rgba(255, 214, 82, 0.72));
  stroke: rgba(255, 248, 214, 0.96);
  stroke-width: 2.4;
  vector-effect: non-scaling-stroke;
  transition: fill 160ms ease, stroke 160ms ease, transform 160ms ease;
}

.location-map-zone text {
  fill: rgba(9, 16, 28, 0.92);
  font-family: "Oxanium", sans-serif;
  font-size: 4.25px;
  font-weight: 800;
  letter-spacing: 0.2px;
  paint-order: stroke fill;
  stroke: rgba(255, 250, 228, 0.82);
  stroke-width: 0.48px;
}

.location-map-zone.is-active rect,
.location-map-zone.is-active circle {
  filter:
    drop-shadow(0 0 14px color-mix(in srgb, var(--map-accent) 45%, transparent))
    drop-shadow(0 0 4px rgba(255, 248, 214, 0.42));
}

.location-map-surface-note {
  margin: 10px 0 0;
  color: rgba(234, 242, 255, 0.72);
  line-height: 1.45;
}

.location-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  position: relative;
  z-index: 1;
}

.location-map-chip {
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--map-accent) 45%, transparent);
  background: color-mix(in srgb, var(--map-accent) 16%, rgba(255, 255, 255, 0.03));
  color: rgba(233, 241, 255, 0.94);
  font-family: "Oxanium", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.location-map-chip--muted {
  border-color: rgba(195, 215, 255, 0.18);
  background: rgba(195, 215, 255, 0.08);
  color: var(--muted);
}

.location-card p {
  margin-top: 0;
}

.location-card p {
  margin-top: 0;
}

.no-signal {
  padding: 30px 20px;
  border-radius: 18px;
  border: 1px dashed rgba(89, 200, 255, 0.18);
  text-align: center;
}

.no-signal strong {
  display: block;
  font-family: "Oxanium", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.12em;
}

.no-signal p {
  margin-top: 10px;
  color: var(--muted);
}

.systems-grid {
  grid-column: 1 / -1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.system-panel {
  min-height: auto;
}

.collection-panel-shell,
.tracker-panel-shell,
.vault-panel-shell,
.home-panel-shell {
  grid-column: 1 / -1;
}

.suggestion-panel-shell,
.modules-panel-shell {
  grid-column: 1 / -1;
}

.system-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.system-title {
  margin-top: 8px;
  font-family: "Oxanium", sans-serif;
  font-size: 1.65rem;
}

.system-summary {
  margin-top: 16px;
}

.tracker-grid,
.progress-stack,
.collection-grid,
.target-board,
.vault-grid,
.home-grid,
.suggestion-stack,
.module-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.progress-stack {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.progress-stack > .progress-card,
.collection-card--generation-board,
.collection-card--game-checklists,
.generation-breakdown-entry,
.game-checklist-grid .checklist-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.progress-stack > .progress-card > *,
.collection-card--generation-board > *,
.collection-card--game-checklists > *,
.generation-breakdown-entry > *,
.game-checklist-grid .checklist-card > * {
  position: relative;
  z-index: 1;
}

.progress-stack > .progress-card::before,
.collection-card--generation-board::before,
.collection-card--game-checklists::before,
.generation-breakdown-entry::before,
.game-checklist-grid .checklist-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.collection-grid,
.home-grid,
.target-board,
.vault-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.tracker-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.progress-card,
.tracker-card,
.suggestion-card,
.checklist-card,
.module-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(89, 200, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(18, 34, 66, 0.86), rgba(8, 15, 31, 0.96));
}

.progress-card {
  padding: 14px 16px;
}

.progress-stack > .progress-card {
  background:
    linear-gradient(180deg, rgba(18, 34, 66, 0.9), rgba(8, 15, 31, 0.98));
}

.progress-stack > .progress-card::before {
  background:
    radial-gradient(circle at 16% 18%, var(--progress-glow, rgba(89, 200, 255, 0.18)) 0 18%, transparent 52%),
    linear-gradient(135deg, var(--progress-tint, rgba(89, 200, 255, 0.1)), transparent 56%);
  opacity: 1;
}

.progress-stack > .progress-card::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 68%),
    var(--progress-emblem, rgba(255, 255, 255, 0.05));
  opacity: 0.9;
  pointer-events: none;
}

.progress-card--main-dex {
  --progress-glow: rgba(90, 224, 255, 0.22);
  --progress-tint: rgba(65, 125, 255, 0.12);
  --progress-emblem:
    radial-gradient(circle at 32% 34%, rgba(170, 241, 255, 0.7), transparent 34%),
    linear-gradient(180deg, rgba(58, 94, 205, 0.24), rgba(12, 25, 54, 0));
}

.progress-card--shiny-dex {
  --progress-glow: rgba(255, 222, 110, 0.24);
  --progress-tint: rgba(255, 155, 90, 0.12);
  --progress-emblem:
    conic-gradient(from 0deg, rgba(255, 228, 128, 0.8), rgba(255, 154, 122, 0.35), rgba(255, 228, 128, 0.8)),
    radial-gradient(circle at center, transparent 0 42%, rgba(255, 248, 214, 0.15) 43% 46%, transparent 47%);
}

.progress-card--owned-coverage {
  --progress-glow: rgba(150, 255, 186, 0.22);
  --progress-tint: rgba(74, 198, 140, 0.12);
  --progress-emblem:
    linear-gradient(135deg, rgba(145, 255, 198, 0.32), rgba(32, 80, 58, 0.04)),
    radial-gradient(circle at 70% 28%, rgba(226, 255, 210, 0.7), transparent 24%);
}

.archive-progress-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  grid-column: 1 / -1;
}

.archive-progress-card {
  margin-top: 0;
}

.generation-breakdown-card {
  margin-top: 16px;
  background:
    linear-gradient(180deg, rgba(16, 30, 57, 0.92), rgba(8, 15, 31, 0.98));
}

.collection-card--generation-board::before {
  background:
    radial-gradient(circle at 12% 0%, rgba(121, 192, 255, 0.2), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(255, 212, 117, 0.18), transparent 24%),
    linear-gradient(120deg, rgba(89, 200, 255, 0.08), transparent 42%);
}

.generation-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.generation-breakdown-entry {
  --generation-flare: rgba(89, 200, 255, 0.2);
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(89, 200, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(24, 41, 78, 0.88), rgba(8, 15, 31, 0.98));
}

.generation-breakdown-entry::before {
  background:
    radial-gradient(circle at 84% 20%, var(--generation-flare) 0 16%, transparent 48%),
    linear-gradient(145deg, color-mix(in srgb, var(--generation-flare) 50%, transparent), transparent 54%);
}

.generation-breakdown-entry::after {
  content: "";
  position: absolute;
  inset: auto 14px 14px auto;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 66%),
    rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.generation-breakdown-entry--gen-1 {
  --generation-flare: rgba(255, 108, 108, 0.24);
}

.generation-breakdown-entry--gen-2 {
  --generation-flare: rgba(255, 215, 104, 0.24);
}

.generation-breakdown-entry--gen-3 {
  --generation-flare: rgba(76, 231, 180, 0.22);
}

.generation-breakdown-entry--gen-4 {
  --generation-flare: rgba(144, 135, 255, 0.22);
}

.generation-breakdown-entry--gen-5 {
  --generation-flare: rgba(112, 207, 255, 0.22);
}

.generation-breakdown-entry--gen-6 {
  --generation-flare: rgba(255, 137, 214, 0.22);
}

.generation-breakdown-entry--gen-7 {
  --generation-flare: rgba(255, 164, 112, 0.22);
}

.generation-breakdown-entry--gen-8 {
  --generation-flare: rgba(193, 173, 255, 0.22);
}

.generation-breakdown-entry--gen-9 {
  --generation-flare: rgba(125, 255, 187, 0.22);
}

.generation-breakdown-head,
.generation-breakdown-stat {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.generation-breakdown-head strong,
.generation-breakdown-stat strong {
  font-family: "Oxanium", sans-serif;
}

.generation-breakdown-head span,
.generation-breakdown-stat span {
  color: var(--muted);
  font-size: 0.8rem;
}

.generation-breakdown-stat {
  margin-top: 12px;
}

.generation-breakdown-stat--shiny {
  margin-top: 10px;
}

.generation-progress-bar {
  height: 10px;
  margin-top: 8px;
}

.generation-progress-bar--shiny span,
.generation-progress-fill--shiny {
  background: linear-gradient(90deg, #8ef3c1, #2fd4aa 52%, #ffe07a);
}

.collection-card--game-checklists {
  background:
    linear-gradient(180deg, rgba(17, 31, 59, 0.92), rgba(8, 15, 31, 0.98));
}

.collection-card--game-checklists::before {
  background:
    radial-gradient(circle at 10% 10%, rgba(110, 202, 255, 0.18), transparent 28%),
    radial-gradient(circle at 92% 16%, rgba(255, 144, 118, 0.14), transparent 24%),
    linear-gradient(135deg, rgba(93, 149, 255, 0.08), transparent 48%);
}

.game-checklist-grid .checklist-card {
  --checklist-accent: #7cb7ff;
  --checklist-flare: rgba(124, 183, 255, 0.2);
  border-color: color-mix(in srgb, var(--checklist-accent) 22%, rgba(89, 200, 255, 0.12));
  background:
    linear-gradient(180deg, rgba(19, 35, 67, 0.92), rgba(9, 16, 33, 0.98));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.01);
}

.game-checklist-grid .checklist-card::before {
  background:
    radial-gradient(circle at 84% 16%, var(--checklist-flare) 0 16%, transparent 46%),
    linear-gradient(145deg, color-mix(in srgb, var(--checklist-accent) 18%, transparent), transparent 58%);
}

.game-checklist-grid .checklist-card::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--checklist-accent) 28%, rgba(255, 255, 255, 0.06));
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 66%),
    color-mix(in srgb, var(--checklist-accent) 12%, rgba(255, 255, 255, 0.02));
  pointer-events: none;
}

.game-checklist-grid .checklist-card .checklist-progress {
  margin-top: 14px;
  border-color: color-mix(in srgb, var(--checklist-accent) 28%, rgba(255, 255, 255, 0.08));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--checklist-accent) 13%, rgba(17, 30, 56, 0.9)), rgba(7, 13, 26, 0.94));
}

.game-checklist-grid .checklist-card .checklist-progress .progress-bar span {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--checklist-accent) 44%, #ffffff),
    var(--checklist-accent)
  );
}

.game-checklist-grid .checklist-card--lgpe {
  --checklist-accent: #ffd45c;
  --checklist-flare: rgba(255, 212, 92, 0.2);
}

.game-checklist-grid .checklist-card--swsh {
  --checklist-accent: #ff6f8a;
  --checklist-flare: rgba(255, 111, 138, 0.2);
}

.game-checklist-grid .checklist-card--bdsp {
  --checklist-accent: #8bb6ff;
  --checklist-flare: rgba(139, 182, 255, 0.2);
}

.game-checklist-grid .checklist-card--pla {
  --checklist-accent: #b7d27a;
  --checklist-flare: rgba(183, 210, 122, 0.18);
}

.game-checklist-grid .checklist-card--sv {
  --checklist-accent: #c18dff;
  --checklist-flare: rgba(193, 141, 255, 0.2);
}

.game-checklist-grid .checklist-card--lza {
  --checklist-accent: #74efb0;
  --checklist-flare: rgba(116, 239, 176, 0.18);
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.progress-head span {
  color: var(--muted);
  font-size: 0.82rem;
}

.progress-bar {
  position: relative;
  height: 12px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(144, 171, 197, 0.14);
}

.progress-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #8be5ff, #2f78ff 56%, #ff4e68);
}

.tracker-card.active {
  border-color: rgba(89, 200, 255, 0.28);
  box-shadow: 0 0 0 1px rgba(89, 200, 255, 0.12);
}

.tracker-card-head,
.tracker-progress-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.tracker-card-head strong,
.module-card strong,
.suggestion-card strong {
  display: block;
  font-size: 1.08rem;
}

.tracker-card-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.tracker-focus-button,
.suggestion-button {
  padding: 9px 12px;
}

.tracker-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.tracker-version-shell {
  margin-top: 14px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(89, 200, 255, 0.12);
  background: rgba(89, 200, 255, 0.05);
}

.tracker-version-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.tracker-version-head strong {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tracker-version-head span {
  color: var(--muted);
  font-size: 0.78rem;
}

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

.tracker-version-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(89, 200, 255, 0.12);
  background: rgba(6, 14, 29, 0.52);
  color: var(--text);
  font-family: "Oxanium", sans-serif;
  font-size: 0.82rem;
}

.tracker-version-toggle.active {
  border-color: rgba(89, 200, 255, 0.34);
  background: rgba(47, 120, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(89, 200, 255, 0.1);
}

.tracker-version-toggle input {
  accent-color: var(--cyan);
}

.tracker-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(89, 200, 255, 0.12);
  background: rgba(89, 200, 255, 0.05);
  color: var(--muted);
  font-family: "Oxanium", sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tracker-toggle input {
  accent-color: var(--cyan);
}

.tracker-progress-shell,
.suggestion-card p {
  margin-top: 14px;
}

.collection-list {
  margin-top: 14px;
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}

.collection-list::-webkit-scrollbar,
.shiny-checklist::-webkit-scrollbar {
  width: 10px;
}

.collection-list::-webkit-scrollbar-thumb,
.shiny-checklist::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(89, 200, 255, 0.18);
}

.collection-item {
  width: 100%;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  color: var(--text);
  text-align: left;
  background: rgba(89, 200, 255, 0.05);
  border: 1px solid rgba(89, 200, 255, 0.12);
}

.collection-item.empty {
  grid-template-columns: minmax(0, 1fr);
  cursor: default;
}

.collection-item-art {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.14), transparent 56%),
    rgba(89, 200, 255, 0.06);
  border: 1px solid rgba(89, 200, 255, 0.12);
}

.collection-item-sprite {
  width: 48px;
  height: 48px;
  object-fit: contain;
  image-rendering: pixelated;
}

.collection-item-sprite.is-missing {
  opacity: 0;
}

.collection-item-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.collection-item-copy strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1rem;
}

.collection-item-note {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.collection-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  grid-column: 2;
}

.vault-manager-item {
  display: grid;
  gap: 10px;
}

.vault-manager-actions,
.vault-picker-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.manager-action-button {
  flex: 0 0 auto;
}

.collection-empty {
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed rgba(89, 200, 255, 0.16);
}

.compact-heading {
  align-items: center;
}

.shiny-checklist {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(89, 200, 255, 0.12);
  max-height: 560px;
  overflow: auto;
}

.shiny-check-summary {
  padding: 0 4px 8px;
}

.shiny-check-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.shiny-check-row input {
  margin-top: 14px;
  accent-color: var(--cyan);
}

.tracker-progress-top span {
  color: var(--muted);
}

.tracker-progress-top strong {
  font-family: "Oxanium", sans-serif;
}

.tracker-progress-shell input[type="range"] {
  width: 100%;
  margin-top: 10px;
}

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

.compact-field input:not([type="range"]),
.tracker-card input[type="text"] {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(13, 26, 52, 0.92), rgba(5, 10, 24, 0.96)),
    var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.compact-field input:focus,
.tracker-card input[type="text"]:focus {
  outline: 2px solid rgba(102, 205, 255, 0.36);
  outline-offset: 2px;
}

.exp-range-field span strong {
  color: var(--cyan-bright);
  font-family: "Oxanium", sans-serif;
  font-size: 1rem;
}

.exp-range-field input[type="range"] {
  width: 100%;
  margin: 2px 0 0;
  accent-color: var(--cyan);
}

.exp-range-scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.exp-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.exp-quick-actions .ghost-button {
  justify-self: auto;
}

.exp-metric-grid {
  margin-top: 16px;
}

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

.hunt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.hunt-card {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(89, 200, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(18, 34, 66, 0.86), rgba(8, 15, 31, 0.96));
}

.hunt-card.active {
  border-color: rgba(89, 200, 255, 0.28);
  box-shadow: 0 0 0 1px rgba(89, 200, 255, 0.12);
}

.hunt-card.unavailable {
  border-color: rgba(255, 93, 120, 0.14);
  background:
    linear-gradient(180deg, rgba(36, 22, 34, 0.8), rgba(18, 10, 22, 0.94));
}

.hunt-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.hunt-card-head strong {
  font-size: 1.08rem;
}

.hunt-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(97, 116, 140, 0.22);
  color: rgba(233, 247, 255, 0.82);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hunt-badge.available {
  background: rgba(91, 231, 171, 0.16);
  color: #8ff3c1;
}

.hunt-badge.unavailable {
  background: rgba(255, 93, 120, 0.14);
  color: #ff9bac;
}

.hunt-badge.general {
  background: rgba(89, 200, 255, 0.16);
  color: #8de5ff;
}

.hunt-badge.logged {
  background: rgba(255, 215, 118, 0.16);
  color: #ffd776;
}

.hunt-method {
  font-size: 1.14rem;
  line-height: 1.2;
}

.hunt-detail,
.hunt-note {
  color: rgba(233, 247, 255, 0.74);
  line-height: 1.45;
}

.hunt-note {
  color: rgba(233, 247, 255, 0.56);
  font-size: 0.92rem;
}

.hunt-tags,
.hunt-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vault-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
}

.vault-inline--single-action {
  grid-template-columns: minmax(0, 1fr);
}

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

.account-auth-grid input,
.vault-inline input,
.trainer-notebook {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(13, 26, 52, 0.92), rgba(5, 10, 24, 0.96)),
    var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.vault-inline input:focus,
.account-auth-grid input:focus,
.trainer-notebook:focus {
  outline: 2px solid rgba(102, 205, 255, 0.36);
  outline-offset: 2px;
}

.account-button-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.account-button-bank > * {
  flex: 1 1 148px;
}

.vault-picker-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(3, 8, 20, 0.76);
  backdrop-filter: blur(14px);
}

.vault-picker-dialog {
  width: min(760px, 100%);
  max-height: min(84vh, 920px);
  display: grid;
  gap: 14px;
  padding: 20px;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(89, 200, 255, 0.18);
  background:
    radial-gradient(circle at top left, rgba(89, 200, 255, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(18, 34, 66, 0.96), rgba(6, 12, 28, 0.98));
  box-shadow:
    0 28px 70px rgba(4, 10, 24, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.vault-picker-list {
  max-height: 420px;
  overflow: auto;
}

.vault-picker-choice {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.vault-picker-choice .collection-item {
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.vault-picker-choice:hover .collection-item,
.vault-picker-choice:focus-visible .collection-item {
  border-color: rgba(89, 200, 255, 0.32);
  background: rgba(89, 200, 255, 0.08);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(4, 12, 24, 0.22);
}

.provider-button {
  position: relative;
  padding-left: 42px;
}

.provider-button::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transform: translateY(-50%);
  background:
    radial-gradient(circle at 70% 30%, #4285f4 0 30%, transparent 31%),
    radial-gradient(circle at 32% 30%, #ea4335 0 30%, transparent 31%),
    radial-gradient(circle at 68% 70%, #34a853 0 30%, transparent 31%),
    radial-gradient(circle at 32% 70%, #fbbc05 0 30%, transparent 31%),
    #ffffff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.provider-button-google {
  border-color: rgba(66, 133, 244, 0.24);
}

.account-detail {
  margin-top: 14px;
}

.account-detail.is-error {
  color: #ff9bac;
}

.account-detail.is-success {
  color: #8ff3c1;
}

.account-detail.is-warn {
  color: #ffd776;
}

.trainer-notebook {
  margin-top: 14px;
  min-height: 220px;
  resize: vertical;
}

.vault-wide {
  grid-column: 1 / -1;
}

.companion-answer {
  margin-top: 14px;
  min-height: 92px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(89, 200, 255, 0.12);
  background: rgba(89, 200, 255, 0.05);
  color: rgba(233, 247, 255, 0.8);
  line-height: 1.5;
}

.box-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
  margin-top: 14px;
  max-height: 232px;
  overflow: auto;
  padding-right: 4px;
}

.box-tab.active {
  color: var(--text);
  background: linear-gradient(180deg, rgba(89, 200, 255, 0.24), rgba(47, 120, 255, 0.16));
  border-color: var(--line-strong);
  box-shadow: 0 0 0 1px rgba(89, 200, 255, 0.18), 0 0 24px rgba(80, 194, 255, 0.16);
}

.home-wide {
  grid-column: 1 / -1;
}

.home-template-card {
  width: min(1220px, 100%);
  margin-inline: auto;
}

.home-template-card .box-tabs,
.home-template-card #home-box-summary,
.home-template-card .home-box-grid {
  width: min(1080px, 100%);
  margin-inline: auto;
}

.home-template-card .home-box-grid {
  margin-top: 16px;
}

.home-excluded-head {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.home-excluded-head span {
  color: var(--muted);
  font-size: 0.82rem;
}

.home-box-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.home-slot {
  min-height: 154px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  padding: 10px 8px 12px;
  border-radius: 16px;
  color: var(--text);
  text-align: center;
  background:
    linear-gradient(180deg, rgba(27, 45, 84, 0.88), rgba(11, 18, 37, 0.96));
  border: 1px solid rgba(89, 200, 255, 0.12);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease,
    background 160ms ease;
}

.home-slot:hover {
  transform: translateY(-2px);
  border-color: rgba(89, 200, 255, 0.28);
  box-shadow: 0 14px 30px rgba(6, 13, 28, 0.26);
}

.home-slot.active {
  border-color: rgba(255, 109, 109, 0.48);
  box-shadow: 0 0 0 1px rgba(255, 109, 109, 0.2), 0 18px 34px rgba(92, 12, 26, 0.24);
}

.home-slot.caught {
  border-color: rgba(102, 193, 255, 0.34);
  background:
    linear-gradient(180deg, rgba(26, 56, 106, 0.9), rgba(12, 20, 41, 0.98));
}

.home-slot.boxed {
  border-color: rgba(255, 132, 132, 0.42);
  background:
    linear-gradient(180deg, rgba(93, 26, 45, 0.92), rgba(24, 13, 26, 0.98));
  box-shadow: 0 0 0 1px rgba(255, 132, 132, 0.14), 0 18px 34px rgba(82, 14, 24, 0.28);
}

.home-slot.missing {
  border-color: rgba(255, 117, 117, 0.18);
}

.home-slot.is-empty {
  cursor: default;
  opacity: 0.78;
  border-style: dashed;
  background: rgba(89, 200, 255, 0.04);
}

.home-slot.is-empty:hover {
  transform: none;
  border-color: rgba(89, 200, 255, 0.12);
  box-shadow: none;
}

.home-slot-number {
  justify-self: start;
  width: 100%;
  color: var(--muted);
  font-family: "Oxanium", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.home-slot-sprite {
  width: 42px;
  height: 42px;
  object-fit: contain;
  image-rendering: pixelated;
}

.home-slot-sprite.is-missing {
  opacity: 0;
}

.home-slot-label {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

.home-slot-dex,
.home-slot-variant,
.home-slot-status {
  font-size: 0.68rem;
  line-height: 1.2;
}

.home-slot-dex {
  color: var(--muted);
  font-family: "Oxanium", sans-serif;
  letter-spacing: 0.06em;
}

.home-slot-variant {
  color: rgba(233, 247, 255, 0.82);
}

.home-slot-status {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(89, 200, 255, 0.16);
  background: rgba(89, 200, 255, 0.08);
  color: rgba(233, 247, 255, 0.88);
}

.home-slot.boxed .home-slot-status {
  border-color: rgba(255, 132, 132, 0.28);
  background: rgba(255, 106, 106, 0.16);
  color: #ffe7e7;
}

.home-slot.caught .home-slot-status {
  border-color: rgba(115, 197, 255, 0.28);
  background: rgba(62, 147, 255, 0.14);
}

.home-slot.missing .home-slot-status {
  border-color: rgba(255, 132, 132, 0.18);
  background: rgba(255, 108, 108, 0.08);
  color: rgba(255, 220, 220, 0.88);
}

.home-slot.is-empty .home-slot-status {
  color: rgba(233, 247, 255, 0.72);
}

.checklist-progress,
.checklist-action {
  margin-top: 14px;
}

.checklist-action {
  justify-self: start;
}

.suggestion-stack {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.suggestion-card {
  display: grid;
  align-content: start;
}

.suggestion-card strong {
  margin-top: 8px;
  line-height: 1.1;
}

.suggestion-button {
  margin-top: 16px;
  justify-self: start;
}

.module-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.module-status {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-family: "Oxanium", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.module-status.live {
  color: #9cffcf;
  background: rgba(78, 218, 162, 0.12);
}

.module-status.queued {
  color: #8be5ff;
  background: rgba(89, 200, 255, 0.12);
}

.module-status.roadmap {
  color: #ffd776;
  background: rgba(255, 215, 118, 0.12);
}

.module-card strong {
  margin-top: 12px;
}

.module-card p {
  margin-top: 10px;
}

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

@media (max-width: 1380px) {
  .archive-stack {
    grid-template-columns: minmax(0, 1fr) 380px;
  }
}

@media (max-width: 1240px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .nav-tabs {
    grid-column: 1 / -1;
    order: 4;
  }

  .archive-stack {
    grid-template-columns: 1fr;
  }

  .systems-grid,
  .landing-grid,
  .progress-stack,
  .collection-grid,
  .tracker-grid,
  .target-board,
  .hunt-grid,
  .vault-grid,
  .home-grid,
  .exp-insight-grid,
  .suggestion-stack,
  .module-grid {
    grid-template-columns: 1fr;
  }

  .results-panel,
  .detail-panel {
    min-height: auto;
  }

  .result-list {
    height: auto;
    max-height: 52vh;
  }

  .availability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-progress-grid {
    grid-template-columns: 1fr;
  }

  .generation-breakdown-grid {
    grid-template-columns: 1fr;
  }

  .tracker-version-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .current-scan-ribbon {
    grid-template-columns: 1fr;
  }

  .current-scan-main {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .current-scan-types {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .system-strip {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .nav-tabs {
    order: 3;
  }

  .archive-workspace {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .landing-metric-grid {
    grid-template-columns: 1fr;
  }

  .suggested-board-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .suggested-board-grid--shiny {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .results-header,
  .detail-grid,
  .meta-grid {
    grid-template-columns: 1fr;
  }

  .exp-form-grid {
    grid-template-columns: 1fr;
  }

  .home-box-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .location-surface-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .archive-workspace {
    grid-template-columns: 1fr;
  }

  .suggested-board-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .suggested-board-grid--shiny {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .suggested-board-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .suggested-board-button-bank {
    justify-content: stretch;
  }

  .suggested-board-button-bank > * {
    flex: 1 1 100%;
  }

  .control-panel {
    position: static;
    max-height: none;
  }

  .panel {
    min-height: auto;
  }

  .result-list {
    height: auto;
    max-height: 60vh;
  }

  .vault-inline {
    grid-template-columns: 1fr;
  }

  .vault-manager-actions,
  .vault-picker-action-row {
    justify-content: stretch;
  }

  .vault-manager-actions > *,
  .vault-picker-action-row > * {
    flex: 1 1 100%;
  }

  .vault-picker-overlay {
    padding: 12px;
  }

  .vault-picker-dialog {
    padding: 16px;
    max-height: 88vh;
  }

  .home-excluded-head {
    justify-content: flex-start;
  }

  .account-auth-grid {
    grid-template-columns: 1fr;
  }

  .location-map-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .location-surface-tabs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .app-shell {
    width: min(100% - 12px, 100%);
  }

  .topbar,
  .panel {
    padding: 14px;
  }

  .current-scan-ribbon {
    grid-template-columns: 1fr;
    justify-items: flex-start;
    padding: 14px;
  }

  .current-scan-main {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .current-scan-clear {
    min-width: 0;
    min-height: 44px;
    width: 100%;
  }

  .current-scan-sprite {
    width: 52px;
    height: 52px;
  }

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

  .ghost-button {
    justify-self: stretch;
  }

  .brand-lockup {
    align-items: flex-start;
  }

  .sensor-cluster {
    grid-template-columns: 44px 12px 12px;
    grid-template-rows: repeat(2, 12px);
  }

  .sensor-main {
    width: 44px;
    height: 44px;
  }

  .action-row {
    grid-template-columns: 1fr;
  }

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

  .bank-button {
    flex-basis: calc(50% - 10px);
  }

  .button-bank.compact .bank-button {
    flex-basis: calc(50% - 10px);
  }

  .detail-tab,
  .detail-link-button {
    flex: 1 1 calc(50% - 10px);
  }

  .dex-entry-button {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .entry-tags {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding-left: 76px;
  }

  .detail-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-actions {
    width: 100%;
    justify-items: stretch;
  }

  .detail-link-bank {
    flex-direction: column;
  }

  .detail-link-button {
    width: 100%;
  }

  .collection-item {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .collection-item-art {
    width: 48px;
    height: 48px;
  }

  .home-box-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .location-map-shell {
    padding: 12px;
  }

  .location-map-controls {
    top: 12px;
    right: 12px;
  }

  .location-map-control {
    width: 46px;
    height: 46px;
    border-radius: 14px;
  }
}
