.page-oakedex-working .app {
  width: min(100%, 1540px);
}

.oakedex-preview-banner {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: -34px auto 24px;
  padding: 9px 15px;
  border: 1px solid rgba(226, 162, 112, 0.3);
  border-radius: 999px;
  color: var(--parchment);
  background: rgba(193, 125, 79, 0.08);
  font-size: 0.74rem;
  text-align: center;
}

.oakedex-preview-banner strong,
.oakedex-control-heading > span,
.oakedex-search > span,
.results-kicker {
  color: var(--copper-light);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.oakedex-preview-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--copper-light);
  box-shadow: 0 0 0 4px rgba(226, 162, 112, 0.1);
}

.oakedex-header {
  display: flex;
  width: min(100%, 1380px);
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  text-align: center;
}

.oakedex-header .inventory-header-copy {
  min-width: 0;
  width: min(100%, 880px);
  max-width: 880px;
}

.oakedex-share-launch,
.oakedex-share-primary,
.oakedex-share-secondary,
.oakedex-share-link button {
  min-height: 40px;
  padding: 9px 15px;
  border: 1px solid rgba(98, 194, 180, 0.5);
  border-radius: 10px;
  color: var(--limestone);
  background: rgba(23, 107, 98, 0.7);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.oakedex-share-launch {
  margin-top: 16px;
}

.oakedex-share-launch:hover,
.oakedex-share-primary:hover,
.oakedex-share-link button:hover {
  background: rgba(35, 139, 125, 0.82);
}

.oakedex-share-dialog {
  width: min(94vw, 760px);
  max-height: 90vh;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--copper-frame);
  border-radius: 18px;
  color: var(--parchment);
  background: #07130f;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.7);
}

.oakedex-share-dialog::backdrop {
  background: rgba(0, 5, 3, 0.78);
  backdrop-filter: blur(4px);
}

.oakedex-share-shell {
  padding: 24px;
}

.oakedex-share-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.oakedex-share-heading h2 {
  margin: 3px 0 7px;
  color: var(--limestone);
  font-size: 1.5rem;
}

.oakedex-share-heading p:last-child {
  margin: 0;
  color: var(--bark);
  font-size: 0.82rem;
}

.oakedex-share-close {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid rgba(201, 195, 184, 0.18);
  border-radius: 50%;
  color: var(--parchment);
  background: rgba(255, 255, 255, 0.03);
  font-size: 1.5rem;
  cursor: pointer;
}

.oakedex-share-notice {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(240, 173, 115, 0.3);
  border-radius: 10px;
  color: var(--parchment);
  background: rgba(240, 173, 115, 0.07);
  line-height: 1.5;
}

.oakedex-share-notice a {
  color: var(--copper-light);
  font-weight: 850;
}

.oakedex-share-settings {
  display: grid;
  gap: 16px;
  margin: 20px 0 0;
  padding: 0;
  border: 0;
}

.oakedex-share-settings:disabled {
  opacity: 0.45;
}

.oakedex-share-field {
  display: grid;
  gap: 6px;
}

.oakedex-share-field > span,
.oakedex-share-categories legend,
.oakedex-share-link > label {
  color: var(--copper-light);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.oakedex-share-field small {
  color: var(--bark);
}

.oakedex-share-field input,
.oakedex-share-field select,
.oakedex-share-link input {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 1px solid rgba(98, 194, 180, 0.28);
  border-radius: 9px;
  color: var(--limestone);
  background: #020b08;
  font: inherit;
}

.oakedex-share-categories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(201, 195, 184, 0.12);
  border-radius: 11px;
}

.oakedex-share-categories legend {
  padding: 0 6px;
}

.oakedex-share-categories label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
}

.oakedex-share-categories input {
  width: 16px;
  height: 16px;
  accent-color: #2b9f8e;
}

.oakedex-share-categories .oakedex-share-statistics {
  grid-column: 1 / -1;
  margin-top: 5px;
  padding-top: 11px;
  border-top: 1px solid rgba(201, 195, 184, 0.1);
}

.oakedex-share-link {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid rgba(98, 194, 180, 0.25);
  border-radius: 11px;
  background: rgba(23, 107, 98, 0.08);
}

.oakedex-share-link > div {
  display: flex;
  gap: 8px;
}

.oakedex-share-link input {
  min-width: 0;
}

