/* A handheld Pokédex: local hardware treatment over the shared game drawer. */
.drawer.pokedex-drawer {
  width: min(1080px, 100%);
}
.pokedex-drawer .drawer-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 8px 16px;
}
.pokedex-drawer .drawer-head {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.pokedex-drawer #drawer-content {
  display: flex;
  min-height: 0;
  flex: 1;
  padding-top: 0;
}
.dex-device {
  --dex-shell: #b93240;
  --dex-shell-light: #ef5b63;
  --dex-shell-dark: #6e1e2a;
  --dex-lcd: #101c27;
  --dex-lcd-raised: #1b2d38;
  --dex-lcd-ink: #d3e3d0;
  --dex-lcd-muted: #92aba3;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
  margin: 2px 4px;
  padding: 0 12px 4px;
  background: var(--dex-shell);
  border: 4px solid var(--dex-shell-dark);
  box-shadow:
    4px 0 var(--dex-shell-dark),
    -4px 0 var(--dex-shell-dark),
    0 4px var(--dex-shell-dark),
    0 -4px var(--dex-shell-dark),
    inset 0 3px var(--dex-shell-light);
  font-family: var(--ui-font-body);
  color: var(--dex-lcd-ink);
}
.dex-hardware {
  flex: none;
  display: flex;
  align-items: center;
  position: relative;
  gap: 16px;
  min-height: 60px;
  padding: 6px 4px;
}
.dex-lens {
  display: block;
  flex: none;
  width: 32px;
  height: 32px;
  margin: 3px 4px;
  background: #71d7ed;
  border: 5px solid #e8e2cd;
  box-shadow:
    4px 0 #6e1e2a,
    -4px 0 #6e1e2a,
    0 4px #6e1e2a,
    0 -4px #6e1e2a,
    inset -5px -5px #21809e;
}
.dex-lens::after {
  content: "";
  display: block;
  width: 9px;
  height: 9px;
  margin: 3px;
  background: #e5faf6;
}
.dex-wordmark {
  color: #ffe8d1;
  font: 28px/0.85 var(--ui-font-display);
  margin: 0;
  letter-spacing: 0.025em;
}
.dex-wordmark small {
  display: block;
  font: 600 8px/1.3 var(--ui-font-body);
  letter-spacing: 0.14em;
  margin-top: 3px;
}
.dex-device-code {
  margin-left: auto;
  margin-right: 52px;
  text-align: right;
  font: 600 10px/1.3 var(--ui-font-body);
  color: #ffd7bd;
  letter-spacing: 0.12em;
}
.dex-hardware .dex-close {
  position: absolute;
  top: 50%;
  right: 2px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  transform: translateY(-50%);
  padding: 0;
  border: 2px solid #6e1e2a;
  border-radius: 0;
  background: #8f2533;
  color: #ffe8d1;
  box-shadow: inset 2px 2px #ef5b63, 2px 2px #6e1e2a;
}
.dex-close .ui-icon {
  display: none;
}
.dex-close::before {
  content: "";
  width: 3px;
  height: 3px;
  background: currentColor;
  box-shadow: -6px -6px, -3px -3px, 3px 3px, 6px 6px,
    6px -6px, 3px -3px, -3px 3px, -6px 6px;
}
.dex-hardware .dex-close:hover {
  background: #6e1e2a;
}
.dex-display {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  border: 5px solid #6e1e2a;
  outline: 2px solid #ef5b63;
  background: var(--dex-lcd);
}
.dex-index {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 12px 10px 0;
  border-right: 3px solid #334b50;
}
.dex-search {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--dex-lcd-muted);
}
.dex-search input {
  display: block;
  width: 100%;
  height: 35px;
  margin-top: 5px;
  padding: 5px 8px;
  border: 1px solid #526966;
  border-radius: 0;
  background: #0b141c;
  color: var(--dex-lcd-ink);
  font: 500 14px var(--ui-font-body);
}
.dex-search input::placeholder {
  color: var(--dex-lcd-muted);
}
.dex-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  margin-top: 8px;
}
.dex-filters button {
  flex: 1;
  min-height: 32px;
  padding: 3px;
  font: 600 11px var(--ui-font-body);
  border: 1px solid #334b50;
  border-radius: 0;
  background: var(--dex-lcd);
  color: var(--dex-lcd-muted);
}
.dex-filters button[aria-pressed="true"] {
  border-color: var(--dex-lcd-ink);
  background: var(--dex-lcd-ink);
  color: var(--dex-lcd);
}
.dex-list-count {
  margin: 6px 0;
  color: var(--dex-lcd-muted);
  font-size: 10px;
}
.dex-species-list {
  overflow: auto;
  min-height: 0;
  margin: 0 -10px;
  padding: 0 5px 8px;
  scrollbar-color: #526966 #0b141c;
}
.dex-species {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 5px 7px;
  color: var(--dex-lcd-muted);
  background: transparent;
  border: 1px solid transparent;
  border-bottom-color: #263c40;
  border-radius: 0;
  text-align: left;
}
.dex-species:hover {
  background: #1b2d38;
}
.dex-species.is-selected {
  border-color: #b6d0ba;
  background: #29413f;
  color: #f0f2d7;
  box-shadow: inset 3px 0 #d3e3d0;
}
.dex-species[data-dex-unlocked="true"] {
  color: var(--dex-lcd-ink);
}
.dex-number {
  font: 19px var(--ui-font-display);
  color: var(--dex-lcd-muted);
}
.dex-list-identity {
  flex: 1;
  font: 600 14px/1.15 var(--ui-font-body);
  min-width: 0;
}
.dex-list-identity small {
  display: block;
  font: 500 8px/1.5 var(--ui-font-body);
  letter-spacing: 0.08em;
  margin-top: 2px;
  color: var(--dex-lcd-muted);
}
.dex-list-identity .dex-list-points {
  color: #dcebb8;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
}
.dex-list-identity .dex-list-points[hidden] {
  display: none;
}
.dex-species .dex-list-sprite {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
}
.dex-list-sprite img {
  width: 32px;
  height: 32px;
  margin: 0;
}
.dex-species[data-dex-unlocked="false"] .dex-list-sprite {
  opacity: 0.45;
}
.dex-entry-mark {
  display: inline-flex;
  width: 17px;
  color: #78928b;
}
.dex-entry-mark .ui-icon {
  width: 14px;
  height: 14px;
}
.dex-entry-mark.is-captured {
  color: #cfe2a6;
}
.dex-readout {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 14px 16px;
  scrollbar-color: #526966 #0b141c;
}
.dex-entry {
  min-width: 0;
}
.dex-identity {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 74px;
}
.dex-sprite {
  display: inline-block;
  position: relative;
  flex: none;
  width: 72px;
  height: 72px;
  background: #1b2d38;
  border: 1px solid #334b50;
}
.dex-sprite img {
  display: block;
  image-rendering: pixelated;
  width: 64px;
  height: 64px;
  margin: 3px;
}
.dex-sprite canvas,
.dex-ball-icon canvas,
.dex-ui-icon canvas {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  pointer-events: none;
}
/* The slot aligner marks a fallback once its canvas holds the art. */
.dex-pixel-source {
  visibility: hidden;
}
.dex-sprite--missing {
  font: 44px/72px var(--ui-font-display);
  text-align: center;
}
.dex-small-label {
  font: 600 9px/1.4 var(--ui-font-body);
  letter-spacing: 0.07em;
  color: var(--dex-lcd-muted);
}
.dex-identity h3 {
  margin: 3px 0 5px;
  font: 34px/0.9 var(--ui-font-display);
  color: var(--dex-lcd-ink);
  letter-spacing: 0.02em;
}
.dex-identity .type-badge {
  font-size: 9px;
  padding: 3px 6px;
}
.dex-pokepedia {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  align-self: start;
  padding: 7px 5px;
  color: #d3e3d0;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.dex-pokepedia .dex-wiki-icon {
  width: 24px;
  height: 24px;
}
.dex-pokepedia .dex-wiki-icon > canvas {
  image-rendering: pixelated;
}
.dex-basic-facts {
  display: grid;
  grid-template-columns: 0.6fr 1.3fr 1.3fr;
  margin: 12px 0 0;
  padding: 10px 0;
  border-top: 1px solid #334b50;
  border-bottom: 1px solid #334b50;
}
.dex-basic-facts > div {
  padding: 0 10px;
  border-left: 1px solid #334b50;
}
.dex-basic-facts > div:first-child {
  border: none;
  padding-left: 0;
}
.dex-basic-facts dt {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--dex-lcd-muted);
}
.dex-basic-facts dd {
  margin: 3px 0 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
}
.dex-basic-facts dd small {
  font-size: 10px;
  color: var(--dex-lcd-muted);
  font-weight: 400;
}
.dex-evolutions {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  font-size: 12px;
}
.dex-evolution-label {
  font-size: 9px;
  color: var(--dex-lcd-muted);
}
.dex-evolutions small {
  color: var(--dex-lcd-muted);
  font-size: 10px;
}
.dex-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.dex-section-heading h3 {
  margin: 0;
  color: var(--dex-lcd-ink);
  font: 23px/1.1 var(--ui-font-display);
}
.dex-tms {
  margin: 5px 0 12px;
  border: 1px solid #334b50;
  background: #1b2d38;
}
.dex-tms summary,
.dex-tms h3 {
  margin: 0;
  padding: 10px;
  color: var(--dex-lcd-ink);
  font: 21px/1.15 var(--ui-font-display);
}
.dex-tms summary {
  cursor: pointer;
}
.dex-tms p,
.dex-tms dl {
  margin: 0;
  padding: 0 10px 10px;
}
.dex-tms dt {
  padding: 8px 0 4px;
  border-top: 1px solid #334b50;
  color: var(--dex-lcd-muted);
  font-weight: 600;
}
.dex-tms dd {
  margin: 0 0 5px;
}
.dex-tms ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.dex-mastery {
  background: #1b2d38;
  border: 1px solid #334b50;
  margin: 5px 0 12px;
}
.dex-mastery-heading {
  margin: 0;
}
.dex-mastery-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  background: transparent;
  color: var(--dex-lcd-ink);
  font: 23px/1.1 var(--ui-font-display);
  text-align: left;
  cursor: pointer;
}
.dex-mastery-toggle:is(:hover, :focus-visible) {
  background: #263c40;
}
.dex-mastery-toggle:focus-visible {
  outline: 2px solid #71d7ed;
  outline-offset: -2px;
}
.dex-mastery-action {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: none;
  color: #a6edfb;
  font: 600 10px/1 var(--ui-font-body);
}
.dex-mastery-chevron {
  width: 7px;
  height: 7px;
  margin: -3px 2px 0 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}
