/* =========================================================
   GEMINIUM - elemental treasury
   Cool assay paper, one dark vault core, spectral circuit inks.
   ========================================================= */

:root {
  --paper: #eef0e8;
  --paper-2: #f6f7f1;
  --ink: #141a17;
  --body: #2f3a33;
  --muted: #49544d;
  --rule: #c7cec3;
  --rule-soft: #dce1d8;
  --cobalt: #1f3da8;
  --cobalt-soft: #e3e7f5;

  --core: #1d5c63;
  --sense: #4a4fb3;
  --create: #a63d6e;
  --reason: #8a4e0d;
  --surface: #2e6b45;
  --base: #5c636a;

  --d-bg: #0b1310;
  --d-surface: #121c17;
  --d-text: #e9eee7;
  --d-muted: #93a096;
  --d-rule: rgba(233, 238, 231, 0.16);
  --d-rule-soft: rgba(233, 238, 231, 0.08);
  --d-cobalt: #a9baff;

  --serif: "Fraunces", "Spectral", "Noto Serif SC", "Source Han Serif SC", "Songti SC", SimSun, serif;
  --latin: "Fraunces", "Spectral", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "DM Mono", "IBM Plex Mono", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", monospace;

  --maxw: 1360px;
  --pad: clamp(18px, 3.2vw, 44px);
  --gutter: var(--pad);
  /* Masthead: 68px inner + 1px border. Anchor offsets derive from this. */
  --head-h: 69px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Keep the scrollbar's space on short pages too, so the centred masthead
     and page container never jump sideways when moving between pages. */
  scrollbar-gutter: stable;
  /* Anchor landings clear the sticky masthead and nothing more: measuring to
     the header's own height keeps the tail of the previous chapter behind it
     instead of leaving a readable sliver under the border. */
  scroll-padding-top: calc(var(--head-h) - 4px);
}

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    radial-gradient(1500px 1000px at 54% 180px, rgba(190, 221, 250, 0.82), transparent 70%),
    radial-gradient(920px 760px at 6% 120px, rgba(224, 224, 250, 0.6), transparent 72%),
    radial-gradient(1040px 800px at 94% 520px, rgba(203, 235, 245, 0.5), transparent 74%),
    radial-gradient(1200px 820px at 50% 100%, rgba(197, 227, 237, 0.42), transparent 72%),
    linear-gradient(180deg, rgba(247, 249, 250, 0.92) 0, rgba(238, 240, 232, 0) 620px);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, dl, dd, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font: inherit; color: inherit; }

::selection { background: var(--cobalt); color: #fff; }

:focus-visible {
  outline: 2px solid var(--cobalt);
  outline-offset: 3px;
}

.skip {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--paper);
  font: 12px/1 var(--mono);
  transform: translateY(-160%);
  transition: transform 0.15s ease;
}
.skip:focus { transform: none; }

.mono-label {
  font: 500 13px/1.4 var(--mono);
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ---------------------------------------------------------
   Masthead
   --------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, #f6f8f7 86%, transparent);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(10px);
}

.masthead-inner {
  max-width: var(--maxw);
  height: 68px;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.6vw, 36px);
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: 9px;
  filter: drop-shadow(0 4px 10px rgba(31, 61, 168, 0.28));
  transition: transform 0.2s ease, filter 0.2s ease;
}
.wordmark:hover .mark {
  transform: translateY(-1px) scale(1.03);
  filter: drop-shadow(0 6px 14px rgba(37, 83, 214, 0.38));
}
.mark-sm {
  border-radius: 6px;
  filter: drop-shadow(0 2px 6px rgba(31, 61, 168, 0.22));
}
.wordmark-text {
  font: 500 20px/1 var(--latin);
  letter-spacing: 0.085em;
}
.ticker {
  padding: 4px 8px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  color: var(--muted);
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.04em;
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--muted);
}
.nav a {
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="true"], .nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* Phone menu button: hidden until the nav folds away. */
.nav-toggle {
  display: none;
  flex: none;
  width: 40px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.nav-toggle:hover { border-color: rgba(31, 61, 168, 0.3); color: var(--cobalt); }
.nav-toggle-bars { display: grid; gap: 4px; width: 16px; }
.nav-toggle-bars i {
  display: block;
  height: 1.8px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.15s ease;
}
.masthead.nav-open .nav-toggle-bars i:nth-child(1) { transform: translateY(5.8px) rotate(45deg); }
.masthead.nav-open .nav-toggle-bars i:nth-child(2) { opacity: 0; }
.masthead.nav-open .nav-toggle-bars i:nth-child(3) { transform: translateY(-5.8px) rotate(-45deg); }

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */

/* A ghost of the element table behind the hero and the grand prize: the
   silhouette and the family hues only, faint enough to read as texture. */
.hero-band {
  position: relative;
  isolation: isolate;
  /* The copy's paper wash overhangs on purpose; clip it at the band edge so
     it can never turn into sideways scroll on a phone. */
  overflow-x: clip;
}
.hero-band > section {
  position: relative;
  z-index: 1;
}
.hero-band-table {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(118% 88% at 50% 16%, #000 14%, rgba(0, 0, 0, 0.55) 54%, transparent 86%);
  mask-image: radial-gradient(118% 88% at 50% 16%, #000 14%, rgba(0, 0, 0, 0.55) 54%, transparent 86%);
}
/* Soft colour field for the frosted panes to sit on; the blur above has
   something to catch, which is what sells the glass. */
.hw-aura {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(42% 36% at 16% 20%, rgba(31, 61, 168, 0.16), transparent 70%),
    radial-gradient(38% 32% at 80% 26%, rgba(217, 181, 111, 0.18), transparent 72%),
    radial-gradient(46% 36% at 52% 74%, rgba(14, 165, 233, 0.14), transparent 74%);
  filter: blur(46px);
  animation: hwAuraDrift 24s ease-in-out infinite;
  will-change: transform;
}
/* Light travelling slowly across the glass. */
.hw-sheen {
  position: absolute;
  inset: -15%;
  pointer-events: none;
  background: linear-gradient(
    104deg,
    transparent 24%,
    rgba(255, 255, 255, 0.5) 40%,
    rgba(217, 181, 111, 0.26) 48%,
    rgba(31, 61, 168, 0.2) 56%,
    transparent 72%
  );
  background-size: 300% 300%;
  mix-blend-mode: soft-light;
  animation: hwSheen 18s linear infinite;
}
@keyframes hwAuraDrift {
  0%, 100% { transform: translate3d(-2%, -1%, 0) scale(1.02); }
  50%      { transform: translate3d(2%, 1.5%, 0) scale(1.07); }
}
@keyframes hwSheen {
  0%   { background-position: 130% 0%; }
  100% { background-position: -60% 100%; }
}
.hw-grid {
  position: relative;
  display: grid;
  flex: none;
  grid-template-columns: repeat(18, minmax(0, 1fr));
  gap: clamp(4px, 0.6vw, 10px);
  width: min(1720px, 100%);
  align-self: flex-start;
  margin-top: clamp(52px, 4.6vw, 86px);
  animation: hwFade 1.2s ease-out both;
}
.hw-cell,
.hw-gap {
  aspect-ratio: 1;
}
.hw-cell {
  /* Frosted panes: milky glass over the page, with just enough of the family
     hue to keep the silhouette recognisable. */
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: clamp(4px, 0.5vw, 10px);
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.06) 62%),
    color-mix(in srgb, var(--c) 16%, transparent);
  -webkit-backdrop-filter: blur(7px) saturate(1.08);
  backdrop-filter: blur(7px) saturate(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 6px 16px -12px rgba(31, 61, 168, 0.35);
}
@keyframes hwFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hw-grid,
  .hw-aura,
  .hw-sheen { animation: none; }
}
@media (max-width: 760px) {
  .hw-grid { width: 920px; gap: 5px; }
  /* 118 live backdrop filters are not worth it on a phone; the milky fill
     alone reads as frosted at this size. */
  .hw-cell {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

.hero {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(42px, 5vw, 68px) var(--gutter) clamp(44px, 4.4vw, 64px);
  display: grid;
  grid-template-columns: minmax(320px, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 4.4vw, 64px);
  align-items: stretch;
  background:
    radial-gradient(58% 64% at 24% 46%, rgba(183, 216, 247, 0.3), transparent 72%),
    radial-gradient(64% 70% at 62% 48%, rgba(183, 216, 247, 0.4), transparent 70%);
}

.hero-copy {
  position: relative;
  isolation: isolate;
  align-self: start;
  display: flex;
  flex-direction: column;
  max-width: 560px;
}
/* The table texture runs right up to the copy; a soft paper wash keeps the
   paragraphs readable without blanking the column edge. */
.hero-copy::before {
  content: "";
  position: absolute;
  inset: -132px -164px;
  z-index: -1;
  pointer-events: none;
  background: var(--paper);
  /* Solid under the copy, then a long linear fade through the padding ring:
     the element grid drifts in over ~160px instead of meeting a panel edge. */
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0, #000 160px, #000 calc(100% - 160px), transparent 100%),
    linear-gradient(180deg, transparent 0, #000 132px, #000 calc(100% - 132px), transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 0, #000 160px, #000 calc(100% - 160px), transparent 100%),
    linear-gradient(180deg, transparent 0, #000 132px, #000 calc(100% - 132px), transparent 100%);
  mask-composite: intersect;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 20px;
  color: var(--body);
  font: 500 13.5px/1.5 var(--mono);
  letter-spacing: 0.06em;
}
.star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  color: var(--cobalt);
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  /* The headline is a full sentence now, so it needs a smaller display size
     than the old two-word mark to keep one line per clause. */
  font-size: clamp(27px, 3.3vw, 46px);
  line-height: 1.26;
  letter-spacing: 0.012em;
  /* Ink gradient: deep navy -> cobalt -> sky, painted through the glyphs. */
  /* Plain sRGB first: if a browser cannot parse the oklab interpolation
     below, this one still paints and the fill never goes transparent-empty. */
  background-image: linear-gradient(96deg, #101a3d 0%, #1f3da8 42%, #2a56c6 60%, #c9a25b 88%, #e3c78a 100%);
  background-image: linear-gradient(in oklab 96deg, #101a3d 0%, #1f3da8 42%, #2a56c6 60%, #c9a25b 88%, #e3c78a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #141f45;
}
.hero h1 .hero-name {
  margin: 0 0.06em;
  font-family: var(--latin);
  font-style: italic;
  font-weight: 400;
  font-size: 1.06em;
  letter-spacing: 0.012em;
}

.hero-latin {
  margin: 14px 0 26px;
  color: var(--muted);
  font: italic 400 clamp(18px, 1.8vw, 22px)/1.4 var(--latin);
}

.lede {
  max-width: 33em;
  margin-bottom: 0;
  color: var(--body);
  font-size: 16.5px;
  line-height: 1.85;
  text-wrap: balance;
}
/* Two beats: how to take part, then what winning pays. */
.lede + .lede { margin-top: 10px; }

/* The wildcard share, pulled out of the paragraph so it reads as an offer. */
.lede-tag {
  /* .hero-copy is a flex column: blockify explicitly and hug the text. */
  align-self: flex-start;
  max-width: 33em;
  margin-top: 16px;
  margin-bottom: 30px;
  padding: 8px 13px 9px;
  border: 1px solid rgba(217, 181, 111, 0.52);
  border-radius: 10px;
  background: rgba(217, 181, 111, 0.12);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.55;
}
.lede-tag-mark {
  margin-right: 6px;
  color: #c9a25b;
  font-size: 12.5px;
}
.lede-tag b {
  color: #a8762c;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 760px) {
  .lede-tag { font-size: 13.5px; padding: 7px 11px 8px; }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  font: 500 13px/1 var(--sans);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary {
  background: var(--cobalt);
  border-color: var(--cobalt);
  color: #fff;
  box-shadow: 0 12px 24px -16px rgba(31, 61, 168, 0.65);
}
.btn-primary:hover {
  background: color-mix(in srgb, var(--cobalt) 82%, var(--ink));
  border-color: color-mix(in srgb, var(--cobalt) 82%, var(--ink));
  box-shadow: 0 16px 28px -16px rgba(31, 61, 168, 0.7);
}
.btn-ghost {
  background: transparent;
  border-color: var(--rule);
  color: var(--muted);
}
.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.hero-actions .btn-ghost {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.62);
}
.hero-actions .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.92);
}
.btn[disabled] {
  background: transparent;
  border-color: var(--rule);
  color: var(--muted);
  cursor: not-allowed;
}

.hero-note {
  margin-top: auto;
  padding-top: 22px;
  color: var(--muted);
  font: 12px/1.7 var(--serif);
  letter-spacing: 0.01em;
}

/* Assay panel */

.assay {
  position: relative;
  overflow: hidden;
  padding: 20px 22px 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background:
    radial-gradient(130% 110% at 14% 0%, rgba(255, 255, 255, 0.9), transparent 58%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.86), rgba(245, 249, 252, 0.62));
  box-shadow:
    0 0 0 1px rgba(31, 61, 168, 0.08),
    0 0 56px rgba(255, 255, 255, 0.78),
    0 32px 80px -44px rgba(31, 61, 168, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px) saturate(1.08);
  -webkit-backdrop-filter: blur(18px) saturate(1.08);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  --a-ink: var(--ink);
  --a-muted: var(--muted);
  --a-rule: color-mix(in srgb, var(--ink) 11%, transparent);
}
.assay::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(31, 61, 168, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 61, 168, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(125% 105% at 50% 4%, #000 38%, transparent 96%);
  mask-image: radial-gradient(125% 105% at 50% 4%, #000 38%, transparent 96%);
  pointer-events: none;
}
.assay > * { position: relative; }

.assay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  background-image: linear-gradient(90deg, var(--a-rule), transparent 92%);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  color: var(--body);
  font: 500 13px/1.4 var(--mono);
  letter-spacing: 0.05em;
}
.assay-state {
  padding: 5px 12px;
  border: 1px solid rgba(138, 78, 13, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  color: #8a4e0d;
  font: 600 12.5px/1.2 var(--sans);
  letter-spacing: 0.02em;
}

.assay-body {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 22px;
  padding: 22px 0 18px;
  flex: 1;
}

.sample {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 296px;
  padding: 11px 12px 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.38));
  box-shadow:
    0 12px 28px -24px rgba(31, 61, 168, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}
.sample::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--core) 0 50%, var(--cobalt) 50% 100%);
}
.sample-top {
  display: flex;
  justify-content: space-between;
  color: var(--a-muted);
  font: 500 12px/1 var(--mono);
}
.sample-zh {
  flex: 1;
  display: grid;
  place-items: center;
  margin: 10px 0 8px;
  color: var(--a-ink);
  font-family: var(--serif);
  font-size: 74px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  perspective: 720px;
}

@keyframes mystery-spin {
  to { transform: rotate(360deg); }
}
@keyframes mystery-spin-reverse {
  to { transform: rotate(-360deg); }
}
@keyframes mystery-q-spin {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}
@keyframes mystery-float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-4px); }
}

.mystery-orb {
  position: relative;
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(
    circle at 34% 28%,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(232, 243, 255, 0.68) 56%,
    rgba(191, 219, 254, 0.32) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.96),
    inset 0 -10px 20px rgba(37, 83, 214, 0.08),
    0 0 32px rgba(56, 189, 248, 0.24),
    0 16px 34px -18px rgba(31, 61, 168, 0.45);
  animation: mystery-float 5.6s ease-in-out infinite;
}

.mystery-glow {
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    rgba(37, 83, 214, 0.24),
    rgba(56, 189, 248, 0.36),
    rgba(129, 140, 248, 0.22),
    rgba(255, 255, 255, 0.55),
    rgba(37, 83, 214, 0.24)
  );
  filter: blur(11px);
  opacity: 0.78;
  animation: mystery-spin 14s linear infinite;
}

.mystery-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.mystery-ring-outer {
  inset: -9px;
  border: 1.5px dashed rgba(37, 83, 214, 0.26);
  animation: mystery-spin 18s linear infinite;
}
.mystery-ring-outer::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2553d6 0%, #38bdf8 100%);
  box-shadow: 0 0 10px rgba(37, 83, 214, 0.85), 0 0 4px rgba(255, 255, 255, 0.95);
}

