@import url("https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600&family=Noto+Sans+SC:wght@400;500;700&family=Noto+Serif+SC:wght@600&family=Ma+Shan+Zheng&display=swap");

/* Tianyan (天衍) components. Every value comes from tokens.css; nothing here re-declares a token. */

.wd-root, .wd-root * { box-sizing: border-box; }
.wd-root { font-family: var(--font-sans); color: var(--ink); -webkit-font-smoothing: antialiased; }

.wd-mist {
  background:
    radial-gradient(70% 45% at 12% 8%, var(--bloom-warm), transparent 70%),
    radial-gradient(60% 50% at 92% 78%, var(--bloom-cool), transparent 70%),
    linear-gradient(180deg, var(--mist-sky) 0%, var(--mist) 45%, var(--mist-blush) 100%);
  color: var(--ink);
  font-family: var(--font-sans);
}

/* Frosted glass: every panel, pill and round button */
.wd-glass, .wd-card, .wd-composer, .wd-tabbar, .wd-chip, .wd-root-badge,
.wd-slip, .wd-banner, .wd-btn--icon, .wd-btn--secondary, .wd-btn--danger, .wd-composer__tool,
.wd-composer__input, .wd-well {
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
}
.wd-glass { background: var(--surface); border-radius: var(--radius-md); color: var(--ink); }

.wd-focusable:focus-visible,
.wd-btn:focus-visible, .wd-chip:focus-visible, .wd-tab:focus-visible,
.wd-card:focus-visible, .wd-slip:focus-visible, .wd-composer__input:focus-visible {
  outline: 2px solid var(--qing);
  outline-offset: 2px;
}

/* Icon */
.wd-icon { display: inline-block; flex: none; vertical-align: middle; }

/* Button */
.wd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: 44px; padding: 0 var(--space-5);
  border: 0; border-radius: var(--radius-pill);
  font: 500 15px/1 var(--font-sans);
  cursor: pointer; transition: transform 120ms ease, background-color 160ms ease;
}
.wd-btn:active { transform: scale(0.97); }
.wd-btn--primary { background: var(--qing); color: var(--on-qing); }
.wd-btn--secondary { background: var(--surface); color: var(--ink); }
.wd-btn--ghost { background: transparent; color: var(--qing); }
.wd-btn--danger { background: var(--surface); color: var(--danger); }
.wd-btn--sm { height: 36px; padding: 0 var(--space-4); font-size: 13px; }
.wd-btn--icon { width: 44px; padding: 0; background: var(--surface-sunk); color: var(--ink); }
.wd-btn--icon.wd-btn--sm { width: 36px; }
.wd-btn--icon.wd-btn--primary {
  background: radial-gradient(120% 120% at 30% 20%, var(--qing-glow) 0%, var(--qing) 70%);
  color: var(--on-qing);
}
.wd-btn:disabled { background: var(--surface-sunk); color: var(--ink-faint); box-shadow: none; cursor: default; transform: none; }

