/* ==========================================================================
   MYSTIC — code-compiled artefact cards (design system)

   Screen master for the print pipeline. Geometry tokens follow
   Premium-Print-Formats §4.3 (board game & playing cards):
     - trim      poker 63.5 x 88.9mm   -> aspect-ratio 63.5/88.9
     - corners   3-3.5mm radius        -> ~4.7% of card width
     - safe zone 3mm inside trim       -> --mcard-safe
     - bleed     3mm beyond trim       -> added at export, not on screen
     - backs     single symmetric file -> .mcard--back is mirror-symmetric
     - register  +/-0.2mm front/back   -> keep badges inset of the safe zone
   Finishes referenced for later export: gold = hot foil (烫金) spot layer,
   card face = CMYK, linen texture = laminate. See Part 6 layer naming.
   ========================================================================== */

.mcard {
  /* geometry */
  --card-w: 250px;
  --card-ratio: 63.5 / 88.9;          /* poker trim, PPF §4.3 */
  --card-radius: 4.7%;                /* ~3mm at poker width */
  --mcard-safe: 5%;                   /* ~3mm safe zone inside trim */

  /* palette (site theme) */
  --face: #fffef9;
  --face-edge: #f3ead2;
  --gold: #c9a24b;
  --gold-deep: #8a6a25;
  --gold-bright: #e8cf8f;
  --ink: #221d12;
  --muted: #6f6858;

  /* rules text sets in Inter for small-size legibility;
     everything else stays Comfortaa */
  --font-body: "Inter", system-ui, sans-serif;

  /* interaction state (set by JS, pointer-fine only) */
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50;                           /* pointer x, % */
  --my: 50;                           /* pointer y, % */
  --hover: 0;                         /* 0..1 pointer presence */

  position: relative;
  width: var(--card-w);
  aspect-ratio: var(--card-ratio);
  font-family: var(--font-display, "Comfortaa", sans-serif);
  color: var(--ink);
  perspective: 720px;
  -webkit-user-select: none;
  user-select: none;
}

.mcard__inner {
  position: absolute;
  inset: 0;
  border-radius: var(--card-radius);
  background:
    linear-gradient(160deg, var(--face) 0%, var(--face-edge) 130%);
  border: 1px solid rgba(201, 162, 75, 0.55);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 18px 34px -22px rgba(34, 29, 18, 0.45);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform 0.45s var(--ease-out, ease), box-shadow 0.45s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: var(--mcard-safe);
  gap: 2.4%;
}

.mcard[data-tilt]:hover .mcard__inner {
  transition: transform 0.08s linear, box-shadow 0.3s ease;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 30px 48px -24px rgba(34, 29, 18, 0.55);
}

/* hairline inner rule — echoes the north-star double border, minimal */
.mcard__inner::before {
  content: "";
  position: absolute;
  inset: calc(var(--mcard-safe) * 0.55);
  border: 1px solid rgba(201, 162, 75, 0.35);
  border-radius: calc(var(--card-radius) * 0.7);
  pointer-events: none;
  z-index: 4;
}

/* ---------- header: biome chip, name, cost coin ---------- */
.mcard__head {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 8%;
  position: relative;
  z-index: 5;
}

/* biome / spell mark — the raw medallion cutout, no housing; the icons
   arrive pre-framed with their own ornate rims */
.mcard__chip {
  flex: 0 0 auto;
  width: 13.5%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 2px 4px rgba(138, 106, 37, 0.45));
}
.mcard__chip svg {
  width: 92%;
  height: 92%;
  display: block;
}
/* spell mark — the flask glyph in gold ink (biome chips use their accents) */
.mcard__chip--spell { color: var(--gold-deep); }

/* mirrored opponent index — rotated 180° so the strength + ability name
   read correctly from across the table */
.mcard__mirror {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0 auto;
  text-align: center;
  transform: rotate(180deg);
  font-size: calc(var(--card-w) * 0.034);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-deep);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  /* gold-ringed parchment pill — the mirrored lockup */
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  padding: 0.35em 1em;
  background: var(--parchment, #f7f1e3);
}

/* gold amount — bare flat gold text, no housing (foil-ready) */
.mcard__coin {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: baseline;
  color: var(--gold-deep);
  font-weight: 700;
  font-size: calc(var(--card-w) * 0.066);
}
/* the ₲ currency mark — Inter/system stack (Comfortaa lacks U+20B2),
   same size as the numeral it prefixes */