.mystery-ring-inner {
  inset: 4px;
  background: conic-gradient(
    from 0deg,
    transparent 0deg 210deg,
    rgba(56, 189, 248, 0.75) 280deg,
    rgba(37, 83, 214, 0.92) 340deg,
    transparent 360deg
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 1.5px));
  animation: mystery-spin-reverse 9.5s linear infinite;
}

.mystery-q {
  position: relative;
  z-index: 2;
  display: inline-block;
  font-family: var(--num-serif, var(--serif));
  font-size: 74px;
  font-weight: 600;
  line-height: 1;
  background: linear-gradient(145deg, #101c42 0%, #1f3da8 42%, #2553d6 68%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 14px rgba(37, 83, 214, 0.34));
  transform-style: preserve-3d;
  will-change: transform;
  animation: mystery-q-spin 9s linear infinite;
}
.sample-meta {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sample-name {
  color: var(--a-ink);
  font: 600 12.5px/1.3 var(--mono);
  letter-spacing: 0.08em;
}
.sample-supply {
  color: var(--a-muted);
  font: 12px/1.4 var(--mono);
}
.sample-bars {
  width: 84%;
  height: 20px;
  margin-top: auto;
  background: repeating-linear-gradient(
    90deg,
    color-mix(in srgb, var(--a-ink) 55%, transparent) 0 1px,
    transparent 1px 4px
  );
  opacity: 0.45;
}

.flow {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px 16px 12px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.34), rgba(238, 245, 252, 0.16));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.flow-step {
  padding: 13px 0 14px;
  border-bottom: 1px solid var(--a-rule);
}
.flow-label {
  display: block;
  color: var(--a-muted);
  font: 600 13px/1.4 var(--sans);
  letter-spacing: 0.02em;
}
.flow-value,
.flow-core strong {
  display: block;
  margin-top: 8px;
  color: var(--a-ink);
  font: 500 40px/1 var(--mono);
}
.flow-unit {
  display: block;
  margin-top: 6px;
  color: var(--a-muted);
  font: 12.5px/1.5 var(--sans);
}
.flow-core strong i,
.flow-value i {
  font-style: normal;
  font-size: 16px;
  color: var(--a-muted);
  margin-left: 3px;
}

.flow-out {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}
.flow-out li {
  display: flex;
  align-items: baseline;
  gap: 2px;
  padding-top: 8px;
  border-top: 2px solid var(--fam);
}
.flow-out span {
  margin-right: auto;
  color: var(--a-muted);
  font: 500 12.5px/1.4 var(--sans);
}
.flow-out b {
  color: var(--a-ink);
  font: 500 23px/1 var(--mono);
}
.flow-out i {
  color: var(--a-muted);
  font: 12px/1 var(--mono);
  font-style: normal;
}

.assay-foot {
  padding-top: 10px;
  border-top: 1px solid var(--a-rule);
  color: var(--a-muted);
  font: 12px/1.65 var(--serif);
  letter-spacing: 0.005em;
}

/* ---------------------------------------------------------
   Tape
   --------------------------------------------------------- */

.tape {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper-2) 60%, transparent);
}
.tape-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.tape-item {
  padding: 18px 22px 17px;
  border-left: 1px solid var(--rule-soft);
}
.tape-item:first-child {
  border-left: 0;
  padding-left: 0;
}
.tape-item > span {
  display: block;
  color: var(--muted);
  font: 500 13px/1.4 var(--sans);
  letter-spacing: 0.03em;
}
.tape-item b {
  display: block;
  margin: 5px 0 3px;
  color: var(--ink);
  font: 600 26px/1.15 var(--mono);
}
.tape-item b span { display: inline; }
.tape-item small {
  display: block;
  color: var(--muted);
  font: 12.5px/1.45 var(--sans);
}

/* ---------------------------------------------------------
   Chapters
   --------------------------------------------------------- */

.chapter {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(56px, 6.5vw, 84px) var(--gutter);
  border-top: 1px solid var(--rule);
}
#mechanism { border-top: 0; }

/* Zero-height anchor so "元素卡" lands on the chapter edge, exactly where
   "元素板" does, while the hash still selects the face. */
.board-anchor {
  display: block;
  height: 0;
}

.chapter-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(280px, 5fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
  margin-bottom: clamp(32px, 4vw, 50px);
}
.chapter-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.14;
  letter-spacing: 0.01em;
  text-wrap: balance;
}
.chapter-deck {
  max-width: 34em;
  padding-bottom: 5px;
  color: var(--body);
  font-size: 15.5px;
  line-height: 1.85;
}

/* ---------------------------------------------------------
   Module table
   --------------------------------------------------------- */

.modules {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.module {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 204px;
  padding: 16px 18px 18px;
  text-align: left;
  border: 1px solid var(--rule);
  border-top: 3px solid var(--fam);
  border-radius: 14px;
  background: color-mix(in srgb, var(--fam) 5%, var(--paper-2));
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.module:hover {
  background: color-mix(in srgb, var(--fam) 10%, var(--paper-2));
  border-color: color-mix(in srgb, var(--fam) 46%, var(--rule));
  box-shadow: 0 12px 26px -22px rgba(20, 26, 23, 0.35);
}
.module-top {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--muted);
  font: 500 12px/1.2 var(--mono);
}
.module-fam {
  color: color-mix(in srgb, var(--fam) 78%, var(--ink));
}
.module-sym {
  margin-left: auto;
  color: color-mix(in srgb, var(--fam) 70%, var(--ink));
  font-weight: 600;
}
.module-zh {
  margin-top: 20px;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 44px;
  line-height: 1;
}
.module-name {
  margin-top: 12px;
  color: var(--ink);
  font: 600 14px/1.4 var(--sans);
  letter-spacing: 0.02em;
}
.module-role {
  margin-top: 5px;
  color: var(--body);
  font-size: 13.5px;
  line-height: 1.6;
}

.module-readout {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--rule);
  color: var(--body);
  font: 500 13.5px/1.5 var(--sans);
}
.module-readout .dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex: none;
  background: var(--cobalt);
}
.module-note {
  margin-top: 8px;
  color: var(--muted);
  font: 12.5px/1.65 var(--sans);
  letter-spacing: 0.01em;
}

/* ---------------------------------------------------------
   Pool glass (light)
   --------------------------------------------------------- */

.vault {
  position: relative;
  overflow: hidden;
  --d-bg: #edf3f9;
  --d-surface: rgba(255, 255, 255, 0.62);
  --d-text: var(--ink);
  --d-muted: var(--muted);
  --d-rule: rgba(31, 61, 168, 0.14);
  --d-rule-soft: rgba(31, 61, 168, 0.08);
  --d-cobalt: var(--cobalt);
  background:
    radial-gradient(1000px 700px at 74% 10%, rgba(255, 255, 255, 0.6), transparent 70%),
    radial-gradient(900px 700px at 10% 84%, rgba(218, 226, 250, 0.68), transparent 76%),
    linear-gradient(180deg, #eaf2fa 0%, #e3edf6 100%);
  border-block: 1px solid rgba(31, 61, 168, 0.12);
  color: var(--d-text);
}
.vault::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(31, 61, 168, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 61, 168, 0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(120% 100% at 50% 8%, #000 30%, transparent 96%);
  mask-image: radial-gradient(120% 100% at 50% 8%, #000 30%, transparent 96%);
  pointer-events: none;
}
.vault::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(52% 50% at 72% 28%, rgba(255, 255, 255, 0.76), transparent 72%),
    radial-gradient(46% 50% at 16% 18%, rgba(191, 216, 246, 0.42), transparent 74%),
    radial-gradient(50% 46% at 46% 88%, rgba(214, 210, 246, 0.38), transparent 76%);
  pointer-events: none;
}
.vault-inner {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(60px, 7vw, 88px) var(--gutter) clamp(54px, 6vw, 76px);
}

.vault-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(280px, 5fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
  margin-bottom: clamp(36px, 4vw, 52px);
}
.vault-head h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.14;
  text-wrap: balance;
}
.vault-head p {
  max-width: 33em;
  padding-bottom: 5px;
  color: var(--d-muted);
  font-size: 15px;
  line-height: 1.9;
}

.vault :focus-visible { outline-color: var(--d-cobalt); }
.core-label {
  color: var(--d-muted);
  font: 600 13px/1.4 var(--sans);
  letter-spacing: 0.04em;
}

.vault-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) minmax(0, 1.35fr);
  gap: 20px;
  align-items: stretch;
}

.vault-in,
.vault-core {
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.44);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 20px 50px -42px rgba(31, 61, 168, 0.35);
}
.vault-in { display: flex; flex-direction: column; padding: 20px 22px; }
.vault-in .core-big {
  display: block;
  margin: 16px 0 6px;
  font: 500 62px/1 var(--mono);
}
.core-big i {
  margin-left: 4px;
  color: var(--d-muted);
  font: 400 24px/1 var(--mono);
  font-style: normal;
}
.vault-in p {
  color: var(--body);
  font-size: 14.5px;
  line-height: 1.7;
}
.core-rows {
  margin-top: 22px;
  border-top: 1px solid var(--d-rule-soft);
}
.core-rows li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--d-rule-soft);
  color: var(--d-muted);
  font: 13.5px/1.45 var(--sans);
}
.core-rows b { color: var(--d-text); font-weight: 600; }
.core-note {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--d-rule-soft);
  color: var(--d-muted);
  font: 13px/1.65 var(--sans);
}

.vault-core {
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.86), rgba(246, 250, 255, 0.62));
  box-shadow:
    0 0 0 1px rgba(31, 61, 168, 0.06),
    0 0 44px rgba(255, 255, 255, 0.65),
    0 24px 60px -42px rgba(31, 61, 168, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.core-figure {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 18px 0 14px;
}
.core-figure > strong {
  color: var(--d-text);
  font-family: var(--serif);
  font-size: 62px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.core-column {
  display: flex;
  flex-direction: column;
  width: 18px;
  height: 148px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(31, 61, 168, 0.08);
}
.core-column span {
  display: block;
  height: var(--h);
  background: var(--fam);
}
.core-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.core-legend li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--d-muted);
  font: 500 13px/1.4 var(--sans);
}
.core-legend i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--fam);
}
.core-legend b { color: var(--d-text); font-weight: 600; }
.core-total {
  padding-top: 12px;
  border-top: 1px solid var(--d-rule);
  color: var(--d-muted);
  font: 13px/1.55 var(--sans);
}
.core-total b { color: var(--d-text); font-weight: 500; }

.vault-circuits {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--d-rule);
}
.circuit {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "id pct"
    "name pct"
    "rule rule";
  align-items: start;
  padding: 15px 12px 15px 18px;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--d-rule);
  background: transparent;
  color: var(--d-text);
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.circuit::before {
  content: "";
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: 0;
  width: 3px;
  background: var(--fam);
  opacity: 0;
  transition: opacity 0.15s ease;
}
.circuit:hover { background: rgba(233, 238, 231, 0.03); }
.circuit[aria-pressed="true"] { background: rgba(233, 238, 231, 0.06); }
.circuit[aria-pressed="true"]::before { opacity: 1; }
.circuit-id {
  grid-area: id;
  color: var(--d-muted);
  font: 9px/1.4 var(--mono);
  letter-spacing: 0.08em;
}
.circuit-name {
  grid-area: name;
  margin-top: 4px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.2;
}
.circuit-pct {
  grid-area: pct;
  color: var(--fam-light);
  font: 500 30px/1 var(--mono);
}
.circuit-rule {
  grid-area: rule;
  margin-top: 7px;
  color: var(--d-muted);
  font: 9.5px/1.5 var(--mono);
}

.circuit-detail {
  min-height: 156px;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--d-rule);
}
.detail-inner { animation: detail-in 0.18s ease-out; }
.detail-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 18px;
}
.detail-head .detail-id {
  color: var(--d-muted);
  font: 9px/1.4 var(--mono);
  letter-spacing: 0.1em;
}
.detail-head h3 {
  margin-right: auto;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.2;
}
.detail-head .pct {
  color: var(--fam-light);
  font: 500 26px/1 var(--mono);
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 40px);
}
.detail-grid dt {
  margin-bottom: 6px;
  color: var(--d-muted);
  font: 9.5px/1.4 var(--mono);
  letter-spacing: 0.08em;
}
.detail-grid dd {
  color: color-mix(in srgb, var(--d-text) 82%, transparent);
  font-size: 13.5px;
  line-height: 1.75;
}

.vault-note {
  margin-top: 24px;
  color: var(--d-muted);
  font: 12px/1.7 var(--serif);
  letter-spacing: 0.01em;
}

/* ---------------------------------------------------------
   Token
   --------------------------------------------------------- */

.token-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(300px, 5fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.spec-block { min-width: 0; }

.spec-id {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  font: 500 12.5px/1.5 var(--mono);
  letter-spacing: 0.05em;
}
.spec-id b {
  color: var(--ink);
  font: 600 20px/1.15 var(--sans);
  letter-spacing: 0.01em;
}
.spec-id span {
  position: relative;
  padding-left: 15px;
}
.spec-id span::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--rule);
  transform: translateY(-50%);
}

.spec { padding-top: 3px; }
.spec > div {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 18px;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.spec > div:last-child { border-bottom: 0; }
.spec dt {
  color: var(--muted);
  font: 500 12.5px/1.6 var(--sans);
  letter-spacing: 0.06em;
}
.spec dd {
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.55;
}
.spec dd b {
  color: var(--ink);
  font: 600 14px/1 var(--mono);
  letter-spacing: 0;
}
.spec dd i {
  color: var(--muted);
  font: 500 11px/1 var(--mono);
  font-style: normal;
  letter-spacing: 0.06em;
}
.spec dd small {
  color: var(--muted);
  font-size: 12.5px;
}
.spec .pending {
  color: var(--reason);
  font: 500 12.5px/1 var(--sans);
  letter-spacing: 0;
}
.spec-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 26px;
}
.spec-pair span {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: var(--muted);
  font-size: 12.5px;
}

.split {
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}
.route {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 24px;
  padding: 12px 0;
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  color: var(--body);
  font: 13.5px/1.5 var(--sans);
}
.route b { color: var(--ink); font-weight: 600; }
.route-arrow { color: var(--muted); }
.split-bar {
  display: flex;
  gap: 3px;
  height: 40px;
  margin: 14px 0 16px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--rule-soft);
}
.split-bar span { display: block; height: 100%; }
.split-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.split-legend li {
  display: grid;
  grid-template-columns: 9px 1fr auto;
  align-items: baseline;
  gap: 8px;
  padding-top: 10px;
  border-top: 2px solid var(--fam);
}
.split-legend i {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--fam);
  transform: translateY(-1px);
}
.split-legend span {
  color: var(--body);
  font-size: 13.5px;
  font-weight: 500;
}
.split-legend b {
  color: var(--ink);
  font: 600 20px/1 var(--mono);
}
.split-legend b::after {
  content: "%";
  margin-left: 2px;
  color: var(--muted);
  font-size: 12px;
}
.split-note {
  margin-top: 22px;
  padding-top: 12px;
  border-top: 1px solid var(--rule-soft);
  color: var(--body);
  font-size: 13.5px;
  line-height: 1.75;
}
.split-read {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--rule-soft);
}
.split-read ul {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.split-read li {
  position: relative;
  padding-left: 14px;
  color: var(--body);
  font-size: 13.5px;
  line-height: 1.7;
}
.split-read li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 4px;
  height: 4px;
  background: var(--rule);
}

/* ---------------------------------------------------------
   Evidence
   --------------------------------------------------------- */