/* IntroFilm (开场): the opening film, then a white flash into the app. */
.wd-film { position: relative; width: 100%; height: 100%; min-height: 560px; overflow: hidden; background: #fffaf0; color: #fff; }
.wd-film__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.wd-film__words { position: absolute; inset: 0; pointer-events: none; transition: opacity 200ms linear; }
.wd-film__title { position: absolute; top: 9%; right: 12%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.wd-film__name {
  writing-mode: vertical-rl; font: 400 64px/1 'Ma Shan Zheng', var(--font-serif); letter-spacing: .12em; color: #fff;
  text-shadow: 0 2px 14px rgb(40 60 110 / .55), 0 0 30px rgb(255 255 255 / .35);
}
.wd-film__title .wd-film__seal { animation: none; opacity: 1; }
.wd-film__verse {
  position: absolute; left: 0; right: 0; bottom: 22%; text-align: center;
  font: 400 24px/30px 'Ma Shan Zheng', var(--font-serif); letter-spacing: .24em; color: #fff;
  text-shadow: 0 2px 12px rgb(60 50 30 / .45);
}
.wd-film__bar { position: absolute; top: 14px; right: 14px; display: flex; gap: 8px; z-index: 3; }
.wd-film__bar .wd-film__sound { position: relative; top: auto; right: auto; background: rgb(0 0 0 / .22); color: #fff; border-color: rgb(255 255 255 / .45); }
.wd-film__skip {
  height: 34px; padding: 0 14px; border: 1px solid rgb(255 255 255 / .45); border-radius: 999px;
  background: rgb(0 0 0 / .22); color: #fff; font: 400 12px/1 var(--font-sans); letter-spacing: .2em; cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.wd-film__skip:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.wd-film__start { position: absolute; left: 0; right: 0; bottom: 9%; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.wd-film__enter { background: rgb(255 255 255 / .18); }
.wd-film__note { position: absolute; left: 0; right: 0; bottom: 3.5%; z-index: 2; text-align: center; font: 400 11px/14px var(--font-sans); color: rgb(255 255 255 / .8); text-shadow: 0 1px 4px rgb(0 0 0 / .35); }
/* The film's own end is white; on skip the white rises fast to meet it. */
.wd-film__white { position: absolute; inset: 0; z-index: 5; background: #fffdf6; opacity: 0; pointer-events: none; transition: opacity 260ms ease-in; }
.wd-film--flash .wd-film__white { opacity: 1; }
.wd-whiteflash { position: absolute; inset: 0; z-index: 999; background: #fffdf6; pointer-events: none; animation: wd-whiteflash 1100ms cubic-bezier(.4,0,.2,1) both; }
@keyframes wd-whiteflash { 0% { opacity: 1; } 25% { opacity: 1; } 100% { opacity: 0; } }

/* Shanmen (山门): the opening screen. */
.wd-sm { position: relative; width: 100%; height: 100%; min-height: 560px; overflow: hidden; background: #05060d; color: #f4efe4; isolation: isolate; }
.wd-sm__sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wd-sm__title {
  position: absolute; top: 11%; right: 13%; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.wd-sm__name {
  writing-mode: vertical-rl; font: 400 64px/1 'Ma Shan Zheng', var(--font-serif); letter-spacing: .12em; color: #f4efe4;
  text-shadow: 0 0 24px rgb(255 240 210 / .35), 0 2px 8px rgb(0 0 0 / .5);
  animation: wd-sm-ink 2.2s cubic-bezier(.2,.7,.2,1) .3s both;
}
/* 朱印: a small red seal under the title. */
.wd-sm__seal {
  display: grid; grid-template-rows: 1fr 1fr; place-items: center; width: 26px; height: 40px; border-radius: 3px;
  background: #b3342b; color: #f6e8d6; font: 600 12px/1 var(--font-serif); transform: rotate(-4deg);
  box-shadow: inset 0 0 0 1.5px rgb(246 232 214 / .55); animation: wd-sm-seal .6s ease-out 2.2s both;
}
.wd-sm__seal i { font-style: normal; }
.wd-sm__lines {
  position: absolute; left: 0; right: 0; bottom: 30%; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center; animation: wd-sm-rise 1.2s ease-out 1.4s both;
}
.wd-sm__verse { font: 400 24px/30px 'Ma Shan Zheng', var(--font-serif); letter-spacing: .24em; color: #f4efe4; text-shadow: 0 2px 10px rgb(0 0 0 / .55); }
.wd-sm__sub { font: 400 12px/16px var(--font-serif); letter-spacing: .4em; color: rgb(244 239 228 / .7); text-shadow: 0 1px 6px rgb(0 0 0 / .6); }
.wd-sm__gate {
  position: absolute; left: 0; right: 0; bottom: 7%; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px;
  animation: wd-sm-rise 1.2s ease-out 1.8s both;
}
/* The gold 入道 seal-button: hold and its ring fills. */
.wd-sm__enter {
  position: relative; display: grid; place-items: center; width: 88px; height: 88px; padding: 0; border: 0; border-radius: 50%;
  background: radial-gradient(circle, rgb(20 16 10 / .55), rgb(20 16 10 / .25)); color: #f3d68b; cursor: pointer;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); touch-action: none; -webkit-user-select: none; user-select: none;
  box-shadow: 0 0 0 1px rgb(227 194 90 / .7), 0 0 26px rgb(227 194 90 / .25);
  transition: transform 160ms ease, box-shadow 200ms ease;
}
.wd-sm__enter span { position: relative; font: 400 26px/1 'Ma Shan Zheng', var(--font-serif); letter-spacing: .1em; text-shadow: 0 0 12px rgb(243 214 139 / .6); }
.wd-sm__enter svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.wd-sm__ring { fill: none; stroke: rgb(227 194 90 / .25); stroke-width: 1.5; }
.wd-sm__ring-fill { fill: none; stroke: #f3d68b; stroke-width: 2.5; stroke-linecap: round; filter: drop-shadow(0 0 6px #f3d68b); }
.wd-sm__enter--on { transform: scale(.96); box-shadow: 0 0 0 1px #f3d68b, 0 0 40px rgb(243 214 139 / .5); }
.wd-sm__enter:focus-visible { outline: 2px solid #f3d68b; outline-offset: 4px; }
.wd-sm__hint { font: 400 12px/16px var(--font-serif); letter-spacing: .3em; color: rgb(244 239 228 / .6); }
.wd-sm__hint--tap { color: #f3d68b; }
.wd-sm__note { font: 400 11px/14px var(--font-sans); color: rgb(244 239 228 / .45); }
.wd-sm__sound {
  position: absolute; top: 14px; right: 14px; z-index: 3; display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
  border: 1px solid rgb(244 239 228 / .25); border-radius: 50%; background: rgb(0 0 0 / .25); color: rgb(244 239 228 / .55); cursor: pointer;
}
.wd-sm__sound::after { content: ''; position: absolute; width: 20px; height: 1.5px; background: currentColor; transform: rotate(-45deg); border-radius: 1px; }
.wd-sm__sound--on { color: #f3d68b; border-color: rgb(243 214 139 / .6); }
.wd-sm__sound--on::after { display: none; }
.wd-sm__sound:focus-visible { outline: 2px solid #f3d68b; outline-offset: 2px; }
/* Flying: the words fall away, then the screen settles into the star system's night. */
.wd-sm__veil { position: absolute; inset: 0; z-index: 4; pointer-events: none; background: var(--mist); opacity: 0; }
.wd-sm--flying .wd-sm__title, .wd-sm--flying .wd-sm__lines, .wd-sm--flying .wd-sm__gate, .wd-sm--flying .wd-sm__sound {
  opacity: 0; transform: translateY(-24px); transition: opacity 600ms ease, transform 900ms ease;
}
.wd-sm--flying .wd-sm__veil { animation: wd-sm-veil 2.4s ease-in both; }
@keyframes wd-sm-veil { 0%, 70% { opacity: 0; } 100% { opacity: 1; } }
@keyframes wd-sm-ink { from { opacity: 0; filter: blur(14px); clip-path: inset(0 0 100% 0); } 40% { opacity: .8; } to { opacity: 1; filter: blur(0); clip-path: inset(0 0 0 0); } }
@keyframes wd-sm-seal { from { opacity: 0; transform: rotate(-4deg) scale(1.6); } to { opacity: 1; transform: rotate(-4deg) scale(1); } }
@keyframes wd-sm-rise { from { opacity: 0; transform: translateY(14px); } }

/* BlackHole (玄渊): fills its positioned parent, fading out toward the left so text stays clear. */
.wd-bh {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: block;
  -webkit-mask-image: linear-gradient(to right, transparent 0, rgb(0 0 0 / .35) 35%, #000 62%);
  mask-image: linear-gradient(to right, transparent 0, rgb(0 0 0 / .35) 35%, #000 62%);
}

/* OrbFlux (灵纹): a canvas centred over its orb, a little larger, added on light. */
.wd-flux {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1;
  pointer-events: none;
}
.wd-onode__btn--planet > .wd-flux { z-index: 0; }

/* KineticGrid (灵网): fills its positioned parent, behind the content. */
.wd-kgrid { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: block; }

/* ChatInput (私聊输入框) */
.wd-ci {
  --ci-bg: color-mix(in srgb, var(--ink) 7%, var(--mist));
  --ci-rec: #e5484d;
  position: relative; display: flex; align-items: flex-end; gap: 10px;
  min-height: 84px; padding: 14px 12px 12px 16px; border-radius: 20px;
  background: var(--ci-bg); border: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
  box-shadow: 0 10px 28px rgb(0 0 0 / .28);
  transition: min-height 260ms cubic-bezier(.2,.7,.2,1), border-color 200ms ease, box-shadow 200ms ease;
}
.wd-ci--rec { min-height: 112px; border-color: color-mix(in srgb, var(--ci-rec) 70%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ci-rec) 35%, transparent), 0 10px 28px rgb(0 0 0 / .28); }
.wd-ci__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.wd-ci__input {
  width: 100%; min-height: 22px; max-height: 96px; resize: none; border: 0; outline: 0; padding: 0; background: transparent;
  color: var(--ink); font: 400 15px/22px var(--font-sans);
}
.wd-ci__input::placeholder { color: var(--ink-faint); }
.wd-ci__input:disabled { cursor: default; }
.wd-ci__tools { display: flex; align-items: center; gap: 4px; color: var(--ink-muted); }
.wd-ci__group { display: flex; align-items: center; gap: 2px; }
.wd-ci__tool {
  display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%;
  background: none; color: inherit; cursor: pointer; transition: background-color 160ms ease, color 160ms ease;
}
.wd-ci__tool:hover, .wd-ci__tool--on { background: color-mix(in srgb, var(--ink) 10%, transparent); color: var(--ink); }
.wd-ci__tool:focus-visible { outline: 2px solid var(--qing); outline-offset: 1px; }
.wd-ci__div { width: 1px; height: 14px; margin: 0 4px; background: color-mix(in srgb, var(--ink) 18%, transparent); }
.wd-ci__note { display: inline-flex; align-items: center; gap: 6px; font: 400 12px/16px var(--font-sans); color: var(--ink-faint); }
.wd-ci__emoji { display: flex; flex-wrap: wrap; gap: 2px; }
.wd-ci__emoji button { width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; font-size: 18px; cursor: pointer; }
.wd-ci__emoji button:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); }
.wd-ci__main {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
  background: var(--ink); color: var(--mist); cursor: pointer; transition: transform 160ms ease, background-color 200ms ease;
}
.wd-ci__main:hover { transform: scale(1.06); }
.wd-ci__main:focus-visible { outline: 2px solid var(--qing); outline-offset: 2px; }
.wd-ci__main--send { background: var(--qing); color: #fff; }
.wd-ci__main--stop { background: var(--ci-rec); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--ci-rec) 25%, transparent); }
/* Recording panel: red dot and timer, then the waveform, centred. */
.wd-ci__rec { flex: 1; min-width: 0; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding-left: 34px; }
.wd-ci__time { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/16px var(--font-sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.wd-ci__time i { width: 6px; height: 6px; border-radius: 50%; background: var(--ci-rec); animation: wd-ci-blink 1s steps(2, start) infinite; }
.wd-ci__wave { display: flex; align-items: center; gap: 2px; height: 32px; }
.wd-ci__wave span { width: 2px; border-radius: 1px; background: color-mix(in srgb, var(--ink) 70%, transparent); transition: height 90ms linear; }
.wd-ci__hint { font: 400 11px/14px var(--font-sans); color: var(--ink-faint); }
@keyframes wd-ci-blink { to { visibility: hidden; } }

/* Probe (神识探查) */
.wd-probe-wrap { display: flex; flex-direction: column; gap: 6px; }
.wd-probe {
  display: flex; align-items: center; gap: var(--space-2); height: 44px; padding: 0 6px 0 14px;
  border-radius: var(--radius-pill); background: var(--surface); color: var(--ink);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4); backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  transition: box-shadow 240ms ease;
}
.wd-probe--on { box-shadow: 0 0 0 1.5px var(--qing), 0 0 22px color-mix(in srgb, var(--qing) 28%, transparent); }
.wd-probe__icon { position: relative; flex: none; display: grid; place-items: center; width: 22px; height: 22px; color: var(--qing); }
.wd-probe__icon i { position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--qing); opacity: 0; }
.wd-probe--on .wd-probe__icon i { animation: wd-probe-ripple 1.8s ease-out infinite; }
.wd-probe__input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink);
  font: 400 15px/22px var(--font-sans); -webkit-appearance: none; appearance: none;
}
.wd-probe__input::placeholder { color: var(--ink-faint); }
.wd-probe__input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.wd-probe__clear {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: var(--surface-sunk); color: var(--ink-muted); cursor: pointer;
}
.wd-probe__clear:focus-visible { outline: 2px solid var(--qing); outline-offset: 2px; }
.wd-probe__count { margin: 0; padding: 0 14px; font: 400 12px/16px var(--font-sans); color: var(--ink-muted); }
/* compact: a 40px round button that opens leftward into the field. Set --probe-w for the open width. */
.wd-probe-wrap--compact { position: relative; width: 40px; transition: width 320ms cubic-bezier(.2, .7, .2, 1); }
.wd-probe-wrap--compact .wd-probe { height: 40px; padding: 0 9px; gap: 0; background: var(--surface-sunk); cursor: pointer; overflow: hidden; }
.wd-probe-wrap--compact .wd-probe__input { flex: 1 1 0; width: 0; opacity: 0; transition: opacity 200ms ease 80ms; }
.wd-probe-wrap--open { width: var(--probe-w, 260px); }
.wd-probe-wrap--open .wd-probe { gap: var(--space-2); padding: 0 4px 0 9px; background: var(--surface); cursor: text; }
.wd-probe-wrap--open .wd-probe__input { opacity: 1; }
.wd-probe-wrap--compact .wd-probe__count {
  position: absolute; right: 0; top: calc(100% + 6px); padding: 4px 12px; white-space: nowrap;
  border-radius: var(--radius-pill); background: var(--surface);
  -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
}
@media (prefers-reduced-motion: reduce) { .wd-probe-wrap--compact, .wd-probe-wrap--compact .wd-probe__input { transition: none; } }
@keyframes wd-probe-ripple { from { transform: scale(.6); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }

/* Chip */
.wd-chips { display: flex; gap: var(--space-2); overflow-x: auto; scrollbar-width: none; padding: 2px; }
.wd-chip {
  flex: none; height: 36px; padding: 0 var(--space-4);
  border: 0; border-radius: var(--radius-pill);
  background: var(--surface); color: var(--ink-muted);
  font: 400 13px/1 var(--font-sans); cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}
.wd-chip[aria-pressed="true"] {
  background: linear-gradient(180deg, var(--qing-soft) 0%, var(--qing-glow) 140%);
  color: var(--ink); font-weight: 500; box-shadow: none;
}

/* Spirit orb */
.wd-orb { position: relative; display: inline-block; flex: none; }
.wd-orb__glow {
  position: absolute; inset: 6%; border-radius: 50%;
  background: var(--orb-a); opacity: .35; filter: blur(26px);
  animation: wd-orb-glow 6s ease-in-out infinite;
}
.wd-orb__body {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 48%, transparent 70%);
  mask-image: radial-gradient(circle at 50% 50%, #000 48%, transparent 70%);
}
.wd-orb__img {
  position: absolute; inset: -6%; width: 112%; height: 112%;
  object-fit: cover; user-select: none; pointer-events: none;
  animation: wd-orb-turn 28s linear infinite;
}
.wd-orb__img--b {
  mix-blend-mode: screen; opacity: .5;
  animation: wd-orb-turn-rev 42s linear infinite, wd-orb-breathe 7s ease-in-out infinite;
}
.wd-orb--listening .wd-orb__img { animation-duration: 7s; }
.wd-orb--listening .wd-orb__img--b { animation-duration: 10s, 1.6s; }
.wd-orb--listening .wd-orb__glow { animation: wd-orb-pulse 1.6s ease-in-out infinite; }
.wd-orb--sealed .wd-orb__body { filter: grayscale(.85) brightness(.8); }
.wd-orb--sealed .wd-orb__img { animation-duration: 120s; }
.wd-orb--sealed .wd-orb__img--b { animation-duration: 160s, 12s; }
.wd-orb--sealed .wd-orb__glow { background: var(--xuan); opacity: .2; animation: none; }
.wd-orb__seal {
  position: absolute; inset: -9%; border-radius: 50%;
  border: 1.5px solid var(--xuan); opacity: .55;
}
.wd-orb__seal + .wd-orb__seal { inset: -18%; opacity: .25; border-style: dashed; }

@keyframes wd-orb-turn { to { rotate: 360deg; } }
@keyframes wd-orb-turn-rev { to { rotate: -360deg; } }
@keyframes wd-orb-breathe { 0%, 100% { scale: 1; } 50% { scale: 1.08; } }
@keyframes wd-orb-glow { 0%, 100% { opacity: .28; } 50% { opacity: .45; } }
@keyframes wd-orb-pulse { 0%, 100% { opacity: .2; transform: scale(.95); } 50% { opacity: .45; transform: scale(1.08); } }

/* Root badge */
.wd-root-badge {
  display: inline-flex; align-items: center; gap: var(--space-2);
  height: 28px; padding: 0 var(--space-3) 0 var(--space-2);
  border-radius: var(--radius-pill); background: var(--surface);
  font: 500 12px/1 var(--font-sans); color: var(--ink);
}
.wd-root-badge { height: 32px; padding-left: 4px; }
.wd-root-badge--empty { padding-left: var(--space-3); }
.wd-root-badge__orbs { display: inline-flex; }

/* Root orbs: a turning cluster of mini element orbs */
.wd-orbs { position: relative; display: inline-block; flex: none; }
.wd-orbs__ring { position: absolute; inset: 0; animation: wd-orb-turn 9s linear infinite; }
.wd-mini { position: absolute; filter: drop-shadow(0 0 2px var(--orb-a)); }
.wd-mini__body {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden;
  -webkit-mask-image: radial-gradient(circle, #000 46%, transparent 70%);
  mask-image: radial-gradient(circle, #000 46%, transparent 70%);
}
.wd-mini__body img {
  position: absolute; inset: -15%; width: 130%; height: 130%; object-fit: cover;
  animation: wd-orb-turn-rev 6s linear infinite;
}
.wd-root-badge__els { color: var(--ink-muted); font-weight: 400; }

/* Practice card */
.wd-card {
  position: relative; display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-4); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-card);
  color: var(--ink); text-align: left; border: 0; font-family: var(--font-sans);
}
button.wd-card { cursor: pointer; transition: transform 120ms ease; }
button.wd-card:active { transform: scale(0.98); }
.wd-card__top { display: flex; align-items: center; justify-content: space-between; }
.wd-well {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface-sunk); color: var(--ink);
}
.wd-card__go { color: var(--ink-muted); }
.wd-card__row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-1); }
.wd-card__title { font: 600 17px/24px var(--font-sans); margin: 0; }
.wd-card__meta { font: 400 13px/19px var(--font-sans); color: var(--ink-muted); margin: 0; }
.wd-card__desc { font: 400 12px/17px var(--font-sans); color: var(--ink-muted); margin: 0; }
.wd-ring { position: relative; flex: none; }
.wd-ring__label {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 600 11px/1 var(--font-sans); color: var(--ink);
}
.wd-ring__track { stroke: var(--surface-sunk); }

/* Avatar */
.wd-avatar { position: relative; display: inline-block; flex: none; }
.wd-avatar__face {
  position: relative; width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center;
  background: radial-gradient(120% 120% at 30% 20%, var(--surface-sunk) 0%, var(--av-tint) 140%);
  color: var(--ink); font-family: var(--font-serif); font-weight: 600;
  transition: transform 400ms cubic-bezier(.3,.7,.2,1), filter 400ms ease;
}
.wd-avatar__face img { width: 100%; height: 100%; object-fit: cover; }
.wd-avatar__ring { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--av-tint); }
.wd-avatar--seclusion .wd-avatar__ring { border-color: var(--xuan); border-style: dashed; }
.wd-avatar--seclusion .wd-avatar__face { filter: saturate(.3); }
.wd-avatar__roots {
  position: absolute; right: -16%; bottom: -12%; z-index: 2;
  display: grid; place-items: center; width: 58%; height: 58%; border-radius: 50%;
  background: var(--surface-sunk);
  -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
}
.wd-avatar--seclusion .wd-avatar__roots { filter: grayscale(.85); }
.wd-avatar--seclusion .wd-orbs__ring, .wd-avatar--seclusion .wd-mini__body img { animation-duration: 90s; }
.wd-avatar--suppressed .wd-avatar__roots { opacity: .55; }
.wd-avatar--suppressed .wd-orbs__ring, .wd-avatar--suppressed .wd-mini__body img { animation-play-state: paused; }
.wd-avatar__seal {
  position: absolute; left: -4px; bottom: -4px; width: 40%; height: 40%; min-width: 16px; min-height: 16px;
  border-radius: 50%; display: grid; place-items: center;
  background: var(--xuan); color: var(--mist); box-shadow: 0 0 0 2px var(--surface);
}
/* 神识威压: a straight column of light comes down through the member to the bottom of the avatar, a tunnel seen from
   outside, its far end lost in the sky above; small shockwaves run out from where it meets the ground. The face
   inside it is pressed down, small and grey. The canvas spans 2.4 avatar-widths and 3.3 avatar-heights: 2 above
   the avatar, the avatar, and 0.3 below it. */
.wd-avatar__pressure {
  position: absolute; left: -70%; right: -70%; top: -200%; bottom: -30%; z-index: 2; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 30%);
  animation: wd-column-in 600ms cubic-bezier(.2,.8,.2,1) both;
}
.wd-avatar__pressure canvas { display: block; width: 100%; height: 100%; }
.wd-avatar--suppressed .wd-avatar__face {
  transform: translateY(8%) scale(.82);
  filter: saturate(.15) brightness(.7);
  box-shadow: 0 0 0 1px rgb(200 220 255 / .45), 0 -4px 12px rgb(200 220 255 / .35);
}
@keyframes wd-column-in { from { transform: translateY(-30%); opacity: 0; } }

/* 神识威压 · 施展 (WeiyaCast): over everything in its container. */
.wd-wycast { position: absolute; inset: 0; z-index: 400; overflow: hidden; pointer-events: auto; }
.wd-wycast canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wd-wycast__word {
  position: absolute; left: 0; right: 0; bottom: 16%; margin: 0; display: grid; justify-items: center; gap: 6px;
  color: #e8eeff; text-shadow: 0 1px 10px #000; font: 400 13px/18px var(--font-sans); letter-spacing: .08em;
  animation: wd-wy-word 2.6s ease both;
}
.wd-wycast__word b { font: 600 22px/28px var(--font-serif); letter-spacing: .3em; }
.wd-wycast--seal .wd-wycast__word { animation: wd-wy-word-out 1.2s ease both; }
.wd-wycast__seal {
  position: absolute; left: var(--sx, 50%); top: var(--sy, 50%); width: 64px; height: 64px; margin: -32px 0 0 -32px;
  display: grid; place-items: center; border-radius: 10px; border: 3px solid #e2483b;
  color: #ff6a5c; font: 700 38px/1 var(--font-brush, var(--font-serif));
  background: rgb(120 16 12 / .25); box-shadow: 0 0 24px rgb(226 72 59 / .6), inset 0 0 12px rgb(226 72 59 / .4);
  animation: wd-wy-seal 1.3s cubic-bezier(.3,.7,.2,1) both;
}
@keyframes wd-wy-word { 0% { opacity: 0; transform: translateY(8px); } 25%, 100% { opacity: 1; transform: none; } }
@keyframes wd-wy-word-out { 0%, 40% { opacity: 1; } 100% { opacity: 0; } }
@keyframes wd-wy-seal {
  0% { opacity: 0; transform: scale(2.6) rotate(-8deg); }
  18% { opacity: 1; transform: scale(.92) rotate(0); }
  26%, 70% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(.6); }
}

/* Message bubble */
/* Chat: a flat, calm space. No glass, no blooms, no shadows. */
.wd-chat {
  display: flex; flex-direction: column; gap: var(--space-6);
  padding: var(--space-5); background: var(--chat-ground); color: var(--ink); font-family: var(--font-sans);
}
.wd-chat .wd-msg--cont { margin-top: calc(var(--space-2) - var(--space-6)); }
.wd-msg { display: flex; gap: var(--space-3); align-items: flex-start; max-width: 100%; }
.wd-msg--self { flex-direction: row-reverse; }
.wd-msg__gap { flex: none; width: 40px; }
.wd-msg__col { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; max-width: 76%; }
.wd-msg--self .wd-msg__col { align-items: flex-end; }
.wd-msg__head { display: flex; align-items: center; gap: var(--space-2); min-height: 40px; flex-wrap: wrap; }
.wd-msg--self .wd-msg__head { flex-direction: row-reverse; }
.wd-msg__who { font: 600 14px/20px var(--font-sans); color: var(--ink); }
.wd-msg__realm { font: 400 12px/16px var(--font-serif); color: var(--ink-muted); letter-spacing: .04em; }
.wd-msg__time { font: 400 12px/16px var(--font-sans); color: var(--ink-muted); }
.wd-msg__bubble {
  padding: 10px 14px; border-radius: var(--radius-md);
  font: 400 14px/21px var(--font-sans); color: var(--ink);
  background: var(--chat-bubble); overflow-wrap: anywhere;
}
.wd-msg--self .wd-msg__bubble { background: var(--qing); color: var(--on-qing); }
.wd-msg--whisper .wd-msg__bubble, .wd-msg--self.wd-msg--whisper .wd-msg__bubble {
  background: var(--whisper-soft); color: var(--ink);
  outline: 1.5px dashed var(--whisper); outline-offset: -1.5px;
}
.wd-mention { color: var(--qing); font-weight: 500; }
.wd-msg--self .wd-mention { color: inherit; text-decoration: underline; }
.wd-msg__bubble a { color: var(--qing); text-decoration: underline; text-underline-offset: 2px; }
.wd-msg--self .wd-msg__bubble a { color: inherit; }
.wd-day { display: flex; justify-content: center; }
.wd-day span {
  padding: 6px 14px; border-radius: var(--radius-pill);
  background: var(--chat-bubble); color: var(--ink-muted); font: 500 12px/16px var(--font-sans);
}
.wd-msg__tag {
  display: inline-flex; align-items: center; gap: var(--space-1);
  font: 500 11px/14px var(--font-sans); color: var(--whisper);
}
.wd-msg__hidden { display: flex; align-items: center; gap: var(--space-2); color: var(--whisper); font-size: 13px; line-height: 19px; }
.wd-msg__ripple { display: inline-flex; gap: 3px; filter: blur(1.2px); }
.wd-msg__ripple i { display: block; width: 18px; height: 6px; border-radius: 3px; background: var(--whisper); opacity: .35; }
.wd-msg__ripple i:nth-child(2) { width: 34px; opacity: .25; }
.wd-msg__ripple i:nth-child(3) { width: 12px; opacity: .3; }

/* Voice jade slip */
.wd-slip {
  display: flex; align-items: center; gap: var(--space-3);
  width: 100%; max-width: 300px; padding: var(--space-3) var(--space-4) var(--space-3) var(--space-3);
  border-radius: var(--radius-md); border: 0; text-align: left; font-family: var(--font-sans);
  background: var(--qing-soft); color: var(--ink);
}
.wd-slip--sealed { background: var(--xuan-soft); }
.wd-slip { padding-top: var(--space-2); padding-bottom: var(--space-2); cursor: pointer; }
.wd-slip--sealed { cursor: default; }

/* Jade tablet */
.wd-jade { flex: none; overflow: visible; filter: drop-shadow(0 0 6px var(--jade)) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25)); transition: filter 300ms ease; }
.wd-jade__edge { stroke: var(--jade-rim); stroke-width: 1.2; opacity: .8; }
.wd-jade__carve { stroke: var(--jade-deep); stroke-width: 1.6; stroke-linecap: square; }
.wd-jade__ring { stroke: var(--jade-rim); stroke-width: 3; }
.wd-jade__icon { fill: #ffffff; stroke: #ffffff; }
.wd-jade__core { transform-box: fill-box; transform-origin: center; }
.wd-jade--playing { filter: drop-shadow(0 0 10px var(--jade-core)) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25)); }
.wd-jade--playing .wd-jade__core { animation: wd-orb-turn 3s linear infinite; }
.wd-jade--sealed { filter: grayscale(.65) brightness(.85) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25)); }
.wd-jade__seal rect { fill: var(--xuan); opacity: .92; }
.wd-jade__seal text { fill: var(--mist); font: 600 10px var(--font-serif); }
.wd-slip__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.wd-slip__wave { display: flex; align-items: center; gap: 2px; height: 22px; }
.wd-slip__wave i { display: block; width: 3px; border-radius: 2px; background: var(--qing); }
.wd-slip--sealed .wd-slip__wave i { background: var(--xuan); opacity: .35; }
.wd-slip__line { display: flex; justify-content: space-between; gap: var(--space-2); font: 400 12px/16px var(--font-sans); color: var(--ink-muted); }
.wd-slip--sealed .wd-slip__line b { color: var(--xuan); font-weight: 500; }

/* Slip stack: the 出关 reveal of received jade slips */
.wd-stack {
  display: grid; grid-template-areas: "stack"; place-items: start; padding-top: 48px;
  animation: wd-fade-in 700ms ease both;
}
.wd-jcard {
  grid-area: stack; position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  width: min(300px, 78vw); height: 136px; padding: var(--space-3) var(--space-4);
  border: 2px solid var(--line); border-radius: var(--radius-lg);
  background: linear-gradient(var(--surface), var(--surface)), color-mix(in srgb, var(--mist) 82%, transparent);
  color: var(--ink); text-align: left; font-family: var(--font-sans);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4); backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  -webkit-mask-image: linear-gradient(90deg, #000 45%, rgba(0, 0, 0, 0.15) 100%);
  mask-image: linear-gradient(90deg, #000 45%, rgba(0, 0, 0, 0.15) 100%);
  transform: translate(var(--x), var(--y)) skewY(-8deg);
  transition: transform 700ms cubic-bezier(.2,.7,.2,1), filter 700ms ease, border-color 700ms ease, background-color 700ms ease;
  cursor: pointer; user-select: none;
}
.wd-jcard:hover, .wd-jcard:focus-visible {
  transform: translate(var(--x), calc(var(--y) - var(--lift))) skewY(-8deg);
  border-color: var(--line-strong);
  background: linear-gradient(var(--surface-sunk), var(--surface-sunk)), color-mix(in srgb, var(--mist) 82%, transparent);
}
.wd-jcard--back { filter: grayscale(1); }
.wd-jcard--back::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: var(--mist); opacity: .5; transition: opacity 700ms ease; pointer-events: none;
}
.wd-jcard--back:hover, .wd-jcard--back:focus-visible { filter: none; }
.wd-jcard--back:hover::before, .wd-jcard--back:focus-visible::before { opacity: 0; }
.wd-jcard__row { display: flex; align-items: center; gap: var(--space-2); white-space: nowrap; }
.wd-jcard__from { font: 600 17px/24px var(--font-sans); color: var(--qing); }
.wd-jcard__realm { font: 400 12px/16px var(--font-serif); color: var(--ink-muted); letter-spacing: .04em; }
.wd-jcard__body { font: 400 15px/22px var(--font-sans); color: var(--ink); }
.wd-jcard__body .wd-slip__wave { height: 18px; }
.wd-jcard__date { font: 400 13px/19px var(--font-sans); color: var(--ink-muted); }
.wd-jcard .wd-jade { filter: drop-shadow(0 0 4px var(--jade)); }
.wd-jcard .wd-jade--sealed { filter: grayscale(.65) brightness(.85); }
@keyframes wd-fade-in { from { opacity: 0; } }

/* RootTest: the one-time root test ritual */
.wd-rt {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-3);
  min-height: 100%; box-sizing: border-box;
  padding: var(--space-8) var(--space-5); text-align: center; color: var(--ink); font-family: var(--font-sans);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.wd-rt__title { font: 600 26px/32px var(--font-serif); letter-spacing: .12em; }
.wd-rt__vow { margin: 0; font: 400 13px/19px var(--font-sans); color: var(--ink-muted); }
.wd-rt__stage {
  position: relative; width: 220px; height: 220px; margin: var(--space-6) 0 var(--space-2);
  display: grid; place-items: center; border-radius: 50%; cursor: pointer; touch-action: none;
}
.wd-rt--done .wd-rt__stage, .wd-rt--reveal .wd-rt__stage { cursor: default; }
.wd-rt__stage:focus-visible { outline: 2px solid var(--qing); outline-offset: 6px; }
.wd-rt__ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wd-rt__ring circle { fill: none; stroke-width: 3; }
.wd-rt__ring-track { stroke: var(--line); }
.wd-rt__ring-fill { stroke: var(--qing); stroke-linecap: round; filter: drop-shadow(0 0 6px var(--qing)); }
.wd-rt--released .wd-rt__ring-fill { transition: stroke-dashoffset 500ms ease; }
.wd-rt--done .wd-rt__ring { opacity: 0; transition: opacity 600ms ease; }

/* The crystal test orb: clear glass; element lights swirl inside while held. */
.wd-rt__orb {
  position: relative; width: 168px; height: 168px; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 55%, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.02) 70%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), inset 0 -18px 36px rgba(255, 255, 255, 0.08),
    0 0 calc(10px + 50px * var(--p, 0)) rgba(255, 255, 255, calc(0.08 + 0.3 * var(--p, 0)));
  transition: transform 600ms cubic-bezier(.2,.7,.2,1), opacity 600ms ease;
}
.wd-rt__light {
  position: absolute; inset: -10%; width: 120%; height: 120%; object-fit: cover; pointer-events: none;
  mix-blend-mode: screen; transition: opacity 700ms ease, transform 900ms cubic-bezier(.2,.7,.2,1);
  animation: wd-orb-turn 6s linear infinite;
  /* Only each orb's glowing core, never its smoky square ground. */
  -webkit-mask-image: radial-gradient(circle, #000 30%, transparent 58%);
  mask-image: radial-gradient(circle, #000 30%, transparent 58%);
  filter: saturate(1.5) brightness(1.15);
}
.wd-rt__light--0 { transform: translate(-22%, -18%) scale(.7); animation-duration: 4.2s; }
.wd-rt__light--1 { transform: translate(22%, -18%) scale(.7); animation-duration: 5.1s; animation-direction: reverse; }
.wd-rt__light--2 { transform: translate(-24%, 20%) scale(.7); animation-duration: 3.6s; }
.wd-rt__light--3 { transform: translate(24%, 20%) scale(.7); animation-duration: 4.7s; animation-direction: reverse; }
.wd-rt__light--4 { transform: translate(0, 0) scale(.75); animation-duration: 5.6s; }
.wd-rt--holding .wd-rt__light { animation-duration: 1.4s; }
.wd-rt--holding .wd-rt__orb { animation: wd-quiver 120ms linear infinite; }
.wd-rt--reveal .wd-rt__light--kept, .wd-rt--done .wd-rt__light--kept { transform: translate(0, 0) scale(1); }
.wd-rt--done .wd-rt__orb { transform: scale(.55); opacity: 0; }
.wd-rt__glass {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(38% 26% at 34% 24%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 70%),
    radial-gradient(70% 70% at 50% 50%, rgba(255, 255, 255, 0) 60%, rgba(255, 255, 255, 0.22) 100%);
}
.wd-rt__flash {
  position: absolute; inset: -20%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, #ffffff 0%, rgba(255, 255, 255, 0) 65%);
  animation: wd-flash 900ms ease-out both;
}
.wd-rt__cluster { position: absolute; inset: 0; display: grid; place-items: center; animation: wd-gather 700ms cubic-bezier(.2,.7,.2,1) both; }

/* 玄渊 in the root test: a wide stage; the hole spins up while held, then roots emerge from its shadow. */
.wd-rt .wd-rt__stage { width: min(340px, 92vw); height: 240px; border-radius: 20px; }
.wd-rt__hole { position: absolute; inset: 0; }
.wd-rt__hole .wd-bh { -webkit-mask-image: none; mask-image: none; }
.wd-rt--holding .wd-rt__hole { animation: wd-quiver 120ms linear infinite; }
.wd-rt .wd-rt__flash {
  inset: auto; left: 50%; top: 50%; width: 260px; height: 260px; margin: -130px 0 0 -130px;
  background: radial-gradient(circle, #fff 0, var(--orb-a) 28%, transparent 66%);
}
.wd-rt .wd-rt__cluster { z-index: 2; animation: wd-rt-emerge 1100ms cubic-bezier(.2,.8,.2,1) both; }
@keyframes wd-rt-emerge { from { transform: scale(.12); opacity: 0; filter: blur(4px); } 60% { opacity: 1; } to { transform: scale(1); opacity: 1; filter: blur(0); } }
.wd-rt__cluster .wd-mini { filter: drop-shadow(0 0 10px var(--orb-a)); }
/* 坠入玄渊 · 五色筛灵: the tunnel canvas covers the whole test; the prompt and the hold button stay above it. */
.wd-rt { position: relative; overflow: hidden; isolation: isolate; }
.wd-rt__rift { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; display: block; }
.wd-rt__msg, .wd-rt__hold { position: relative; z-index: 5; }
/* Spat-out roots: each shoots out of the hole on an arc, overshoots, and settles into a row beneath it,
   then floats gently. Its element name sits under it. --dx/--dy: the resting offset from the hole. */
.wd-rt__spat {
  position: absolute; left: 50%; top: 50%; z-index: 3; pointer-events: none;
  transform: translate(-50%, -50%) translate(var(--dx), var(--dy));
  animation: wd-rt-spit 760ms cubic-bezier(.2, .9, .25, 1) both, wd-rt-float 3.4s ease-in-out 760ms infinite;
}
.wd-rt__spat--still { animation: wd-rt-float 3.4s ease-in-out infinite; }
.wd-rt__spat .wd-mini { filter: drop-shadow(0 0 10px var(--orb-a)); }
.wd-rt__spat b {
  position: absolute; left: 50%; top: 100%; margin-top: 6px; transform: translateX(-50%);
  font: 500 13px/16px var(--font-serif); letter-spacing: .08em; white-space: nowrap; color: var(--ink);
  animation: wd-rise 400ms 520ms ease-out both;
}
@keyframes wd-rt-spit {
  0% { transform: translate(-50%, -50%) scale(.1); opacity: 0; filter: blur(4px) brightness(2.2); }
  15% { opacity: 1; }
  55% { transform: translate(-50%, -50%) translate(calc(var(--dx) * .7), calc(var(--dy) * .3 - var(--lift))) scale(1.25); filter: blur(0) brightness(1.5); }
  100% { transform: translate(-50%, -50%) translate(var(--dx), var(--dy)) scale(1); filter: none; }
}
@keyframes wd-rt-float {
  0%, 100% { transform: translate(-50%, -50%) translate(var(--dx), var(--dy)); }
  50% { transform: translate(-50%, -50%) translate(var(--dx), calc(var(--dy) - 4px)); }
}
/* The title, vow and black hole: the camera zooms into this (driven from the tunnel's frame loop). */
.wd-rt__scene { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--space-3); will-change: transform; }
.wd-rt--holding .wd-rt__msg { text-shadow: 0 1px 8px #000, 0 0 2px #000; }
.wd-rt__whiteout { position: absolute; inset: 0; z-index: 6; background: #fffdf6; pointer-events: none; animation: wd-rt-whiteout 700ms cubic-bezier(.4, 0, .2, 1) both; }
@keyframes wd-rt-whiteout { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }
.wd-rt__msg { margin: 0; min-height: 22px; font: 500 15px/22px var(--font-sans); letter-spacing: .06em; color: var(--ink-muted); }
.wd-rt--holding .wd-rt__msg { color: var(--ink); }
.wd-rt__hold {
  margin-top: var(--space-4); height: 52px; padding: 0 var(--space-8); border: 0; border-radius: var(--radius-pill);
  background: var(--surface-sunk); color: var(--ink); font: 600 16px/1 var(--font-sans); letter-spacing: .1em; cursor: pointer;
  -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur)); touch-action: none;
  transition: background-color 200ms ease, color 200ms ease, transform 200ms ease;
}
.wd-rt__hold--on { background: var(--qing); color: var(--on-qing); transform: scale(.97); }
.wd-rt__hold:focus-visible { outline: 2px solid var(--qing); outline-offset: 3px; }
.wd-rt__hold:disabled { opacity: 0; }
/* The verdict. Nothing extra on screen; the craft is in how each piece arrives and answers.
   Pieces come in one after another (blur → sharp, a few px of rise), in the main root's colour (--accent). */
.wd-rt__verdict { --ease: cubic-bezier(.2, .7, .2, 1); display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.wd-rt__verdict > * { animation: wd-rt-in 700ms var(--ease) both; }
.wd-rt__verdict > :nth-child(2) { animation: wd-rt-rule 900ms 380ms var(--ease) both; }
.wd-rt__verdict > :nth-child(3) { animation-delay: 520ms; }
.wd-rt__verdict > :nth-child(4) { animation-delay: 640ms; }
.wd-rt__verdict > :nth-child(5) { animation-delay: 780ms; }
.wd-rt__verdict--still > *, .wd-rt__verdict--still .wd-rt__grade span, .wd-rt__verdict--still .wd-rt__seal, .wd-rt__verdict--still .wd-rt__enter::after { animation: none; }
@keyframes wd-rt-in { from { opacity: 0; transform: translateY(8px); filter: blur(6px); } }
/* The grade inks in: letters drawn together from wide and soft. Then the seal is stamped beside it. */
.wd-rt__grade { position: relative; font: 600 34px/40px var(--font-serif); letter-spacing: .16em; padding-left: .16em; }
.wd-rt__grade span { display: inline-block; animation: wd-rt-ink 1000ms var(--ease) both; }
@keyframes wd-rt-ink { from { letter-spacing: .5em; opacity: 0; filter: blur(8px); } 60% { opacity: 1; } }
.wd-rt__seal {
  position: absolute; left: 100%; top: 50%; margin: -11px 0 0 6px; width: 20px; height: 22px; border-radius: 3px;
  display: grid; place-items: center; background: #b3342b; color: #f6e8d6; font: 600 11px/1 var(--font-serif); font-style: normal; letter-spacing: 0;
  box-shadow: inset 0 0 0 1.2px rgb(246 232 214 / .55); transform: rotate(-6deg);
  animation: wd-rt-stamp 520ms 900ms cubic-bezier(.3, 1.6, .5, 1) both;
}
@keyframes wd-rt-stamp { from { opacity: 0; transform: rotate(-14deg) scale(1.9); } 55% { opacity: 1; transform: rotate(-5deg) scale(.9); } }
/* A hairline in the root's colour draws out from the centre. */
.wd-rt__rule { width: 120px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .8; }
@keyframes wd-rt-rule { from { transform: scaleX(0); opacity: 0; } }
/* Elements: each name is tied to its orb above. Point at either and both light; the others step back. */
.wd-rt__els { display: flex; gap: 2px; font: 500 17px/24px var(--font-serif); }
.wd-rt__el {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color 240ms ease, opacity 240ms ease, transform 240ms var(--ease);
}
.wd-rt__el i { width: 7px; height: 7px; border-radius: 50%; background: var(--el); box-shadow: 0 0 0 0 var(--el); transition: box-shadow 300ms ease, transform 300ms var(--ease); }
.wd-rt__el--hot { background: color-mix(in srgb, var(--el) 16%, transparent); transform: translateY(-1px); }
.wd-rt__el--hot i { transform: scale(1.3); box-shadow: 0 0 10px 1px var(--el); }
.wd-rt__el--dim { opacity: .45; }
.wd-rt__el:focus-visible { outline: 1.5px solid var(--el); outline-offset: 2px; }
.wd-rt--done .wd-rt__spat { pointer-events: auto; }
.wd-rt__spat > .wd-mini, .wd-rt__spat b { transition: transform 300ms cubic-bezier(.2, .7, .2, 1), opacity 240ms ease, filter 300ms ease; }
.wd-rt__spat--hot > .wd-mini { transform: scale(1.14); filter: drop-shadow(0 0 16px var(--orb-a)) brightness(1.15); }
.wd-rt__spat--dim { opacity: .4; transition: opacity 240ms ease; }
/* The figures: small labels over serif numbers in tabular figures, split by a hairline. Speed counts up once. */
.wd-rt__facts { display: flex; align-items: stretch; margin: var(--space-1) 0 var(--space-4); }
.wd-rt__facts > div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 18px; }
.wd-rt__facts > div + div { box-shadow: inset 1px 0 0 var(--line); }
.wd-rt__facts small { font: 400 11px/14px var(--font-sans); letter-spacing: .12em; color: var(--ink-muted); }
.wd-rt__facts b { font: 600 18px/24px var(--font-serif); font-variant-numeric: tabular-nums; color: var(--ink); }
/* The way in: smoky glass tinted with the root's colour, a hairline ring and soft glow in it; one slow sheen passes once it arrives,
   and again on hover; pressing sinks it a little. */
.wd-rt__enter {
  position: relative; overflow: hidden; isolation: isolate; color: var(--ink); letter-spacing: .12em;
  background: color-mix(in srgb, var(--accent) 24%, rgb(255 255 255 / .05));
  -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent), 0 10px 28px -12px var(--accent);
  transition: transform 140ms ease, box-shadow 300ms ease;
}
.wd-rt__enter::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgb(255 255 255 / .38) 50%, transparent 65%);
  transform: translateX(-110%); animation: wd-rt-sheen 1100ms 1500ms ease-in-out both;
}
.wd-rt__enter:hover { box-shadow: 0 0 0 1px var(--accent), 0 12px 32px -10px var(--accent); }
.wd-rt__enter:hover::after { animation: wd-rt-sheen 1100ms 1500ms ease-in-out both, wd-rt-sheen2 1000ms ease-in-out; }
.wd-rt__enter:active { transform: scale(.97); box-shadow: 0 0 0 1px var(--accent), 0 4px 14px -8px var(--accent); }
@keyframes wd-rt-sheen { from { transform: translateX(-110%); } to { transform: translateX(110%); } }
@keyframes wd-rt-sheen2 { from { transform: translateX(-110%); } to { transform: translateX(110%); } }
@keyframes wd-quiver { 25% { translate: .6px -.4px; } 50% { translate: -.5px .5px; } 75% { translate: .4px .6px; } }
@keyframes wd-flash { from { opacity: 1; transform: scale(.6); } to { opacity: 0; transform: scale(1.4); } }
@keyframes wd-gather { from { opacity: 0; transform: scale(.4); } }
@keyframes wd-rise { from { opacity: 0; transform: translateY(12px); } }

