/* PRANATARA Reference Card Fidelity v001 — chat-143.
   Corrective successor for the thin frame, monoline rarity glyphs and floating
   C-ID plaque. The canonical card data and inherited motion remain untouched. */

body[data-reference-card-fidelity="antique-frame-relief-v001"] {
  --reference-antique-ink: #0b0906;
  --reference-antique-shadow: #18120b;
  --reference-antique-dark: #312517;
  --reference-antique-mid: #775d36;
  --reference-antique-gold: #b99658;
  --reference-antique-light: #ddc37e;
}

body[data-reference-card-fidelity="antique-frame-relief-v001"] #grid > article.holo-card,
body[data-reference-card-fidelity="antique-frame-relief-v001"] .collectible-card.holo-card {
  border: 1px solid var(--reference-antique-shadow) !important;
  border-radius: 8px !important;
  box-shadow:
    0 0 0 1px #070503,
    0 5px 0 -3px #775d36,
    0 18px 31px -19px rgba(0, 0, 0, .95),
    inset 0 0 0 3px #21180f !important;
}

/* The frame is one closed object. The inherited 333 token-bound corner paths
   survive as quiet intaglio signatures beneath the dominant filled relief. */
body[data-reference-card-fidelity="antique-frame-relief-v001"] .holo-card > .ornamental-frame-v002.heirloom-cartouche-frame-v001 {
  position: absolute !important;
  inset: 0 !important;
  z-index: 8 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: url("assets/reference-antique-frame-v001.svg") center / 100% 100% no-repeat !important;
  box-shadow: none !important;
  color: var(--reference-antique-gold) !important;
  pointer-events: none !important;
}

body[data-reference-card-fidelity="antique-frame-relief-v001"] .holo-card > .ornamental-frame-v002 .heirloom-corner {
  width: 31px !important;
  height: 31px !important;
  opacity: .14 !important;
  mix-blend-mode: screen;
}

body[data-reference-card-fidelity="antique-frame-relief-v001"] .holo-card > .ornamental-frame-v002 .heirloom-corner-intaglio {
  fill: none !important;
  stroke: color-mix(in srgb, var(--frame-light) 52%, var(--reference-antique-gold)) !important;
  stroke-width: .42 !important;
}

/* C-ID plaque shares the top and left frame seams: zero visual gap and no pill. */
body[data-reference-card-fidelity="antique-frame-relief-v001"] .holo-card .heirloom-top-number {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: auto !important;
  z-index: 7 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  width: clamp(58px, 16.5%, 72px) !important;
  min-width: 0 !important;
  height: 33px !important;
  padding: 0 8px 1px 6px !important;
  transform: none !important;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 88% 100%, 0 100%) !important;
  border: 0 !important;
  border-radius: 7px 0 2px 0 !important;
  background:
    linear-gradient(90deg, rgba(227, 201, 135, .18), transparent 22%),
    linear-gradient(180deg, #2c2418 0%, #17120c 58%, #0a0805 100%) !important;
  box-shadow:
    inset 0 0 0 1px #d0b16d,
    inset 0 -3px 0 #3e2f1d,
    inset -3px 0 0 #332616,
    inset 0 1px 0 rgba(246, 223, 164, .25) !important;
  color: #ddc27e !important;
  font: 600 14px/1 Georgia, "Times New Roman", serif !important;
  letter-spacing: .035em !important;
  text-align: center !important;
  text-shadow: 0 1px 0 #000, 0 0 7px rgba(210, 177, 103, .2) !important;
  white-space: nowrap !important;
}

body[data-reference-card-fidelity="antique-frame-relief-v001"] .holo-card .heirloom-top-number::before {
  content: "C" !important;
  position: static !important;
  display: inline !important;
}

body[data-reference-card-fidelity="antique-frame-relief-v001"] .holo-card .heirloom-top-number::after {
  content: "" !important;
  position: absolute !important;
  inset: 3px 5px 4px 3px !important;
  clip-path: polygon(0 0, 100% 0, 100% 68%, 87% 100%, 0 100%) !important;
  box-shadow: inset 0 0 0 1px rgba(141, 111, 63, .55) !important;
  pointer-events: none !important;
}

/* Retire the clipped v071 pseudo badge and render a real direct-child pennant. */
body[data-reference-card-fidelity="antique-frame-relief-v001"] #grid > article.holo-card > .body::before,
body[data-reference-card-fidelity="antique-frame-relief-v001"] #grid > article.holo-card > .body::after {
  content: none !important;
  display: none !important;
}

body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-rarity-pennant {
  --reference-emblem-field: #2b3023;
  --reference-emblem-field-dark: #11150f;
  --reference-emblem-ink: #d8c67d;
  position: absolute !important;
  top: 0 !important;
  right: 14px !important;
  z-index: 9 !important;
  display: block !important;
  width: 58px !important;
  height: 78px !important;
  color: var(--reference-emblem-ink) !important;
  pointer-events: none !important;
  filter: none !important;
}

body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-rarity-pennant[data-rarity="Core"] {
  --reference-emblem-field: #354026;
  --reference-emblem-field-dark: #151b10;
  --reference-emblem-ink: #d7c56f;
}