.evidence-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(300px, 5fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.evidence ul {
  margin-top: 10px;
  border-top: 1px solid var(--rule);
}
.evidence li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 18px;
  align-items: baseline;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.evidence li span { font-size: 15px; }
.evidence li b {
  color: var(--reason);
  font: 500 13px/1.4 var(--mono);
}
.evidence li small {
  color: var(--muted);
  font: 12px/1.4 var(--mono);
}

.boundary {
  padding: 22px 24px 10px;
  border: 1px solid color-mix(in srgb, var(--reason) 18%, var(--rule));
  border-top: 3px solid var(--reason);
  border-radius: 14px;
  background: color-mix(in srgb, var(--reason) 5%, var(--paper-2));
}
.boundary .mono-label { color: color-mix(in srgb, var(--reason) 80%, var(--ink)); }
.boundary ul {
  margin-top: 10px;
}
.boundary li {
  padding: 12px 0 13px;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--body);
  font-size: 14px;
  line-height: 1.75;
}
.boundary li:last-child { border-bottom: 0; }
.boundary li span {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font: 600 13.5px/1.5 var(--sans);
  letter-spacing: 0.01em;
}

/* ---------------------------------------------------------
   Phases
   --------------------------------------------------------- */

.phases {
  border-top: 1px solid var(--rule);
}
.phases li {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule-soft);
}
.phase-num {
  color: var(--muted);
  font: 500 13px/1.4 var(--mono);
}
.phase-body h3 {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.3;
}
.phase-body p {
  margin-top: 4px;
  color: var(--body);
  font-size: 14.5px;
  line-height: 1.7;
}
.chip {
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--body);
  font: 500 12.5px/1.3 var(--sans);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.chip-active {
  border-color: color-mix(in srgb, var(--reason) 40%, var(--rule));
  background: color-mix(in srgb, var(--reason) 6%, var(--paper));
  color: var(--reason);
}
.chip-shipped {
  border-color: color-mix(in srgb, var(--cobalt) 34%, var(--rule));
  background: color-mix(in srgb, var(--cobalt) 7%, var(--paper));
  color: var(--cobalt);
}

/* ---------------------------------------------------------
   FAQ
   --------------------------------------------------------- */

.faq {
  border-top: 1px solid var(--rule);
}
.faq details {
  border-bottom: 1px solid var(--rule-soft);
}
.faq summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
  transition: color 0.15s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  color: var(--muted);
  font: 400 18px/1 var(--mono);
}
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--cobalt); }
.faq details p {
  max-width: 46em;
  padding: 0 48px 22px 0;
  color: var(--body);
  font-size: 15px;
  line-height: 1.85;
}

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */

.site-foot {
  border-top: 1px solid var(--rule);
}
.foot-grid {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 32px var(--gutter) 42px;
  display: grid;
  /* Equal side columns keep the centred disclaimer on the page's own axis. */
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: start;
}
.foot-brand-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.foot-brand .wordmark-text { font-size: 17px; }
.foot-brand p {
  margin-top: 5px;
  color: var(--muted);
  font: 12.5px/1.45 var(--sans);
  letter-spacing: 0.02em;
}
.foot-x {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font: 500 12.5px/1.4 var(--sans);
  letter-spacing: 0.02em;
  border-bottom: 1px solid transparent;
}
.foot-x svg { flex: none; }
.foot-x:hover { color: var(--ink); border-bottom-color: var(--rule); }
.foot-note {
  max-width: 40em;
  margin-inline: auto;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
  text-align: center;
  text-wrap: balance;
}
.foot-side {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 18px;
  white-space: nowrap;
}
/* Narrow desktops: equal side columns would starve the right-hand links,
   so fall back to the wider note column and centre inside it. */
@media (max-width: 900px) {
  .foot-grid { grid-template-columns: 1fr 2fr auto; }
}
.foot-top {
  justify-self: end;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--rule);
  color: var(--body);
  font: 500 13px/1.4 var(--sans);
}
.foot-top:hover { color: var(--ink); border-color: var(--ink); }

.chapter-deck a {
  color: var(--cobalt);
  border-bottom: 1px solid rgba(31, 61, 168, 0.32);
}
.chapter-deck a:hover { border-color: currentColor; }

/* ---------------------------------------------------------
   Dossier dialog
   --------------------------------------------------------- */

.dossier {
  width: min(720px, calc(100vw - 32px));
  max-height: min(86vh, 760px);
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 18px;
  background: var(--paper-2);
  color: var(--ink);
  box-shadow: 0 28px 70px -24px rgba(20, 26, 23, 0.32);
}
.dossier::backdrop {
  background: rgba(11, 19, 16, 0.45);
  backdrop-filter: blur(4px);
}
.dossier-inner {
  position: relative;
  padding: 28px 30px 30px;
}
.dossier-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: 20px/1 var(--sans);
  cursor: pointer;
}
.dossier-close:hover { border-color: var(--ink); color: var(--ink); }
.dossier-fam {
  color: color-mix(in srgb, var(--fam, var(--core)) 78%, var(--ink));
  font: 600 12.5px/1.4 var(--mono);
  letter-spacing: 0.08em;
}
.dossier-head {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 20px;
  align-items: end;
  margin: 16px 0 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}
.dossier-zh {
  font-family: var(--serif);
  font-size: 76px;
  font-weight: 500;
  line-height: 0.9;
}
.dossier-id h2 {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.15;
}
.dossier-id p {
  margin-top: 6px;
  color: var(--muted);
  font: 13px/1.5 var(--mono);
}
.dossier-role {
  margin-bottom: 12px;
  color: var(--body);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
}
.dossier-body {
  color: var(--body);
  font-size: 15px;
  line-height: 1.85;
}
.dossier-edge {
  margin-top: 18px;
  padding: 15px 17px;
  border-top: 2px solid var(--reason);
  border-radius: 10px;
  background: color-mix(in srgb, var(--reason) 5%, var(--paper));
}
.dossier-edge span {
  display: block;
  margin-bottom: 5px;
  color: var(--reason);
  font: 600 12px/1.4 var(--mono);
  letter-spacing: 0.06em;
}
.dossier-edge p {
  color: var(--body);
  font-size: 14px;
  line-height: 1.75;
}
.dossier-related {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--rule-soft);
}
.dossier-related button {
  padding: 7px 12px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: transparent;
  color: var(--body);
  font: 500 12.5px/1.3 var(--sans);
  cursor: pointer;
}
.dossier-related button:hover { border-color: var(--ink); color: var(--ink); }

/* ---------------------------------------------------------
   Motion
   --------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .modules.is-printing .module {
    animation: print-in 0.36s cubic-bezier(0.2, 0.7, 0.25, 1) backwards;
    animation-delay: calc(var(--i, 0) * 45ms);
  }
  .dossier[open] { animation: dossier-in 0.2s ease-out; }
}

@keyframes print-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes dossier-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes detail-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */

@media (max-width: 1200px) {
  .hero {
    grid-template-columns: minmax(300px, 5fr) minmax(0, 6.4fr);
    gap: 36px;
  }
  .assay-body { grid-template-columns: 180px minmax(0, 1fr); }
  .mystery-orb { width: 116px; height: 116px; }
  .mystery-q { font-size: 64px; }
  .vault-grid { grid-template-columns: 0.8fr 1fr 1.25fr; }
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .hero-copy { max-width: 660px; }
  .assay { max-width: 760px; }
  .assay-body { grid-template-columns: 210px minmax(0, 1fr); }
  .mystery-orb { width: 126px; height: 126px; }
  .mystery-q { font-size: 70px; }
  .hero-note { margin-top: 22px; }

  .vault-head { grid-template-columns: 1fr; gap: 16px; align-items: start; }
  .vault-head p { max-width: 42em; }
  .vault-grid { grid-template-columns: 1fr 1.25fr; }
  .vault-circuits { grid-column: 1 / -1; }
  .vault-circuits { display: grid; grid-template-columns: repeat(3, 1fr); }
  .circuit { border-top: 1px solid var(--d-rule); }
  .circuit::before { top: 0; bottom: auto; left: 0; right: 0; width: auto; height: 3px; }
  .circuit { padding-left: 16px; }
}

@media (max-width: 1000px) {
  .chapter-head { grid-template-columns: 1fr; gap: 14px; align-items: start; }
  .chapter-deck { max-width: 40em; }
  .modules { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .module { min-height: 168px; }
  .token-grid,
  .evidence-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 760px) {
  :root { --head-h: 59px; }
  .masthead-inner { height: 58px; gap: 10px; }
  .ticker { display: none; }
  .wordmark-text { font-size: 17px; }
  .nav { gap: 10px; font-size: 12.5px; }
  .nav a { padding: 7px 0; }

  .hero { padding-top: 30px; padding-bottom: 40px; gap: 28px; }
  .eyebrow { font-size: 12px; letter-spacing: 0.04em; flex-wrap: wrap; }
  .hero h1 { font-size: clamp(26px, 7.4vw, 36px); line-height: 1.28; }
  .hero-latin { margin-bottom: 20px; }
  .lede { font-size: 15.5px; line-height: 1.9; }
  .lede + .lede { margin-top: 12px; }
  .hero-note { margin-top: 18px; padding-top: 0; }

  .assay { padding: 16px 16px 14px; border-radius: 20px; }
  .assay-body { grid-template-columns: 1fr; gap: 16px; padding: 16px 0 14px; }
  .sample { min-height: 220px; }
  .sample-zh { margin: 14px 0 10px; }
  .mystery-orb { width: 112px; height: 112px; }
  .mystery-q { font-size: 62px; }
  .flow { gap: 4px; }
  .flow-step { padding: 9px 0 10px; }
  .flow-out { margin-top: 8px; }

  .tape-inner { grid-template-columns: 1fr 1fr; }
  .tape-item { padding: 13px 16px; border-left: 0; border-top: 1px solid var(--rule-soft); }
  .tape-item:nth-child(odd) { border-right: 1px solid var(--rule-soft); }
  .tape-item:first-child, .tape-item:nth-child(2) { border-top: 0; }
  .tape-item:first-child { padding-left: 0; }
  .tape-item b { font-size: 20px; }

  .chapter { padding-top: 46px; padding-bottom: 52px; }
  .chapter-title { font-size: clamp(32px, 8.6vw, 44px); }
  .chapter-deck { font-size: 14.5px; }

  .modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module { min-height: 152px; }
  .module-zh { margin-top: 14px; font-size: 34px; }
  .module-name { margin-top: 6px; }

  .vault-inner { padding-top: 52px; padding-bottom: 50px; }
  .vault-grid { grid-template-columns: 1fr; gap: 24px; }
  .vault-circuits { grid-template-columns: 1fr; }
  .circuit::before { top: 0; bottom: auto; left: 0; right: auto; width: 3px; height: auto; }
  .circuit { border-bottom: 1px solid var(--d-rule); padding: 14px 12px 14px 16px; }
  .detail-grid { grid-template-columns: 1fr; gap: 14px; }
  .detail-head h3 { font-size: 22px; }
  .detail-head .pct { font-size: 22px; }
  .core-figure { gap: 18px; }

  .spec > div { grid-template-columns: 116px minmax(0, 1fr); gap: 12px; }
  .split-legend { gap: 10px; }
  .split-legend span { font-size: 13px; }

  .phases li { grid-template-columns: 42px minmax(0, 1fr); gap: 12px 14px; }
  .phases .chip { grid-column: 2; justify-self: start; }

  .faq summary { font-size: 18px; padding: 15px 0; }
  .faq details p { padding-right: 8px; }

  /* Brand and the two links share one line, justified apart; the disclaimer
     runs underneath. */
  .foot-grid {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand side"
      "note  note";
    align-items: center;
    gap: 14px 16px;
  }
  .foot-brand { grid-area: brand; }
  .foot-note { grid-area: note; }
  .foot-side { grid-area: side; justify-self: end; }
}

@media (max-width: 420px) {
  .nav { gap: 8px; }
  .tape-item b { font-size: 18px; }
  .module-role { font-size: 13px; }
  .split-legend { grid-template-columns: 1fr; }
  .split-legend li { grid-template-columns: 8px 1fr auto; }
  .dossier-inner { padding: 22px 18px 24px; }
  .dossier-head { grid-template-columns: 70px minmax(0, 1fr); gap: 14px; }
  .dossier-zh { font-size: 58px; }
  .dossier-id h2 { font-size: 27px; }
}

@media (max-width: 359px) {
  .tape-inner { grid-template-columns: 1fr; }
  .tape-item { padding: 11px 0; border-left: 0; border-right: 0; border-top: 1px solid var(--rule-soft); }
  .tape-item:nth-child(odd) { border-right: 0; }
  .tape-item:first-child { border-top: 0; }
  .tape-item:nth-child(2) { border-top: 1px solid var(--rule-soft); }
  .tape-item b { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* =========================================================
   Prediction game additions
   ========================================================= */

#board { border-top: 0; }

.nowrap { white-space: nowrap; }

.modules.is-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Board toolbar */

.board-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
#face-predict .board-toolbar { justify-content: center; }

.board-search {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 0 1 340px;
}
.board-search input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--paper-2);
  color: var(--ink);
  font: 14px/1 var(--sans);
}
.board-search input::placeholder { color: var(--muted); }
.board-search input:focus {
  outline: none;
  border-color: var(--cobalt);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--cobalt) 22%, transparent);
}

.board-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}
.board-count {
  color: var(--body);
  font: 500 13px/1.4 var(--mono);
}

.board-hint {
  margin: 0 0 10px;
  color: var(--muted);
  font: 13px/1.5 var(--sans);
  letter-spacing: 0.01em;
}

/* Periodic table */

.board-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper-2) 52%, transparent);
  scrollbar-width: thin;
  scrollbar-color: var(--rule) transparent;
  -webkit-overflow-scrolling: touch;
}
.board-scroll:focus-visible { outline-offset: -2px; }

.board-inner {
  min-width: 1060px;
  padding: 18px 0 16px;
}

.ptable {
  display: grid;
  grid-template-columns: repeat(18, minmax(0, 1fr));
  gap: 5px;
}

.el {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 74px;
  padding: 6px 6px 6px;
  border: 1px solid var(--cat-bd, var(--rule));
  border-top: 2.5px solid var(--cat, var(--rule));
  border-radius: 7px;
  background: var(--cat-bg, var(--paper-2));
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.el:hover {
  background: color-mix(in srgb, var(--cat, var(--base)) 16%, var(--cat-bg, var(--paper-2)));
  border-color: var(--cat, var(--rule));
  transform: translateY(-1px);
  box-shadow: 0 6px 14px -10px color-mix(in srgb, var(--cat, var(--ink)) 55%, transparent);
}
.el:focus-visible { outline-offset: 1px; z-index: 2; }
.el-z {
  color: var(--muted);
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.01em;
}
.el-sym {
  margin-top: auto;
  padding-top: 4px;
  font: 600 16px/1.05 var(--mono);
  letter-spacing: 0.01em;
}
.el-zh {
  margin-top: 3px;
  color: var(--body);
  font: 500 11.5px/1.15 var(--sans);
}
.el.is-active {
  outline: 2px solid var(--cobalt);
  outline-offset: 1px;
  z-index: 1;
}
.el[aria-pressed="true"] {
  background: var(--cobalt);
  border-color: var(--cobalt);
  border-top-color: var(--cat, var(--cobalt));
  color: #fff;
}
.el[aria-pressed="true"] .el-z { color: rgba(255, 255, 255, 0.78); }
.el[aria-pressed="true"] .el-zh { color: rgba(255, 255, 255, 0.9); }
.el.is-dimmed {
  opacity: 0.14;
  pointer-events: none;
}
.el[disabled] { cursor: default; }

/* Elements whose Gemini model already shipped: readable, but never predictable. */
.el.is-released {
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(12, 22, 48, 0.05) 0 5px,
    transparent 5px 11px
  );
}
.el.is-released .el-z { opacity: 0.55; }
.el.is-released .el-sym,
.el.is-released .el-zh { opacity: 0.72; }
.el-flag {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cobalt);
  color: #fff;
  font: 700 9px/1 var(--sans);
  box-shadow: 0 0 0 2px color-mix(in srgb, #fff 62%, transparent);
}

.el-gap { min-height: 74px; }