/* SeclusionScene: your own seclusion / meditation view. A void, a warm horizon, one glowing figure. */
.wd-sc {
  position: relative; height: 100%; min-height: 560px; overflow: hidden; color: var(--ink); font-family: var(--font-sans);
  background: radial-gradient(120% 70% at 50% 58%, #0b1a1e 0%, #050a0d 55%, #020405 100%);
  --hz: 58%;
}
.wd-sc__dome {
  position: absolute; left: 50%; top: var(--hz); width: 150%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; background: radial-gradient(circle, rgba(70, 150, 160, 0.13) 0%, rgba(70, 150, 160, 0.04) 35%, transparent 60%);
}
.wd-sc__floor { position: absolute; left: 0; right: 0; top: var(--hz); bottom: 0; background: linear-gradient(180deg, #071215 0%, #020506 100%); overflow: hidden; }
.wd-sc__floor::after {
  content: ""; position: absolute; inset: 0 -50%;
  background:
    radial-gradient(18% 10% at 30% 30%, rgba(90, 170, 180, 0.12), transparent 70%),
    radial-gradient(14% 8% at 62% 52%, rgba(90, 170, 180, 0.09), transparent 70%),
    radial-gradient(22% 9% at 44% 82%, rgba(90, 170, 180, 0.08), transparent 70%),
    radial-gradient(16% 7% at 78% 24%, rgba(90, 170, 180, 0.07), transparent 70%);
  filter: blur(6px); animation: wd-drift 24s ease-in-out infinite alternate;
}
.wd-sc__horizon { position: absolute; left: 0; right: 0; top: var(--hz); height: 0; }
.wd-sc__horizon span, .wd-sc__horizon i {
  position: absolute; left: 0; right: 0; transform: translateY(-50%);
  background: linear-gradient(90deg, transparent 0%, rgba(255, 214, 160, 0.12) 12%, rgba(255, 220, 170, 0.85) 50%, rgba(255, 214, 160, 0.12) 88%, transparent 100%);
}
.wd-sc__horizon span { height: 1.5px; }
.wd-sc__horizon i { height: 26px; filter: blur(12px); opacity: .45; animation: wd-hz 8s ease-in-out infinite; }
.wd-sc__figure { position: absolute; left: 50%; top: var(--hz); width: 76px; height: 64px; transform: translate(-50%, -95%); }
.wd-sc__aura {
  position: absolute; left: 50%; top: 55%; width: 230px; height: 230px; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--aura) 60%, transparent) 0%, color-mix(in srgb, var(--aura) 18%, transparent) 28%, transparent 62%);
  animation: wd-breathe 8s ease-in-out infinite; pointer-events: none;
}
.wd-sc__body { position: relative; display: block; width: 100%; height: 100%; filter: drop-shadow(0 0 5px var(--aura)) drop-shadow(0 0 16px var(--aura)); }
.wd-sc__reflect {
  position: absolute; left: 0; top: 95%; width: 100%; height: 100%; transform-origin: top; transform: scaleY(-.9) translateY(-100%);
  opacity: .22; filter: blur(1.6px);
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 85%); mask-image: linear-gradient(to top, #000 0%, transparent 85%);
  animation: wd-ripple-x 5s ease-in-out infinite;
}
.wd-sc__motes { position: absolute; left: 0; right: 0; top: var(--hz); bottom: 0; pointer-events: none; }
.wd-sc__motes i {
  position: absolute; bottom: 12%; width: 3px; height: 3px; border-radius: 50%; background: var(--aura);
  box-shadow: 0 0 6px var(--aura); opacity: 0; animation: wd-mote 8s linear infinite;
}
.wd-sc__top { position: absolute; top: 48px; left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.wd-sc__title { font: 600 22px/28px var(--font-serif); letter-spacing: .3em; margin-bottom: 6px; }
.wd-sc__line { font: 400 14px/20px var(--font-sans); color: var(--ink); }
.wd-sc__line--muted { color: var(--ink-muted); }
.wd-sc__breath {
  position: absolute; left: 0; right: 0; top: calc(var(--hz) + 96px); text-align: center;
  font: 500 16px/22px var(--font-serif); letter-spacing: .4em; color: var(--ink-muted);
}
.wd-sc__bottom { position: absolute; left: 0; right: 0; bottom: 40px; display: flex; flex-direction: column; align-items: center; gap: var(--space-3); text-align: center; }
.wd-sc__stat { font: 400 13px/19px var(--font-sans); color: var(--ink-muted); }
.wd-sc__stat b { color: var(--ink); font-weight: 600; font-size: 15px; }
.wd-sc__slips { display: inline-flex; align-items: center; gap: var(--space-2); font: 400 12px/16px var(--font-sans); color: var(--ink-muted); }
.wd-sc__slips .wd-jade { filter: none; }
@keyframes wd-breathe { 0%, 100% { transform: translate(-50%, -50%) scale(.82); opacity: .55; } 50% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; } }
@keyframes wd-hz { 0%, 100% { opacity: .35; } 50% { opacity: .6; } }
@keyframes wd-drift { from { transform: translateX(-6%); } to { transform: translateX(6%); } }
@keyframes wd-ripple-x { 0%, 100% { transform: scaleX(1) scaleY(-.9) translateY(-100%); } 50% { transform: scaleX(1.04) scaleY(-.86) translateY(-100%); } }
@keyframes wd-mote {
  0% { transform: translate(0, 0); opacity: 0; }
  15% { opacity: .8; }
  100% { transform: translate(0, -260px); opacity: 0; }
}

