/* Printed faces. New inner names deliberately isolate these cards from the
   older dashboard and foil styles. Width comes from the existing game layout. */
body .card.gallery-card.collectible-card.tcg-card {
  --tcg-tone:#b4bdcc; --tcg-bright:#eef1f6; --tcg-dark:#555e70; --tcg-ink:#151b28;
  --tcg-rim:3px;
  --edge:linear-gradient(130deg,var(--tcg-bright),var(--tcg-tone) 14%,var(--tcg-dark) 35%,
          color-mix(in srgb,var(--tcg-dark) 76%,var(--tcg-ink)) 47%,var(--tcg-tone) 67%,
          var(--tcg-bright) 85%,var(--tcg-dark));
  --edge-line:color-mix(in srgb,var(--tcg-dark) 70%,#1a1420);
  --close-glow:color-mix(in srgb,var(--tcg-tone) 15%,transparent);
  --far-glow:color-mix(in srgb,var(--tcg-tone) 9%,transparent);
  --aura:0 0 0 1px var(--edge-line),0 0 12px var(--close-glow),0 0 26px var(--far-glow),0 8px 16px #0007;
  position:relative; isolation:isolate; display:block; box-sizing:border-box;
  aspect-ratio:63/88; padding:var(--tcg-rim); min-width:0; border:0;
  border-radius:12px; overflow:hidden; text-align:left; cursor:pointer;
  background:var(--edge);
  box-shadow:var(--aura);
  animation:none; transition:box-shadow .18s ease; color:#f9f6ee; line-height:1.25;
  container-type:inline-size;
}
body .card.gallery-card.collectible-card.tcg-card.t-uncommon {--tcg-tone:#6abf8b;--tcg-bright:#c5f2bb;--tcg-dark:#246b51;--tcg-ink:#122b24}
body .card.gallery-card.collectible-card.tcg-card.t-rare {--tcg-tone:#70a7f1;--tcg-bright:#d0e3ff;--tcg-dark:#284f97;--tcg-ink:#15243f}
body .card.gallery-card.collectible-card.tcg-card.t-epic {--tcg-tone:#b487ee;--tcg-bright:#efd3ff;--tcg-dark:#61358a;--tcg-ink:#2a193b}
body .card.gallery-card.collectible-card.tcg-card.t-legendary {--tcg-tone:#e3af54;--tcg-bright:#ffebaf;--tcg-dark:#8b5826;--tcg-ink:#342619}
body .card.gallery-card.collectible-card.tcg-card.t-mythic {--tcg-tone:#ec718e;--tcg-bright:#ffc7d3;--tcg-dark:#9a3158;--tcg-ink:#341b2b;--edge-line:#753748;--close-glow:#e4517859;--far-glow:#cb30543f;--badge-bg:linear-gradient(130deg,#74324b,#512034);--badge-line:#a74f68;--badge-text:#ffe3eb}
body .card.gallery-card.collectible-card.tcg-card.t-apex {--tcg-tone:#edcc7e;--tcg-bright:#fff6d3;--tcg-dark:#9c7032;--tcg-ink:#25252d}
body .card.gallery-card.collectible-card.tcg-card.t-legacy {--tcg-tone:#67c4bb;--tcg-bright:#c0e9df;--tcg-dark:#39756b;--tcg-ink:#18312d}
body .tcg-card .tcg-stock {
  position:relative; height:100%; display:grid; min-width:0; overflow:hidden;
  grid-template-rows:10% 40% 17% 24% 9%; border:0; border-radius:9px;
  background:var(--tcg-ink); box-shadow:0 0 0 .7px #140e1ac9,inset 0 0 0 1px #ae6b7c16; isolation:isolate;
}
body .tcg-card .tcg-header {display:flex;align-items:center;justify-content:space-between;gap:6px;padding:0 4%;color:var(--tcg-bright);background:linear-gradient(110deg,#ffffff0b,#ffffff00);min-width:0}
body .tcg-card .tcg-rank {display:flex;align-items:baseline;gap:4px;line-height:1;white-space:nowrap;font-variant-numeric:tabular-nums}
body .tcg-card .tcg-rank b {font-size:8.1cqi;font-weight:800;letter-spacing:-.06em;color:#fff9ed}
body .tcg-card .tcg-rarity {
  display:flex;align-items:center;gap:3px;padding:2px 5px;border-radius:4px;line-height:1;
  font-size:clamp(9px,4.9cqi,12px);letter-spacing:.065em;text-transform:uppercase;white-space:nowrap;
  background:var(--badge-bg,color-mix(in srgb,var(--tcg-dark) 48%,var(--tcg-ink)));
  border:1px solid var(--badge-line,color-mix(in srgb,var(--tcg-tone) 62%,var(--tcg-dark)));
  color:var(--badge-text,var(--tcg-bright));
}
body .tcg-card .tcg-rarity svg {width:5.4cqi;height:5.4cqi;flex:none;color:var(--tcg-bright);filter:drop-shadow(0 1px 0 #0008)}
body .tcg-card .tcg-rarity b {font-weight:800}
body .tcg-card .tcg-art {position:relative;min-height:0;margin:0 2.1%;border:1px solid var(--tcg-tone);border-radius:2px;box-shadow:0 0 0 1px #0009,0 2px 0 #ffffff20;z-index:2;isolation:isolate}
body .card.gallery-card.collectible-card.tcg-card .thumb {position:absolute;inset:0;width:100%;height:100%;aspect-ratio:auto;margin:0;border:0;border-radius:0;overflow:hidden;box-shadow:none;background:#080a12}
body .card.gallery-card.collectible-card.tcg-card .thumb img {display:block;width:100%;height:100%;object-fit:contain;object-position:center;filter:none;transform:none;opacity:1;mix-blend-mode:normal}
body .card.gallery-card.collectible-card.tcg-card .thumb::after {display:none}
body .card.gallery-card.collectible-card.tcg-card .thumb .ph {position:absolute;inset:0;display:grid;place-items:center;padding:10%;height:100%;font-size:9cqi;text-align:center;font-weight:750;line-height:1.15;background:repeating-linear-gradient(45deg,#ffffff03 0 1px,transparent 1px 9px),radial-gradient(ellipse at bottom,color-mix(in srgb,var(--tcg-tone) 30%,#080c18),#10121d);color:var(--tcg-bright)}
body .tcg-card .tcg-art-corner {position:absolute;inset:-2px;pointer-events:none;border:5px solid var(--tcg-bright);clip-path:polygon(0 0,9% 0,9% 2%,2% 2%,2% 10%,0 10%,0 0,100% 100%,91% 100%,91% 98%,98% 98%,98% 90%,100% 90%,100% 100%);opacity:.7}
body .tcg-card .tcg-copies {position:absolute;right:5px;bottom:5px;padding:2px 5px;border:1px solid #fff6;border-radius:3px;color:white;background:#10131dea;font-size:4.5cqi;font-weight:750}
body .tcg-card .tcg-title {position:relative;display:flex;align-items:center;min-width:0;padding:2cqi 4%;background:linear-gradient(110deg,color-mix(in srgb,var(--tcg-tone) 17%,var(--tcg-ink)),var(--tcg-ink));border-bottom:1px solid color-mix(in srgb,var(--tcg-tone) 40%,transparent);z-index:2}
body .tcg-card .tcg-name {display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere;min-width:0;font-size:var(--name-scale,8cqi);font-weight:750;letter-spacing:-.025em;line-height:1.16;text-wrap:balance;color:#fff8ec;text-shadow:0 1px 1px #0008}
body .tcg-card .tcg-details {position:relative;display:grid;grid-template-columns:minmax(0,1fr) 32cqi;grid-template-rows:1fr auto;gap:4% 5%;align-items:center;padding:4% 4% 3%;isolation:isolate;overflow:hidden;background:radial-gradient(ellipse at 80% 150%,color-mix(in srgb,var(--tcg-tone) 28%,transparent),transparent 80%),repeating-linear-gradient(135deg,transparent 0 7px,#ffffff03 7px 8px),var(--tcg-ink);min-height:0}
body .tcg-card .tcg-credits {align-self:end;min-width:0;display:flex;flex-direction:column;gap:1.7cqi;z-index:1}
body .tcg-card .tcg-credits>span {display:flex;flex-direction:column;min-width:0;gap:.4cqi}
body .tcg-card .tcg-credits small {font-size:3.25cqi;font-weight:450;color:color-mix(in srgb,var(--tcg-bright) 65%,#8e8e95);line-height:1.1}
body .tcg-card .tcg-credits b {font-size:4.6cqi;font-weight:600;color:#f1efe8;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body .tcg-card .tcg-score {
  align-self:end;justify-self:end;z-index:1;white-space:nowrap;
  font-size:clamp(9px,5.15cqi,12px);line-height:1.15;font-weight:500;font-variant-numeric:tabular-nums;
  color:color-mix(in srgb,var(--tcg-bright) 48%,#a0a1a8);
}
body .tcg-card .tcg-traits {grid-column:1/-1;z-index:1;font-size:3.15cqi;letter-spacing:.035em;line-height:1.2;color:color-mix(in srgb,var(--tcg-bright) 68%,#94969a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:1cqi}
body .tcg-card .tcg-footer {
  display:flex;align-items:center;justify-content:center;min-width:0;padding:0 3%;z-index:2;
  background:color-mix(in srgb,var(--tcg-tone) 10%,var(--tcg-ink));
  border-top:1px solid color-mix(in srgb,var(--tcg-tone) 45%,transparent);
}
body .tcg-card .tcg-demon-stamp {display:inline-flex;gap:4px;align-items:center;white-space:nowrap;color:var(--tcg-bright);}
body .tcg-demon-stamp b {font-size:clamp(8px,4.6cqi,10px);font-weight:700;letter-spacing:.045em;text-transform:uppercase;}
body .tcg-demon-stamp img {width:clamp(12px,8.5cqi,18px);height:auto;filter:saturate(.7);}
body .tcg-card .tcg-foil-mark {
  display:inline-flex;flex-shrink:0;align-items:center;gap:.22em;padding:2px 4px;border-radius:2px;
  font-size:clamp(7px,4cqi,10px);line-height:1;font-weight:800;letter-spacing:.035em;text-transform:uppercase;
  color:#22192d;background:linear-gradient(110deg,#f8d3e7,#c5c8ff,#a8eee7,#f5deb6);text-shadow:none;
}
/* Foil colour stays beneath the printed ink; artwork gets only a faint reflection. */
body .card.gallery-card.collectible-card.tcg-card.holo {
  background:linear-gradient(135deg,#ffe8aa,#f2a2d7 18%,#c2aafe 36%,#9bf5ff 56%,#fff3c0 74%,#ef8cb8);
  box-shadow:var(--aura);
}
body .tcg-card.holo .tcg-stock {background:#22182e;}
body .tcg-card.holo .tcg-stock::before {
  content:'';position:absolute;inset:-11%;z-index:0;pointer-events:none;
  background:radial-gradient(ellipse at 96% 92%,#f3b86a8a,transparent 43%),linear-gradient(120deg,#42225d 5%,#b32e79 20%,#f173a5 27%,#ffcb8c 31%,#2cddd0 42%,#275b9a 51%,#472779 59%,#b459da 70%,#ec8db6 77%,#59cbd7 88%,#25486b);
  background-size:112% 112%;background-position:var(--mx,50%) var(--my,50%);opacity:1;
  animation:tcg-spectrum-drift 12s ease-in-out infinite alternate;animation-delay:var(--foil-delay,0s);
}
body .tcg-card.holo .tcg-stock::after {
  content:'';position:absolute;inset:0;z-index:1;pointer-events:none;
  background:radial-gradient(ellipse at var(--mx,38%) var(--my,30%),#fff6,transparent 48%),repeating-linear-gradient(122deg,transparent 0 2px,#ffffff24 2px 2.5px,transparent 2.5px 5px),radial-gradient(circle,#fff9 0 .5px,transparent .9px);
  background-size:100% 100%,100% 100%,13px 17px;mix-blend-mode:screen;opacity:.23;
}
body .tcg-card.holo :is(.tcg-header,.tcg-title,.tcg-details,.tcg-footer) {
  position:relative;z-index:2;background:linear-gradient(90deg,#10102058,#12112530);border-color:#eddafb26;
}
body .tcg-card.holo .tcg-title {justify-content:space-between;gap:5px;}
body .tcg-card.holo .tcg-light {
  position:absolute;inset:-40% -30%;z-index:1;
  background:linear-gradient(115deg,transparent 32%,#ffd5f722 42%,#b8ffff99 46%,#fff 47%,#ffe6ae77 48%,transparent 51%,transparent 56%,#dfc4ff88 57%,transparent 59%);
  mix-blend-mode:screen;opacity:.37;pointer-events:none;transform:translateX(-55%);
  animation:tcg-foil-light 8s ease-in-out infinite alternate;animation-delay:var(--foil-delay,0s);
}
/* A much softer reflection crosses the image without changing its saturation or contrast. */
body .tcg-card.holo .tcg-art::after {content:'';position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(115deg,transparent 35%,#b9e9ff88 46%,#fff 48%,transparent 52%);background-size:300% 100%;mix-blend-mode:soft-light;opacity:.09;animation:tcg-art-reflection 8s ease-in-out infinite alternate;animation-delay:var(--foil-delay,0s)}
body .tcg-card.holo .tcg-name,body .tcg-card.holo .tcg-rank,body .tcg-card.holo .tcg-rarity {text-shadow:0 1px 2px #06091c,0 0 5px #06091c88}
body .tcg-card.holo .tcg-credits small,body .tcg-card.holo .tcg-traits,body .tcg-card.holo .tcg-serial {color:#e6e6f0;text-shadow:0 1px 2px #06091c}
@keyframes tcg-spectrum-drift {from{transform:translate(-3%,-2%)}to{transform:translate(3%,2%)}}
@keyframes tcg-art-reflection {from{background-position:100% 50%}to{background-position:0% 50%}}
html.reduce-motion body .tcg-card.holo .tcg-stock::before,html.reduce-motion body .tcg-card.holo .tcg-art::after {animation:none}
@media(prefers-reduced-motion:reduce){body .tcg-card.holo .tcg-stock::before,body .tcg-card.holo .tcg-art::after{animation:none}}
body .card.gallery-card.collectible-card.tcg-card.holo::after {content:'';position:absolute;inset:0;padding:var(--tcg-rim);border-radius:inherit;background:linear-gradient(115deg,transparent 25%,#ffffffbd 45%,#fff4 48%,transparent 65%);background-size:250% 250%;background-position:var(--mx,36%) var(--my,50%);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask-composite:exclude;pointer-events:none;z-index:4;opacity:.65}
body .tcg-card.holo .tcg-credits b {text-shadow:0 1px 2px #020817}
body .tcg-card.holo .tcg-score {color:#f1e8ed;text-shadow:0 1px 2px #201429}
body .tcg-card.holo .tcg-art {border-color:#e1c0d58a}
body .tcg-card.t-apex .tcg-rarity svg {color:#fff0aa;filter:drop-shadow(0 0 4px #ffe6a755)}
body .tcg-card.t-apex .tcg-stock {background:repeating-conic-gradient(from 0deg at 50% -60%,#fff3 0 1deg,#0000 1deg 14deg),var(--tcg-ink)}
body .tcg-card.t-apex:not(.holo) .tcg-header {background:linear-gradient(120deg,#b3914c44,#fff5bd22,#b3914c33)}
body .card.gallery-card.collectible-card.tcg-card.unowned {filter:grayscale(.45) brightness(.78)}
body .card.gallery-card.collectible-card.tcg-card:hover {box-shadow:var(--aura)}
body .card.gallery-card.collectible-card.tcg-card:focus-visible {outline:2px solid #fff1cb;outline-offset:4px}
body .card.gallery-card.collectible-card.tcg-card.cardz-motion {transform:var(--cardz-pose,translate(0,0)) perspective(900px) translateY(calc(var(--card-lift,0)*-3px)) rotateX(var(--ry,0deg)) rotateY(var(--rx,0deg));transition:box-shadow .15s;will-change:transform;z-index:3}
body .card-wrap:has(.tcg-card)>.fav-star {left:4%;right:auto;top:12%;bottom:auto;background:#0c1121;color:#a4afc6;border-color:#8d9bb04d;z-index:4}
body .card-wrap:has(.tcg-card)>.fav-star[aria-pressed=true] {color:#ffe0a2}
body .card-wrap:has(.tcg-card) .tcg-details {padding-right:4%}
body .craft-slot .card.gallery-card.collectible-card.tcg-card {--tcg-rim:1.5px;border-radius:7px}
body .craft-slot .tcg-stock {grid-template-rows:14% 51% 24% 0% 11%;border-radius:4px}
body .craft-slot .tcg-details,body .craft-slot .tcg-rank small,body .craft-slot .tcg-serial {display:none}
body .craft-slot .tcg-footer {display:flex;justify-content:space-between}
@keyframes tcg-foil-light {from{transform:translateX(-55%)}to{transform:translateX(55%)}}
html.reduce-motion .tcg-card.holo .tcg-light {animation:none}
@media(prefers-reduced-motion:reduce){body .tcg-card.holo .tcg-light{animation:none}body .card.gallery-card.collectible-card.tcg-card.cardz-motion{transform:none;will-change:auto}}
@container(max-width:185px){body .tcg-card .tcg-credits small{font-size:7px}body .tcg-card .tcg-credits b{font-size:9px}body .tcg-card .tcg-details{grid-template-rows:1fr;padding-block:3%;gap:3%}body .tcg-card .tcg-traits{display:none}}
@media(max-width:600px){body .card.gallery-card.collectible-card.tcg-card{border-radius:10px}body .tcg-card .tcg-stock{border-radius:7px}body .tcg-card .tcg-rank small{display:none}body .tcg-card .tcg-rarity{gap:3px}}

/* Apex's prismatic edge turns independently of the printed face and pointer tilt. */
@property --tcg-apex-angle { syntax:'<angle>'; initial-value:0deg; inherits:false; }
body .card.gallery-card.collectible-card.tcg-card.t-apex {
  background:conic-gradient(from var(--tcg-apex-angle),#fff0ad,#f6ba73 14%,#ef8bd2 29%,#ac9df6 43%,#7ae4e2 57%,#b0e6a3 71%,#fff0ad 86%,#fff0ad);
  animation:tcg-apex-edge 10s linear infinite;
}
@keyframes tcg-apex-edge {to{--tcg-apex-angle:360deg}}
html.reduce-motion body .card.gallery-card.collectible-card.tcg-card.t-apex {animation:none}
@media(prefers-reduced-motion:reduce){body .card.gallery-card.collectible-card.tcg-card.t-apex{animation:none}}

@container (max-width:125px) {
  body .tcg-card .tcg-demon-stamp {gap:2px;}
  body .tcg-demon-stamp img {width:9px;}
  body .tcg-demon-stamp b {font-size:5.6cqi;}
  body .tcg-card .tcg-foil-mark {padding:1px 2px;font-size:5.4cqi;}
}

body a.tcg-card{text-decoration:none;font-family:inherit}body .search-card-grid .tcg-card{width:100%;min-height:0}body .search-detail .tcg-card{min-height:0}body .cardz-welcome-cards .tcg-card{flex:1;max-width:190px}