.oakedex-share-link a {
  width: fit-content;
  color: var(--verdigris-300);
  font-size: 0.72rem;
  font-weight: 850;
}

.oakedex-share-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 20px;
}

.oakedex-share-secondary {
  border-color: rgba(221, 102, 102, 0.45);
  color: #efaaaa;
  background: rgba(119, 28, 28, 0.12);
}

.oakedex-share-primary:disabled,
.oakedex-share-secondary:disabled,
.oakedex-share-link button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.oakedex-share-status {
  min-height: 1.25em;
  margin: 10px 0 0;
  color: var(--bark);
  font-size: 0.76rem;
  text-align: right;
}

.oakedex-controls,
.oakedex-table-card {
  width: min(100%, 1380px);
  margin-inline: auto;
  border: 1px solid var(--copper-frame);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(10, 27, 21, 0.94), rgba(3, 13, 10, 0.97));
  box-shadow: var(--shadow-soft);
}

.oakedex-controls {
  margin-bottom: 16px;
  padding: 16px 18px;
}

.oakedex-control-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 10px 0;
}

.oakedex-control-row + .oakedex-control-row {
  border-top: 1px solid rgba(201, 195, 184, 0.1);
}

.oakedex-control-heading small {
  display: block;
  margin-top: 4px;
  color: var(--bark);
  font-size: 0.68rem;
  line-height: 1.4;
}

.filter-rail {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: thin;
}

#region-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: visible;
}

#region-filters .oakedex-filter {
  width: 100%;
  min-width: 0;
}

#collection-filters {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  overflow: visible;
}

#collection-filters .oakedex-filter {
  width: 100%;
  min-width: 0;
}

.oakedex-filter,
.oakedex-clear {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(201, 195, 184, 0.14);
  border-radius: 9px;
  color: var(--bark);
  background: rgba(2, 10, 7, 0.58);
  font: inherit;
  font-size: 0.69rem;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
  transition: 150ms ease;
}

.oakedex-filter:hover,
.oakedex-clear:hover {
  border-color: rgba(98, 194, 180, 0.38);
  color: var(--parchment);
}

.oakedex-filter[aria-pressed="true"] {
  border-color: rgba(98, 194, 180, 0.68);
  color: var(--limestone);
  background: rgba(23, 107, 98, 0.28);
  box-shadow: inset 0 0 0 1px rgba(98, 194, 180, 0.08);
}

.oakedex-region-filter {
  min-width: 72px;
  display: inline-grid;
  place-items: center;
  gap: 2px;
  padding-block: 6px 5px;
}

.oakedex-collection-filter {
  min-width: 72px;
  display: inline-grid;
  place-items: center;
  gap: 2px;
  padding-block: 6px 5px;
}