.el-placeholder {
  border: 1px dashed var(--cat-bd, var(--rule));
  border-top: 1px dashed var(--cat-bd, var(--rule));
  border-radius: 7px;
  background: color-mix(in srgb, var(--cat-bg, transparent) 55%, transparent);
  color: var(--muted);
  font: 500 10.5px/1.2 var(--mono);
  align-items: center;
  justify-content: center;
  text-align: center;
}
.el-placeholder:hover {
  background: var(--cat-bg, transparent);
  border-color: var(--cat, var(--ink));
  color: var(--ink);
  transform: none;
  box-shadow: none;
}

.fblock { margin-top: 6px; }
.fblock-row {
  display: grid;
  grid-template-columns: repeat(18, minmax(0, 1fr));
  gap: 5px;
}
.fblock-row + .fblock-row { margin-top: 5px; }

.fblock-label {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 6px 9px;
  border: 1px solid var(--rule-soft);
  border-radius: 7px;
  background: color-mix(in srgb, var(--paper-2) 62%, transparent);
}
.fblock-label b {
  color: var(--ink);
  font: 600 12px/1.25 var(--sans);
}
.fblock-label span {
  color: var(--muted);
  font: 500 10px/1.2 var(--mono);
  letter-spacing: 0.03em;
}

/* Board footer */

.board-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.none-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 264px;
  padding: 14px 16px;
  border: 1px solid var(--rule);
  border-top: 3px solid var(--base);
  border-radius: 12px;
  background: var(--paper-2);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.none-card:hover { border-color: var(--ink); }
.none-card.is-active { outline: 2px solid var(--cobalt); outline-offset: 1px; }
.none-card[aria-pressed="true"] {
  background: var(--cobalt);
  border-color: var(--cobalt);
  border-top-color: var(--base);
  color: #fff;
}
.none-sym {
  width: 34px;
  height: 34px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: color-mix(in srgb, var(--cobalt) 7%, transparent);
  color: var(--cobalt);
}
.none-copy { display: flex; flex-direction: column; gap: 3px; }
.none-copy b {
  font: 600 13.5px/1.4 var(--sans);
  letter-spacing: 0.01em;
}
.none-copy small {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}
.none-card[aria-pressed="true"] .none-sym {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.none-card[aria-pressed="true"] .none-copy b { color: #fff; }
.none-card[aria-pressed="true"] .none-copy small { color: rgba(255, 255, 255, 0.8); }

.board-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  max-width: 820px;
  padding-top: 4px;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--body);
  font: 12px/1.4 var(--sans);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.legend-item i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex: none;
  background: var(--cat-bg, var(--cat));
  border: 1.5px solid var(--cat);
}
.legend-item.legend-released i {
  border-radius: 50%;
  background: var(--cobalt);
  border-color: var(--cobalt);
}

/* Element detail */

.board-detail {
  min-height: 196px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.detail-empty p {
  margin: 9px 0 6px;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.35;
}
.detail-empty small {
  display: block;
  max-width: 44em;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.75;
}

.detail-top {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}
.detail-symbol {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border: 1px solid var(--cat-bd, var(--rule));
  border-top: 3px solid var(--cat);
  border-radius: 12px;
  background: var(--cat-bg, var(--paper-2));
  font: 600 32px/1 var(--mono);
}
.detail-id h3 {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.12;
}
.detail-id p {
  margin-top: 5px;
  color: var(--muted);
  font: 13px/1.5 var(--mono);
}
.detail-badge {
  align-self: start;
  padding: 5px 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--body);
  font: 500 12px/1.3 var(--sans);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.detail-shipped {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--cobalt) 24%, var(--rule));
  border-left: 3px solid var(--cobalt);
  border-radius: 10px;
  background: color-mix(in srgb, var(--cobalt) 5%, var(--paper));
}
.detail-shipped-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 14px;
}
.detail-shipped-date {
  color: var(--muted);
  font: 500 12px/1.3 var(--mono);
  letter-spacing: 0.02em;
}
.detail-shipped p {
  margin-top: 7px;
  color: var(--body);
  font-size: 14px;
  line-height: 1.7;
}
.detail-shipped p b { color: var(--ink); font-weight: 600; }

.detail-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 18px 0;
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
}
.detail-facts > div { padding: 12px 0; }
.detail-facts > div + div {
  padding-left: 16px;
  border-left: 1px solid var(--rule-soft);
}
.detail-facts dt {
  color: var(--muted);
  font: 500 12px/1.4 var(--sans);
  letter-spacing: 0.02em;
}
.detail-facts dd {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.5;
}
.detail-facts .pending { color: var(--reason); }

.detail-copy {
  max-width: 60em;
  color: var(--body);
  font-size: 14.5px;
  line-height: 1.85;
}
.detail-copy b { color: var(--ink); font-weight: 600; }

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}
.detail-note {
  margin-top: 10px;
  color: var(--muted);
  font: 12.5px/1.65 var(--sans);
  letter-spacing: 0.01em;
}

/* ---------------------------------------------------------
   Element cards: the board panel's second face
   --------------------------------------------------------- */

/* Segmented switch above the panel. */
.board-switch {
  display: flex;
  width: fit-content;
  gap: 3px;
  padding: 3px;
  margin: 26px auto 18px;
  border: 1px solid var(--rule);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.55);
}
.switch-btn {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 16px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.switch-btn:hover { color: var(--ink); }
.switch-btn.is-on {
  background: var(--ink);
  color: #fff;
  cursor: default;
}
.switch-zh {
  font: 600 14px/1 var(--sans);
  letter-spacing: 0.01em;
}
.switch-en {
  font: 500 10.5px/1 var(--mono);
  letter-spacing: 0.08em;
  opacity: 0.72;
}

/* The turn. Both faces share one grid cell, so the panel is as tall as the
   taller of the two and neither is clipped half-way through the rotation. */
.board-flip { perspective: 2400px; }
.flip-stage {
  display: grid;
  transform-style: preserve-3d;
  transition: transform 0.72s cubic-bezier(0.62, 0.02, 0.24, 1);
}
.flip-stage.is-flipped { transform: rotateY(180deg); }

.board-face {
  grid-area: 1 / 1;
  min-width: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.board-face.is-back { transform: rotateY(180deg); }

@media (prefers-reduced-motion: reduce) {
  .flip-stage { transition: none; }
}

/* Card set figures, sitting in the toolbar of the card face. */
.card-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--rule-soft);
  border-radius: 12px;
  overflow: hidden;
  background: var(--rule-soft);
}
.card-stats.is-compact {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}
.card-stat {
  padding: 15px 18px 17px;
  background: rgba(255, 255, 255, 0.6);
}
.card-stats.is-compact .card-stat { padding: 11px 14px 13px; }
.card-stat > span {
  color: var(--muted);
  font: 500 12px/1.4 var(--sans);
  letter-spacing: 0.06em;
}
.card-stats.is-compact .card-stat > span { font-size: 11px; }
.card-figure {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 7px;
}
.card-stats.is-compact .card-figure { margin-top: 6px; gap: 4px; }
.card-figure b {
  font: 600 30px/1 var(--num-serif, var(--serif));
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.card-stats.is-compact .card-figure b { font-size: 23px; }
.card-figure small {
  color: var(--muted);
  font-size: 12.5px;
}
.card-stats.is-compact .card-figure small { font-size: 11.5px; }

/* Per-element card count, riding in the corner of each tile. */
.el-count {
  position: absolute;
  right: 5px;
  bottom: 4px;
  color: var(--cat, var(--muted));
  font: 600 9px/1 var(--mono);
  letter-spacing: 0.02em;
  opacity: 0.66;
}
.el-card.is-released .el-count { opacity: 0.5; }

/* Sold-out editions: still readable, clearly finished */
.el-card.is-soldout {
  opacity: 0.46;
  border-style: dashed;
}
.el-card.is-soldout .el-count {
  color: #b4472f;
  font-weight: 700;
}

/* 同系叠加 ladder inside the card dossier */
.weight-ladder {
  margin-top: 12px;
  padding: 12px 14px 14px;
  border-radius: 14px;
  background: rgba(29, 92, 99, 0.045);
  border: 1px solid rgba(29, 92, 99, 0.14);
}
.weight-ladder .mono-label {
  color: var(--cobalt);
}
.weight-steps {
  list-style: none;
  margin: 9px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}
.weight-steps li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 2px 6px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(29, 92, 99, 0.13);
}
.weight-steps b {
  font: 600 9.5px/1.2 var(--mono);
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
}
.weight-steps span {
  font: 700 14px/1 var(--latin, var(--sans));
  color: var(--cobalt);
}
.weight-steps li.is-on {
  background: #fff;
  border-color: var(--cobalt);
  box-shadow: 0 0 0 2px rgba(31, 61, 168, 0.12);
}

/* 退役卡熔炼 / SMELT */
.smelt-panel {
  margin-top: 14px;
  padding: 16px 18px 16px;
  border-radius: 16px;
  border: 1px dashed rgba(196, 155, 74, 0.62);
  background: linear-gradient(150deg, rgba(250, 243, 227, 0.72), rgba(255, 255, 255, 0.5));
}
.smelt-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.smelt-pool {
  padding: 3px 10px;
  border-radius: 999px;
  font: 600 11px/1.5 var(--mono);
  letter-spacing: 0.02em;
  color: #8a6b2f;
  background: rgba(217, 181, 111, 0.18);
  border: 1px solid rgba(196, 155, 74, 0.45);
}
.smelt-rule {
  margin: 10px 0 12px;
  font-size: 13.5px;
  line-height: 1.68;
  color: var(--ink);
}
.smelt-rule b {
  color: #8a6b2f;
  font-weight: 600;
}
.smelt-meter {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 18px;
  font: 500 12.5px/1.5 var(--sans);
  color: var(--muted);
}
.smelt-meter b {
  font-size: 15px;
  color: var(--ink);
}
.smelt-hint.is-ready {
  color: #1c6b3d;
  font-weight: 600;
}
.smelt-btn {
  width: 100%;
  margin-top: 12px;
}
.smelt-note {
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
}

@media (max-width: 520px) {
  .weight-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding-top: 4px;
}
.legend-item.legend-card i {
  border-radius: 3px;
  background: var(--paper-2);
  border-color: var(--rule);
}

.detail-badge-retired {
  border-color: color-mix(in srgb, var(--cobalt) 30%, var(--rule));
  background: color-mix(in srgb, var(--cobalt) 7%, transparent);
  color: var(--cobalt);
}

/* Everything below the panel belongs to one face or the other. */
.board-extra { margin-top: 4px; }
.extra-face.is-cards { display: none; }
.chapter.is-cards .extra-face.is-cards { display: block; }
.chapter.is-cards .extra-face.is-predict { display: none; }

/* Four steps read as one row; the notes sit under it as a two-up footnote
   band instead of stacking in the first column. */
.chapter.is-cards .extra-face.is-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(24px, 3vw, 44px);
}
.extra-face.is-cards .card-flow { grid-column: 1 / -1; }

.card-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(16px, 1.8vw, 26px);
  margin-top: 28px;
}
.card-flow li {
  padding-top: 15px;
  border-top: 2px solid var(--rule);
}
.card-step {
  color: var(--muted);
  font: 500 11.5px/1 var(--mono);
  letter-spacing: 0.08em;
}
.card-flow h3 {
  margin-top: 9px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
}
.card-flow p {
  margin-top: 7px;
  color: var(--body);
  font-size: 13.5px;
  line-height: 1.75;
}
.extra-face.is-cards .module-note {
  margin-top: 20px;
  padding-top: 13px;
  border-top: 1px solid var(--rule);
  font-size: 12.5px;
  line-height: 1.7;
}

@media (max-width: 1080px) {
  .card-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 22px; }
}
@media (max-width: 760px) {
  .card-flow { grid-template-columns: 1fr; gap: 16px; }
  .chapter.is-cards .extra-face.is-cards { grid-template-columns: 1fr; }
  .extra-face.is-cards .module-note { margin-top: 14px; }
}
@media (max-width: 760px) {
  .card-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Two short lines beat one clipped one: the labels no longer fit side by side. */
  .board-switch { display: flex; width: 100%; }
  .switch-btn {
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 10px;
  }
  .switch-zh { font-size: 13.5px; }
  .switch-en { font-size: 9.5px; letter-spacing: 0.06em; }
}

/* Pool timeline */

.pool-timeline {
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 20px 50px -42px rgba(31, 61, 168, 0.35);
}
.timeline { margin-top: 14px; }
.timeline li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--d-rule-soft);
}
.timeline li:last-child { border-bottom: 0; }
.timeline-num {
  color: var(--cobalt);
  font: 600 12.5px/1.4 var(--mono);
  letter-spacing: 0.03em;
}
.timeline-body h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}
.timeline-body p {
  margin-top: 4px;
  color: var(--body);
  font-size: 14px;
  line-height: 1.7;
}

/* Grand prize spotlight */

.grand-prize {
  margin-top: 22px;
  padding: 20px 22px 18px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  background:
    radial-gradient(90% 130% at 10% 0%, rgba(255, 255, 255, 0.92), transparent 60%),
    radial-gradient(80% 120% at 92% 100%, rgba(186, 230, 253, 0.42), transparent 64%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.84), rgba(240, 247, 255, 0.62));
  box-shadow:
    0 0 0 1px rgba(31, 61, 168, 0.08),
    0 0 40px rgba(255, 255, 255, 0.62),
    0 24px 56px -40px rgba(31, 61, 168, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}
/* Lifted out of the vault section: the block now closes the hero. */
.grand-home-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 0 var(--gutter) clamp(42px, 4.2vw, 64px);
}
.grand-home .grand-prize { margin-top: 0; }
.grand-prize-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}
.grand-prize-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid rgba(31, 61, 168, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--cobalt);
  font: 500 12px/1.3 var(--sans);
  letter-spacing: 0.02em;
}
.grand-prize-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}
.grand-tier {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95);
}
.grand-tier.is-first {
  border-top: 3px solid #d97706;
  background: linear-gradient(155deg, rgba(255, 251, 235, 0.76), rgba(255, 255, 255, 0.64));
}
.grand-tier.is-second {
  border-top: 3px solid var(--cobalt);
  background: linear-gradient(155deg, rgba(239, 246, 255, 0.78), rgba(255, 255, 255, 0.64));
}
.grand-tier.is-third {
  border-top: 3px solid var(--core);
  background: linear-gradient(155deg, rgba(236, 253, 245, 0.74), rgba(255, 255, 255, 0.64));
}
.grand-tier.is-fourth {
  border-top: 3px solid var(--sense);
  background: linear-gradient(155deg, rgba(238, 242, 255, 0.76), rgba(255, 255, 255, 0.64));
}
.grand-rank {
  align-self: flex-start;
  padding: 3px 9px;
  border-radius: 999px;
  font: 600 11.5px/1.3 var(--mono);
  letter-spacing: 0.03em;
}
.grand-tier.is-first .grand-rank {
  background: rgba(217, 119, 6, 0.12);
  color: #9a5204;
}
.grand-tier.is-second .grand-rank {
  background: rgba(31, 61, 168, 0.1);
  color: var(--cobalt);
}
.grand-tier.is-third .grand-rank {
  background: rgba(29, 92, 99, 0.11);
  color: var(--core);
}
.grand-tier.is-fourth .grand-rank {
  background: rgba(74, 79, 179, 0.11);
  color: var(--sense);
}
.grand-tier-body h3 {
  font-family: var(--geom, var(--sans));
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.015em;
}
.grand-tier-body h3 em {
  margin-left: 4px;
  font-style: normal;
  font-family: var(--num-serif, var(--serif));
  font-weight: 600;
}
.grand-tier.is-first .grand-tier-body h3 em { color: #b45309; }
.grand-tier.is-second .grand-tier-body h3 em { color: var(--cobalt); }
.grand-tier.is-third .grand-tier-body h3 em { color: var(--core); }
.grand-tier.is-fourth .grand-tier-body h3 em { color: var(--sense); }
.grand-value {
  display: inline-block;
  margin-left: 9px;
  padding: 2px 8px 3px;
  border: 1px solid var(--d-rule-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--d-muted);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  vertical-align: 3px;
  white-space: nowrap;
}
.grand-tier-body p {
  margin-top: 6px;
  color: var(--body);
  font-size: 13.5px;
  line-height: 1.65;
}
.grand-prize-note {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--d-rule-soft);
  color: var(--d-muted);
  font: 12.5px/1.6 var(--sans);
}