.mcard__cur {
  font-family: var(--font-body), system-ui, sans-serif;
  font-size: 1em;
  font-weight: 400; /* regular against the bold numeral */
  margin-right: 0.1em;
}

/* ---------- art window ---------- */
.mcard__art {
  position: relative;
  z-index: 3;
  flex: 0 0 50%;
  border-radius: calc(var(--card-radius) * 0.55);
  overflow: hidden;
  border: 1px solid rgba(201, 162, 75, 0.5);
  box-shadow: 0 6px 14px -10px rgba(34, 29, 18, 0.5);
  background: #e9e2cf;
}
/* mid row (creature + land): art at 73% left-aligned + chevron strip right */
.mcard__mid {
  display: flex;
  gap: 3%;
  flex: 0 0 50%;
  min-height: 0;
  position: relative;
  z-index: 3;
}
.mcard__mid .mcard__art { flex: 0 0 73%; min-width: 0; }
.mcard__art > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* name overlaid on the art's bottom edge (SuperAI-style), lifted by an
   ivory scrim; padding-right keeps it clear of the class medallion */
.mcard__artname {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 16% 22% 4.5% 5%;
  background: linear-gradient(transparent, rgba(255, 251, 238, 0.94) 62%);
  font-size: calc(var(--card-w) * 0.041); /* same size as the rules text */
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.15;
  color: var(--ink);
}
/* class medallion set into the art, bottom right */
.mcard__art .mcard__class {
  position: absolute;
  right: 4%;
  bottom: 4%;
  width: 20%; /* creature type medallion, ~33% larger for legibility */
  z-index: 3;
}