.oakedex-region-stat {
  color: rgba(240, 173, 115, 0.72);
  font-size: 0.55rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.oakedex-collection-stat {
  color: rgba(240, 173, 115, 0.72);
  font-size: 0.55rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.oakedex-region-percent {
  color: rgba(201, 195, 184, 0.58);
  font-size: 0.5rem;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.oakedex-collection-percent {
  color: rgba(201, 195, 184, 0.58);
  font-size: 0.5rem;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.oakedex-region-filter[aria-pressed="true"] .oakedex-region-stat,
.oakedex-region-filter[aria-pressed="true"] .oakedex-region-percent,
.oakedex-collection-filter[aria-pressed="true"] .oakedex-collection-stat,
.oakedex-collection-filter[aria-pressed="true"] .oakedex-collection-percent {
  color: #f0ad73;
}

.oakedex-search-row {
  display: flex;
  align-items: end;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(201, 195, 184, 0.1);
}

.oakedex-search {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 6px;
}

.oakedex-search input {
  width: 100%;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid rgba(98, 194, 180, 0.3);
  border-radius: 10px;
  color: var(--limestone);
  background: rgba(1, 9, 6, 0.82);
  font: inherit;
}

.oakedex-search input:focus {
  border-color: var(--verdigris-300);
  outline: 2px solid rgba(98, 194, 180, 0.15);
  outline-offset: 1px;
}

.oakedex-clear {
  width: auto;
  min-height: 42px;
  flex: 0 0 auto;
  border-color: rgba(226, 162, 112, 0.32);
  color: var(--copper-light);
}

.oakedex-missing-toggle {
  width: max-content;
  min-height: 42px;
  flex: 0 0 max-content;
}

.oakedex-table-card {
  padding: 16px;
}

.oakedex-table-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 3px 4px 14px;
}

.results-kicker {
  margin: 0 0 5px;
}

.oakedex-table-heading h2 {
  margin: 0;
  color: var(--limestone);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
}

#table-status {
  margin: 0;
  color: var(--bark);
  font-size: 0.74rem;
}

.oakedex-table-wrap {
  position: relative;
  max-height: min(64vh, 710px);
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(98, 194, 180, 0.18);
  border-radius: 12px;
  background: #07130f;
  scrollbar-color: rgba(98, 194, 180, 0.42) rgba(2, 10, 7, 0.6);
}

.oakedex-table-wrap:focus-visible {
  outline: 2px solid var(--verdigris-300);
  outline-offset: 2px;
}

.oakedex-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-spacing: 0;
  border-collapse: separate;
  color: var(--parchment);
  font-size: 0.76rem;
}

.oakedex-table th,
.oakedex-table td {
  height: 38px;
  padding: 6px 4px;
  border-right: 1px solid rgba(201, 195, 184, 0.08);
  border-bottom: 1px solid rgba(201, 195, 184, 0.08);
  text-align: center;
  white-space: nowrap;
}

.oakedex-table thead th {
  position: sticky;
  z-index: 8;
  top: 0;
  color: #f6e9d5;
  background: #163c32;
  box-shadow: 0 1px 0 rgba(98, 194, 180, 0.28);
  font-size: 0.67rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: normal;
  line-height: 1.15;
}

.oakedex-pro-label {
  display: block;
  width: max-content;
  margin: 3px auto 0;
  padding: 1px 4px;
  border: 1px solid rgba(240, 173, 115, 0.55);
  border-radius: 999px;
  color: #f0ad73;
  font-size: 0.48rem;
  line-height: 1.15;
  letter-spacing: 0.08em;
}

.oakedex-is-pro .oakedex-pro-label {
  display: none;
}

.oakedex-table tbody tr {
  --region-tint: rgba(49, 115, 96, 0.15);
}

.oakedex-table tbody tr:nth-child(even) td {
  background-color: rgba(255, 255, 255, 0.012);
}

.oakedex-table tbody tr:hover td {
  background-color: rgba(98, 194, 180, 0.085);
}

.oakedex-table td.name-cell,
.oakedex-table td.number-cell,
.oakedex-table td.region-cell {
  background: linear-gradient(var(--region-tint), var(--region-tint)), #07130f;
}

.oakedex-table .number-cell,
.oakedex-table .sticky-number {
  width: 54px;
  min-width: 54px;
  left: 0;
}

.oakedex-table .name-cell,
.oakedex-table .sticky-name {
  width: 204px;
  min-width: 204px;
  left: 54px;
  text-align: center;
}

.oakedex-table .region-cell,
.oakedex-table .sticky-region {
  width: 78px;
  min-width: 78px;
  left: 258px;
}

/* On the owner's complete checklist, XXL and XXS need only enough room for
   their label and checkbox. Their recovered space belongs to Pokémon names. */
.page-oakedex-working:not(.page-oakedex-share) .oakedex-table th:nth-child(8),
.page-oakedex-working:not(.page-oakedex-share) .oakedex-table td:nth-child(8),
.page-oakedex-working:not(.page-oakedex-share) .oakedex-table th:nth-child(9),
.page-oakedex-working:not(.page-oakedex-share) .oakedex-table td:nth-child(9) {
  width: 30px;
  min-width: 30px;
  max-width: 30px;
}

.oakedex-table .sticky-number,
.oakedex-table .sticky-name,
.oakedex-table .sticky-region {
  z-index: 10;
}

.oakedex-table td.number-cell,
.oakedex-table td.name-cell,
.oakedex-table td.region-cell {
  position: sticky;
  z-index: 4;
}

.oakedex-table td.name-cell {
  color: var(--limestone);
  font-weight: 800;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.2;
}

.oakedex-name-wrap {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
}

.oakedex-sprite-shell {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
}

.oakedex-sprite-shell .owned-build-sprite {
  display: block;
  width: 32px;
  height: 32px;
  max-width: none;
  object-fit: contain;
}

.region-pill {
  display: inline-flex;
  padding: 4px 7px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  background: var(--region-tint);
  font-size: 0.62rem;
  font-weight: 850;
}

.oakedex-checkbox {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #2b9f8e;
  cursor: pointer;
}

.oakedex-filter.is-pro-locked {
  border-color: rgba(240, 173, 115, 0.25);
  color: rgba(236, 235, 224, 0.7);
  cursor: pointer;
}

.oakedex-filter-lock {
  margin-left: 5px;
  color: #f0ad73;
  font-size: 0.7em;
}

.oakedex-pro-locked-cell {
  background: rgba(240, 173, 115, 0.025);
}

.oakedex-cell-lock {
  display: inline-grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid rgba(240, 173, 115, 0.18);
  border-radius: 7px;
  color: rgba(240, 173, 115, 0.58);
  text-decoration: none;
  font-size: 0.72rem;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}

.oakedex-cell-lock:hover,
.oakedex-cell-lock:focus-visible {
  border-color: rgba(240, 173, 115, 0.72);
  color: #f0ad73;
  background: rgba(240, 173, 115, 0.08);
  outline: none;
}

.oakedex-ineligible {
  color: rgba(236, 235, 224, 0.24);
  background: rgba(0, 0, 0, 0.16);
  font-weight: 800;
  text-align: center;
}

.oakedex-checkbox:focus-visible {
  outline: 2px solid #f0ad73;
  outline-offset: 2px;
}

.oakedex-empty {
  display: grid;
  min-height: 180px;
  place-content: center;
  gap: 7px;
  color: var(--bark);
  text-align: center;
}

.oakedex-empty[hidden] {
  display: none;
}

.oakedex-empty strong {
  color: var(--parchment);
}

.oakedex-shared-updated {
  margin: 12px 0 0;
  color: var(--bark);
  font-size: 0.72rem;
}

.oakedex-share-state {
  display: grid;
  width: min(100%, 720px);
  min-height: 220px;
  place-content: center;
  gap: 8px;
  margin: 70px auto;
  padding: 30px;
  border: 1px solid var(--copper-frame);
  border-radius: 18px;
  color: var(--bark);
  background: rgba(5, 18, 14, 0.94);
  text-align: center;
}

.oakedex-share-state[hidden] {
  display: none;
}

.oakedex-share-state strong {
  color: var(--limestone);
  font-size: 1.2rem;
}

.oakedex-share-state a {
  margin-top: 12px;
  color: var(--copper-light);
  font-weight: 900;
}

.oakedex-shared-table {
  min-width: 760px;
}

.oakedex-shared-mark {
  color: rgba(236, 235, 224, 0.18);
  font-size: 1rem;
  font-weight: 900;
}

.oakedex-shared-mark.is-selected {
  color: #72cfb9;
  background: rgba(43, 159, 142, 0.08);
}

.region-kanto { --region-tint: rgba(201, 77, 80, 0.2); }
.region-johto { --region-tint: rgba(209, 157, 66, 0.2); }
.region-hoenn { --region-tint: rgba(57, 121, 192, 0.21); }
.region-sinnoh { --region-tint: rgba(135, 109, 190, 0.2); }
.region-unova { --region-tint: rgba(117, 132, 142, 0.2); }
.region-kalos { --region-tint: rgba(61, 144, 137, 0.2); }
.region-alola { --region-tint: rgba(216, 124, 52, 0.21); }
.region-galar { --region-tint: rgba(194, 85, 146, 0.2); }
.region-hisui { --region-tint: rgba(115, 151, 173, 0.21); }
.region-paldea { --region-tint: rgba(105, 91, 193, 0.22); }

@media (max-width: 900px) {
  .oakedex-header {
    display: grid;
  }

  .oakedex-control-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .oakedex-control-heading small {
    display: none;
  }

  #collection-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #region-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .oakedex-preview-banner {
    align-items: flex-start;
    border-radius: 14px;
    text-align: left;
  }

  .oakedex-search-row {
    align-items: stretch;
    flex-direction: column;
  }

  #collection-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #region-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .oakedex-table-card,
  .oakedex-controls {
    border-radius: 14px;
  }

  .oakedex-table-wrap {
    max-height: 62vh;
    overflow: auto;
  }

  .oakedex-table {
    min-width: 1180px;
  }

  .oakedex-share-shell {
    padding: 18px;
  }

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

  .oakedex-share-link > div,
  .oakedex-share-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