/* Pool rules */

.grand-pointer {
  margin-top: 20px;
  color: var(--d-muted);
  font: 13px/1.7 var(--sans);
}
.grand-pointer a {
  color: var(--cobalt, #1f3da8);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.grand-pointer a:hover { color: var(--ink); }

.pool-rules {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.pool-rules > div {
  padding: 17px 19px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.pool-rules dt {
  color: var(--d-muted);
  font: 600 12.5px/1.4 var(--sans);
  letter-spacing: 0.03em;
}
.pool-rules dd {
  margin-top: 8px;
  color: var(--body);
  font-size: 14px;
  line-height: 1.72;
}

/* Token additions */

.split-legend.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.token-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--rule-soft);
}

/* Responsive additions */

@media (max-width: 1080px) {
  .pool-timeline { grid-column: 1 / -1; }
  .pool-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
}

@media (max-width: 1000px) {
  .modules.is-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .board-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .board-tools { justify-content: space-between; }
  .board-search { flex: none; }
  .board-search input { width: 100%; }

  .board-scroll {
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
  }
  .board-inner { min-width: 980px; }

  .board-meta {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }
  .none-card { width: 100%; min-width: 0; }
  .board-legend { max-width: none; }

  .detail-top {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
  }
  .detail-symbol { width: 64px; height: 64px; font-size: 26px; }
  .detail-id h3 { font-size: 24px; }
  .detail-badge { grid-column: 2; justify-self: start; }
  .detail-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-facts > div:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }
  .detail-facts > div:nth-child(n+3) {
    border-top: 1px solid var(--rule-soft);
  }
  .detail-empty p { font-size: 21px; }

  .grand-prize-grid { grid-template-columns: 1fr; gap: 12px; }
  .pool-rules { grid-template-columns: 1fr; gap: 16px; }
  .pool-timeline { grid-column: auto; }
}

@media (max-width: 420px) {
  .modules.is-four { grid-template-columns: 1fr; }
  .board-inner { min-width: 920px; }
  .detail-symbol { width: 58px; height: 58px; font-size: 23px; }
  .detail-top { grid-template-columns: 58px minmax(0, 1fr); }
  .none-sym { width: 28px; font-size: 24px; }
}

/* ---------------------------------------------------------
   Type test: geometric sans
   Scoped to .type-geometric; remove the body class to restore
   the serif direction. Poppins covers Latin/numerals, Noto Sans
   SC covers Chinese, PingFang SC is the macOS fallback.
   --------------------------------------------------------- */

.type-geometric {
  --geom: "Poppins", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --num-serif: "Fraunces", "Spectral", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", serif;
  --sans: var(--geom);
  font-family: var(--geom);
}

.type-geometric .wordmark-text,
.type-geometric .nav,
.type-geometric .btn,
.type-geometric .hero-note,
.type-geometric .assay-foot,
.type-geometric .chapter-title,
.type-geometric .vault-head h2,
.type-geometric .core-note,
.type-geometric .vault-note,
.type-geometric .circuit-name,
.type-geometric .detail-head h3,
.type-geometric .detail-id h3,
.type-geometric .module-zh,
.type-geometric .phase-body h3,
.type-geometric .faq summary,
.type-geometric .detail-empty p,
.type-geometric .dossier-id h2,
.type-geometric .dossier-role {
  font-family: var(--geom);
}

@keyframes nav-text-sweep {
  0%, 56% { background-position: 100% 0; }
  100% { background-position: 0% 0; }
}
@keyframes nav-text-sweep-once {
  0% { background-position: 100% 0; }
  100% { background-position: 0% 0; }
}
@keyframes nav-pill-sweep {
  0%, 54% { background-position: 100% 0, 0 0; }
  100% { background-position: 0% 0, 0 0; }
}
@keyframes nav-pill-sweep-once {
  0% { background-position: 100% 0, 0 0; }
  100% { background-position: 0% 0, 0 0; }
}
@keyframes nav-bar-sweep {
  0% { background-position: 100% 0; }
  100% { background-position: 0% 0; }
}

.type-geometric .wordmark-text {
  font-weight: 900;
  font-size: 21px;
  letter-spacing: 0.055em;
  background-image: linear-gradient(
    112deg,
    #101c42 0%,
    #1f3da8 36%,
    #38bdf8 46%,
    #f0f9ff 50%,
    #38bdf8 54%,
    #1f3da8 64%,
    #0284c7 100%
  );
  background-size: 260% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 6px rgba(31, 61, 168, 0.18));
  animation: nav-text-sweep 4.2s ease-in-out infinite;
  transition: filter 0.25s ease;
}
.type-geometric .wordmark:hover .wordmark-text {
  animation: nav-text-sweep-once 0.78s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 3px 12px rgba(37, 83, 214, 0.38));
}

.type-geometric .foot-brand .wordmark-text {
  font-size: 17px;
  animation: none;
  background-position: 85% 0;
}

.type-geometric .nav {
  gap: clamp(6px, 1vw, 12px);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.03em;
}
.type-geometric .nav a {
  position: relative;
  isolation: isolate;
  padding: 8px 14px;
  border-bottom: 0;
  border-radius: 10px;
  color: transparent;
  background-image: linear-gradient(
    112deg,
    #1b2436 0%,
    #25324a 38%,
    #3b82f6 47%,
    #e0f2fe 50%,
    #3b82f6 53%,
    #25324a 62%,
    #33415c 100%
  );
  background-size: 260% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-stroke: 0.35px rgba(20, 30, 58, 0.35);
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.85));
  animation: nav-text-sweep 5.4s ease-in-out infinite;
  transition:
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.22s ease;
}
.type-geometric .nav a:nth-child(1) { animation-delay: 0s; }
.type-geometric .nav a:nth-child(2) { animation-delay: 0.18s; }
.type-geometric .nav a:nth-child(3) { animation-delay: 0.36s; }
.type-geometric .nav a:nth-child(4) { animation-delay: 0.54s; }
.type-geometric .nav a:nth-child(5) { animation-delay: 0.72s; }
.type-geometric .nav a:nth-child(6) { animation-delay: 0.9s; }

.type-geometric .nav a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 10px;
  border: 1px solid transparent;
  background-image:
    linear-gradient(112deg, transparent 34%, rgba(255, 255, 255, 0.88) 48%, rgba(186, 230, 253, 0.92) 52%, transparent 66%),
    linear-gradient(135deg, rgba(37, 83, 214, 0.11), rgba(56, 189, 248, 0.15));
  background-size: 280% 100%, 100% 100%;
  background-position: 100% 0, 0 0;
  background-repeat: no-repeat;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 6px 18px -8px rgba(31, 61, 168, 0.42);
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease;
}
.type-geometric .nav a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 3px;
  border-radius: 999px;
  background-image: linear-gradient(90deg, #162e88 0%, #2553d6 34%, #e0f2fe 50%, #38bdf8 66%, #162e88 100%);
  background-size: 240% 100%;
  background-position: 100% 0;
  box-shadow: 0 2px 10px rgba(37, 83, 214, 0.52);
  transform: scaleX(0);
  transform-origin: center;
  opacity: 0;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}
.type-geometric .nav a:hover,
.type-geometric .nav a:focus-visible {
  background-image: linear-gradient(
    112deg,
    #162e88 0%,
    #2553d6 36%,
    #38bdf8 46%,
    #ffffff 50%,
    #38bdf8 54%,
    #2553d6 64%,
    #0ea5e9 100%
  );
  background-size: 260% 100%;
  -webkit-text-stroke: 0.35px rgba(31, 61, 168, 0.22);
  filter: drop-shadow(0 3px 11px rgba(37, 83, 214, 0.36));
  transform: translateY(-1.5px);
  animation: nav-text-sweep-once 0.72s cubic-bezier(0.22, 1, 0.36, 1);
  animation-delay: 0s;
}
.type-geometric .nav a:hover::before,
.type-geometric .nav a:focus-visible::before {
  opacity: 1;
  transform: scale(1);
  border-color: rgba(37, 83, 214, 0.2);
  animation: nav-pill-sweep-once 0.72s cubic-bezier(0.22, 1, 0.36, 1);
}
.type-geometric .nav a:hover::after,
.type-geometric .nav a:focus-visible::after {
  opacity: 1;
  transform: scaleX(1);
  animation: nav-bar-sweep 1.8s linear infinite;
}
.type-geometric .nav a[aria-current="true"], .type-geometric .nav a[aria-current="page"] {
  background-image: linear-gradient(
    112deg,
    #162e88 0%,
    #2553d6 36%,
    #38bdf8 46%,
    #f0f9ff 50%,
    #38bdf8 54%,
    #2553d6 64%,
    #0ea5e9 100%
  );
  background-size: 260% 100%;
  -webkit-text-stroke: 0.35px rgba(31, 61, 168, 0.24);
  filter: drop-shadow(0 3px 10px rgba(37, 83, 214, 0.32));
  animation: nav-text-sweep 3.4s ease-in-out infinite;
  animation-delay: 0s;
}
.type-geometric .nav a[aria-current="true"]::before, .type-geometric .nav a[aria-current="page"]::before {
  opacity: 1;
  transform: scale(1);
  border-color: rgba(37, 83, 214, 0.24);
  animation: nav-pill-sweep 3.4s ease-in-out infinite;
}
.type-geometric .nav a[aria-current="true"]::after, .type-geometric .nav a[aria-current="page"]::after {
  opacity: 1;
  transform: scaleX(1);
  animation: nav-bar-sweep 2.4s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .type-geometric .wordmark-text,
  .type-geometric .nav a,
  .type-geometric .nav a::before,
  .type-geometric .nav a::after,
  .type-geometric .btn::after,
  .mystery-orb,
  .mystery-glow,
  .mystery-ring,
  .mystery-q {
    animation: none !important;
  }
}

@media (max-width: 760px) {
  .type-geometric .wordmark-text { font-size: 18px; }
  .type-geometric .nav { gap: 4px; font-size: 13.5px; letter-spacing: 0.015em; }
  .type-geometric .nav a { padding: 6px 8px; }
  .type-geometric .nav a::after { left: 8px; right: 8px; height: 2.5px; }
}

/* Phones: the links tuck behind a toggle and unfold into a full-width sheet,
   so nobody has to guess that the strip scrolls sideways. */
@media (max-width: 880px) {
  .masthead-inner { gap: 10px; }
  .wordmark { flex: none; }
  .nav-toggle { display: inline-flex; margin-left: auto; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    margin: 0;
    padding: 12px var(--gutter) 16px;
    background: #f5f7f6;
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 22px 34px -30px rgba(31, 61, 168, 0.65);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    -webkit-mask-image: none;
    mask-image: none;
  }
  .nav a { padding: 9px 4px; }
  .masthead.nav-open .nav { display: grid; }
  .masthead.nav-open .nav-toggle {
    background: rgba(31, 61, 168, 0.08);
    border-color: rgba(31, 61, 168, 0.24);
    color: var(--cobalt);
  }

}

/* The connect button only needs a word on a phone; the address replaces it
   once a wallet is linked. */
@media (max-width: 760px) {
  .wallet-btn[data-state="idle"] .wallet-label { font-size: 0; }
  .wallet-btn[data-state="idle"] .wallet-label::after { content: "登录"; font-size: 12.5px; }
}

.type-geometric .hero h1 {
  font-family: var(--geom);
  font-weight: 600;
}

.type-geometric .chapter-title,
.type-geometric .vault-head h2 {
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.02em;
}

@keyframes btn-sheen {
  0%, 58% {
    transform: translateX(-150%) skewX(-24deg);
    opacity: 0;
  }
  64% {
    opacity: 1;
  }
  94% {
    opacity: 1;
  }
  100% {
    transform: translateX(260%) skewX(-24deg);
    opacity: 0;
  }
}
@keyframes btn-sheen-once {
  0% {
    transform: translateX(-150%) skewX(-24deg);
    opacity: 0.95;
  }
  100% {
    transform: translateX(260%) skewX(-24deg);
    opacity: 0;
  }
}

.type-geometric .btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: 46px;
  padding: 0 22px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.005em;
  transition:
    transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.24s ease;
}
.type-geometric .btn:not([disabled])::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: 0;
  width: 48%;
  pointer-events: none;
  transform: translateX(-150%) skewX(-24deg);
  will-change: transform, opacity;
}
.type-geometric .btn-primary:not([disabled]) {
  background: linear-gradient(135deg, #173496 0%, #2553d6 55%, #1d4ed8 100%);
  border-color: rgba(37, 83, 214, 0.85);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 12px 26px -14px rgba(31, 61, 168, 0.72);
}
.type-geometric .btn-primary:not([disabled])::after {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(186, 230, 253, 0.24) 28%,
    rgba(255, 255, 255, 0.68) 50%,
    rgba(186, 230, 253, 0.24) 72%,
    transparent 100%
  );
  animation: btn-sheen 3.4s ease-in-out infinite;
}
.type-geometric .btn-primary:not([disabled]):hover,
.type-geometric .btn-primary:not([disabled]):focus-visible {
  background: linear-gradient(135deg, #162e88 0%, #224cc7 55%, #0ea5e9 100%);
  border-color: rgba(37, 83, 214, 0.95);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 16px 32px -12px rgba(37, 83, 214, 0.75);
  transform: translateY(-1.5px);
}
.type-geometric .btn-primary:not([disabled]):hover::after,
.type-geometric .btn-primary:not([disabled]):focus-visible::after {
  animation: btn-sheen-once 0.68s cubic-bezier(0.22, 1, 0.36, 1);
}
.type-geometric .btn-ghost:not([disabled]) {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 8px 20px -16px rgba(31, 61, 168, 0.35);
}
.type-geometric .btn-ghost:not([disabled])::after {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(56, 189, 248, 0.16) 28%,
    rgba(255, 255, 255, 0.9) 50%,
    rgba(37, 83, 214, 0.14) 72%,
    transparent 100%
  );
  animation: btn-sheen 4.4s ease-in-out 1.1s infinite;
}
.type-geometric .btn-ghost:not([disabled]):hover,
.type-geometric .btn-ghost:not([disabled]):focus-visible {
  color: var(--cobalt);
  border-color: rgba(37, 83, 214, 0.32);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 12px 24px -14px rgba(37, 83, 214, 0.42);
  transform: translateY(-1.5px);
}
.type-geometric .btn-ghost:not([disabled]):hover::after,
.type-geometric .btn-ghost:not([disabled]):focus-visible::after {
  animation: btn-sheen-once 0.68s cubic-bezier(0.22, 1, 0.36, 1);
}
.type-geometric .btn:not([disabled]):active {
  transform: translateY(0);
}

.type-geometric .hero-note {
  font-size: 13.5px;
  line-height: 1.75;
}

.type-geometric .assay-foot,
.type-geometric .core-note,
.type-geometric .vault-note {
  font-size: 13px;
  line-height: 1.7;
}