/* OrbitHome: the one home screen */
.wd-orbit {
  position: relative; width: 100%; height: 100%; min-height: 560px; overflow: hidden;
  color: var(--ink); font-family: var(--font-sans);
  touch-action: none; cursor: grab; -webkit-user-select: none; user-select: none;
}
.wd-orbit--drag { cursor: grabbing; }
.wd-orbit--drag .wd-onode__btn { pointer-events: none; }
/* The sphere: an armillary (浑天仪) — a faint glass globe, three rings with ticks, 二十八宿 and a field of
   spirit dots. Every stroke fades with depth, so the far side all but disappears. */
.wd-orbit__sphere { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 1; }
.wd-orbit__globe { fill: color-mix(in srgb, var(--ink) 2.5%, transparent); stroke: var(--line); stroke-width: .8; }
.wd-orbit__dot { fill: var(--ink); }
.wd-arm { fill: none; stroke-linecap: round; }
.wd-arm--eq { stroke: var(--root-jin); }
.wd-arm--ecl { stroke: var(--qing); }
.wd-arm--mer { stroke: var(--ink); }
.wd-arm--tick { stroke: var(--root-jin); }
/* Each function's own orbit, running through the centre of its ball. */
.wd-arm--orb { stroke: var(--ink); stroke-dasharray: 1 0; }
.wd-orbit__xiu28 { fill: var(--root-jin); font-family: var(--font-serif); text-anchor: middle; dominant-baseline: central; }
.wd-orbit--tide .wd-orbit__aura { animation: wd-tide 2.4s ease-in-out infinite; }
@keyframes wd-tide { 50% { opacity: .55; } }