/* ---------- rules zone ---------- */
.mcard__rules {
  position: relative;
  z-index: 5;
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 2%;
  font-family: var(--font-body);
  font-size: calc(var(--card-w) * 0.041);
  line-height: 1.42;
  color: var(--ink);
  overflow: hidden;
}
/* mirrored description band above the art — muted, clamped, for opponents */
.mcard__rules--mirror {
  flex: 0 0 auto;
  transform: rotate(180deg);
  color: var(--muted);
  font-size: calc(var(--card-w) * 0.034);
  line-height: 1.3;
  max-height: 2.7em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
/* land mirror band carries both match and mismatch effects — clamp deeper */
.mcard__rules--mirror.mcard__rules--biome {
  -webkit-line-clamp: 4;
  max-height: 5.6em;
}
/* footer lockup — strength numeral + ability name in a gold-ringed pill,
   centered at the bottom, echoing the mirrored pill at the top */
.mcard__lockup {
  display: flex;
  align-items: center;
  gap: 0.4em;
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  padding: 0.35em 1em;
  background: rgba(247, 241, 227, 0.92);
  margin-bottom: 1%;
  /* identical typography to .mcard__mirror — the same pill, upright */
  font-size: calc(var(--card-w) * 0.034);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.mcard__strname {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1em;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.mcard__strname::before { content: "·"; margin-right: 0.4em; color: var(--gold); }

.mcard__rules strong {
  display: block;
  font-family: var(--font-display, "Comfortaa", sans-serif); /* label stays Comfortaa */
  color: var(--gold-deep);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: calc(var(--card-w) * 0.045);
  margin-bottom: 0.15em;
}
.mcard__rules--plain { padding-top: 1%; }
.mcard__rules--plain strong { color: var(--ink); }

/* land card: the biome's match/mismatch pair as run-in effect lines */
.mcard__rules--biome {
  font-size: calc(var(--card-w) * 0.034);
  line-height: 1.38;
}
.fxline { margin: 0; }
.fxline + .fxline { margin-top: 0.5em; }
.fxline__tag {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.86em;
}
.fxline--match .fxline__tag { color: var(--gold-deep); }
.fxline--mismatch .fxline__tag { color: var(--muted); }

/* ---------- footer: strength numeral, class icon ---------- */
.mcard__foot {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 8%;
}

/* strength — crossed-swords device + bare gold numeral, no housing */
.mcard__str {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 1em; /* inherits the lockup's size — numeral matches the name */
  color: var(--gold-deep);
}
/* crossed-swords device — same metrics as .mcard__miricon so the bottom
   pill matches the mirrored top pill exactly */
.mcard__stricon {
  width: 1.14em;
  flex: 0 0 auto;
  display: inline-block;
  vertical-align: -0.12em;
  margin-right: 0.3em;
}
.mcard__stricon svg { width: 100%; height: auto; display: block; }

/* the same device leading the mirrored opponent strip */
.mcard__miricon {
  display: inline-block;
  width: 1.14em;
  vertical-align: -0.12em;
  margin-right: 0.3em;
}
.mcard__miricon svg { width: 100%; height: auto; display: block; }

/* creature type = the same circular medallion as the creature gallery
   (.medallion in style.css): circle crop, gold rim, art edge-to-edge */
.mcard__class {
  flex: 0 0 auto;
  width: 12.5%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background: #e9dfc8;
  border: 1.5px solid var(--gold);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 2px 6px -3px rgba(34, 29, 18, 0.4);
  display: grid;
  place-items: center;
}
.mcard__class img {
  width: 88%; /* parchment ring margin inside the gold border */
  height: 88%;
  object-fit: cover;
}


/* ---------- orientation chevrons (gold, bottom right) ---------- */
/* right strip beside the art: chevron column on top, reaction shield below */
.mcard__strip {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5%;
  padding: 2% 0;
}
.mcard__chev {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;           /* top-aligned, clear of the shield */
  filter: drop-shadow(0 1px 2px rgba(138, 106, 37, 0.4));
}
.mcard__chev svg { height: 100%; width: auto; max-width: 100%; display: block; }
.mcard__strip .mcard__shield {
  position: static;
  flex: 0 0 auto;
  width: 55%;
}

/* ---------- reaction shield (golden, right edge) ---------- */
.mcard__shield {
  position: absolute;
  z-index: 6;
  right: calc(var(--mcard-safe) * 0.8);
  top: 55%;
  width: 11%;
  aspect-ratio: 0.86;
  color: var(--gold);
  filter: drop-shadow(0 2px 4px rgba(138, 106, 37, 0.5));
}
.mcard__shield svg { width: 100%; height: 100%; display: block; }

/* ---------- holo foil + glare (after simeydotme, gold-brand) ---------- */
.mcard__foil,
.mcard__glare {
  position: absolute;
  inset: 0;
  border-radius: var(--card-radius);
  pointer-events: none;
  z-index: 8;
  opacity: var(--hover);
  transition: opacity 0.4s ease;
}

/* gold-foil shimmer — brand adaptation of the rainbow holo gradient */
.mcard__foil {
  background:
    linear-gradient(115deg,
      transparent 18%,
      rgba(201, 162, 75, 0.28) 36%,
      rgba(255, 243, 205, 0.6) 47%,
      rgba(201, 162, 75, 0.28) 58%,
      transparent 76%);
  background-size: 230% 230%;
  background-position: calc(var(--mx) * 1%) calc(var(--my) * 1%);
  mix-blend-mode: soft-light;
}

/* cursor-tracked glare */
.mcard__glare {
  background: radial-gradient(circle at calc(var(--mx) * 1%) calc(var(--my) * 1%),
    rgba(255, 252, 238, 0.55) 0%,
    rgba(255, 252, 238, 0.12) 34%,
    transparent 62%);
  mix-blend-mode: screen;
}

/* faint card stock texture */
.mcard__inner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}

/* ---------- card back (single symmetric file — PPF §4.3) ----------
   Radiant-sun tarot frame (first frame of the gold tarot EPS set) in
   gold-deep linework on the ivory ground. The tarot frame's own ornate
   border is the edge — the standard hairline border + inner frame line
   are removed on backs. */
.mcard--back .mcard__inner {
  align-items: center;
  justify-content: center;
  border: none;
  background:
    radial-gradient(circle at 50% 42%, rgba(201, 162, 75, 0.16), transparent 58%),
    linear-gradient(160deg, var(--face) 0%, var(--face-edge) 130%);
}
.mcard--back .mcard__inner::before { content: none; }
.mcard__backframe {
  position: absolute;
  inset: 2.5%;
  color: var(--gold-deep);
}
.mcard__backframe svg { width: 100%; height: 100%; display: block; }

/* ---------- land tile (hexagonal board piece) ---------- */
.mtile {
  --tile-w: 300px;
  position: relative;
  width: var(--tile-w);
  aspect-ratio: 1;
  font-family: var(--font-display, "Comfortaa", sans-serif);
  clip-path: polygon(50% 0%, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);
  clip-path: url(#hexRound);
  background: #e9e2cf;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}
.mtile__art { position: absolute; inset: 0; }
.mtile__art img { width: 100%; height: 100%; object-fit: cover; }
.mtile__veil {                       /* legibility rim wash behind the marker ring */
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, transparent 56%, rgba(20, 16, 8, 0.34) 100%);
}
/* marker pair (chip + coin, side by side) on every edge — one per seat */
.mtile__mark {
  position: absolute;
  left: var(--mx);
  top: var(--my);
  /* translateX after the rotate shifts the pair to the left end of its own
     edge plane (local axes), preserving the 6-fold symmetry */
  transform: translate(-50%, -50%) rotate(var(--mr)) translateX(calc(var(--tile-w) * -0.13));
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: calc(var(--tile-w) * 0.013);
  z-index: 2;
}
.mtile__mark--0 { --mx: 67%; --my: 20.6%; --mr: 30deg; }
.mtile__mark--2 { --mx: 67%; --my: 79.4%; --mr: 150deg; }
.mtile__mark--4 { --mx: 16%; --my: 50%;   --mr: 270deg; }
/* biome chip and yield hex are the same component: gold-rimmed hexagon
   with a parchment inset */
.mtile__chip,
.mtile__yield {
  width: calc(var(--tile-w) * 0.10);
  aspect-ratio: 1;
  clip-path: polygon(50% 0%, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);
  clip-path: url(#hexRound);
  background: linear-gradient(150deg, var(--gold-bright), var(--gold));
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.mtile__chipin,
.mtile__yieldin {
  width: 84%;
  aspect-ratio: 1;
  clip-path: polygon(50% 0%, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);
  clip-path: url(#hexRound);
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #ece4cd;               /* parchment inset — colored glyph reads over art */
}
/* yield inset carries the ₲ mark + numeral as text instead of a glyph */
.mtile__yieldin {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: calc(var(--tile-w) * 0.032);
  font-weight: 700;
  color: var(--gold-deep);
}
/* inner frame line — the currency hex alone wears an engraved rim */
.mtile__yieldring {
  position: absolute;
  inset: 7%;
  color: var(--gold);
  pointer-events: none;
}
.mtile__yieldring svg { width: 100%; height: 100%; display: block; }
.mtile__chipin svg {
  width: 68%;
  height: 68%;
  display: block;
}
/* ₲ on the tile — same treatment as the card's .mcard__cur */
.mtile__cur {
  font-family: var(--font-body), system-ui, sans-serif;
  font-size: 1em;
  font-weight: 400;
  margin-right: 0.08em;
}

/* foil/glare shared with tiles */
.mtile .mcard__foil,
.mtile .mcard__glare { border-radius: 0; }

/* ==========================================================================
   Artefacts section + explainer panels
   ========================================================================== */
.artefacts {
  padding: 7rem 1.5rem 6rem;
  max-width: 1180px;
  margin: 0 auto;
}
.artefacts__eyebrow {
  text-align: center;
  color: var(--gold-deep);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 0.9rem;
}
.artefacts__title {
  text-align: center;
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 1.1rem;
}
.artefacts__lede {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 4rem;
  color: var(--muted);
}

.artefact-panel { margin-bottom: 5.5rem; }
.artefact-panel__head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 2.8rem;
}
.artefact-panel__head h3 {
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}
.artefact-panel__sub {
  color: var(--muted);
  font-size: 0.92rem;
}

/* unified annotation diagram: numbered labels flank the artefact and
   dashed connectors point back to each element — the numeral lives with
   its description, so no markers sit on the card face itself */
.artefact-diagram {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  column-gap: clamp(2.5rem, 7vw, 5.5rem);
  row-gap: 1.35rem;
}
.artefact-panel__stage {
  grid-column: 2;
  position: relative;
  display: grid;
  place-items: center;
  padding: 1.2rem;
}
/* stage spans exactly the rows its annos create — no phantom gaps */
[data-artefact-panel="creature"] .artefact-panel__stage { grid-row: 1 / span 4; }
[data-artefact-panel="spell"] .artefact-panel__stage,
[data-artefact-panel="land"] .artefact-panel__stage,
[data-artefact-panel="tile"] .artefact-panel__stage { grid-row: 1 / span 3; }
.artefact-panel__stage .mcard { --card-w: 240px; }
.artefact-panel__stage .mtile { --tile-w: 270px; }

.anno {
  display: flex;
  gap: 0.55rem;
  align-items: baseline;
  align-self: center;
  max-width: 320px;
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
}
.anno[data-side="left"] {
  grid-column: 1;
  justify-self: end;
  flex-direction: row-reverse;
  text-align: right;
}
.anno[data-side="right"] {
  grid-column: 3;
  justify-self: start;
}
.anno__n {
  flex: 0 0 auto;
  color: var(--gold-deep);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
}
.anno__t strong { color: var(--ink); font-weight: 700; }

.artefact-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}
.artefact-line {
  stroke: var(--gold-deep);
  stroke-opacity: 0.5;
  stroke-width: 1;
  stroke-dasharray: 2 5;
}
.artefact-line-dot { fill: var(--gold); }

/* ---------- deck explorer (after fanki's Card Randomizer) ---------- */
.deck {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
  gap: clamp(1.6rem, 5vw, 4rem);
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--gold-faint);
  border-radius: 18px;
  box-shadow: 0 24px 54px -34px rgba(34, 29, 18, 0.25);
  padding: clamp(1.4rem, 4vw, 2.6rem);
}
.deck__pile {
  position: relative;
  width: 190px;
  aspect-ratio: 63.5 / 88.9;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
}
.deck__pile .mcard { --card-w: 180px; position: absolute; inset: 0; margin: auto; }
.deck__pile .mcard:nth-child(1) { transform: rotate(-5deg) translate(-4px, 3px); }
.deck__pile .mcard:nth-child(2) { transform: rotate(3deg) translate(4px, -2px); }
.deck__pile .mcard:nth-child(3) { transform: rotate(-1deg); }
.deck__pile:hover .mcard:nth-child(3) { transform: rotate(-1deg) translateY(-6px); transition: transform 0.3s var(--ease-out); }
/* mirrored deck label — the same gold-ringed parchment pill as the cards,
   once upright and once rotated 180° so both seats read the deck's name */
.deck__tag {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  gap: 0.45em;
  pointer-events: none;
  transition: transform 0.3s var(--ease-out);
}
/* the labels ride along when the top back lifts on hover */
.deck__pile:hover .deck__tag { transform: translateY(-6px); }
.deck__tag span { transition: border-color 0.3s var(--ease-out), background 0.3s var(--ease-out); }
.deck__pile:hover .deck__tag span {
  border-color: var(--gold-deep);
  background: rgba(247, 241, 227, 1);
}
.deck__tag span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
  background: rgba(247, 241, 227, 0.94);
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  padding: 0.32em 0.9em;
  text-align: center;
  white-space: nowrap;
}
.deck__tag span:last-child { transform: rotate(180deg); }
.deck__hint {
  position: absolute;
  left: 50%;
  bottom: -2.1rem;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.deck__stage {
  display: grid;
  place-items: center;
  min-height: 350px; /* the card's rendered height — the first draw can't grow the div */
  perspective: 900px;
}
/* incoming + outgoing cards share the single grid cell while the old one
   animates out — the stage height never changes mid-draw */
.deck__stage .mcard { --card-w: 250px; grid-area: 1 / 1; }
.deck__meta {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 1rem;
  min-height: 1.6em;
}
.deck__meta strong { color: var(--ink); }

@media (max-width: 860px) {
  .artefact-diagram { grid-template-columns: 1fr; row-gap: 1rem; }
  .artefact-panel__stage,
  [data-artefact-panel="creature"] .artefact-panel__stage,
  [data-artefact-panel="spell"] .artefact-panel__stage,
  [data-artefact-panel="land"] .artefact-panel__stage,
  [data-artefact-panel="tile"] .artefact-panel__stage {
    grid-column: 1;
    grid-row: auto;
    margin-bottom: 1.4rem;
  }
  .anno,
  .anno[data-side="left"],
  .anno[data-side="right"] {
    grid-column: 1;
    justify-self: start;
    flex-direction: row;
    text-align: left;
    max-width: 560px;
  }
  .artefact-lines { display: none; }
  .deck { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .mcard__inner { transition: none; transform: none !important; }
  .mcard__foil, .mcard__glare { display: none; }
}