.type-geometric .sample-zh,
.type-geometric .dossier-zh {
  font-family: var(--geom);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.type-geometric .core-figure > strong {
  font-family: var(--num-serif);
  font-weight: 500;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

/* Fraunces editorial numerals for chart & metric cards */
.type-geometric .flow-value,
.type-geometric .flow-core strong,
.type-geometric .flow-out b,
.type-geometric .tape-item b,
.type-geometric .vault-in .core-big,
.type-geometric .core-rows b,
.type-geometric .core-legend b,
.type-geometric .timeline-body h3,
.type-geometric .route b,
.type-geometric .split-legend b {
  font-family: var(--num-serif);
  font-variant-numeric: tabular-nums;
}

.type-geometric .flow-value,
.type-geometric .flow-core strong,
.type-geometric .vault-in .core-big {
  font-weight: 500;
  letter-spacing: -0.01em;
}

.type-geometric .flow-value i,
.type-geometric .flow-core strong i,
.type-geometric .flow-out i,
.type-geometric .core-big i {
  font-family: var(--num-serif);
}

.type-geometric .flow-out b,
.type-geometric .tape-item b,
.type-geometric .split-legend b {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.type-geometric .circuit-name,
.type-geometric .detail-head h3,
.type-geometric .detail-id h3,
.type-geometric .module-zh,
.type-geometric .phase-body h3,
.type-geometric .timeline-body h3,
.type-geometric .faq summary,
.type-geometric .detail-empty p,
.type-geometric .dossier-id h2,
.type-geometric .dossier-role {
  font-weight: 600;
  letter-spacing: -0.015em;
}

/* =========================================================
   Hero 3D Mint Card Window
   ========================================================= */

.assay-mint .mint-body {
  grid-template-columns: 204px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.mint-stage {
  --burst-color: #3b6bf7;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  perspective: 1000px;
}

/* Mysterious Alchemical Summoning Seal behind Card */
.mint-alchemy-seal {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 268px;
  height: 268px;
  margin-top: -146px;
  margin-left: -134px;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.58) rotate(0deg);
  transition: opacity 0.45s ease, transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  filter:
    drop-shadow(0 0 22px rgba(245, 223, 176, 0.95))
    drop-shadow(0 0 48px rgba(59, 107, 247, 0.78));
  z-index: 0;
}
.mint-alchemy-seal::before {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 223, 176, 0.55) 0%, rgba(59, 107, 247, 0.48) 42%, transparent 72%);
  filter: blur(18px);
  opacity: 0;
  transition: opacity 0.45s ease;
}
.mint-alchemy-seal svg {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}
.mint-stage.is-summoning .mint-alchemy-seal {
  opacity: 1;
  transform: scale(1.16) rotate(180deg);
  animation: mintSealSpin 3.2s linear infinite;
}
.mint-stage.is-summoning .mint-alchemy-seal::before {
  opacity: 1;
  animation: mintHaloPulse 1.1s ease-in-out infinite alternate;
}
@keyframes mintSealSpin {
  from { transform: scale(1.16) rotate(0deg); }
  to   { transform: scale(1.16) rotate(360deg); }
}
@keyframes mintHaloPulse {
  from { transform: scale(0.92); opacity: 0.75; }
  to   { transform: scale(1.18); opacity: 1; }
}

/* Radial Flash Shockwave on Reveal */
.mint-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 260px;
  height: 260px;
  margin-top: -142px;
  margin-left: -130px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  z-index: 8;
  background: radial-gradient(circle, rgba(255, 253, 242, 0.98) 0%, rgba(245, 223, 176, 0.85) 24%, color-mix(in srgb, var(--burst-color) 78%, transparent) 52%, transparent 76%);
  filter: blur(4px);
}
.mint-stage.is-revealed .mint-burst {
  animation: mintBurstPop 1.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes mintBurstPop {
  0%   { opacity: 1;    transform: scale(0.32); }
  42%  { opacity: 0.92; transform: scale(1.52); }
  100% { opacity: 0;    transform: scale(2.15); }
}

/* Bridge-ratio 57:89 compact 3D preview card */
.mint-card-3d {
  --mc-accent: #2b56d6;
  --mc-soft: #7ce8ff;
  --mc-deep: #13256d;
  position: relative;
  z-index: 2;
  width: 184px;
  height: 287px;
  transform-style: preserve-3d;
  cursor: grab;
  user-select: none;
  touch-action: none;
  will-change: transform;
}
.mint-card-3d.is-dragging { cursor: grabbing; }

.mc-face {
  position: absolute;
  inset: 0;
  border-radius: 15px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 18px 34px -10px rgba(15, 23, 42, 0.45);
  transition: box-shadow 0.4s ease;
}
.mint-stage.is-summoning .mc-face {
  box-shadow:
    0 0 28px rgba(245, 223, 176, 0.92),
    0 0 58px rgba(59, 107, 247, 0.78),
    0 18px 34px -10px rgba(15, 23, 42, 0.55);
}
.mint-stage.is-revealed .mc-face {
  box-shadow:
    0 0 26px color-mix(in srgb, var(--burst-color) 85%, transparent),
    0 0 50px rgba(245, 223, 176, 0.48),
    0 18px 34px -10px rgba(15, 23, 42, 0.45);
}

.mc-front {
  background:
    radial-gradient(150px 140px at 50% 42%, color-mix(in srgb, var(--mc-accent) 42%, transparent), transparent 72%),
    linear-gradient(160deg, #161f38 0%, #10172b 52%, #0b101e 100%);
  border: 1.2px solid rgba(217, 181, 111, 0.65);
  color: #f3efe6;
}
.mint-card-3d.is-none .mc-front {
  background:
    radial-gradient(140px 140px at 50% 42%, rgba(217, 181, 111, 0.25), transparent 70%),
    linear-gradient(160deg, #14121b 0%, #0b0a10 55%, #060508 100%);
  border-color: rgba(245, 223, 176, 0.85);
}

.mc-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(217, 181, 111, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(217, 181, 111, 0.05) 1px, transparent 1px);
  background-size: 14px 14px;
  pointer-events: none;
}

.mc-frame {
  position: absolute;
  inset: 6px;
  border-radius: 10px;
  border: 1px solid rgba(217, 181, 111, 0.34);
  pointer-events: none;
  z-index: 2;
}

.mc-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #8f6b2e, #f5dfb0 28%, var(--mc-accent) 62%, var(--mc-soft) 86%, #d9b56f);
  z-index: 3;
}

.mc-holo {
  position: absolute;
  inset: -45%;
  background: linear-gradient(118deg, transparent 28%, rgba(245, 223, 176, 0.35) 50%, transparent 72%);
  mix-blend-mode: screen;
  animation: mcSweep 6s cubic-bezier(0.35, 0, 0.2, 1) infinite;
  pointer-events: none;
  z-index: 6;
}
@keyframes mcSweep {
  0%   { transform: translateX(-95%) rotate(8deg); }
  45%  { transform: translateX(95%) rotate(8deg); }
  100% { transform: translateX(95%) rotate(8deg); }
}

.mc-content {
  position: relative;
  z-index: 4;
  height: 100%;
  padding: 13px 12px 11px;
  display: flex;
  flex-direction: column;
}

.mc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(217, 181, 111, 0.22);
}
.mc-assay {
  font: 600 7.5px/1 var(--latin);
  letter-spacing: 0.08em;
  color: #f5dfb0;
  white-space: nowrap;
}
.mc-badge {
  padding: 2px 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--mc-accent) 26%, rgba(217, 181, 111, 0.14));
  border: 1px solid rgba(245, 223, 176, 0.5);
  color: #fff3d6;
  font-size: 8px;
  font-weight: 600;
  white-space: nowrap;
}

.mc-indices {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 6px;
}
.mc-z {
  font: 700 17px/1 var(--latin);
  color: #f5dfb0;
}
.mc-mass {
  font: 600 8.5px/1 var(--mono);
  color: #d6c096;
}

.mc-orb {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
}
.mc-aura {
  position: absolute;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--mc-accent) 45%, transparent) 0%, transparent 72%);
}
.mc-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(217, 181, 111, 0.42);
}
.mc-ring-1 { width: 92px; height: 92px; border-style: dashed; }
.mc-ring-2 { width: 68px; height: 68px; border-color: color-mix(in srgb, var(--mc-soft) 50%, transparent); }

.mc-core {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, var(--mc-soft) 0%, var(--mc-accent) 46%, var(--mc-deep) 88%);
  border: 1.5px solid rgba(245, 223, 176, 0.88);
  display: grid;
  place-items: center;
  box-shadow: 0 0 18px color-mix(in srgb, var(--mc-accent) 60%, transparent);
}
.mc-sym {
  font: 700 20px/1 var(--latin);
  color: #ffffff;
}

.mc-title {
  text-align: center;
  margin-bottom: 8px;
}
.mc-name {
  font: 700 11.5px/1.2 var(--latin);
  letter-spacing: 0.12em;
  color: #fff6e0;
}
.mc-sub {
  font: italic 9px/1.3 var(--latin);
  color: #b8c4d9;
}

.mc-foot {
  display: flex;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px solid rgba(217, 181, 111, 0.2);
  font: 600 7.5px/1 var(--latin);
  letter-spacing: 0.06em;
  color: #d6c096;
}
.mc-foot span:last-child { color: #fff0cc; }

.mc-back {
  transform: rotateY(180deg);
  background:
    radial-gradient(140px 140px at 50% 50%, rgba(217, 181, 111, 0.18), transparent 70%),
    linear-gradient(160deg, #131b31 0%, #0b1020 100%);
  border: 1.2px solid rgba(217, 181, 111, 0.65);
}
.mc-back-inner {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 24px 12px;
}
.mc-back-top,
.mc-back-word {
  font: 600 8px/1 var(--latin);
  letter-spacing: 0.18em;
  color: #f3dba6;
}
.mc-back-word { font-size: 11px; letter-spacing: 0.24em; }
.mc-back-crest {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--mc-accent), var(--mc-deep));
  border: 1px solid rgba(245, 223, 176, 0.7);
  display: grid;
  place-items: center;
}

.mint-drag-hint {
  font: 500 11.5px/1.3 var(--mono);
  color: var(--muted);
}

/* Right Mint Console */
.mint-console {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mint-progress-block {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(31, 61, 168, 0.12);
}
.mint-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 7px;
}
.mint-progress-head b {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--ink);
}
.mint-bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(31, 61, 168, 0.10);
  overflow: hidden;
}
.mint-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cobalt), #3b6bf7, #d9b56f);
  transition: width 0.35s ease;
}
.mint-progress-sub {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--muted);
}

.mint-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.mint-stat {
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(20, 26, 23, 0.08);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mint-stat span {
  font-size: 11px;
  color: var(--muted);
}
.mint-stat b {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

/* Wildcard stock, called out in gold: it is the one card that pays tax. */
.mint-wild {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 8px;
  padding: 9px 11px 10px;
  border: 1px solid rgba(217, 181, 111, 0.5);
  border-radius: 12px;
  background: rgba(217, 181, 111, 0.12);
}
.mint-wild-mark {
  color: #c9a25b;
  font-size: 12px;
}
.mint-wild-name {
  color: #8a6a2f;
  font-family: var(--latin);
  font-size: 11px;
  letter-spacing: 0.06em;
}
.mint-wild-num {
  margin-left: auto;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.mint-wild-num i {
  margin-left: 3px;
  font-style: normal;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}
.mint-wild small {
  flex-basis: 100%;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
}

.mint-qty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.mint-qty-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}
.mint-qty-btns {
  display: flex;
  gap: 6px;
}
.mint-qty {
  min-width: 38px;
  height: 32px;
  border-radius: 9px;
  border: 1px solid rgba(31, 61, 168, 0.18);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: 600 13px/1 var(--mono);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.mint-qty:hover { border-color: var(--cobalt); color: var(--cobalt); }
.mint-qty.is-on {
  background: var(--cobalt);
  border-color: var(--cobalt);
  color: #ffffff;
}

.mint-submit {
  width: 100%;
  justify-content: center;
}

.mint-feedback {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

@media (max-width: 820px) {
  .assay-mint .mint-body {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* =========================================================
   Full-Screen Alchemical Multi-Card Reveal Modal
   ========================================================= */

.mint-modal[hidden] { display: none; }
.mint-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 36px);
  overflow-y: auto;
  animation: mintModalIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes mintModalIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.mint-modal-backdrop {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 600px at 50% 30%, rgba(31, 61, 168, 0.32), transparent 68%),
    radial-gradient(640px 460px at 50% 72%, rgba(217, 181, 111, 0.16), transparent 72%),
    rgba(6, 9, 18, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.mint-modal-aura {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(760px, 92vw);
  height: min(760px, 92vw);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 223, 176, 0.16) 0%, rgba(59, 107, 247, 0.12) 42%, transparent 70%);
  filter: blur(28px);
  pointer-events: none;
  animation: mintModalPulse 3.6s ease-in-out infinite alternate;
}
@keyframes mintModalPulse {
  from { transform: translate(-50%, -50%) scale(0.92); opacity: 0.72; }
  to   { transform: translate(-50%, -50%) scale(1.08); opacity: 1; }
}

.mint-modal-shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1160px;
  max-height: 92vh;
  margin: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(20px, 2.8vw, 32px);
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(18, 25, 46, 0.92) 0%, rgba(10, 14, 28, 0.96) 100%);
  border: 1px solid rgba(217, 181, 111, 0.38);
  box-shadow:
    0 36px 90px rgba(0, 0, 0, 0.72),
    0 0 60px rgba(41, 82, 204, 0.22),
    inset 0 1px 0 rgba(245, 223, 176, 0.28);
  color: #f3efe6;
  overflow-y: auto;
}

.mint-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(217, 181, 111, 0.2);
}
.mint-modal-eyebrow {
  display: block;
  font: 600 11px/1.3 var(--mono);
  letter-spacing: 0.18em;
  color: #d9b56f;
  margin-bottom: 4px;
}
.mint-modal-head h2 {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff8e7;
}
.mint-modal-sub {
  margin-top: 4px;
  font-size: 13.5px;
  color: #a9b6cc;
}
/* Wildcard count in the reveal window: pool left while sealed, hits after. */
.mint-modal-wild {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px;
  margin-top: 10px;
  padding: 4px 11px 5px;
  border: 1px solid rgba(217, 181, 111, 0.42);
  border-radius: 999px;
  background: rgba(217, 181, 111, 0.14);
  font-size: 12px;
  line-height: 1.6;
  color: #e6d3a6;
}
.mint-modal-wild[hidden] { display: none; }
.mint-modal-wild b {
  color: #f5dfb0;
  font-variant-numeric: tabular-nums;
}
.mint-modal-wild small {
  color: #b9a880;
  font-size: 11.5px;
}
.mint-modal-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(217, 181, 111, 0.36);
  background: rgba(255, 255, 255, 0.06);
  color: #f5dfb0;
  font-size: 16px;
  cursor: pointer;
  flex: none;
  transition: background 0.15s ease, transform 0.15s ease;
}
.mint-modal-close:hover {
  background: rgba(217, 181, 111, 0.2);
  transform: scale(1.06);
}
.mint-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.mint-modal-sound {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(217, 181, 111, 0.36);
  background: rgba(255, 255, 255, 0.06);
  color: #f5dfb0;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  flex: none;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.mint-modal-sound:hover {
  background: rgba(217, 181, 111, 0.2);
  transform: scale(1.06);
}
.mint-modal-sound.is-muted {
  color: #6b7488;
  border-color: rgba(148, 160, 180, 0.3);
  opacity: 0.62;
}
.mint-modal-sound.is-muted::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  top: 50%;
  height: 1.4px;
  background: currentColor;
  transform: rotate(-38deg);
  pointer-events: none;
}
.mint-modal-sound {
  position: relative;
}