/* 时辰天象: a sky wash and background stars that follow the 仙日. */
.wd-orbit__sky { position: absolute; inset: 0; pointer-events: none; transition: background 3s ease; }
.wd-orbit__sky i {
  position: absolute; border-radius: 50%; background: var(--ink); opacity: 0; transition: opacity 3s ease;
  animation: wd-twinkle 4s ease-in-out infinite;
}
.wd-orbit--night .wd-orbit__sky { background: radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, #1b2a6b 18%, transparent), transparent 70%); }
.wd-orbit--night .wd-orbit__sky i { opacity: .7; }
.wd-orbit--dawn .wd-orbit__sky { background: radial-gradient(130% 60% at 50% 100%, color-mix(in srgb, #f0a07a 26%, transparent), transparent 70%); }
.wd-orbit--dawn .wd-orbit__sky i { opacity: .25; }
.wd-orbit--day .wd-orbit__sky { background: radial-gradient(120% 70% at 50% 0%, color-mix(in srgb, #9fd8f0 18%, transparent), transparent 70%); }
.wd-orbit--dusk .wd-orbit__sky { background: radial-gradient(130% 60% at 50% 100%, color-mix(in srgb, #e9773f 26%, transparent), transparent 70%); }
.wd-orbit--dusk .wd-orbit__sky i { opacity: .3; }
@keyframes wd-twinkle { 50% { transform: scale(.4); } }

/* Sun and moon on the ecliptic ring. */
.wd-orbit__body { position: absolute; left: 50%; top: 50%; border-radius: 50%; pointer-events: none; }
.wd-orbit__body--sun {
  width: 18px; height: 18px; margin: -9px 0 0 -9px;
  background: radial-gradient(circle, #fff6d8 0 30%, #f3c44f 60%, color-mix(in srgb, #f3c44f 0%, transparent) 72%);
  box-shadow: 0 0 18px 6px color-mix(in srgb, #f3c44f 45%, transparent);
}
.wd-orbit__body--moon {
  width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; background: #e9eef6;
  box-shadow: inset -4px -2px 0 0 color-mix(in srgb, #8d9ab0 80%, transparent), 0 0 12px 2px color-mix(in srgb, #dfe8ff 40%, transparent);
}

/* 道侣 twin star. */
.wd-orbit__twin {
  position: absolute; left: 50%; top: 50%; display: flex; flex-direction: column; align-items: center; gap: 2px;
  width: 0; height: 0; padding: 0; border: 0; background: none; color: var(--ink-muted); cursor: pointer;
}
.wd-orbit__twin .wd-orbs { margin-top: -12px; filter: drop-shadow(0 0 6px var(--orb-a)); }
.wd-orbit__twin span { white-space: nowrap; font: 500 10px/12px var(--font-sans); letter-spacing: .06em; }
.wd-orbit__twin:focus-visible { outline: none; }
.wd-orbit__twin:focus-visible .wd-orbs { outline: 2px solid var(--qing); outline-offset: 3px; border-radius: 50%; }

/* Centre label sits on a soft wash, so ring lines never run through the text. */
.wd-orbit__id { padding: 6px 18px; border-radius: 999px; background: radial-gradient(closest-side, color-mix(in srgb, var(--mist) 88%, transparent) 55%, transparent); }
.wd-orbit__yun { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; filter: drop-shadow(0 0 6px var(--orb-a)); }
.wd-orbit--yun .wd-orbs__ring, .wd-orbit--yun .wd-mini__body img { animation-duration: 1.1s; }
.wd-orbit--yun .wd-orbit__core .wd-mini { filter: drop-shadow(0 0 14px var(--orb-a)); }
.wd-orbit--yun .wd-orbit__aura { opacity: .9; }
.wd-orbit__core--ready .wd-orbit__xiu-fill { stroke: var(--root-jin); filter: drop-shadow(0 0 8px var(--root-jin)); animation: wd-ready 1.6s ease-in-out infinite; }
.wd-orbit__core--ready .wd-orbit__id span { color: var(--root-jin); font-weight: 600; }
@keyframes wd-ready { 50% { filter: drop-shadow(0 0 16px var(--root-jin)); } }

/* 灵气 motes and the "+修为" that floats up when you gather one. */
.wd-orbit__mote {
  position: absolute; left: 50%; top: 50%; width: 32px; height: 32px; margin: -16px 0 0 -16px; padding: 0;
  border: 0; border-radius: 50%; background: none; cursor: pointer;
}
.wd-orbit__mote i {
  position: absolute; inset: 9px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 25%, var(--orb-a) 60%, transparent 72%);
  box-shadow: 0 0 14px 4px color-mix(in srgb, var(--orb-a) 55%, transparent);
  animation: wd-mote 1.8s ease-in-out infinite;
}
.wd-orbit__mote:disabled { cursor: default; }
.wd-orbit__mote:focus-visible { outline: 2px solid var(--qing); outline-offset: -2px; }
@keyframes wd-mote { 50% { transform: scale(1.25); opacity: .75; } }
.wd-orbit__burst {
  position: absolute; left: 50%; top: 50%; z-index: 250; white-space: nowrap; pointer-events: none;
  margin-left: -40px; width: 80px; text-align: center;
  font: 600 13px/16px var(--font-sans); color: var(--ink); text-shadow: 0 0 10px var(--orb-a);
  animation: wd-burst 1.4s ease-out forwards;
}
@keyframes wd-burst { from { opacity: 0; margin-top: 0; } 15% { opacity: 1; } to { opacity: 0; margin-top: -48px; } }

/* Friend satellites around a node. */
.wd-sat {
  position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; border-radius: 50%;
  display: grid; place-items: center; font: 600 9px/1 var(--font-sans); color: var(--ink);
  background: color-mix(in srgb, var(--mist) 85%, transparent); border: 1.5px solid var(--orb-a);
  box-shadow: 0 0 8px color-mix(in srgb, var(--orb-a) 50%, transparent); pointer-events: none;
}
.wd-sat--sealed { opacity: .45; border-style: dashed; box-shadow: none; }
.wd-onode__btn { z-index: 1; }
.wd-onode__name {
  font-family: var(--font-sans); font-weight: 600; line-height: 1; letter-spacing: .02em; white-space: nowrap;
  color: var(--ink); text-shadow: 0 1px 2px rgb(0 0 0 / .45);
}

/* Node states: 威压, 封印, 新品火光, 玉简. */
.wd-onode__fx {
  position: absolute; top: -4px; right: -4px; display: grid; place-items: center; min-width: 16px; height: 16px;
  border-radius: 50%; pointer-events: none;
}
.wd-onode--pressure .wd-onode__btn { border-color: var(--root-jin); }
.wd-onode--pressure .wd-onode__btn::before, .wd-onode--pressure .wd-onode__btn::after {
  content: ''; position: absolute; inset: -12px; border-radius: 50%; border: 1px solid var(--root-jin);
  animation: wd-press 2.2s ease-in infinite; pointer-events: none;
}
.wd-onode--pressure .wd-onode__btn::after { animation-delay: 1.1s; }
@keyframes wd-press { from { transform: scale(1.35); opacity: 0; } 40% { opacity: .8; } to { transform: scale(.75); opacity: 0; } }
.wd-onode--sealed .wd-onode__btn { border-style: dashed; color: var(--ink-muted); }
.wd-onode--sealed .wd-onode__fx { background: var(--surface-sunk); color: var(--ink-muted); }
.wd-onode--fire .wd-onode__fx {
  width: 12px; min-width: 0; height: 15px; border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 70%, #fff3c4 0 18%, #ffb347 40%, #e8552a 75%);
  box-shadow: 0 0 10px #ff8a3d; animation: wd-flame .9s ease-in-out infinite alternate;
}
@keyframes wd-flame { to { transform: scale(.85, 1.12) translateY(-1px); } }
.wd-onode--jade .wd-onode__fx { top: -8px; right: -2px; filter: drop-shadow(0 0 6px var(--qing)); }

/* 时辰 readout and the first-run hint. */
.wd-orbit__clock {
  position: absolute; left: 50%; bottom: 52px; transform: translateX(-50%); z-index: 210;
  display: flex; align-items: center; gap: 8px; white-space: nowrap; pointer-events: none;
  padding: 5px 12px; border-radius: 999px; background: var(--surface);
  -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
  font: 400 11px/14px var(--font-sans); color: var(--ink-muted); letter-spacing: .04em;
}
.wd-orbit__clock b { font-weight: 600; color: var(--root-jin); }
.wd-orbit__clock { bottom: 60px; }
.wd-orbit__clock--conj { box-shadow: 0 0 0 1px color-mix(in srgb, var(--root-jin) 55%, transparent), 0 0 18px color-mix(in srgb, var(--root-jin) 30%, transparent); }
.wd-orbit__next {
  position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 210; white-space: nowrap; pointer-events: none;
  font: 400 11px/14px var(--font-sans); color: var(--ink-faint); letter-spacing: .04em;
}

/* 五行 planets: the element's painted orb is the surface, under a glass glint; icon and name sit on top. */
.wd-orbit__stage { position: absolute; inset: 0; transform-origin: 50% 50%; will-change: transform; }
.wd-orbit .wd-onode__btn--planet {
  background: none; border-color: color-mix(in srgb, var(--el) 55%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--el) 45%, transparent), 0 6px 14px rgb(0 0 0 / .35);
  color: #fff;
}
.wd-onode__orb {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; user-select: none;
  scale: 1.28; clip-path: circle(39% at 50% 50%); border-radius: 50%;
  animation: wd-orb-turn 40s linear infinite;
}
.wd-onode__gloss {
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 33% 27%, rgb(255 255 255 / .55) 0 6%, rgb(255 255 255 / .12) 18%, transparent 34%),
    radial-gradient(circle at 50% 50%, transparent 55%, rgb(0 0 0 / .35) 100%);
}
.wd-onode__btn--planet > .wd-icon, .wd-onode__btn--planet > .wd-onode__name {
  position: relative; z-index: 1; color: #fff; filter: drop-shadow(0 1px 2px rgb(0 0 0 / .8));
}
.wd-onode__btn--planet > .wd-onode__name { text-shadow: 0 1px 3px rgb(0 0 0 / .85); }
.wd-orbit .wd-onode--active .wd-onode__btn--planet { box-shadow: 0 0 0 2px var(--el), 0 0 26px var(--el); }
/* Glow budget: a planet without news keeps a thin rim and a plain shadow, no halo. */
.wd-orbit .wd-onode--quiet .wd-onode__btn--planet {
  border-color: color-mix(in srgb, var(--el) 35%, transparent);
  box-shadow: 0 6px 14px rgb(0 0 0 / .35);
}
/* At least 48px to tap even when the planet is drawn small (planets scale down to about 0.8), centred, invisible. */
.wd-onode__hit { position: absolute; left: 50%; top: 50%; width: max(100%, 60px); height: max(100%, 60px); transform: translate(-50%, -50%); border-radius: 50%; }
/* News count: a small 朱 badge at the planet's upper right, in tabular figures. */
.wd-onode__badge {
  position: absolute; z-index: 2; right: -4px; top: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: #c8432f; color: #fff7ee; box-shadow: 0 0 0 1.5px rgb(5 6 14 / .9);
  font: 600 10px/16px var(--font-sans); font-variant-numeric: tabular-nums; text-align: center; pointer-events: none;
}

/* 洞府 at the centre: its name under your roots, and its jade-slip badge. */
.wd-orbit__home-name {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); pointer-events: none;
  font: 600 13px/1 var(--font-serif); letter-spacing: .2em; color: var(--root-tu); text-shadow: 0 0 8px rgb(0 0 0 / .8);
}
.wd-orbit__core-fx { position: absolute; top: 14px; right: 18px; filter: drop-shadow(0 0 6px var(--qing)); pointer-events: none; }

/* 相生灵气流 */
.wd-flow__line { stroke: var(--flow); stroke-width: .8; stroke-dasharray: 2 5; opacity: .35; }
.wd-flow__dot { fill: var(--flow); filter: drop-shadow(0 0 3px var(--flow)); }

/* 飞入 veil */
.wd-fly {
  position: absolute; inset: 0; z-index: 290; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--el) 70%, #fff) 0, var(--el) 35%, var(--mist) 80%);
}

/* 五星连珠 */
.wd-conj__line {
  fill: none; stroke: var(--root-jin); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 6px var(--root-jin)) drop-shadow(0 0 14px color-mix(in srgb, var(--root-jin) 60%, transparent));
  stroke-dasharray: 1200; animation: wd-conj-draw 1.6s ease-out both;
}
.wd-conj__line--minor { stroke-width: 1.2; opacity: .8; animation-duration: .8s; }
@keyframes wd-conj-draw { from { stroke-dashoffset: 1200; } to { stroke-dashoffset: 0; } }
.wd-orbit .wd-onode--aligned .wd-onode__btn {
  border-color: var(--root-jin);
  box-shadow: inset -3px -5px 9px rgb(0 0 0 / .25), 0 0 0 3px color-mix(in srgb, var(--root-jin) 35%, transparent), 0 0 20px var(--root-jin);
}
.wd-conj {
  position: absolute; left: 50%; top: 56px; transform: translateX(-50%); z-index: 260; width: min(300px, 86%);
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  padding: 14px 16px 10px; border-radius: var(--radius-lg); background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--root-jin) 45%, transparent);
  -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
  box-shadow: 0 0 30px color-mix(in srgb, var(--root-jin) 25%, transparent);
  animation: wd-hint-in 700ms ease both;
}
.wd-conj__title { font: 600 24px/30px var(--font-serif); letter-spacing: .3em; color: var(--root-jin); text-shadow: 0 0 16px var(--root-jin); }
.wd-conj__sub { font: 400 12px/16px var(--font-sans); color: var(--ink-muted); letter-spacing: .1em; }
.wd-conj__line-text { font: 500 13px/19px var(--font-sans); color: var(--ink); }
.wd-conj__close { margin-top: 4px; border: 0; background: none; color: var(--ink-faint); font: 400 12px/16px var(--font-sans); cursor: pointer; padding: 4px 10px; }
.wd-orbit__clock-muted { color: var(--ink-faint); }
.wd-orbit__hint {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  font: 400 12px/16px var(--font-sans); letter-spacing: .08em; color: var(--ink-faint);
  animation: wd-hint-in 800ms ease both;
}
@keyframes wd-hint-in { from { opacity: 0; transform: translate(-50%, 6px); } }

/* 雷劫 */
.wd-orbit--trib .wd-onode, .wd-orbit--trib .wd-orbit__twin, .wd-orbit--trib .wd-orbit__mote, .wd-orbit--trib .wd-orbit__clock { opacity: .12 !important; pointer-events: none; }
.wd-trib { position: absolute; inset: 0; z-index: 300; cursor: default; }
.wd-trib__clouds { position: absolute; left: -20%; right: -20%; top: -10%; height: 46%; pointer-events: none; }
.wd-trib__clouds i {
  position: absolute; inset: 0; border-radius: 50%; filter: blur(18px);
  background: radial-gradient(40% 50% at 30% 50%, rgba(92, 84, 128, .85) 0, transparent 70%), radial-gradient(45% 55% at 70% 40%, rgba(64, 58, 96, .9) 0, transparent 70%);
  animation: wd-cloud 9s ease-in-out infinite alternate;
}
.wd-trib__clouds i:nth-child(2) { top: 12%; opacity: .8; animation-duration: 12s; animation-direction: alternate-reverse; }
.wd-trib__clouds i:nth-child(3) { top: 24%; opacity: .6; animation-duration: 15s; }
@keyframes wd-cloud { to { transform: translateX(8%); } }
.wd-trib__flash { position: absolute; inset: 0; background: #dfe6ff; pointer-events: none; mix-blend-mode: screen; }
.wd-trib__sky { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.wd-trib__bolt { fill: none; stroke: #eef3ff; stroke-width: 2.4; stroke-linejoin: round; filter: drop-shadow(0 0 6px #9fb4ff) drop-shadow(0 0 14px #6f86ff); }
.wd-trib__panel {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); width: min(300px, 88%);
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
.wd-trib__title { font: 600 18px/24px var(--font-serif); letter-spacing: .2em; color: var(--ink); }
.wd-trib__sub { font: 400 12px/18px var(--font-sans); color: var(--ink-muted); }
.wd-trib__seal {
  position: relative; display: grid; place-items: center; width: 96px; height: 96px; padding: 0; border: 0; border-radius: 50%;
  background: color-mix(in srgb, var(--root-jin) 14%, var(--mist)); color: var(--ink); cursor: pointer;
  font: 600 13px/1 var(--font-sans); letter-spacing: .1em; touch-action: none; -webkit-user-select: none; user-select: none;
  box-shadow: 0 0 30px color-mix(in srgb, var(--root-jin) 30%, transparent);
}
.wd-trib__seal:active { transform: scale(.96); }
.wd-trib__seal:focus-visible { outline: 2px solid var(--qing); outline-offset: 3px; }
.wd-trib__seal svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.wd-trib__track { fill: none; stroke: var(--line-strong); stroke-width: 4; }
.wd-trib__fill { fill: none; stroke: var(--root-jin); stroke-width: 4; stroke-linecap: round; filter: drop-shadow(0 0 6px var(--root-jin)); }
.wd-trib__quit { border: 0; background: none; color: var(--ink-faint); font: 400 12px/16px var(--font-sans); cursor: pointer; padding: 6px 10px; }
.wd-trib__done { display: flex; flex-direction: column; gap: 4px; animation: wd-hint-in 600ms ease both; }
.wd-trib__done b { font: 600 22px/28px var(--font-serif); letter-spacing: .2em; color: var(--root-jin); text-shadow: 0 0 18px var(--root-jin); }
.wd-trib__done span { font: 400 13px/18px var(--font-sans); color: var(--ink); }
.wd-orbit__core {
  position: absolute; left: 50%; top: 50%; z-index: 10; display: grid; place-items: center;
  width: 120px; height: 120px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer;
  transition: opacity 300ms ease, filter 300ms ease;
}
.wd-orbit__core:focus-visible { outline: 2px solid var(--qing); outline-offset: 4px; }
.wd-orbit--open .wd-orbit__core { filter: blur(2px) brightness(.6); }
.wd-orbit__core > .wd-orbs, .wd-orbit__core > .wd-orb { grid-area: 1 / 1; }
.wd-orbit__core .wd-mini { filter: drop-shadow(0 0 7px var(--orb-a)); }
/* Ripples stay inside the 修为 ring's reach so they never cross the labels below. */
.wd-orbit__ping {
  position: absolute; inset: 14px; border-radius: 50%; border: 1px solid var(--line-strong);
  animation: wd-ping 2.8s cubic-bezier(0, 0, .2, 1) infinite; opacity: .5; pointer-events: none;
}
.wd-orbit__ping--2 { animation-delay: 1.4s; }
.wd-orbit__xiu { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.wd-orbit__xiu circle { fill: none; stroke-width: 2.5; }
.wd-orbit__xiu-track { stroke: var(--line); }
.wd-orbit__xiu-fill {
  stroke: var(--orb-a); stroke-linecap: round;
  filter: drop-shadow(0 0 4px var(--orb-a)); transition: stroke-dashoffset 900ms cubic-bezier(.2,.7,.2,1);
}
.wd-orbit__id {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 2px; white-space: nowrap; pointer-events: none;
}
.wd-orbit__id b { font: 600 15px/20px var(--font-serif); letter-spacing: .08em; color: var(--ink); }
.wd-orbit__id span { font: 400 11px/14px var(--font-sans); color: var(--ink-muted); }
@keyframes wd-ping { 0% { transform: scale(.85); opacity: .55; } 80%, 100% { transform: scale(1.12); opacity: 0; } }

.wd-onode {
  position: absolute; left: 50%; top: 50%; width: 0; height: 0;
  display: flex; flex-direction: column; align-items: center;
}
.wd-onode__btn {
  /* Size comes from the orbit layout (inline width/height); icon above, name below, both inside the ball. */
  position: relative; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  width: 44px; height: 44px; margin-top: -22px; padding: 0;
  /* A clear glass sphere, 76% transparent (24% opaque): lit from the upper left, with a specular glint and a rim of light. */
  --sph-lit: color-mix(in srgb, var(--ink) 42%, var(--mist));
  --sph-mid: color-mix(in srgb, var(--ink) 12%, var(--mist));
  --sph-dark: color-mix(in srgb, #000 35%, var(--mist));
  border-radius: 50%; border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent);
  background:
    radial-gradient(circle at 34% 28%, rgb(255 255 255 / .85) 0 5%, rgb(255 255 255 / .2) 14%, transparent 30%),
    radial-gradient(circle at 50% 108%, color-mix(in srgb, var(--qing) 38%, transparent) 0, transparent 55%),
    radial-gradient(circle at 38% 32%, color-mix(in srgb, var(--sph-lit) 24%, transparent) 0, color-mix(in srgb, var(--sph-mid) 24%, transparent) 55%, color-mix(in srgb, var(--sph-dark) 24%, transparent) 100%);
  box-shadow: inset -3px -5px 9px rgb(0 0 0 / .28), inset 2px 2px 4px rgb(255 255 255 / .12), 0 6px 14px rgb(0 0 0 / .3);
  color: var(--ink); cursor: pointer;
  transition: transform 300ms ease, background-color 300ms ease, color 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}
.wd-onode__btn:hover { box-shadow: inset -3px -5px 9px rgb(0 0 0 / .28), 0 0 0 6px color-mix(in srgb, var(--ink) 8%, transparent), 0 0 24px color-mix(in srgb, var(--qing) 35%, transparent); }
.wd-onode__btn:focus-visible { outline: 2px solid var(--qing); outline-offset: 3px; }
.wd-onode__label {
  margin-top: 8px; white-space: nowrap; font: 500 12px/16px var(--font-sans); letter-spacing: .08em;
  color: var(--ink-muted); transition: color 300ms ease, transform 300ms ease;
}
.wd-onode--active .wd-onode__btn {
  /* The open node's sphere brightens toward ink, still 24% opaque; the icon stays ink so it reads through the glass. */
  transform: scale(1.5); color: var(--ink); border-color: color-mix(in srgb, var(--ink) 60%, transparent);
  --sph-lit: var(--ink); --sph-mid: color-mix(in srgb, var(--ink) 78%, var(--mist)); --sph-dark: color-mix(in srgb, var(--ink) 45%, var(--mist));
  box-shadow: inset -3px -5px 9px rgb(0 0 0 / .25), 0 0 24px color-mix(in srgb, var(--ink) 35%, transparent);
}
.wd-onode--active .wd-onode__label { color: var(--ink); font-weight: 600; transform: translateY(10px) scale(1.15); }
.wd-onode--related .wd-onode__btn { animation: wd-related 1.6s ease-in-out infinite; border-color: var(--qing); }
.wd-onode--dim { opacity: .35 !important; }
@keyframes wd-related { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--qing) 25%, transparent); } }

/* The card picks up where the pointer is on the page (--wd-x / --wd-y, written to :root by the bundle),
   and shifts its hue along a spread (--wd-base + --wd-xp × --wd-spread). Each planet starts the hue at
   its element's own colour, so moving across the page sweeps through warm neighbours and back. */
@property --wd-spot { syntax: '<length>'; inherits: true; initial-value: 260px; }
.wd-ocard {
  /* Hue shifts along a narrow sweep around the element's own colour, so the border stays in family. */
  --wd-base: 210; --wd-spread: 60;
  --wd-hue: calc(var(--wd-base) + (var(--wd-xp, .5) - .5) * var(--wd-spread));
  --wd-spot: 260px;
  position: absolute; top: 58px; left: 50%; transform: translateX(-50%);
  width: min(272px, 80vw); padding: var(--space-4); border-radius: var(--radius-lg);
  border: 2px solid hsl(var(--wd-hue) 70% 72% / .32);
  color: var(--ink); text-align: left; cursor: default; isolation: isolate;
  background:
    radial-gradient(var(--wd-spot) var(--wd-spot) at
      calc(var(--wd-x, 50) * 1px) calc(var(--wd-y, 50) * 1px),
      hsl(var(--wd-hue) 100% 72% / .28), transparent 65%) fixed,
    linear-gradient(var(--surface), var(--surface)),
    color-mix(in srgb, var(--mist) 88%, transparent);
  -webkit-backdrop-filter: blur(calc(var(--glass-blur) + 2px)) saturate(1.25);
  backdrop-filter: blur(calc(var(--glass-blur) + 2px)) saturate(1.25);
  box-shadow: var(--shadow-float), 0 0 36px -8px hsl(var(--wd-hue) 95% 60% / .7);
  animation: wd-ocard-in 360ms cubic-bezier(.2,.7,.2,1) both;
}
/* Element hue starts: 木 green, 火 red-orange, 土 amber, 金 pale gold, 水 azure. */
.wd-ocard[data-el="mu"]   { --wd-base: 128; }
.wd-ocard[data-el="huo"]  { --wd-base:  12; }
.wd-ocard[data-el="tu"]   { --wd-base:  36; }
.wd-ocard[data-el="jin"]  { --wd-base:  48; }
.wd-ocard[data-el="shui"] { --wd-base: 206; }
.wd-ocard__stem { position: absolute; left: 50%; top: -14px; width: 1px; height: 14px; background: var(--line-strong); }
.wd-ocard__top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.wd-ocard__badge {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--radius-pill);
  border: 1px solid var(--ink); font: 600 11px/1 var(--font-sans); letter-spacing: .04em;
}
.wd-ocard__badge--hot { background: var(--ink); color: var(--mist); }
.wd-ocard__badge--quiet { border-color: var(--line-strong); color: var(--ink-muted); }
.wd-ocard__time { font: 400 11px/14px var(--font-sans); color: var(--ink-muted); }
.wd-ocard__title { margin-top: var(--space-3); font: 600 14px/20px var(--font-sans); }
.wd-ocard__desc { margin: 4px 0 0; font: 400 13px/19px var(--font-sans); color: var(--ink-muted); }
.wd-ocard__meter { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.wd-ocard__mrow { display: flex; justify-content: space-between; font: 500 12px/16px var(--font-sans); color: var(--ink-muted); }
.wd-ocard__mrow span:first-child { display: inline-flex; align-items: center; gap: 4px; }
.wd-ocard__track { margin-top: 6px; height: 4px; border-radius: 2px; background: var(--surface-sunk); overflow: hidden; }
.wd-ocard__track span { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--qing), var(--whisper)); transition: width 600ms ease; }
.wd-ocard__rel { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.wd-ocard__rlabel { display: flex; align-items: center; gap: 4px; font: 500 12px/16px var(--font-sans); color: var(--ink-muted); }
.wd-ocard__chips { margin-top: var(--space-2); display: flex; flex-wrap: wrap; gap: 6px; }
.wd-ocard__chip {
  display: inline-flex; align-items: center; gap: 2px; height: 26px; padding: 0 10px;
  border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: transparent;
  color: var(--ink); font: 500 12px/1 var(--font-sans); cursor: pointer; transition: background-color 160ms ease;
}
.wd-ocard__chip:hover { background: var(--surface-sunk); }
.wd-ocard__chip:focus-visible { outline: 2px solid var(--qing); outline-offset: 2px; }
.wd-ocard__go { width: 100%; margin-top: var(--space-4); }
@keyframes wd-ocard-in { from { opacity: 0; transform: translate(-50%, -8px) scale(.96); } }

/* Spotlight border: the pointer casts a sharp bright arc on the border (::before, brightened), and a pure-white
   glint under it (::after). The whole border tracks the pointer across the viewport, like a torch on a jade edge. */
.wd-ocard::before, .wd-ocard::after {
  content: ''; position: absolute; inset: -2px; z-index: -1; pointer-events: none;
  border: 2px solid transparent; border-radius: inherit;
  background-repeat: no-repeat; background-position: 50% 50%;
  background-size: calc(100% + 4px) calc(100% + 4px);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.wd-ocard::before {
  background-image: radial-gradient(
    calc(var(--wd-spot) * .75) calc(var(--wd-spot) * .75) at
    calc(var(--wd-x, 50) * 1px) calc(var(--wd-y, 50) * 1px),
    hsl(var(--wd-hue) 100% 55% / 1), transparent 100%);
  background-attachment: fixed; filter: brightness(1.9);
}
.wd-ocard::after {
  background-image: radial-gradient(
    calc(var(--wd-spot) * .5) calc(var(--wd-spot) * .5) at
    calc(var(--wd-x, 50) * 1px) calc(var(--wd-y, 50) * 1px),
    hsl(0 0% 100% / .95), transparent 100%);
  background-attachment: fixed;
}
/* A soft outer bloom in the same shifted hue, blurred, so the glow bleeds beyond the border. */
.wd-ocard > .wd-ocard__glow {
  position: absolute; inset: -14px; border-radius: calc(var(--radius-lg) + 10px); pointer-events: none; z-index: -2;
  background: radial-gradient(
    calc(var(--wd-spot) * .9) calc(var(--wd-spot) * .9) at
    calc(var(--wd-x, 50) * 1px) calc(var(--wd-y, 50) * 1px),
    hsl(var(--wd-hue) 95% 60% / .55), transparent 70%);
  background-attachment: fixed; filter: blur(16px); opacity: .85;
}
@media (prefers-reduced-motion: reduce) {
  .wd-ocard::before, .wd-ocard::after, .wd-ocard > .wd-ocard__glow { background-attachment: scroll; }
}

/* Moments (动态): 3D cards. No backdrop blur or overflow clipping here: both would flatten the 3D layers. */
.wd-feed { display: flex; flex-direction: column; gap: var(--space-6); }
.wd-mo-stage { perspective: 1000px; }
.wd-mo {
  position: relative; transform-style: preserve-3d; transition: transform 200ms linear, box-shadow 300ms ease;
  padding: var(--space-4); border-radius: var(--radius-lg); border: 1px solid var(--line);
  background: linear-gradient(var(--surface), var(--surface)), color-mix(in srgb, var(--mist) 85%, transparent);
  color: var(--ink); font-family: var(--font-sans);
}
.wd-mo.is-in { box-shadow: 0 28px 48px -16px color-mix(in srgb, var(--qing) 30%, transparent); }
.wd-mo__layer { transform: translateZ(0); transition: transform 200ms linear; transform-style: preserve-3d; }
.wd-mo.is-in .wd-mo__layer { transform: translateZ(var(--z)); }
.wd-mo__head { display: flex; align-items: center; gap: var(--space-3); }
.wd-mo__who { display: flex; align-items: baseline; gap: var(--space-2); flex: 1; min-width: 0; }
.wd-mo__name { font: 600 15px/22px var(--font-sans); }
.wd-mo__realm { font: 400 12px/16px var(--font-serif); color: var(--ink-muted); letter-spacing: .04em; }
.wd-mo__time { font: 400 12px/16px var(--font-sans); color: var(--ink-muted); white-space: nowrap; }
.wd-mo__text { margin-top: var(--space-3); font: 400 15px/24px var(--font-sans); white-space: pre-wrap; overflow-wrap: anywhere; }
.wd-mo__imgs { margin-top: var(--space-3); display: grid; gap: 6px; }
.wd-mo__imgs img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); background: var(--surface-sunk); }
.wd-mo__imgs--1 img { aspect-ratio: 16 / 10; border-radius: var(--radius-md); }
.wd-mo__imgs--2 { grid-template-columns: repeat(2, 1fr); }
.wd-mo__imgs--3 { grid-template-columns: repeat(3, 1fr); }
.wd-mo.is-in .wd-mo__imgs img { box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28); }
.wd-mo__video { margin-top: var(--space-3); width: 100%; }
.wd-mo__video video { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-md); background: #000; }
.wd-mo.is-in .wd-mo__video video { box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28); }
.wd-mo__acts { margin-top: var(--space-4); display: flex; gap: var(--space-2); flex-wrap: wrap; }
.wd-mo__act--shared { color: var(--qing); }
.wd-mo__act {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 var(--space-4);
  border: 0; border-radius: var(--radius-pill); background: var(--surface-sunk); color: var(--ink-muted);
  font: 500 13px/1 var(--font-sans); cursor: pointer; transition: color 160ms ease, background-color 160ms ease;
}
.wd-mo__act:focus-visible, .wd-mo__input:focus-visible, .wd-post__text:focus-visible { outline: 2px solid var(--qing); outline-offset: 2px; }
.wd-mo__act--on { color: var(--like); }
.wd-mo__act--on .wd-icon path { fill: currentColor; }
.wd-mo__act--on .wd-icon { animation: wd-pop 320ms cubic-bezier(.3,1.6,.5,1); }
.wd-mo__act--open { color: var(--ink); }
/* Counts roll into place when they change (up for more, down for less), in tabular figures. */
.wd-mo__act { position: relative; }
.wd-mo__count { display: inline-block; font-variant-numeric: tabular-nums; }
.wd-mo__count--up { animation: wd-mo-roll-up 340ms cubic-bezier(.2, .8, .2, 1) both; }
.wd-mo__count--down { animation: wd-mo-roll-down 340ms cubic-bezier(.2, .8, .2, 1) both; }
@keyframes wd-mo-roll-up { from { opacity: 0; transform: translateY(70%); filter: blur(2px); } }
@keyframes wd-mo-roll-down { from { opacity: 0; transform: translateY(-70%); filter: blur(2px); } }
/* Liking sends six sparks out from the heart, once. */
.wd-mo__burst {
  position: absolute; left: calc(var(--space-4) + 7px); top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%;
  color: var(--like); pointer-events: none;
  box-shadow: 0 -11px 0 -.5px currentColor, 9.5px -5.5px 0 -.5px currentColor, 9.5px 5.5px 0 -.5px currentColor,
    0 11px 0 -.5px currentColor, -9.5px 5.5px 0 -.5px currentColor, -9.5px -5.5px 0 -.5px currentColor;
  animation: wd-mo-burst 560ms cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes wd-mo-burst { from { transform: scale(.35); opacity: 1; } 70% { opacity: .9; } to { transform: scale(1.5); opacity: 0; } }
.wd-mo__comments { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.wd-mo__list { list-style: none; margin: 0 0 var(--space-3); padding: 0; display: flex; flex-direction: column; gap: 6px; font: 400 14px/21px var(--font-sans); }
.wd-mo__list b { font-weight: 600; margin-right: 6px; }
.wd-mo__empty { margin: 0 0 var(--space-3); font: 400 13px/19px var(--font-sans); color: var(--ink-muted); }
.wd-mo__reply { display: flex; align-items: center; gap: var(--space-2); }
.wd-mo__input {
  flex: 1; min-width: 0; height: 36px; padding: 0 var(--space-4); border: 0; border-radius: var(--radius-pill);
  background: var(--surface-sunk); color: var(--ink); font: 400 14px/21px var(--font-sans);
}
.wd-mo__input::placeholder, .wd-post__text::placeholder { color: var(--ink-faint); }
@keyframes wd-pop { 0% { transform: scale(1); } 45% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* 发布动态 */
.wd-post {
  display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-4); border-radius: var(--radius-xl); background: var(--surface); color: var(--ink);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4); backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  box-shadow: var(--shadow-float); font-family: var(--font-sans);
}
.wd-post__text { width: 100%; min-height: 72px; resize: none; border: 0; background: transparent; color: var(--ink); font: 400 15px/24px var(--font-sans); border-radius: var(--radius-sm); }
.wd-post__thumbs { display: grid; grid-template-columns: repeat(auto-fill, 64px); gap: 6px; }
.wd-post__thumb { position: relative; width: 64px; height: 64px; }
.wd-post__thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-sm); }
.wd-post__remove {
  position: absolute; top: -6px; right: -6px; display: grid; place-items: center; width: 20px; height: 20px;
  border: 0; border-radius: 50%; background: var(--ink); color: var(--mist); cursor: pointer;
}
.wd-post__video { position: relative; width: 160px; }
.wd-post__video video { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius-sm); background: #000; }
.wd-post__err { margin: 0; font: 500 13px/19px var(--font-sans); color: var(--danger); }
.wd-post__bar { display: flex; align-items: center; gap: var(--space-3); }
.wd-post__hint { flex: 1; font: 400 12px/16px var(--font-sans); color: var(--ink-muted); }

/* Composer */
.wd-composer {
  display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-4); border-radius: var(--radius-xl);
  background: var(--surface); box-shadow: var(--shadow-float);
}
.wd-composer__row { display: flex; align-items: center; gap: var(--space-3); }
.wd-composer__input {
  flex: 1; min-width: 0; height: 44px; padding: 0 var(--space-4);
  border: 0; background: var(--surface-sunk); color: var(--ink);
  font: 400 15px/22px var(--font-sans); border-radius: var(--radius-pill);
}
.wd-composer__input::placeholder { color: var(--ink-faint); }
.wd-composer__tools { display: flex; gap: var(--space-2); }
.wd-composer__tool {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: var(--surface-sunk); color: var(--ink); cursor: pointer;
}
.wd-composer__tool[aria-pressed="true"] { background: var(--whisper-soft); color: var(--whisper); }
.wd-composer--jade { background: var(--xuan-soft); align-items: center; text-align: center; }
.wd-composer__hint { font: 400 13px/19px var(--font-sans); color: var(--ink-muted); margin: 0; }
.wd-composer__hint b { color: var(--xuan); font-weight: 600; }
.wd-composer__hold {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: 48px; padding: 0 var(--space-6); border: 0; border-radius: var(--radius-pill);
  background: var(--xuan); color: var(--mist); font: 500 15px/1 var(--font-sans); cursor: pointer;
}
.wd-composer--suppressed { background: var(--surface-sunk); box-shadow: none; }
.wd-composer--suppressed .wd-composer__hint { display: flex; align-items: center; gap: var(--space-2); color: var(--ink-muted); }