.dex-mastery-toggle[aria-expanded="true"] .dex-mastery-chevron {
  margin-top: 3px;
  transform: rotate(225deg);
}
.dex-mastery-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 8px 10px 6px;
}
.dex-mastery-summary dt {
  margin-bottom: 4px;
  color: var(--dex-lcd-muted);
  font: 600 9px/1 var(--ui-font-body);
}
.dex-mastery-summary dd {
  margin: 0;
  color: var(--dex-lcd-ink);
  font: 22px/1 var(--ui-font-display);
  white-space: nowrap;
}
.dex-mastery-summary .dex-mastery-capture {
  color: #8fd0ff;
}
.dex-mastery-summary .dex-mastery-loot {
  color: #ffe58a;
}
.dex-mastery-summary .dex-mastery-shiny {
  color: #e7b5ff;
}
.dex-mastery-content {
  padding: 0 10px 9px;
  border-top: 1px solid #334b50;
}
.dex-mastery-content[hidden] {
  display: none;
}
.dex-mastery-earned {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0 0;
  color: var(--dex-lcd-muted);
  font: 500 9px/1.3 var(--ui-font-body);
}
.dex-ui-icon {
  display: inline-block;
  position: relative;
  flex: none;
  width: 32px;
  height: 32px;
}
.dex-ui-icon img {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
.dex-point-cost {
  width: 16px;
  height: 16px;
}
.dex-milestone {
  margin-top: 8px;
}
.dex-milestone-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  font-size: 10px;
  color: var(--dex-lcd-muted);
}
.dex-milestone-heading strong {
  font-weight: 600;
  color: var(--dex-lcd-ink);
}
.dex-progression-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  min-width: 0;
  scrollbar-color: #607a76 #101c27;
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}
.dex-progression-scroll:focus-visible {
  outline: 2px solid #71d7ed;
  outline-offset: -2px;
}
.dex-progression {
  position: relative;
  width: var(--dex-axis-width);
  margin: 0 76px;
  padding: 64px 0 32px;
}
.dex-progress {
  position: relative;
  height: 10px;
  background: #0b141c;
  border: 1px solid #526966;
}
.dex-progress i {
  display: block;
  height: 100%;
  background: #b7d397;
}
.dex-current-marker {
  position: absolute;
  z-index: 2;
  top: -3px;
  width: 14px;
  height: 14px;
  border: 2px solid #d2f8ff;
  background: #71d7ed;
  box-shadow: 0 0 0 2px #0b141c;
  transform: translateX(-50%);
}
.dex-current-marker::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 4px;
  width: 2px;
  height: 18px;
  background: #71d7ed;
}
.dex-current-label {
  position: absolute;
  bottom: 29px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 134px;
  padding: 5px 6px;
  border: 1px solid #d2f8ff;
  background: #71d7ed;
  color: #101c27;
  white-space: nowrap;
  pointer-events: none;
}
.dex-current-label small {
  font: 700 8px/1 var(--ui-font-body);
  letter-spacing: 0.05em;
}
.dex-current-label strong {
  font: 700 12px/1 var(--ui-font-body);
}
.dex-checkpoints {
  position: absolute;
  inset: 62px 0 auto;
  margin: 0;
  padding: 0;
  list-style: none;
  height: 14px;
}
.dex-checkpoint {
  position: absolute;
  top: 0;
  width: 8px;
  height: 14px;
  transform: translateX(-50%);
  cursor: help;
  outline: none;
}
.dex-checkpoint::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 14px;
  left: 50%;
  height: 10px;
  border-left: 1px solid #405750;
  pointer-events: none;
}
.dex-checkpoint-dot {
  display: block;
  width: 8px;
  height: 14px;
  border: 2px solid #607a76;
  background: #101c27;
}
.dex-checkpoint.is-complete .dex-checkpoint-dot {
  border-color: #dcebb8;
  background: #a4c482;
}
.dex-checkpoint.is-next .dex-checkpoint-dot {
  border-color: #71d7ed;
}
.dex-checkpoint-number {
  display: block;
  position: absolute;
  z-index: 1;
  top: 24px;
  left: 50%;
  width: max-content;
  padding: 1px 2px;
  background: var(--dex-lcd-raised);
  transform: translateX(-50%);
  text-align: center;
  color: var(--dex-lcd-muted);
  font: 600 12px/1 var(--ui-font-body);
  font-variant-numeric: tabular-nums;
}
.dex-checkpoint.is-complete .dex-checkpoint-number {
  color: #dcebb8;
}
.dex-checkpoint.is-next .dex-checkpoint-number {
  color: #a6edfb;
}
.dex-checkpoint-tooltip {
  display: none;
  position: absolute;
  bottom: 21px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: max-content;
  padding: 6px 8px;
  border: 1px solid #a4c482;
  background: #0b141c;
  color: var(--dex-lcd-muted);
  font: 500 10px/1.5 var(--ui-font-body);
  text-align: center;
  pointer-events: none;
}
.dex-checkpoint-tooltip strong {
  display: block;
  color: var(--dex-lcd-ink);
  font-weight: 600;
}
.dex-checkpoint:nth-child(-n + 4) .dex-checkpoint-tooltip {
  left: -4px;
  transform: none;
}
.dex-checkpoint:nth-last-child(-n + 4) .dex-checkpoint-tooltip {
  left: auto;
  right: -4px;
  transform: none;
}
.dex-checkpoint:is(:hover, :focus-visible) .dex-checkpoint-tooltip {
  display: block;
}
.dex-checkpoint:focus-visible .dex-checkpoint-dot {
  outline: 2px solid #f4df8e;
  outline-offset: 2px;
}
.dex-progression-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  font-size: 10px;
  color: var(--dex-lcd-muted);
}
.dex-progression-tools button {
  padding: 4px 7px;
  border: 1px solid #607a76;
  background: #101c27;
  color: #a6edfb;
  font: 600 10px/1.2 var(--ui-font-body);
  cursor: pointer;
}
.dex-progression-tools button:is(:hover, :focus-visible) {
  border-color: #71d7ed;
  color: #d2f8ff;
}
.dex-point-balance {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.dex-point-balance > strong {
  font: inherit;
  color: #dcebb8;
}
.dex-point-help {
  font-size: 10px;
  line-height: 1.45;
  color: var(--dex-lcd-muted);
  margin: 8px 0 6px;
}
.dex-upgrades {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.dex-upgrade {
  --dex-boost-color: #8fd0ff;
  --dex-boost-mid: #2f8fe8;
  --dex-boost-dark: #124f8f;
  --dex-boost-ink: #081a2a;
  min-width: 0;
  padding: 7px;
  background: #101c27;
  border: 1px solid var(--dex-boost-dark);
  box-shadow: inset 0 2px var(--dex-boost-mid);
}
.dex-upgrade--loot {
  --dex-boost-color: #ffe58a;
  --dex-boost-mid: #f0b429;
  --dex-boost-dark: #9a6a08;
  --dex-boost-ink: #2b210c;
}
.dex-upgrade--shiny {
  --dex-boost-color: #e7b5ff;
  --dex-boost-mid: #bd80df;
  --dex-boost-dark: #81509f;
  --dex-boost-ink: #231331;
}
.dex-upgrade-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.dex-upgrade-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--dex-boost-color);
}
.dex-upgrade-current {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  width: 100%;
  text-align: right;
  white-space: nowrap;
}
.dex-upgrade-current small {
  font-size: 8px;
  color: var(--dex-lcd-muted);
}
.dex-upgrade-current strong {
  color: var(--dex-boost-color);
  font: 27px/1.1 var(--ui-font-display);
}
.dex-upgrade .ui-button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-height: 40px;
  border-radius: 0;
  font: 600 11px var(--ui-font-body);
  background: var(--dex-boost-mid);
  border-color: var(--dex-boost-color);
  color: var(--dex-boost-ink);
  padding: 5px 7px;
  box-shadow: inset 0 -2px var(--dex-boost-dark);
}
.dex-upgrade .ui-button:hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--dex-boost-color);
}
.dex-upgrade .ui-button:disabled,
.dex-upgrade .ui-button[aria-disabled="true"] {
  background: #263c40;
  color: #92aba3;
  border-color: #526966;
  opacity: 0.65;
  box-shadow: none;
}
.dex-upgrade-increment {
  font: 23px/1 var(--ui-font-display);
  white-space: nowrap;
}
.dex-upgrade-cost {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  white-space: nowrap;
}
.dex-cap {
  font-size: 10px;
  color: var(--dex-lcd-muted);
  margin: 6px 0 0;
  line-height: 1.35;
}
/* Appearances: one collectible tile per look; the table follows the selection. */
.dex-appearances {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}
.dex-appearance {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
  padding: 6px 4px 7px;
  border: 1px solid #334b50;
  border-radius: 0;
  background: var(--dex-lcd-raised);
  color: var(--dex-lcd-ink);
  font: 500 10px var(--ui-font-body);
  cursor: pointer;
}
.dex-appearance:hover {
  background: #263c40;
}
.dex-appearance:focus-visible {
  outline: 2px solid #71d7ed;
  outline-offset: -2px;
}
.dex-appearance.is-selected {
  border-color: var(--dex-lcd-ink);
  box-shadow: inset 0 0 0 1px var(--dex-lcd-ink);
  background: #22394a;
}
/* Holo tiles keep a pearl edge even before the look is obtained. */
.dex-appearance[data-dex-appearance-holo="true"]::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, #8fe8f2, #c9a8ff, #ffd3a1, #8fe8f2);
  opacity: 0.8;
}
.dex-appearance .dex-appearance-sprite {
  background: var(--dex-lcd);
}
.dex-appearance.is-missing .dex-appearance-sprite :is(img, canvas) {
  filter: brightness(0);
  opacity: 0.38;
}
.dex-appearance-name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  max-width: 100%;
  font: 600 11px/16px var(--ui-font-body);
  white-space: nowrap;
}
.dex-appearance-count {
  color: var(--dex-lcd-muted);
}
.dex-appearance-count strong {
  color: var(--dex-lcd-ink);
  font: 18px/1 var(--ui-font-display);
}
.dex-appearance.is-missing .dex-appearance-count {
  font-style: italic;
}
.dex-appearance-record {
  border: 1px solid #334b50;
}
.dex-appearance-record-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  padding: 7px 10px;
  background: #1b2d38;
}
.dex-appearance-record-heading .dex-small-label {
  width: 100%;
}
.dex-appearance-record-heading > strong {
  font: 21px/1 var(--ui-font-display);
  color: var(--dex-lcd-ink);
}
.dex-appearance-record-totals {
  margin-left: auto;
  font-size: 10px;
  color: var(--dex-lcd-muted);
}
.dex-appearance-record-totals b {
  color: var(--dex-lcd-ink);
  font-weight: 700;
}
.dex-capture-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.dex-capture-table thead {
  color: var(--dex-lcd-muted);
  font-size: 9px;
}
.dex-capture-table thead tr:first-child th {
  background: #1b2d38;
  font-weight: 600;
}
.dex-capture-table th {
  font-weight: 500;
  padding: 5px 4px;
}
.dex-capture-table tbody tr {
  border-bottom: 1px solid #263c40;
}
.dex-capture-table tbody th {
  display: flex;
  align-items: center;
  text-align: left;
  font-size: 11px;
  gap: 6px;
}
.dex-capture-table td {
  padding: 5px 4px;
  text-align: center;
  font-size: 12px;
}
.dex-capture-table .dex-success {
  color: #dcebb8;
}
.dex-capture-table .dex-zero {
  color: #657d78;
  font-weight: 400;
}
.dex-capture-table .dex-nonzero {
  font-weight: 700;
}
.dex-ball-icon {
  display: inline-block;
  position: relative;
  width: 32px;
  height: 32px;
  flex: none;
}
.dex-ball-icon img {
  display: block;
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
}
.dex-history-note {
  font-size: 10px;
  line-height: 1.5;
  color: var(--dex-lcd-muted);
  margin: 9px 0 0;
}
.dex-hardware-foot {
  display: flex;
  align-items: center;
  flex: none;
  gap: 18px;
  min-height: 26px;
  padding: 4px 2px 0;
}
.dex-speaker {
  flex: none;
  width: 45px;
  height: 18px;
  border-top: 3px solid #6e1e2a;
  border-bottom: 3px solid #6e1e2a;
  position: relative;
}
.dex-speaker::after {
  content: "";
  height: 3px;
  background: #6e1e2a;
  position: absolute;
  top: 5px;
  left: 0;
  right: 0;
}
.dex-overview {
  background: #203f38;
  border: 2px solid #6e1e2a;
  padding: 2px 8px;
  font-size: 10px;
  color: #c4dab9;
}
.dex-overview strong {
  font-weight: 700;
}
.dex-overview > span {
  padding: 0 5px;
}
.dex-foot-label {
  margin-left: auto;
  color: #ffd7bd;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.dex-notice {
  flex: none;
  margin: 8px 0 0;
  border: 2px solid #6e1e2a;
  background: #101c27;
  padding: 7px 10px;
  font-size: 12px;
}
.dex-empty {
  margin: 10px;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: var(--dex-lcd-muted);
}
.dex-empty--large {
  margin: 70px 20px;
}
.dex-empty--large strong {
  color: var(--dex-lcd-ink);
  font: 25px var(--ui-font-display);
}
.dex-locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 80px 25px 35px;
}
.dex-locked-symbol {
  width: 43px;
  height: 43px;
  margin-bottom: 25px;
  color: #526966;
}
.dex-locked h3 {
  font: 38px var(--ui-font-display);
  margin: 5px 0 20px;
  color: var(--dex-lcd-ink);
}
.dex-locked > strong {
  font-size: 15px;
  color: #b5cbb8;
}
.dex-locked p {
  font-size: 13px;
  max-width: 270px;
  color: var(--dex-lcd-muted);
  line-height: 1.5;
}
.dex-locked-hint {
  max-width: 250px;
  padding-top: 25px;
  font-size: 11px;
  line-height: 1.5;
  color: #78928b;
}
.dex-device :is(button, input, a):focus-visible {
  outline: 2px solid #f4df8e;
  outline-offset: 2px;
}
@media (min-width: 721px) and (max-width: 960px) {
  .dex-upgrades {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 720px) {
  .pokedex-drawer .drawer-panel {
    padding: 6px 8px;
    overflow: auto;
  }
  .pokedex-drawer #drawer-content {
    display: block;
    flex: none;
  }
  .dex-device {
    padding: 0 7px 4px;
    margin: 2px 3px;
  }
  .dex-hardware {
    min-height: 58px;
    gap: 12px;
    padding: 5px 4px;
  }
  .dex-lens {
    width: 32px;
    height: 32px;
  }
  .dex-wordmark {
    font-size: 26px;
  }
  .dex-device-code {
    display: none;
  }
  .dex-hardware .dex-close {
    right: 0;
    width: 44px;
    height: 44px;
  }
  .dex-display {
    grid-template-columns: minmax(0, 1fr);
    display: block;
  }
  .dex-index {
    padding: 10px 8px 0;
    border-right: 0;
    border-bottom: 3px solid #334b50;
  }
  .dex-search input {
    min-height: 44px;
    font-size: 16px;
  }
  .dex-filters button {
    min-height: 44px;
    font-size: 12px;
  }
  .dex-species-list {
    margin: 0 -8px;
    max-height: 154px;
  }
  .dex-species {
    min-height: 49px;
  }
  .dex-readout {
    padding: 13px 10px;
    overflow: visible;
  }
  .dex-identity {
    gap: 8px;
    flex-wrap: wrap;
  }
  .dex-identity .dex-sprite {
    width: 64px;
    height: 64px;
  }
  .dex-identity .dex-sprite img {
    margin: 0;
  }
  .dex-identity h3 {
    font-size: 30px;
  }
  .dex-pokepedia {
    width: 100%;
    margin: 0;
    min-height: 44px;
    padding: 7px 0;
    justify-content: flex-end;
  }
  .dex-basic-facts {
    margin-top: 2px;
    grid-template-columns: 0.65fr 1.25fr 1.3fr;
  }
  .dex-basic-facts > div {
    padding: 0 6px;
  }
  .dex-basic-facts dt {
    font-size: 8px;
  }
  .dex-basic-facts dd {
    font-size: 15px;
  }
  .dex-basic-facts dd small {
    display: block;
    font-size: 9px;
    margin-top: 3px;
  }
  .dex-evolutions {
    font-size: 11px;
  }
  .dex-mastery-toggle {
    padding: 9px 8px;
    font-size: 22px;
  }
  .dex-mastery-summary {
    gap: 4px;
    padding: 8px 8px 6px;
  }
  .dex-mastery-summary dt {
    font-size: 8px;
    min-height: 18px;
    line-height: 1.15;
  }
  .dex-mastery-summary dd {
    font-size: clamp(16px, 5.3vw, 21px);
  }
  .dex-mastery-content {
    padding: 0 8px 8px;
  }
  .dex-section-heading h3 {
    font-size: 22px;
  }
  .dex-milestone-heading {
    gap: 4px;
    font-size: 9px;
  }
  .dex-checkpoint {
    width: 6px;
  }
  .dex-checkpoint-dot {
    width: 6px;
    border-width: 1px;
  }
  .dex-upgrades {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .dex-upgrade {
    padding: 8px 6px 6px;
  }
  .dex-upgrade-heading {
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 6px;
  }
  .dex-upgrade-name {
    font-size: 13px;
  }
  .dex-upgrade-current {
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    width: auto;
  }
  .dex-upgrade-current small {
    font-size: 7px;
  }
  .dex-upgrade-current strong {
    font-size: 25px;
  }
  .dex-upgrade .ui-button {
    justify-content: space-between;
    gap: 6px;
    min-height: 44px;
    padding: 5px 8px;
  }
  .dex-upgrade-increment {
    font-size: 21px;
  }
  .dex-upgrade-cost {
    font-size: 10px;
    gap: 4px;
  }
  .dex-appearances {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dex-appearance-record-heading {
    padding: 6px 8px;
  }
  .dex-appearance-record-totals {
    margin-left: 0;
    width: 100%;
  }
  .dex-capture-table thead {
    font-size: 8px;
  }
  .dex-capture-table th,
  .dex-capture-table td {
    padding: 4px 2px;
  }
  .dex-capture-table tbody th {
    font-size: 10px;
    gap: 2px;
  }
  .dex-capture-table tbody th > span:last-child {
    max-width: 58px;
  }
  .dex-capture-table td {
    font-size: 11px;
  }
  .dex-hardware-foot {
    gap: 9px;
  }
  .dex-speaker {
    width: 30px;
  }
  .dex-overview {
    font-size: 9px;
    padding: 2px 4px;
  }
  .dex-overview > span {
    padding: 0 2px;
  }
  .dex-foot-label {
    display: none;
  }
  .dex-locked {
    padding: 35px 15px;
  }
  .dex-locked-hint {
    padding-top: 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pokedex-drawer {
    transition: none;
  }
}