body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-rarity-pennant[data-rarity="Uncommon"] {
  --reference-emblem-field: #1f4835;
  --reference-emblem-field-dark: #0e2118;
  --reference-emblem-ink: #b7dfbf;
}

body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-rarity-pennant[data-rarity="Rare"] {
  --reference-emblem-field: #1e4760;
  --reference-emblem-field-dark: #0c202d;
  --reference-emblem-ink: #c0deeb;
}

body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-rarity-pennant[data-rarity="Epic"] {
  --reference-emblem-field: #493553;
  --reference-emblem-field-dark: #201724;
  --reference-emblem-ink: #dec7e6;
}

body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-rarity-pennant[data-rarity="Mythic"] {
  --reference-emblem-field: #712d20;
  --reference-emblem-field-dark: #2e120d;
  --reference-emblem-ink: #f1ae70;
}

body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-rarity-pennant[data-rarity="Relic"] {
  --reference-emblem-field: #4b3d1c;
  --reference-emblem-field-dark: #1d170b;
  --reference-emblem-ink: #f1df99;
}

body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-rarity-pennant-shell,
body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-rarity-emblem {
  position: absolute;
  display: block;
  overflow: visible;
}

body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-rarity-pennant-shell {
  inset: 0;
  width: 100%;
  height: 100%;
  shape-rendering: geometricPrecision;
}

body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-pennant-outer {
  fill: #090704;
  stroke: #17100a;
  stroke-width: 2.4;
}

body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-pennant-rim {
  fill: var(--reference-emblem-field-dark);
  stroke: #bf9b5b;
  stroke-width: 1.55;
}

body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-pennant-field {
  fill: var(--reference-emblem-field);
  stroke: #5c4528;
  stroke-width: 1.15;
}

body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-pennant-bevel {
  fill: none;
  stroke: rgba(235, 207, 140, .28);
  stroke-width: .9;
}

body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-rarity-emblem {
  top: 12px;
  left: 10px;
  width: 38px;
  height: 42px;
  shape-rendering: geometricPrecision;
}

body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-emblem-shadow {
  fill: #050403;
  opacity: .72;
  transform: translateY(1.8px);
}

body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-emblem-face {
  fill: currentColor;
  fill-rule: evenodd;
  stroke: color-mix(in srgb, currentColor 62%, #5b3d1b);
  stroke-width: .55;
  paint-order: stroke fill;
}

body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-emblem-glint {
  fill: none;
  stroke: rgba(255, 248, 219, .5);
  stroke-width: .8;
  stroke-linecap: round;
}

/* Featured C001 uses the same hierarchy without changing its canonical art. */
body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-feature-card {
  border: 0 !important;
  border-radius: 8px !important;
}

body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-feature-frame {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: block;
  border-radius: 7px;
  background: url("assets/reference-antique-frame-v001.svg") center / 100% 100% no-repeat;
  pointer-events: none;
}

body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-feature-card .museum-feature-token {
  top: 0 !important;
  left: 0 !important;
  z-index: 9 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 33px;
  padding: 0 8px 1px 6px !important;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 88% 100%, 0 100%);
  border: 0 !important;
  border-radius: 7px 0 2px 0 !important;
  background: linear-gradient(180deg, #2c2418, #0a0805) !important;
  box-shadow: inset 0 0 0 1px #d0b16d, inset 0 -3px 0 #3e2f1d !important;
  color: #ddc27e !important;
  font: 600 14px/1 Georgia, "Times New Roman", serif !important;
  letter-spacing: .035em !important;
  text-shadow: 0 1px 0 #000 !important;
}

body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-feature-card > .reference-rarity-pennant {
  z-index: 10 !important;
}

@media (max-width: 420px) {
  body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-rarity-pennant {
    right: 10px !important;
    width: 52px !important;
    height: 70px !important;
  }

  body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-rarity-emblem {
    top: 11px;
    left: 9px;
    width: 34px;
    height: 37px;
  }

  body[data-reference-card-fidelity="antique-frame-relief-v001"] .holo-card .heirloom-top-number,
  body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-feature-card .museum-feature-token {
    width: 58px !important;
    height: 30px !important;
    font-size: 12px !important;
  }
}

@media (forced-colors: active) {
  body[data-reference-card-fidelity="antique-frame-relief-v001"] .holo-card > .ornamental-frame-v002.heirloom-cartouche-frame-v001,
  body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-feature-frame {
    background: none !important;
    border: 3px double CanvasText !important;
    border-radius: 4px !important;
  }

  body[data-reference-card-fidelity="antique-frame-relief-v001"] .holo-card .heirloom-top-number,
  body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-feature-card .museum-feature-token {
    clip-path: none !important;
    border: 1px solid CanvasText !important;
    background: Canvas !important;
    color: CanvasText !important;
    box-shadow: none !important;
  }

  body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-pennant-outer,
  body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-pennant-rim,
  body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-pennant-field {
    fill: Canvas !important;
    stroke: CanvasText !important;
  }

  body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-emblem-shadow {
    display: none;
  }

  body[data-reference-card-fidelity="antique-frame-relief-v001"] .reference-emblem-face {
    fill: CanvasText !important;
    stroke: Canvas !important;
  }
}