/* Tab bar */
.wd-tabbar {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 6px; border-radius: var(--radius-pill);
  background: var(--surface); box-shadow: var(--shadow-float);
}
.wd-tab {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  border: 0; background: transparent; color: var(--ink-muted); cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
}
.wd-tab[aria-current="page"] {
  background: radial-gradient(120% 120% at 30% 20%, var(--qing-soft) 0%, var(--qing-glow) 120%);
  color: var(--ink);
}
.wd-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Dual calendar */
.wd-date { display: inline-flex; align-items: baseline; gap: 6px; font: 400 13px/19px var(--font-sans); color: var(--ink-muted); }
.wd-date__xian { color: var(--ink); font-weight: 500; }
.wd-date__sep { color: var(--ink-faint); }
.wd-date--hero { flex-direction: column; align-items: inherit; gap: 2px; }
.wd-date--hero .wd-date__xian { font: 600 22px/28px var(--font-serif); letter-spacing: 0.04em; }
.wd-date--hero .wd-date__fan { font-size: 13px; }

/* Cultivation-time span */
.wd-span { display: inline-flex; align-items: baseline; gap: 6px; }
.wd-span__fan { font-size: .85em; color: var(--ink-muted); font-weight: 400; }
.wd-span__fan::before { content: "（"; }
.wd-span__fan::after { content: "）"; }

