/* PRANATARA chat-151 — literal owner-reference rarity strip.
   At the 1678px reference viewport the supplied 1678x63 raster is presented
   one-to-one. Native buttons remain above it as semantic filter hit regions.
   Responsive layouts reuse exact source-image segments; forced-colors restores
   visible native text and controls. No animation or network asset is added. */

body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-filter-deck {
  overflow: visible;
  z-index: 10000 !important;
}

body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-nav {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  clip-path: none !important;
  filter: none !important;
  mask: none !important;
  opacity: 1 !important;
  transform: none !important;
  isolation: isolate;
}

body[data-rarity-strip-pixel-match="reference-raster-v001"] .rarity-strip-reference-raster {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
  image-rendering: auto;
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
}

body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-nav::before,
body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-nav::after {
  content: none !important;
}

body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-button > .museum-rarity-cartouche-frame,
body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-button > .museum-rarity-label,
body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-button > .museum-rarity-count {
  opacity: 0 !important;
}

body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-button {
  z-index: 1;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  background-position: 0 0 !important;
  background-size: auto !important;
  box-shadow: none !important;
  clip-path: none !important;
  color: transparent !important;
  appearance: none;
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
  mask: none !important;
  transition: none !important;
  cursor: pointer;
}

body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-button::before,
body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-button::after {
  content: none !important;
}

body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-button:focus-visible {
  outline: 2px solid #ead39d !important;
  outline-offset: -3px;
}

@media (min-width: 1500px) {
  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-filter-deck {
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
  }

  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-nav {
    position: relative;
    display: block !important;
    width: min(100vw, 1678px) !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 1678 / 63;
    margin: 0 auto !important;
    padding: 0 !important;
    gap: 0 !important;
    overflow: hidden !important;
    background: #0c0e12;
  }

  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-button {
    position: absolute !important;
    top: 11.111111% !important;
    bottom: auto !important;
    height: 69.841270% !important;
    min-height: 44px !important;
    max-width: none !important;
    margin: 0 !important;
  }

  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-button[data-rarity-filter="Core"] {
    left: 0.238379%;
    width: 15.137068%;
  }

  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-button[data-rarity-filter="Uncommon"] {
    left: 17.461263%;
    width: 15.733016%;
  }

  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-button[data-rarity-filter="Rare"] {
    left: 35.280095%;
    width: 14.183552%;
  }

  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-button[data-rarity-filter="Epic"] {
    left: 51.609058%;
    width: 14.719905%;
  }

  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-button[data-rarity-filter="Mythic"] {
    left: 68.474374%;
    width: 15.494636%;
  }

  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-button[data-rarity-filter="Relic"] {
    left: 85.995232%;
    width: 13.110846%;
  }
}

@media (max-width: 1499.98px) {
  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-filter-deck {
    height: auto !important;
    min-height: 0 !important;
  }

  body[data-rarity-strip-pixel-match="reference-raster-v001"] .rarity-strip-reference-raster {
    display: none;
  }

  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-nav {
    position: relative;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 10px 18px !important;
    width: min(100%, 920px) !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 auto !important;
    padding: 7px 0 12px !important;
    overflow: visible !important;
  }

  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-button {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    width: var(--rarity-reference-segment-width) !important;
    height: 63px !important;
    min-height: 63px !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    background-image: url("assets/rarity-strip-reference-exact-v001.png") !important;
    background-repeat: no-repeat !important;
    background-size: 1678px 63px !important;
    background-position: var(--rarity-reference-segment-offset) 0 !important;
  }

  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-button[data-rarity-filter="Core"] {
    --rarity-reference-segment-width: 261px;
    --rarity-reference-segment-offset: 0;
  }

  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-button[data-rarity-filter="Uncommon"] {
    --rarity-reference-segment-width: 270px;
    --rarity-reference-segment-offset: -290px;
  }

  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-button[data-rarity-filter="Rare"] {
    --rarity-reference-segment-width: 245px;
    --rarity-reference-segment-offset: -589px;
  }

  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-button[data-rarity-filter="Epic"] {
    --rarity-reference-segment-width: 254px;
    --rarity-reference-segment-offset: -863px;
  }

  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-button[data-rarity-filter="Mythic"] {
    --rarity-reference-segment-width: 267px;
    --rarity-reference-segment-offset: -1145px;
  }

  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-button[data-rarity-filter="Relic"] {
    --rarity-reference-segment-width: 239px;
    --rarity-reference-segment-offset: -1439px;
  }
}

@media (max-width: 899.98px) {
  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 9px 12px !important;
    width: min(100%, 580px) !important;
  }
}

@media (max-width: 479.98px) {
  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-nav {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
    width: min(100%, 270px) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-button,
  body[data-rarity-strip-pixel-match="reference-raster-v001"] .rarity-strip-reference-raster {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

@media (forced-colors: active) {
  body[data-rarity-strip-pixel-match="reference-raster-v001"] .rarity-strip-reference-raster,
  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-cartouche-frame {
    display: none !important;
  }

  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-nav {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    padding: 8px !important;
    overflow: visible !important;
  }

  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-button {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    border: 1px solid ButtonText !important;
    background: ButtonFace !important;
    color: ButtonText !important;
    forced-color-adjust: auto;
  }

  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-button > .museum-rarity-label,
  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-button > .museum-rarity-count {
    opacity: 1 !important;
    color: ButtonText !important;
    text-shadow: none !important;
  }

  body[data-rarity-strip-pixel-match="reference-raster-v001"] .museum-rarity-button[aria-pressed="true"] {
    border: 3px solid Highlight !important;
    box-shadow: none !important;
  }
}