/* Responsive card grid for 1 / 3 / 5 / 10 draws */
.mint-modal-grid {
  display: grid;
  gap: 18px;
  justify-items: center;
  align-items: center;
  padding: 6px 2px 10px;
}
.mint-modal-grid[data-count="1"] {
  grid-template-columns: 1fr;
}
.mint-modal-grid[data-count="10"] {
  gap: 14px 16px;
}
.mint-modal-grid[data-count="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.mint-modal-grid[data-count="5"],
.mint-modal-grid[data-count="10"] {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* Individual pop-out reveal card (Bridge 57:89 ratio) */
.reveal-slot {
  perspective: 1100px;
  width: 100%;
  max-width: 196px;
  opacity: 0;
  transform: translateY(24px) scale(0.86);
  animation: revealSlotIn 0.48s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--enter-delay, 0ms);
}
.mint-modal-grid[data-count="1"] .reveal-slot {
  max-width: 248px;
}
@keyframes revealSlotIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.reveal-card {
  --mc-accent: #2b56d6;
  --mc-soft: #7ce8ff;
  --mc-deep: #13256d;
  position: relative;
  width: 100%;
  aspect-ratio: 57 / 89;
  transform-style: preserve-3d;
  transform: rotateY(180deg);
  transition: transform 0.78s cubic-bezier(0.2, 0.85, 0.25, 1);
  cursor: pointer;
}
.reveal-card.is-flipped {
  transform: rotateY(0deg);
}
.reveal-card.is-flipped:hover {
  transform: translateY(-6px) rotateX(4deg) rotateY(-5deg) scale(1.03);
}

.reveal-card .mc-face {
  box-shadow: 0 18px 36px -10px rgba(0, 0, 0, 0.65);
}
.reveal-card.is-flipped .mc-front {
  box-shadow:
    0 0 24px color-mix(in srgb, var(--mc-accent) 68%, transparent),
    0 0 44px rgba(245, 223, 176, 0.22),
    0 20px 38px -10px rgba(0, 0, 0, 0.7);
}
.reveal-card.is-none.is-flipped .mc-front {
  box-shadow:
    0 0 32px rgba(245, 223, 176, 0.92),
    0 0 64px rgba(217, 181, 111, 0.55),
    0 20px 40px -10px rgba(0, 0, 0, 0.75);
}

.reveal-ssr-tag {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  padding: 2px 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #c9a25b, #fff0c2, #c9a25b);
  color: #1a1204;
  font: 700 10px/1.3 var(--mono);
  letter-spacing: 0.12em;
  box-shadow: 0 4px 14px rgba(245, 223, 176, 0.65);
  white-space: nowrap;
}

.mint-modal-grid[hidden],
.mint-modal-foot[hidden] { display: none; }

.mint-modal-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(217, 181, 111, 0.2);
}
.mint-modal-btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(217, 181, 111, 0.36);
  color: #f5dfb0;
}
.mint-modal-btn-ghost:hover {
  background: rgba(217, 181, 111, 0.18);
  border-color: #f5dfb0;
}

@media (max-width: 980px) {
  .mint-modal-grid[data-count="5"],
  .mint-modal-grid[data-count="10"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .mint-modal-grid[data-count="3"],
  .mint-modal-grid[data-count="5"],
  .mint-modal-grid[data-count="10"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

/* =========================================================
   Sealed Booster Packs (one pack per card, tear individually)
   ========================================================= */

.pack-slot {
  width: 100%;
  max-width: 196px;
  display: grid;
  place-items: center;
  perspective: 1000px;
  opacity: 0;
  transform: translateY(22px) scale(0.88);
  animation: revealSlotIn 0.48s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--enter-delay, 0ms);
}
.mint-modal-grid[data-count="1"] .pack-slot {
  max-width: 244px;
}
.mint-modal-grid[data-count="3"] .pack-slot {
  max-width: 176px;
}
.mint-modal-grid[data-count="5"] .pack-slot {
  max-width: 158px;
}
.mint-modal-grid[data-count="10"] .pack-slot {
  max-width: 128px;
}

@property --tear {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

.mini-pack {
  --tear: 0;
  position: relative;
  width: 100%;
  aspect-ratio: 57 / 89;
  border-radius: 13px;
  border: 1.4px solid rgba(217, 181, 111, 0.62);
  background:
    radial-gradient(150px 150px at 50% 46%, rgba(59, 107, 247, 0.34), transparent 70%),
    linear-gradient(160deg, #17213e 0%, #0d1428 52%, #090d1b 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.62)) drop-shadow(0 0 16px rgba(41, 82, 204, 0.28));
  transition: transform 0.2s ease, filter 0.2s ease;
}
.mini-pack:hover {
  transform: translateY(-6px);
  filter: drop-shadow(0 20px 36px rgba(0, 0, 0, 0.68)) drop-shadow(0 0 26px rgba(245, 223, 176, 0.5));
}
.mini-pack.is-dragging,
.mini-pack.is-tearing {
  overflow: visible;
  cursor: grabbing;
  transform: none;
}
.mini-pack.is-pulling {
  transform: translateY(-4px) scale(1.035);
  filter:
    drop-shadow(0 20px 36px rgba(0, 0, 0, 0.68))
    drop-shadow(0 0 calc(var(--tear) * 34px) rgba(245, 223, 176, calc(var(--tear) * 0.85)));
}

/* Serrated foil crimp edges */
.mini-crimp {
  flex: none;
  height: 12px;
  background: repeating-linear-gradient(
    90deg,
    rgba(245, 223, 176, 0.3) 0px,
    rgba(245, 223, 176, 0.3) 2.5px,
    rgba(12, 18, 36, 0.82) 2.5px,
    rgba(12, 18, 36, 0.82) 5px
  );
  border-bottom: 1px solid rgba(217, 181, 111, 0.34);
}
.mini-crimp-bottom {
  border-bottom: none;
  border-top: 1px solid rgba(217, 181, 111, 0.34);
  margin-top: auto;
}

/* Tear-off top strip */
.mini-rip {
  flex: none;
  position: relative;
  z-index: 5;
  padding: 7px 4px;
  text-align: center;
  background: linear-gradient(90deg, rgba(217, 181, 111, 0.06), rgba(245, 223, 176, 0.22), rgba(217, 181, 111, 0.06));
  border-bottom: 2px dashed rgba(245, 223, 176, 0.75);
  transform-origin: left 140%;
  transform:
    translate(calc(var(--tear) * 44px), calc(var(--tear) * -46px))
    rotate(calc(var(--tear) * -26deg));
  opacity: calc(1 - max(0, var(--tear) - 0.62) * 3);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.42s ease;
  will-change: transform;
}
.mini-pack.is-dragging .mini-rip,
.mini-pack.is-tearing .mini-rip {
  transition: none;
}
.mini-rip span {
  display: inline-block;
  font: 600 7px/1 var(--mono);
  letter-spacing: 0.06em;
  color: #f7e4bc;
  white-space: nowrap;
  animation: ripHintNudge 2.1s ease-in-out infinite;
}
.mini-pack.is-pulling .mini-rip span,
.mini-pack.is-tearing .mini-rip span {
  animation: none;
}
@keyframes ripHintNudge {
  0%, 100% { transform: translateX(0); opacity: 0.82; }
  50%      { transform: translateX(5px); opacity: 1; }
}

/* Glowing seam left behind by the peeling strip */
.mini-seam {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 246, 221, 0), #fff6dd 50%, rgba(255, 246, 221, 0));
  box-shadow: 0 0 12px 2px rgba(245, 223, 176, 0.9), 0 0 30px 8px rgba(59, 107, 247, 0.42);
  opacity: calc(var(--tear) * 1.25);
  transform: scaleX(calc(0.12 + var(--tear) * 0.88));
  transform-origin: left center;
}
.mini-seam::after {
  content: "";
  position: absolute;
  inset: 0 0 -12px;
  background-image: radial-gradient(circle, rgba(255, 250, 235, 0.95) 0 1px, transparent 1.7px);
  background-size: 13px 100%;
  background-repeat: repeat-x;
  opacity: calc(max(0, var(--tear) - 0.28) * 1.5);
}

.mini-body {
  position: relative;
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 8px 12px;
}

.mini-foil {
  position: absolute;
  inset: -40%;
  background: linear-gradient(118deg, transparent 30%, rgba(245, 223, 176, 0.3) 50%, rgba(124, 232, 255, 0.16) 58%, transparent 72%);
  mix-blend-mode: screen;
  animation: mcSweep 4.8s cubic-bezier(0.35, 0, 0.2, 1) infinite;
  pointer-events: none;
}

.mini-emblem {
  position: relative;
  z-index: 2;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3b6bf7 0%, #162a78 60%, #0b1336 100%);
  border: 1.3px solid rgba(245, 223, 176, 0.85);
  display: grid;
  place-items: center;
  box-shadow: 0 0 22px rgba(59, 107, 247, 0.55), inset 0 0 14px rgba(245, 223, 176, 0.22);
}
.mini-emblem svg { width: 30px; height: 30px; }
.mint-modal-grid[data-count="1"] .mini-emblem { width: 84px; height: 84px; }
.mint-modal-grid[data-count="1"] .mini-emblem svg { width: 40px; height: 40px; }
.mint-modal-grid[data-count="10"] .mini-emblem { width: 52px; height: 52px; }
.mint-modal-grid[data-count="10"] .mini-emblem svg { width: 25px; height: 25px; }

.mini-emblem-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px dashed rgba(217, 181, 111, 0.6);
  animation: mintSealSpin 16s linear infinite;
}

.mini-pill {
  position: relative;
  z-index: 2;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(217, 181, 111, 0.16);
  border: 1px solid rgba(245, 223, 176, 0.5);
  color: #fff3d6;
  font: 600 9px/1.3 var(--mono);
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.mint-modal-grid[data-count="1"] .mini-pill { font-size: 11px; padding: 5px 14px; }

.mini-wordmark {
  position: relative;
  z-index: 2;
  font: 600 6.5px/1 var(--mono);
  letter-spacing: 0.16em;
  color: #9aa7bd;
  text-align: center;
}
.mint-modal-grid[data-count="1"] .mini-wordmark { font-size: 8.5px; }

/* Per-pack flash burst */
.mini-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 190%;
  height: 190%;
  margin: -95% 0 0 -95%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 252, 238, 0.98) 0%, rgba(245, 223, 176, 0.8) 26%, rgba(59, 107, 247, 0.42) 56%, transparent 74%);
  opacity: 0;
  pointer-events: none;
  z-index: 12;
  filter: blur(4px);
}
.mini-pack.is-tearing .mini-burst {
  animation: miniBurstOut 0.78s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes miniBurstOut {
  0%   { opacity: 0; transform: scale(0.35); }
  32%  { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.5); }
}