/* Seclusion banner */
.wd-banner {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); border-radius: var(--radius-md);
  background: var(--xuan-soft); color: var(--xuan); font: 500 13px/19px var(--font-sans);
}

@media (prefers-reduced-motion: reduce) {
  .wd-orb__img, .wd-orb__glow, .wd-orbs__ring, .wd-mini__body img, .wd-jade__core,
  .wd-avatar__pressure, .wd-wycast__word, .wd-wycast__seal { animation: none !important; }
  .wd-sc__motes { display: none; }
  .wd-avatar__face, .wd-btn, .wd-chip, .wd-tab, .wd-card, .wd-jcard { transition: opacity 160ms ease !important; }
  .wd-ci__time i, .wd-probe--on .wd-probe__icon i, .wd-conj__line, .wd-conj, .wd-onode__orb,
  .wd-orbit__sky i, .wd-orbit__aura, .wd-orbit__mote i, .wd-onode--pressure .wd-onode__btn::before, .wd-onode--pressure .wd-onode__btn::after,
  .wd-onode--fire .wd-onode__fx, .wd-trib__clouds i, .wd-orbit__core--ready .wd-orbit__xiu-fill,
  .wd-sc__floor::after, .wd-sc__horizon i, .wd-sc__aura, .wd-sc__reflect,
  .wd-rt__light, .wd-rt__orb, .wd-rt__flash, .wd-rt__cluster, .wd-rt__verdict, .wd-rt__hole, .wd-rt__spat, .wd-rt__spat b,
  .wd-rt__verdict > *, .wd-rt__grade span, .wd-rt__seal, .wd-rt__enter::after,
  .wd-stack, .wd-mo__act--on .wd-icon, .wd-mo__count--up, .wd-mo__count--down, .wd-mo__burst, .wd-orbit__ping, .wd-onode--related .wd-onode__btn, .wd-ocard,
  .wd-ocard::before, .wd-ocard::after,
  .wd-sm__name, .wd-sm__seal, .wd-sm__lines, .wd-sm__gate, .wd-sm__veil { animation: none !important; }
  .wd-sm--flying .wd-sm__veil { opacity: 1; transition: opacity 400ms ease; }
  .wd-whiteflash, .wd-rt__whiteout { animation-duration: 400ms !important; }
  /* Still, the light rests with the planet's colour along the top edge. */
  .wd-ocard::before, .wd-ocard::after { --wd-ang: 300deg; }
}

