/*
 * PRANATARA Index Card Frame + Artwork Forward v002 — chat-195.
 *
 * The ornamental frame is the visible card boundary.  The rectangular host
 * behind it stays transparent, the full 4:5 artwork remains visible, and the
 * title/chips stay on the foreground plane without a dark full-width veil.
 * The scope is limited to the featured card and the 333-card gallery on the
 * Editorial index.  Special cards, detail-dialog panels, and standalone media
 * retain their established presentation.
 */

body[data-index-card-visual="frame-clean-artwork-forward-v001"] #museumFeature,
body[data-index-card-visual="frame-clean-artwork-forward-v001"]
  #museumFeature
  > .museum-feature-image.reference-feature-card,
body[data-index-card-visual="frame-clean-artwork-forward-v001"]
  #grid
  > article.holo-card {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Do not let fine-pointer hover restore a rectangular black shadow.  The
   inherited scale/translate depth and ornamental frame glow remain active. */
@media (hover: hover) and (pointer: fine) {
  body[data-index-card-visual="frame-clean-artwork-forward-v001"]
    #grid
    > article.holo-card:is(:hover, :focus-within) {
    box-shadow: none !important;
  }
}

/* The artwork keeps its complete 4:5 source crop and a near-neutral display
   calibration.  Any narrow remainder stays inside the ornamental frame. */
body[data-index-card-visual="frame-clean-artwork-forward-v001"]
  #museumFeature
  > .museum-feature-image.reference-feature-card
  > img,
body[data-index-card-visual="frame-clean-artwork-forward-v001"]
  #grid
  > article.holo-card
  > .protected-media
  > img {
  object-fit: contain !important;
  object-position: center !important;
  opacity: 1 !important;
  filter: saturate(.96) contrast(1.02) brightness(.97) !important;
}

/* Remove only the presentation veils which obscured the lower artwork. */
body[data-index-card-visual="frame-clean-artwork-forward-v001"]
  #museumFeature
  > .museum-feature-image.reference-feature-card::after,
body[data-index-card-visual="frame-clean-artwork-forward-v001"]
  #grid
  > article.holo-card
  > .body::before,
body[data-index-card-visual="frame-clean-artwork-forward-v001"]
  #grid
  > article.holo-card
  > .body::after {
  content: none !important;
  display: none !important;
  background: none !important;
}

body[data-index-card-visual="frame-clean-artwork-forward-v001"]
  #grid
  > article.holo-card
  > .body {
  background: none !important;
}

/* Text remains explicitly above artwork and literal frame. */
body[data-index-card-visual="frame-clean-artwork-forward-v001"]
  #museumFeature
  > .museum-feature-body {
  z-index: 8 !important;
}

body[data-index-card-visual="frame-clean-artwork-forward-v001"]
  #museumFeature
  > .museum-feature-body
  > :is(h2, .museum-feature-tags, .museum-feature-open),
body[data-index-card-visual="frame-clean-artwork-forward-v001"]
  #grid
  > article.holo-card
  > .body
  > :is(.name, .chips, .view-card-button) {
  z-index: 9 !important;
}

/* Anchor the responsive Relic pennant to the literal 382x457 frame geometry. */
body[data-index-card-visual="frame-clean-artwork-forward-v001"]
  #grid
  > article.holo-card[data-rarity="Relic"]
  > .reference-rarity-pennant,
body[data-index-card-visual="frame-clean-artwork-forward-v001"]
  .reference-feature-card[data-rarity="Relic"]
  > .reference-rarity-pennant {
  top: 4.48cqw !important;
  right: 5.72cqw !important;
}

/* The inherited pennant is responsive; its Sulur Pusaka glyph must therefore
   use proportional geometry too.  Centre (50%,39.25%) matches the square
   emblem field above the pointed tail and keeps clearance at every card size. */
body[data-index-card-visual="frame-clean-artwork-forward-v001"]
  .reference-rarity-pennant[data-rarity="Relic"]::after {
  top: 14.5% !important;
  right: auto !important;
  bottom: auto !important;
  left: 17% !important;
  width: 66% !important;
  height: 49.5% !important;
  -webkit-mask-position: center !important;
  mask-position: center !important;
  -webkit-mask-size: contain !important;
  mask-size: contain !important;
}

/* The literal Relic frame layer intentionally used a long selector chain to
   protect its earlier visual contract.  This successor names that same chain
   plus the new gate, so the owner-requested clean host decisively wins without
   weakening any unrelated card, modal, or standalone rule. */
body[data-index-card-visual="frame-clean-artwork-forward-v001"][data-relic-literal-frame="full-frame-v006"][data-reference-portrait-card="v001"][data-reference-portrait-frame="transparent-centre-v002"][data-reference-portrait-fidelity="v003"][data-reference-portrait-optical="v004"][data-reference-feature-coordinate="v005"]
  #grid
  > article.holo-card[data-rarity="Relic"],
body[data-index-card-visual="frame-clean-artwork-forward-v001"][data-relic-literal-frame="full-frame-v006"][data-reference-portrait-card="v001"][data-reference-portrait-frame="transparent-centre-v002"][data-reference-portrait-fidelity="v003"][data-reference-portrait-optical="v004"][data-reference-feature-coordinate="v005"]
  #grid
  > article.holo-card[data-rarity="Relic"]:is(:hover, :focus-within) {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

body[data-index-card-visual="frame-clean-artwork-forward-v001"][data-relic-gallery-frame-stacking="foreground-v001"]
  #grid
  > article.holo-card[data-rarity="Relic"]
  > .body::before,
body[data-index-card-visual="frame-clean-artwork-forward-v001"][data-relic-gallery-frame-stacking="foreground-v001"]
  #grid
  > article.holo-card[data-rarity="Relic"]
  > .body::after {
  content: none !important;
  display: none !important;
  background: none !important;
}

body[data-index-card-visual="frame-clean-artwork-forward-v001"][data-relic-gallery-frame-stacking="foreground-v001"]
  #grid
  > article.holo-card[data-rarity="Relic"]
  > .body
  > :is(.name, .chips, .view-card-button) {
  z-index: 9 !important;
}

@media (forced-colors: active) {
  body[data-index-card-visual="frame-clean-artwork-forward-v001"] #museumFeature,
  body[data-index-card-visual="frame-clean-artwork-forward-v001"]
    #grid
    > article.holo-card {
    background: Canvas !important;
    border: 1px solid CanvasText !important;
    box-shadow: none !important;
  }

  body[data-index-card-visual="frame-clean-artwork-forward-v001"]
    .reference-rarity-pennant[data-rarity="Relic"]::after {
    background: CanvasText !important;
    filter: none !important;
  }
}
