/*
 * PRANATARA chat-175 — Relic rarity-strip cartouche aligned to its neighbours.
 *
 * The existing seven-path semantic frame follows the reference-raster scale on
 * desktop and stays contained at responsive widths.  The inherited Relic label,
 * count, and inline Cakra emblem share the frame's vertical host height so all
 * four elements retain one centre line.  Palette, masks, x axes, typography,
 * interaction states, motion policy, native hit area, and raster eraser remain
 * owned by their earlier layers.
 */

@media (min-width: 1500px) {
  body[data-rarity-strip-pixel-match="reference-raster-v001"][data-relic-strip-frame="neighbour-geometry-v003"]
    .museum-rarity-button[data-rarity-filter="Relic"]
    > .museum-rarity-cartouche-frame {
    inset: auto !important;
    top: 0 !important;
    right: auto !important;
    bottom: auto !important;
    left: 0 !important;
    width: 100% !important;
    height: min(44px, 2.62216925vw) !important;
  }

  body[data-rarity-strip-pixel-match="reference-raster-v001"][data-relic-strip-frame="neighbour-geometry-v003"]
    .museum-rarity-button[data-rarity-filter="Relic"]
    > .museum-rarity-label,
  body[data-rarity-strip-pixel-match="reference-raster-v001"][data-relic-strip-frame="neighbour-geometry-v003"]
    .museum-rarity-button[data-rarity-filter="Relic"]
    > .museum-rarity-count {
    height: min(44px, 2.62216925vw) !important;
  }
}

@media (max-width: 1499.98px) {
  body[data-rarity-strip-pixel-match="reference-raster-v001"][data-relic-strip-frame="neighbour-geometry-v003"]
    .museum-rarity-button[data-rarity-filter="Relic"] {
    --relic-strip-frame-offset-x: clamp(0px, calc(100% - 220px), 4px);
  }

  body[data-rarity-strip-pixel-match="reference-raster-v001"][data-relic-strip-frame="neighbour-geometry-v003"]
    .museum-rarity-button[data-rarity-filter="Relic"]
    > .museum-rarity-cartouche-frame {
    inset: auto !important;
    top: 7px !important;
    right: auto !important;
    bottom: auto !important;
    left: var(--relic-strip-frame-offset-x) !important;
    width: 220px !important;
    height: 44px !important;
  }
}

@media (min-width: 1500px) and (forced-colors: active) {
  body[data-rarity-strip-pixel-match="reference-raster-v001"][data-relic-strip-frame="neighbour-geometry-v003"]
    .museum-rarity-button[data-rarity-filter="Relic"]
    > .museum-rarity-label,
  body[data-rarity-strip-pixel-match="reference-raster-v001"][data-relic-strip-frame="neighbour-geometry-v003"]
    .museum-rarity-button[data-rarity-filter="Relic"]
    > .museum-rarity-count {
    height: 44px !important;
  }
}