/* ElementRealm (五行之境): fills its positioned parent, behind the content, never takes the pointer. */
.wd-realm { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: block; }

/* 渡劫 · 道友助阵: allies who came to stand with you, under the title; each steadies the seal. */
.wd-trib__allies { display: flex; align-items: flex-end; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.wd-trib__ally { display: flex; flex-direction: column; align-items: center; gap: 2px; animation: wd-trib-ally 600ms cubic-bezier(.2, .7, .2, 1) both; }
.wd-trib__ally .wd-avatar { filter: drop-shadow(0 0 8px rgb(170 200 255 / .6)); }
.wd-trib__ally small { font: 500 10px/14px var(--font-sans); color: rgb(220 230 255 / .85); letter-spacing: .06em; }
.wd-trib__allies em { flex-basis: 100%; text-align: center; font: 500 12px/16px var(--font-sans); font-style: normal; color: rgb(200 220 255 / .9); }
@keyframes wd-trib-ally { from { opacity: 0; transform: translateY(10px) scale(.8); } }
@media (prefers-reduced-motion: reduce) { .wd-trib__ally { animation: none; } }

/* 太虚: the deep sky behind the star system (DeepSpace). The 时辰 tint still lies over it; the old CSS stars give way. */
.wd-orbit { background: #05060e; }
.wd-orbit__deep { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.wd-orbit__sky i { display: none; }

/* 运功 · 渡劫 as visible buttons, above the 时辰 readout. 「按住运功」 fills left to right while held;
   at 修为 100% a gold 「渡劫」 takes its place. */
.wd-orbit__acts { position: absolute; left: 50%; bottom: 92px; transform: translateX(-50%); z-index: 215; display: flex; gap: 8px; }
/* In the flat wheel the open card hangs below its planet; the buttons step aside until it closes. */
.wd-orbit--flat.wd-orbit--open .wd-orbit__acts { opacity: 0; pointer-events: none; transition: opacity .25s; }
.wd-orbit--flat .wd-orbit__acts { transition: opacity .35s .1s; }
.wd-orbit__act {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 18px; border: 0; border-radius: 999px; cursor: pointer;
  color: var(--ink); font: 500 13px/1 var(--font-sans); letter-spacing: .12em; white-space: nowrap;
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  background: linear-gradient(90deg, color-mix(in srgb, var(--orb-a, var(--qing)) 45%, transparent) var(--yun, 0%), rgb(255 255 255 / .06) var(--yun, 0%));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .14);
  -webkit-backdrop-filter: blur(var(--glass-blur)); backdrop-filter: blur(var(--glass-blur));
  transition: box-shadow 200ms ease, transform 140ms ease;
}
.wd-orbit__act .wd-icon { color: var(--orb-a, var(--qing)); }
.wd-orbit__act:hover { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .26); }
.wd-orbit__act--on { transform: scale(.97); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--orb-a, var(--qing)) 70%, transparent); }
.wd-orbit__act:focus-visible { outline: 2px solid var(--qing); outline-offset: 2px; }
.wd-orbit__act--trib {
  background: color-mix(in srgb, var(--root-jin) 22%, rgb(255 255 255 / .04)); color: var(--ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--root-jin) 60%, transparent), 0 8px 24px -10px var(--root-jin);
}
.wd-orbit__act--trib .wd-icon { color: var(--root-jin); }

/* 入道: while the sky above is drawn into the hole, the hold control waits out of sight, then fades in. */
.wd-rt--arriving .wd-rt__hold { opacity: 0; visibility: hidden; }
.wd-rt__hold { transition: opacity 420ms ease, visibility 0s; }
/* 测灵: space squeezed toward the hole springs back when you let go, and overshoots a touch as the roots come out. */
.wd-rt--released .wd-rt__scene { transition: transform 420ms cubic-bezier(.2, .8, .2, 1); }
.wd-rt--eject .wd-rt__scene { transition: transform 720ms cubic-bezier(.34, 1.56, .64, 1); }

/* 灵丝雨: the test's backdrop of falling threads (SpiritRain), with a soft magenta glow following the pointer. */
.wd-rt__rain {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; pointer-events: none;
  background: radial-gradient(ellipse 80% 70% at 50% 42%, #0e0d2a 0%, #080818 55%, #040410 100%);
}
.wd-rt__rain-glow {
  position: absolute; left: -140px; top: -140px; width: 280px; height: 280px; border-radius: 50%; z-index: 0;
  pointer-events: none; opacity: 0; will-change: transform, opacity; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(232, 64, 176, 0.32) 0%, rgba(232, 64, 176, 0.12) 35%, rgba(232, 64, 176, 0) 70%);
}
/* orbits: false: no orbit rings, and the globe's rim goes too; the planets move on the dark alone. */
.wd-orbit--bare .wd-orbit__globe { stroke: none; }