/* Tear: kick, then the emptied pack drops away */
.mini-pack.is-tearing {
  animation: miniPackTear 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  pointer-events: none;
  transform-origin: 50% 30%;
}
@keyframes miniPackTear {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
  14%  { transform: translate(-4px, -10px) rotate(-3deg) scale(1.07); opacity: 1; }
  30%  { transform: translate(3px, 3px) rotate(2.6deg) scale(0.985); opacity: 1; }
  62%  { transform: translate(-2px, 12px) rotate(-4deg) scale(0.95); opacity: 0.9; }
  100% { transform: translate(-1px, 54px) rotate(-10deg) scale(0.78); opacity: 0; }
}
.mini-pack.is-tearing .mini-body {
  animation: miniBodySplit 0.62s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes miniBodySplit {
  0%   { transform: translateY(0) rotateX(0deg); }
  38%  { transform: translateY(2px) rotateX(0deg); }
  100% { transform: translateY(14px) rotateX(16deg); }
}

/* Flash of escaping light through the opened seam */
.mini-pack.is-tearing .mini-seam {
  animation: miniSeamFlare 0.5s ease-out forwards;
}
@keyframes miniSeamFlare {
  0%   { opacity: 1; transform: scaleX(0.6); filter: brightness(1); }
  28%  { opacity: 1; transform: scaleX(1); filter: brightness(2.1); }
  100% { opacity: 0; transform: scaleX(1.15) translateY(-12px); filter: brightness(2.4); }
}

.mint-modal-btn-tearall {
  background: linear-gradient(135deg, #d9b56f, #b08a3e);
  border-color: #f5dfb0;
  color: #141005;
  font-weight: 600;
}

@media (max-width: 560px) {
  .mint-modal-head {
    gap: 10px;
  }
  .mint-modal-eyebrow {
    font-size: 9px;
    letter-spacing: 0.1em;
  }
  .mint-modal-head h2 {
    font-size: 19px;
    letter-spacing: 0.02em;
  }
  .mint-modal-sub {
    font-size: 12px;
  }
  .mint-modal-actions {
    gap: 8px;
  }
  .mint-modal-sound,
  .mint-modal-close {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
}






/* ---- Wallet connect ---------------------------------------------------- */
.wallet-wrap {
  position: relative;
  flex: none;
}

.wallet-btn {
  /* The fill lives in a variable so the sheen layer can ride on top of any state. */
  --wb-base: linear-gradient(180deg, #ffffff, rgba(255, 255, 255, 0.72));
  --wb-edge: rgba(31, 61, 168, 0.22);

  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 4px 15px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--wb-edge);
  background-image:
    linear-gradient(115deg, rgba(56, 189, 248, 0) 36%, rgba(56, 189, 248, 0.20) 49%, rgba(31, 61, 168, 0.10) 57%, rgba(56, 189, 248, 0) 69%),
    var(--wb-base);
  background-size: 230% 100%, 100% 100%;
  background-position: 135% 0, 0 0;
  background-repeat: no-repeat;
  color: var(--ink);
  font: 600 12.5px/1 var(--mono);
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 18px -14px rgba(24, 39, 75, 0.55);
  transition:
    background-position 0.62s cubic-bezier(0.22, 0.7, 0.3, 1),
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}
.wallet-btn:hover {
  --wb-base: linear-gradient(180deg, #ffffff, rgba(238, 244, 255, 0.94));
  --wb-edge: rgba(31, 61, 168, 0.42);
  background-position: -35% 0, 0 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 14px 24px -16px rgba(31, 61, 168, 0.7);
  transform: translateY(-1px);
}
.wallet-btn:active { transform: translateY(0) scale(0.985); }
.wallet-btn:focus-visible {
  outline: 2px solid rgba(31, 61, 168, 0.55);
  outline-offset: 2px;
}

.wallet-btn[data-state="linked"] {
  --wb-base: linear-gradient(180deg, #ffffff, rgba(232, 240, 255, 0.94));
  --wb-edge: rgba(31, 61, 168, 0.3);
  color: var(--cobalt);
}
.wallet-btn[data-state="linked"]:hover { --wb-edge: rgba(31, 61, 168, 0.5); }
.wallet-btn[data-state="wrong"] {
  --wb-base: linear-gradient(180deg, #ffffff, rgba(255, 240, 234, 0.94));
  --wb-edge: rgba(168, 69, 43, 0.42);
  color: #a8452b;
}
.wallet-btn[data-state="wrong"]:hover { --wb-edge: rgba(168, 69, 43, 0.62); }

/* The badge carries the state colour; the label carries the state text. */
.wallet-glyph {
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(148deg, #3d6ae8, #1f3da8 58%, #0ea5e9);
  box-shadow: 0 3px 8px -3px rgba(31, 61, 168, 0.75);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}
.wallet-glyph svg { width: 13px; height: 13px; }
.wallet-btn[data-state="linked"] .wallet-glyph {
  background: linear-gradient(148deg, #2fbd7e, #12855a);
  box-shadow: 0 0 0 0 rgba(28, 157, 99, 0.55);
  animation: walletPulse 2.4s ease-out infinite;
}
.wallet-btn[data-state="wrong"] .wallet-glyph {
  background: linear-gradient(148deg, #e0894a, #b8492a);
  box-shadow: 0 3px 8px -3px rgba(184, 73, 42, 0.7);
}
@keyframes walletPulse {
  0%   { box-shadow: 0 0 0 0 rgba(28, 157, 99, 0.5); }
  70%  { box-shadow: 0 0 0 7px rgba(28, 157, 99, 0); }
  100% { box-shadow: 0 0 0 0 rgba(28, 157, 99, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .wallet-btn,
  .wallet-btn:hover { transition: none; transform: none; }
  .wallet-btn[data-state="linked"] .wallet-glyph { animation: none; }
}

/* Connected popover */
.wallet-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 90;
  width: 260px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(31, 61, 168, 0.16);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 44px rgba(24, 39, 75, 0.18), 0 2px 6px rgba(24, 39, 75, 0.06);
  backdrop-filter: blur(12px);
  animation: walletMenuIn 0.16s ease-out;
}
.wallet-menu[hidden] { display: none; }
@keyframes walletMenuIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.wallet-menu-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 0 4px 9px;
  border-bottom: 1px solid var(--rule);
}
.wallet-menu-name {
  font: 600 13px/1.3 var(--sans);
  color: var(--ink);
}
.wallet-menu-chain {
  padding: 2px 8px;
  border-radius: 999px;
  font: 600 10px/1.6 var(--mono);
  letter-spacing: 0.06em;
  color: #1c6b45;
  background: rgba(28, 157, 99, 0.12);
  border: 1px solid rgba(28, 157, 99, 0.3);
}
.wallet-menu-chain.is-wrong {
  color: #a8452b;
  background: rgba(196, 85, 47, 0.12);
  border-color: rgba(196, 85, 47, 0.32);
}
.wallet-menu-addr {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 10px 0 4px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px dashed rgba(31, 61, 168, 0.26);
  background: rgba(31, 61, 168, 0.04);
  color: var(--ink);
  font: 500 11.5px/1.2 var(--mono);
  cursor: pointer;
  text-align: left;
}
.wallet-menu-addr span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wallet-menu-addr em {
  font-style: normal;
  font-size: 10.5px;
  color: var(--cobalt);
  flex: none;
}
.wallet-menu-addr:hover { background: rgba(31, 61, 168, 0.09); }
.wallet-menu-item {
  width: 100%;
  margin-top: 4px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--body);
  font: 500 12.5px/1.2 var(--sans);
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}
.wallet-menu-item:hover { background: rgba(31, 61, 168, 0.07); color: var(--ink); }
.wallet-menu-item.is-danger:hover { background: rgba(196, 85, 47, 0.1); color: #a8452b; }
.wallet-menu-item[hidden] { display: none; }

/* Connect sheet */
.wallet-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.wallet-modal[hidden] { display: none; }
.wallet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 28, 46, 0.38);
  backdrop-filter: blur(6px);
  animation: walletFade 0.2s ease;
}
@keyframes walletFade { from { opacity: 0; } to { opacity: 1; } }
.wallet-sheet {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 24px;
  border-radius: 22px;
  background: #fbfcfd;
  border: 1px solid rgba(31, 61, 168, 0.14);
  box-shadow: 0 30px 70px rgba(18, 28, 46, 0.3);
  animation: walletSheetIn 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes walletSheetIn {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.wallet-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.wallet-sheet-eyebrow {
  display: block;
  font: 600 10px/1.4 var(--mono);
  letter-spacing: 0.16em;
  color: var(--cobalt);
  margin-bottom: 5px;
}
.wallet-sheet h2 {
  font-size: 21px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.wallet-sheet-sub {
  margin-top: 5px;
  font-size: 12.5px;
  color: var(--muted);
}
.wallet-sheet-close {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.wallet-sheet-close:hover { background: rgba(31, 61, 168, 0.07); color: var(--ink); }

.wallet-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.wallet-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--rule);
  background: #fff;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.wallet-opt.is-primary {
  border-color: rgba(31, 61, 168, 0.32);
  background: linear-gradient(180deg, rgba(31, 61, 168, 0.055), #fff 72%);
}
.wallet-opt:hover {
  border-color: rgba(31, 61, 168, 0.42);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(31, 61, 168, 0.1);
}
.wallet-opt[disabled] {
  cursor: default;
  opacity: 0.62;
  transform: none;
  box-shadow: none;
}
.wallet-opt-ico {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  overflow: hidden;
  background: #eef1f6;
  box-shadow: inset 0 0 0 1px rgba(24, 39, 75, 0.08);
}
.wallet-opt-ico svg {
  width: 100%;
  height: 100%;
  display: block;
}
.wallet-opt-tit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.wallet-opt-rec {
  font-style: normal;
  font: 600 9.5px/1 var(--mono);
  letter-spacing: 0.06em;
  padding: 3px 5px;
  border-radius: 5px;
  color: #1c6b45;
  background: rgba(28, 157, 99, 0.12);
  border: 1px solid rgba(28, 157, 99, 0.3);
}
.wallet-opt-name {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font: 600 13.5px/1.2 var(--sans);
  color: var(--ink);
}
.wallet-opt-name small {
  font: 500 11px/1.2 var(--mono);
  color: var(--muted);
  letter-spacing: 0.02em;
}
.wallet-opt-go {
  margin-left: auto;
  font: 600 11.5px/1 var(--mono);
  color: var(--cobalt);
  flex: none;
}
.wallet-opt.is-missing .wallet-opt-go { color: var(--muted); }
.wallet-opt.is-checking { pointer-events: none; opacity: 0.72; }
.wallet-install-hint {
  margin: 2px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
}
.wallet-install-hint a {
  margin-left: 4px;
  color: var(--cobalt);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.wallet-sheet-note {
  margin-top: 14px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
}

/* Toast */
.wallet-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 140;
  transform: translateX(-50%);
  max-width: min(92vw, 420px);
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(22, 32, 51, 0.94);
  color: #f4f7fb;
  font: 500 12.5px/1.4 var(--sans);
  text-align: center;
  box-shadow: 0 14px 34px rgba(12, 20, 34, 0.34);
  animation: walletToastIn 0.22s ease-out;
}
.wallet-toast[hidden] { display: none; }
@keyframes walletToastIn {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.wallet-menu-item.wallet-menu-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--cobalt);
  font-weight: 600;
}
.wallet-menu-item.wallet-menu-profile em {
  font: 600 12px/1 var(--mono);
  font-style: normal;
  opacity: 0.7;
}

/* ---- 个人中心 --------------------------------------------------------- */
.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 135;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.profile-modal[hidden] { display: none; }
.profile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 28, 46, 0.42);
  backdrop-filter: blur(7px);
  animation: walletFade 0.2s ease;
}
.profile-sheet {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 780px;
  max-height: min(88vh, 940px);
  overflow: hidden;
  background:
    radial-gradient(620px 260px at 88% -70px, rgba(186, 219, 250, 0.5), transparent 70%),
    linear-gradient(180deg, #fdfcf8, #f4f3ec);
  border: 1px solid var(--rule);
  border-radius: 20px;
  box-shadow: 0 32px 76px rgba(14, 24, 38, 0.3);
  animation: walletSheetIn 0.24s ease-out;
}
.profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 26px 15px;
  border-bottom: 1px solid var(--rule-soft);
}
.profile-eyebrow {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.profile-head h2 {
  margin-top: 5px;
  font-family: var(--sans);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.25;
  color: var(--ink);
}
.profile-close {
  flex: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  transition: background 0.18s ease, color 0.18s ease;
}
.profile-close:hover { background: rgba(31, 61, 168, 0.07); color: var(--ink); }
.profile-body {
  padding: 18px 26px 26px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* small label pair: Latin in mono, Chinese in the geometric sans */
.pf-lb-en {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6d786f;
}
.pf-lb-zh {
  display: block;
  margin-top: 3px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--muted);
}
.pf-num {
  display: block;
  margin-top: 7px;
  font-family: var(--sans);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.012em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.pf-num i {
  margin-left: 2px;
  font-style: normal;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.pf-num.is-pending {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}

/* identity */
.pf-id {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
}
.pf-identicon {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 5px;
  border-radius: 11px;
  border: 1px solid rgba(20, 26, 23, 0.08);
}
.pf-identicon i { border-radius: 1.5px; }
.pf-id-main { min-width: 0; flex: 1; }
.pf-id-name {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
}
.pf-addr {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
}
.pf-addr em {
  font-family: var(--sans);
  font-size: 11.5px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--cobalt);
  border-bottom: 1px solid currentColor;
}
.pf-net {
  flex: none;
  align-self: flex-start;
  padding: 4px 9px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: #2c6a48;
  background: #e2f2e7;
  border: 1px solid #bcdcc6;
}
.pf-net.is-wrong { color: #8a4e0d; background: #fdf0dd; border-color: #ecd0a4; }

/* asset strip */
.pf-assets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 12px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  overflow: hidden;
}
.pf-assets > div {
  padding: 12px 15px 14px;
  border-right: 1px solid var(--rule-soft);
}
.pf-assets > div:last-child { border-right: 0; }

/* sections */
.pf-sec { margin-top: 24px; }
.pf-sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--rule-soft);
}
.pf-sec-head h3 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.pf-sec-head h3 .pf-lb-zh {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.pf-sec-head h3 .pf-lb-en {
  display: inline;
  order: 2;
  margin: 0;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: #7c867e;
}
.pf-sec-head > span {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.pf-empty-line {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

/* ---- miniature NFT cards ------------------------------------------- */
.pf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 14px;
  margin-top: 14px;
  transition: max-height 0.26s ease;
}
.pf-cards.is-folded .pf-grid { overflow: hidden; }
.pf-fold {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 14px auto 0;
  padding: 5px 13px 5px 15px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--body);
  font: 500 12px/1.4 var(--sans);
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.pf-fold[hidden] { display: none; }
.pf-fold:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: #fff;
}
.pf-fold-chev { flex: none; transition: transform 0.22s ease; }
.pf-cards.is-open .pf-fold-chev { transform: rotate(180deg); }
.pf-nft {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  aspect-ratio: 360 / 562;
  border: 1px solid rgba(217, 181, 111, 0.5);
  border-radius: 9px;
  overflow: hidden;
  text-align: left;
  color: #f3efe6;
  cursor: pointer;
  background:
    radial-gradient(64% 54% at 50% 44%, color-mix(in srgb, var(--accent) 46%, transparent), transparent 72%),
    radial-gradient(52% 40% at 50% 8%, rgba(217, 181, 111, 0.17), transparent 70%),
    linear-gradient(160deg, #161f38 0%, #10172b 48%, #0b101e 100%);
  box-shadow: 0 8px 18px -8px rgba(6, 10, 20, 0.5);
  transform: translateZ(0);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  animation: pfCardIn 0.34s ease-out both;
}
@keyframes pfCardIn {
  from { opacity: 0; transform: translateY(8px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
.pf-nft:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 223, 176, 0.85);
  box-shadow: 0 16px 30px -12px rgba(6, 10, 20, 0.62);
}
.pf-nft-top {
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 3;
  background: linear-gradient(90deg, #8f6b2e 0%, #f5dfb0 26%, var(--accent) 60%, color-mix(in srgb, var(--accent) 45%, #fff) 84%, #d9b56f 100%);
}
.pf-nft-frame {
  position: absolute;
  inset: 4px;
  z-index: 2;
  border: 1px solid rgba(217, 181, 111, 0.3);
  border-radius: 5px;
  pointer-events: none;
}
.pf-nft-foil {
  position: absolute;
  inset: -40%;
  z-index: 3;
  pointer-events: none;
  mix-blend-mode: screen;
  background: linear-gradient(118deg,
    transparent 24%,
    rgba(217, 181, 111, 0.14) 36%,
    color-mix(in srgb, var(--accent) 26%, transparent) 45%,
    rgba(245, 223, 176, 0.5) 50%,
    color-mix(in srgb, var(--accent) 20%, transparent) 55%,
    rgba(217, 181, 111, 0.1) 64%,
    transparent 76%);
  animation: pfHolo 6.4s cubic-bezier(0.35, 0, 0.2, 1) infinite;
}
@keyframes pfHolo {
  0%        { transform: translateX(-95%) rotate(8deg); }
  44%, 100% { transform: translateX(95%) rotate(8deg); }
}
.pf-nft-body {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 9px 9px 8px;
}
.pf-nft-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(217, 181, 111, 0.24);
}
.pf-nft-brand {
  font-family: var(--mono);
  font-size: 5.5px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.2em;
  color: #f7e6c4;
}
.pf-nft-held {
  padding: 2px 4px;
  border: 1px solid rgba(245, 223, 176, 0.5);
  border-radius: 999px;
  background: rgba(217, 181, 111, 0.16);
  font-family: var(--mono);
  font-size: 7.5px;
  font-weight: 500;
  line-height: 1;
  color: #fff3d6;
}
.pf-nft-num {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.08em;
  background: linear-gradient(180deg, #fff8e7 0%, #d9b56f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.pf-nft-orb {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 0;
}
.pf-nft-aura {
  position: absolute;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle,
    color-mix(in srgb, var(--accent) 62%, transparent) 0%,
    rgba(217, 181, 111, 0.2) 46%,
    transparent 72%);
  animation: pfAura 5.5s ease-in-out infinite;
}
@keyframes pfAura {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50%      { transform: scale(1.09); opacity: 1; }
}
.pf-nft-sym {
  position: relative;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 600;
  line-height: 1;
  background: linear-gradient(180deg, #fffaf0 0%, #e7cd93 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent);
}
.pf-nft-name {
  font-family: var(--mono);
  font-size: 6.5px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #cfc4a8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pf-nft-zh {
  margin-top: 1px;
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.3;
  color: #f3efe6;
}
.pf-nft-flag {
  align-self: flex-start;
  margin-top: 4px;
  padding: 2px 4px;
  border: 1px solid rgba(245, 223, 176, 0.34);
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 6.5px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: #e9d3a4;
  white-space: nowrap;
}
.pf-nft-flag.is-live {
  color: #bfe6cc;
  border-color: rgba(150, 220, 175, 0.42);
}
.pf-nft.is-retired { filter: grayscale(0.42) brightness(0.9); }
.pf-nft.is-retired .pf-nft-flag { color: #b8bdc4; border-color: rgba(184, 189, 196, 0.4); }
.pf-nft.is-static { cursor: default; }
.pf-nft.is-static:hover { transform: none; }
.pf-nft.is-wild { border-color: rgba(233, 205, 138, 0.72); }

/* family ladder */
.pf-fams { margin-top: 4px; }
.pf-fam {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--rule-soft);
}
.pf-fam:last-child { border-bottom: 0; }
.pf-fam-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--body);
}
.pf-fam-name i {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cat);
}
.pf-fam-name b { font-weight: 600; color: var(--ink); }
.pf-fam-name em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.pf-fam-now {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: var(--cobalt);
  font-variant-numeric: tabular-nums;
}
.pf-fam-next {
  min-width: 112px;
  text-align: right;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
}
.pf-fam.is-max .pf-fam-next { color: #2c6a48; }

/* smelt */
.pf-smelt {
  padding: 15px 17px 16px;
  border: 1px dashed #d8c48a;
  border-radius: 14px;
  background: linear-gradient(180deg, #fdf8ea, #faf2dc);
}
.pf-smelt .pf-sec-head { border-bottom: 0; padding-bottom: 0; }
.pf-smelt-count {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin-top: 9px;
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--body);
}
.pf-smelt-count .pf-num {
  display: inline;
  margin: 0;
  font-size: 14px;
  color: var(--ink);
}
.pf-smelt .btn { width: 100%; margin-top: 13px; }
.pf-smelt-note {
  margin-top: 9px;
  text-align: center;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--muted);
}
.pf-smelt-note.is-ready { color: #2c6a48; }

/* empty state */
.pf-empty {
  padding: 36px 8px 30px;
  text-align: center;
}
.pf-empty-mark {
  display: block;
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1;
  color: var(--cobalt);
  opacity: 0.5;
}
.pf-empty h3 {
  margin-top: 14px;
  font-family: var(--sans);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.pf-empty p {
  max-width: 34ch;
  margin: 8px auto 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}
.pf-empty .btn { margin-top: 18px; }

@media (max-width: 1000px) {
  .wallet-btn { padding: 4px 12px 4px 4px; font-size: 11.5px; gap: 7px; }
  .wallet-glyph { width: 21px; height: 21px; }
  .wallet-glyph svg { width: 12px; height: 12px; }
}

@media (max-width: 620px) {
  .profile-modal { padding: 0; align-items: flex-end; }
  .profile-sheet {
    max-width: none;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
    border-bottom: 0;
  }
  .profile-head { padding: 18px 18px 13px; }
  .profile-head h2 { font-size: 21px; }
  .profile-body { padding: 14px 18px 22px; }
  .pf-assets { grid-template-columns: repeat(2, 1fr); }
  .pf-assets > div { border-bottom: 1px solid var(--rule-soft); }
  .pf-assets > div:nth-child(2) { border-right: 0; }
  .pf-assets > div:nth-child(3),
  .pf-assets > div:nth-child(4) { border-bottom: 0; }
  .pf-grid { grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 11px; }
  .pf-nft-sym { font-size: 23px; }
  .pf-fam { grid-template-columns: 1fr auto; row-gap: 2px; }
  .pf-fam-next { grid-column: 1 / -1; text-align: left; min-width: 0; }
}
@media (max-width: 520px) {
  .wallet-label { max-width: 92px; overflow: hidden; text-overflow: ellipsis; }
  .wallet-menu { width: clamp(200px, calc(100vw - 32px), 260px); }
  .wallet-sheet { padding: 20px; border-radius: 18px; }
}
