.game-tools { display: flex; gap: .26rem; }
.game-tool { gap: .26rem; min-width: 44px; min-height: 44px; justify-content: center; }
.game-tool span:first-child { font-size: 1.08em; }
.game-tool[aria-pressed="true"] { border-color: #ddaf68; background: #44362b; color: #ffe5ac; }
.game-focus-lobby { display: none; white-space: nowrap; }
.game-focus .game-focus-lobby { display: inline-flex; margin-inline-end: auto; }
.game-nav-trail { display: inline-flex; align-items: center; gap: .42rem; min-width: 0; }
.game-nav-trail .identity { gap: .42rem; min-height: 40px; padding-inline-end: .12rem; border-radius: .6rem; }
.merge-nav .identity img { display: block; object-fit: contain; filter: drop-shadow(0 1px 3px #0713242e); }
.merge-page:not(.games-hall-page):not(.mines-page):not(.claw-page):not(.match-page):not(.party-page) .merge-nav .identity img {
  filter: drop-shadow(0 2px 5px #00000059);
}
.nav-home-tag {
  display: inline-flex; align-items: center; gap: .18rem;
  padding: .16rem .46rem; border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  border-radius: 999px; background: color-mix(in srgb, currentColor 11%, transparent);
  font-size: .74rem; font-weight: 740; line-height: 1.2; white-space: nowrap;
}
.merge-nav .identity:hover .nav-home-tag { background: color-mix(in srgb, currentColor 19%, transparent); }
.game-nav-sep { opacity: .45; font-size: .92rem; font-weight: 600; user-select: none; }
.game-lobby-back {
  min-height: 38px; padding: 0 .64rem; gap: .24rem;
  font-size: .84rem; font-weight: 740; white-space: nowrap; text-decoration: none;
}
.game-switch-btn { text-decoration: none; }
.game-screen, .game-screen-bar, .game-compact-summary, .game-compact-actions { display: contents; }
.merge-page[data-game]:not(.game-focus) { padding-inline: env(safe-area-inset-left) env(safe-area-inset-right); }
.merge-page[data-game] .merge-nav { padding-block-start: env(safe-area-inset-top); }
.merge-page .merge-dialog:not(.bluff-sheet) {
  inset: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  max-inline-size: calc(100% - env(safe-area-inset-left) - env(safe-area-inset-right) - 1rem);
  max-block-size: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 1rem);
  max-block-size: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 1rem);
  overflow: auto;
  overscroll-behavior: contain;
}
html:has(> body.game-focus), body.game-focus { overflow: hidden; overscroll-behavior: none; }
.game-focus > :is(.merge-nav, .skip-link), .game-focus main > :not(.game-screen) { display: none; }
.game-focus main { width: 100%; margin: 0; padding: 0; background: inherit; }
.game-focus .game-screen {
  --game-viewport-height: 100vh;
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, min(100%, var(--game-screen-width, 36rem)));
  grid-auto-rows: max-content;
  justify-content: center;
  align-content: start;
  gap: .53rem;
  width: 100%;
  height: var(--game-viewport-height);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable both-edges;
  scroll-padding-block-start: 3.25rem;
  overscroll-behavior: contain;
  padding: max(.45rem, env(safe-area-inset-top)) max(.65rem, env(safe-area-inset-right))
    max(.65rem, env(safe-area-inset-bottom)) max(.65rem, env(safe-area-inset-left));
  background: inherit;
}
@supports (height: 100dvh) {
  .game-focus .game-screen { --game-viewport-height: 100dvh; }
}
.game-screen::backdrop { background: #111829; }
.game-focus .game-screen > .game-tools {
  position: sticky;
  top: env(safe-area-inset-top);
  z-index: 6;
  justify-content: flex-end;
  align-items: center;
  margin: 0;
  padding-block: .15rem;
  background: inherit;
}
.game-focus .game-screen [data-full] span:last-child { display: inline; }
.game-focus .game-screen > [data-game-panel] { grid-area: auto; width: 100%; min-inline-size: 0; }
.game-focus .game-screen-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .55rem;
  min-inline-size: 0;
}
.game-focus .game-screen-bar:empty { display: none; }
.game-focus[data-game="merge"] .game-screen { --game-screen-width: clamp(16rem, calc(var(--game-viewport-height) - 12.5rem), 35rem); }
.game-focus[data-game="jieqi"] .game-screen { --game-screen-width: clamp(16rem, calc(var(--game-viewport-height) - 10rem), 34rem); }
.game-focus:is([data-game="sudoku"], [data-game="english-sudoku"]) .game-screen { --game-screen-width: clamp(16rem, calc(var(--game-viewport-height) - 12rem), 33rem); }
.game-focus:is([data-game="bluff"], [data-game="werewolf"], [data-game="quiz"]) .game-screen { --game-screen-width: 40rem; }
.game-screen-bar > [data-game-screen-setup], .game-screen > [data-game-screen-room] { margin: 0; }
.game-focus .game-screen-bar > .campaign-controls { width: auto; max-width: 100%; }
.game-screen > [data-game-screen-room] { width: 100%; }
.game-screen-bar > .arcade-setup { padding: .5rem; }
.game-screen-bar > [data-words-clue-button] { justify-self: end; }
.game-screen :is(.bluff-difficulty-note, .bluff-sample) { display: none; }
.game-screen .bluff-idle { min-height: 0; padding: .35rem .15rem; }
.game-screen:has([data-bluff-match]:not([hidden], [data-bluff-finished])) .game-screen-bar > [data-bluff-solo],
.game-screen:has([data-wolf-table]:not([hidden])) .game-screen-bar > [data-party-practice-setup],
.game-screen > [data-party-practice]:not(:has([data-wolf-table]:not([hidden]))) { display: none; }
.game-screen > .quiz-stage:not(:has([data-quiz-round]:not([hidden]), [data-quiz-search]:not([hidden]), [data-quiz-ready]:not([hidden]), [data-quiz-result]:not([hidden]))) {
  display: none;
}
.game-screen:has([data-quiz-round]:not([hidden]), [data-quiz-result]:not([hidden]), [data-quiz-search]:not([hidden]), [data-quiz-ready]:not([hidden]))
  .game-screen-bar > [data-game-screen-setup] :is(.arcade-modes, .arcade-label, [data-quiz-solo], .arcade-guide) { display: none; }
.game-screen:has([data-quiz-result]:not([hidden])) .game-screen-bar > [data-game-screen-setup],
.game-screen:has([data-quiz-round]:not([hidden])) .game-screen-bar > [data-game-screen-setup]:not(:has([data-quiz-online]:not([hidden]))) { display: none; }
@media (orientation: landscape) and (min-width: 30rem) {
  .game-focus .game-screen:has(.game-compact-play:not([hidden])) {
    --game-wide-board: min(52vw, max(10rem, calc(var(--game-viewport-height) - 9rem - env(safe-area-inset-top) - env(safe-area-inset-bottom))), 34rem);
    grid-template-columns: minmax(0, min(100%, 60rem));
  }
  .game-focus .game-screen-bar > [data-game-screen-setup] { min-inline-size: 0; }
  .game-focus .game-compact-play {
    display: grid;
    grid-template-columns: minmax(0, var(--game-wide-board)) minmax(0, 1fr);
    grid-template-areas: "board summary" "board actions";
    grid-template-rows: auto 1fr;
    gap: .5rem clamp(.55rem, 2vw, 1.2rem);
    align-items: start;
  }
  .game-focus .game-compact-summary, .game-focus .game-compact-actions { display: grid; gap: .4rem; min-inline-size: 0; justify-self: stretch; }
  .game-focus .game-compact-summary { grid-area: summary; }
  .game-focus .game-compact-actions { grid-area: actions; }
  .game-focus .game-compact-board { grid-area: board; min-inline-size: 0; align-self: start; }
}
@media (orientation: landscape) and (max-height: 35rem) {
  .game-focus:is([data-game="bluff"], [data-game="werewolf"]) .game-screen-bar > :is(.bluff-modes, .wolf-modes, .campaign-controls) { width: auto; }
  .game-focus:is([data-game="bluff"], [data-game="werewolf"]) .game-screen-bar > :is(.bluff-solo, .arcade-setup) { flex: 1 0 100%; order: 2; }
  .merge-page .merge-dialog:not(.bluff-sheet) { padding-block: .8rem; }
}
.game-rules-dialog { width: min(34rem, calc(100% - 1.3rem)); }
.game-rules-dialog > :is(p, ul, ol) { margin-block: .7rem; line-height: 1.55; }
.game-rules-dialog > :is(ul, ol) { padding-inline-start: 1.35rem; }
.game-rules-dialog li + li { margin-top: .35rem; }
.game-feedback { block-size: 2.8em; overflow: auto; overflow-wrap: anywhere; line-height: 1.4; }
@media (pointer: coarse) {
  .merge-page[data-game] :is(input:not([type="checkbox"], [type="radio"]), select) { font-size: max(1rem, 1em); }
}
.game-toast {
  position: fixed; z-index: 62; inset: auto 1rem max(1rem, env(safe-area-inset-bottom));
  width: fit-content; max-width: calc(100% - 2rem); margin-inline: auto; padding: .68rem 1rem;
  border: 1px solid #e2b970; border-radius: .74rem; background: #2e2b43f5;
  box-shadow: 0 .45rem 1.8rem #10121a99; color: #ffedc2; font-weight: 700; pointer-events: none;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.game-toast:not([hidden]) { animation: xh-toast-in var(--xh-dur-base) var(--xh-ease-spring) both; }
.game-toast.is-leaving { animation: xh-toast-out var(--xh-dur-fast) var(--xh-ease-exit) both; }
@keyframes xh-toast-in { from { opacity: 0; transform: translateY(.75rem) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes xh-toast-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(.45rem) scale(.97); } }
.wallet-button { position: relative; flex: none; gap: .32rem; border-color: #a28254; background: #3b312a; color: #ffe8ad; font-variant-numeric: tabular-nums; }
.wallet-tier-tag {
  display: inline-flex; align-items: center; padding: .08rem .34rem; border-radius: 999px;
  font-size: .68rem; font-weight: 820; line-height: 1.25; letter-spacing: .01em;
  background: #ffffff1f; color: inherit; border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
}
.wallet-alert-dot {
  position: absolute; top: -.14rem; right: -.14rem; width: .52rem; height: .52rem;
  border-radius: 50%; background: #e84836; border: 2px solid #22293e; pointer-events: none;
}
.wallet-alert-dot[hidden] { display: none; }
.games-hall-page .wallet-alert-dot { border-color: #f7f4ec; }
/* Top-nav wallet button subtle tier accents */
.wallet-button[data-pass-tier="iron"] { border-color: #7c879b; }
.wallet-button[data-pass-tier="bronze"] { border-color: #c78556; }
.wallet-button[data-pass-tier="silver"] { border-color: #b8c8df; }
.wallet-button[data-pass-tier="gold"] { border-color: #ebc260; }
.wallet-button[data-pass-tier="platinum"] { border-color: #6bd0db; }
.wallet-button[data-pass-tier="diamond"] { border-color: #6ea9ff; }
.wallet-button[data-pass-tier="master"] { border-color: #d685ff; }
.wallet-button[data-pass-tier="grandmaster"] { border-color: #ff8c73; }
.wallet-button[data-pass-tier="king"] { border-color: #ffd866; box-shadow: 0 0 0 1px #ffd86644; }
.wallet-button[data-pass-tier="radiant"] {
  border-color: #79f6e2;
  background: linear-gradient(115deg, #1b2248, #3d2c7a 55%, #194b59);
  color: #fff6c9;
  box-shadow: 0 0 12px #72f5df4a;
}
.games-hall-page .wallet-button[data-pass-tier="radiant"] {
  border-color: #36b5a9;
  background: linear-gradient(115deg, #172047, #412d84 55%, #165161);
  color: #fff8cf;
}
.wallet-coin, [data-coin-award]::before { background: url('./dachui-coin.svg') center / contain no-repeat; }
.wallet-coin { display: block; flex: none; width: var(--coin-size, 1.25rem); aspect-ratio: 1; }
[data-coin-award]::before { content: ''; display: inline-block; width: 1.12em; aspect-ratio: 1; margin-inline-end: .35em; vertical-align: -.17em; }
.game-checkout-medal { --coin-size: 3.1rem; margin-inline: auto; }
.game-wallet { width: min(36rem, calc(100% - 1.2rem)); background: linear-gradient(150deg, #2e304c, #21273d); border-color: #b4996f; }
.game-wallet .game-dialog-header h2 { color: #ffdfa2; }

/* 10-Tier Metallic / Holographic XinHammer Pass Card */
.xh-pass-card {
  --pass-bg0: #2b313d; --pass-bg1: #495264; --pass-rim: #9aa6bc; --pass-ink: #eef2f9; --pass-bar: #c3cfe4;
  position: relative; overflow: hidden; isolation: isolate;
  margin: .55rem 0 .85rem; padding: .92rem 1rem .8rem;
  border: 1.5px solid var(--pass-rim); border-radius: 1.02rem;
  color: var(--pass-ink);
  background:
    radial-gradient(circle at var(--sheen-x, 92%) var(--sheen-y, 6%), color-mix(in srgb, var(--pass-rim) 40%, transparent), transparent 56%),
    repeating-linear-gradient(125deg, #ffffff08 0 2px, transparent 2px 11px),
    linear-gradient(135deg, var(--pass-bg0), var(--pass-bg1) 55%, var(--pass-bg0));
  box-shadow: 0 .65rem 1.8rem #0a0f1f4d, inset 0 1px #ffffff38;
  transform: perspective(760px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform var(--xh-dur-slow) var(--xh-ease-spring), border-color var(--xh-dur-base) var(--xh-ease-spring);
  will-change: transform;
}
.xh-pass-card.is-tilting { transition: border-color var(--xh-dur-fast) var(--xh-ease-spring); }
.xh-pass-card.is-swapping { animation: xh-card-swap var(--xh-dur-base) var(--xh-ease-spring) both; }
@keyframes xh-card-swap { from { opacity: .82; transform: scale(.982); } to { opacity: 1; transform: perspective(760px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); } }
.xh-pass-preview-bar {
  display: flex; align-items: center; justify-content: space-between; gap: .45rem;
  margin: -.18rem 0 .48rem; padding: .24rem .5rem; border-radius: .5rem;
  background: #0000004d; border: 1px solid color-mix(in srgb, var(--pass-rim) 65%, transparent);
  font-size: .73rem; font-weight: 720; color: var(--pass-ink);
}
.xh-pass-preview-bar[hidden] { display: none; }
.xh-pass-preview-bar button {
  flex: none; padding: .14rem .48rem; border-radius: 999px;
  border: 1px solid var(--pass-rim); background: #ffffff24; color: #fff;
  font: 750 .71rem/1.2 var(--sans); cursor: pointer;
}
.xh-pass-preview-bar button:hover { background: #ffffff3b; }
.xh-newbie-guide {
  margin: 0 0 .75rem !important; padding: .48rem .68rem; border-radius: .65rem;
  border: 1px solid #d9b86b; background: #473923; color: #ffebc0 !important;
  font-size: .8rem; font-weight: 700; line-height: 1.45;
}
.games-hall-page .xh-newbie-guide { border-color: #dec079; background: #fff7e1; color: #5f3d0b !important; }
.xh-newbie-guide[hidden] { display: none; }
.wallet-device-balance {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .45rem;
  margin: 0 0 .75rem; padding: .5rem .68rem; border-radius: .65rem;
  border: 1px solid color-mix(in srgb, currentColor 24%, transparent);
  background: color-mix(in srgb, currentColor 6%, transparent); font-size: .8rem; line-height: 1.4;
}
.wallet-device-balance[hidden] { display: none; }
.wallet-merge-btn { min-height: 36px; padding: .2rem .66rem; font-size: .78rem; }
.wallet-merge-btn[hidden] { display: none; }
.xh-pass-card[data-pass-tier="iron"] { --pass-bg0: #252b36; --pass-bg1: #454f62; --pass-rim: #9aa6bc; --pass-ink: #f1f5fb; --pass-bar: #c8d4e8; }
.xh-pass-card[data-pass-tier="bronze"] { --pass-bg0: #462717; --pass-bg1: #905330; --pass-rim: #e9b186; --pass-ink: #fff3e8; --pass-bar: #f3c197; }
.xh-pass-card[data-pass-tier="silver"] { --pass-bg0: #334054; --pass-bg1: #6f84a2; --pass-rim: #d7e3f4; --pass-ink: #ffffff; --pass-bar: #e8f0fc; }
.xh-pass-card[data-pass-tier="gold"] { --pass-bg0: #52350c; --pass-bg1: #ab7821; --pass-rim: #ffe082; --pass-ink: #fffbe8; --pass-bar: #ffe48d; }
.xh-pass-card[data-pass-tier="platinum"] { --pass-bg0: #143a44; --pass-bg1: #347e8c; --pass-rim: #9ef0f6; --pass-ink: #f2ffff; --pass-bar: #adf5fa; }
.xh-pass-card[data-pass-tier="diamond"] { --pass-bg0: #152862; --pass-bg1: #3460c4; --pass-rim: #9cd1ff; --pass-ink: #f4f9ff; --pass-bar: #b2dcff; }
.xh-pass-card[data-pass-tier="master"] { --pass-bg0: #3a1552; --pass-bg1: #7d2c96; --pass-rim: #efa2ff; --pass-ink: #fef2ff; --pass-bar: #f5b9ff; }
.xh-pass-card[data-pass-tier="grandmaster"] { --pass-bg0: #4d131b; --pass-bg1: #9b2630; --pass-rim: #ffad88; --pass-ink: #fff4ee; --pass-bar: #ffc2a1; }
.xh-pass-card[data-pass-tier="king"] { --pass-bg0: #191612; --pass-bg1: #574118; --pass-rim: #ffd96b; --pass-ink: #fff9e3; --pass-bar: #ffe285; }
.xh-pass-card[data-pass-tier="radiant"] {
  --pass-bg0: #12173a; --pass-bg1: #3d2c85; --pass-rim: #78f6e1; --pass-ink: #fffef2; --pass-bar: #82fae5;
  background:
    linear-gradient(120deg, #70f5df38 0%, #c084ff30 34%, #ffe58838 66%, #68d8ff34 100%),
    radial-gradient(ellipse at 90% 8%, #82fae54d, transparent 58%),
    linear-gradient(135deg, #12173a, #3d2c85 52%, #134a59);
  box-shadow: 0 .7rem 2.1rem #21576b66, inset 0 1px #ffffff55;
}
.xh-pass-shine {
  position: absolute; inset: -30% -50%; z-index: -1; pointer-events: none;
  background: linear-gradient(112deg, transparent 36%, #ffffff22 48%, #ffffff05 56%, transparent 66%);
  transform: translateX(-20%);
}
.xh-pass-card[data-pass-tier="radiant"] .xh-pass-shine {
  background: linear-gradient(112deg, transparent 30%, #76f7e23d 44%, #ffe99940 52%, #cb93ff36 60%, transparent 72%);
  animation: xh-pass-holo 5.5s ease-in-out infinite alternate;
}
@keyframes xh-pass-holo { from { transform: translateX(-22%); } to { transform: translateX(22%); } }
.xh-pass-top { display: flex; align-items: center; justify-content: space-between; gap: .45rem; font-size: .7rem; letter-spacing: .04em; opacity: .9; }
.xh-pass-brand { font-weight: 760; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xh-pass-no {
  flex: none; padding: .12rem .45rem; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--pass-rim) 65%, transparent);
  background: #00000038; font-family: ui-monospace, Consolas, monospace; font-weight: 750; font-size: .71rem;
}
.xh-pass-main { display: flex; align-items: center; gap: .68rem; margin: .62rem 0 .68rem; }
.xh-pass-emblem {
  display: grid; place-items: center; flex: none; width: 2.95rem; height: 2.95rem;
  border-radius: 50%; border: 1.5px solid var(--pass-rim); background: #00000036;
  font-size: 1.48rem; line-height: 1; box-shadow: inset 0 1px #ffffff38;
}
.xh-pass-identity { min-width: 0; flex: 1; }
.xh-pass-tier-row { display: flex; align-items: center; flex-wrap: wrap; gap: .32rem .42rem; }
.xh-pass-lv {
  padding: .08rem .38rem; border-radius: .36rem; background: #0000003d;
  border: 1px solid color-mix(in srgb, var(--pass-rim) 55%, transparent);
  font-size: .72rem; font-weight: 820; color: var(--pass-bar);
}
.xh-pass-tier-row strong { font-size: clamp(1.25rem, 4.8vw, 1.56rem); font-weight: 880; letter-spacing: -.02em; line-height: 1.1; }
.xh-pass-title-pill {
  padding: .1rem .44rem; border-radius: 999px; background: #ffffff20;
  font-size: .71rem; font-weight: 740; color: var(--pass-ink);
}
.xh-pass-perk-line { margin: .26rem 0 0 !important; font-size: .78rem !important; opacity: .94; line-height: 1.35; }
.merge-dialog .xh-pass-card p { color: var(--pass-ink); }
.xh-pass-stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem;
  margin-bottom: .62rem;
}
.xh-pass-stat {
  padding: .46rem .62rem; border-radius: .66rem;
  border: 1px solid #ffffff24; background: #0000002e;
}
.xh-pass-stat > span { display: block; font-size: .7rem; opacity: .82; }
.xh-pass-coins, .xh-pass-lifetime { display: flex; align-items: baseline; gap: .32rem; margin-top: .16rem; font-variant-numeric: tabular-nums; }
.xh-pass-coins .wallet-coin { --coin-size: 1.2rem; align-self: center; }
.xh-pass-coins strong, .xh-pass-lifetime strong { font-size: clamp(1.22rem, 4.4vw, 1.58rem); font-weight: 860; line-height: 1.1; }
.xh-pass-coins b, .xh-pass-lifetime b { font-size: .76rem; opacity: .88; font-weight: 700; }
.xh-pass-progress-wrap { margin-bottom: .62rem; }
.xh-pass-meter { height: .48rem; border-radius: 999px; background: #00000042; overflow: hidden; }
.xh-pass-meter span {
  display: block; width: 100%; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--pass-rim), var(--pass-ink));
  transform-origin: left center;
  transform: scaleX(var(--progress, 0));
  transition: transform var(--xh-dur-slow) var(--xh-ease-spring);
  will-change: transform;
}
.xh-pass-progress-copy { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; margin-top: .26rem; font-size: .75rem; opacity: .94; }
.xh-pass-progress-copy b { flex: none; font-variant-numeric: tabular-nums; color: var(--pass-bar); }
.xh-pass-actions { display: flex; flex-wrap: wrap; gap: .42rem; }
.xh-pass-claim-btn, .xh-pass-export-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .28rem;
  min-height: 38px; padding: .28rem .72rem; border-radius: .56rem; font: 780 .8rem/1.2 var(--sans); cursor: pointer;
}
.xh-pass-claim-btn {
  border: 1px solid #ffe799; background: linear-gradient(135deg, #ffd76a, #f4b23c); color: #362004;
  box-shadow: 0 3px 12px #ffcf674d;
}
.xh-pass-claim-btn:hover:enabled { filter: brightness(1.06); }
.xh-pass-claim-btn[hidden] { display: none; }
.xh-pass-export-btn {
  border: 1px solid color-mix(in srgb, var(--pass-rim) 72%, transparent);
  background: #00000038; color: var(--pass-ink);
}
.xh-pass-export-btn:hover { background: #00000054; }
.xh-pass-ecosystem { margin: .55rem 0 0 !important; font-size: .72rem !important; opacity: .86; }

.wallet-plays-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.wallet-plays-dots { display: inline-flex; align-items: center; gap: .38rem; }
.wallet-plays-dots i {
  display: block; width: 1.55rem; height: .52rem; border-radius: 999px;
  border: 1px solid #7181a0; background: #ffffff14;
  transition: transform var(--xh-dur-base) var(--xh-ease-pop), background-color var(--xh-dur-fast) var(--xh-ease-spring), border-color var(--xh-dur-fast) var(--xh-ease-spring);
}
.wallet-plays-dots i.is-lit { border-color: #f0c96f; background: linear-gradient(90deg, #ffdf82, #f2b444); transform: scale(1.04); }
.games-hall-page .wallet-plays-dots i { border-color: #b7c5e3; background: #e8eefb; }
.games-hall-page .wallet-plays-dots i.is-lit { border-color: #c89a3c; background: linear-gradient(90deg, #ffd66b, #eba62f); }

.wallet-pass-ladder { margin-top: .85rem; padding-top: .42rem; border-top: 1px solid var(--game-line); }
.wallet-pass-ladder summary { min-height: 44px; padding: .5rem .1rem; font-weight: 760; cursor: pointer; }
.xh-tier-ladder { display: grid; gap: .36rem; margin: .25rem 0 0; padding: 0; list-style: none; }
.xh-ladder-row {
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  border-radius: .6rem; background: color-mix(in srgb, currentColor 5%, transparent);
  overflow: hidden; transition: border-color .16s ease, background-color .16s ease;
}
.xh-ladder-trigger {
  display: block; width: 100%; padding: .46rem .58rem; border: 0; background: transparent;
  color: inherit; text-align: start; font: inherit; cursor: pointer;
}
.xh-ladder-trigger:hover { background: color-mix(in srgb, currentColor 6%, transparent); }
.xh-ladder-row.is-previewing { border-color: #6bd5f5; box-shadow: inset 3px 0 0 #6bd5f5; }
.xh-ladder-row.is-current {
  border-color: #e2b453; background: color-mix(in srgb, #f2bf54 16%, transparent);
  box-shadow: inset 3px 0 0 #e2b453;
}
.xh-ladder-head { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem .5rem; }
.xh-ladder-head strong { font-size: .78rem; font-variant-numeric: tabular-nums; }
.xh-ladder-head b {
  margin-inline-start: auto; font-size: .7rem; font-weight: 780;
  padding: .08rem .38rem; border-radius: 999px;
  background: color-mix(in srgb, currentColor 11%, transparent);
}
.xh-ladder-row.is-current .xh-ladder-head b { background: #e8b853; color: #3d2204; }
.xh-ladder-row.is-done .xh-ladder-head b { background: #267355; color: #ebfff4; }
.xh-ladder-row small { display: block; margin-top: .22rem; font-size: .74rem; opacity: .86; line-height: 1.35; }

/* Social Tier Chips (Leaderboards, Friend Rooms, Ladder, Stats) */
.pass-tier-chip {
  display: inline-flex; align-items: center; gap: .16rem; vertical-align: middle;
  margin-inline-start: .36em; padding: .06rem .38rem; border-radius: 999px;
  font-size: .68rem; font-weight: 800; line-height: 1.25; white-space: nowrap;
  border: 1px solid #9aa6bc; background: #2b313d; color: #eef2f9;
}
.xh-ladder-head .pass-tier-chip { margin-inline-start: 0; font-size: .72rem; padding: .1rem .44rem; }
.pass-tier-chip[data-tier="bronze"] { background: #6b3b22; border-color: #e4ac80; color: #fff1e4; }
.pass-tier-chip[data-tier="silver"] { background: #4d5e76; border-color: #d3e0f2; color: #ffffff; }
.pass-tier-chip[data-tier="gold"] { background: #8f6114; border-color: #ffe080; color: #fffbe6; }
.pass-tier-chip[data-tier="platinum"] { background: #1d5d6b; border-color: #9bf0f5; color: #ecfeff; }
.pass-tier-chip[data-tier="diamond"] { background: #1e4299; border-color: #98ceff; color: #f0f8ff; }
.pass-tier-chip[data-tier="master"] { background: #64217d; border-color: #eda0ff; color: #fdf0ff; }
.pass-tier-chip[data-tier="grandmaster"] { background: #821d27; border-color: #ffa682; color: #fff2eb; }
.pass-tier-chip[data-tier="king"] { background: #241d12; border-color: #ffd866; color: #ffe799; }
.pass-tier-chip[data-tier="radiant"] {
  background: linear-gradient(115deg, #1b2259, #50339c 52%, #176b70);
  border-color: #7df6e2; color: #fff8c8;
}

.game-tier-toast {
  border-color: #82f5e2;
  background: linear-gradient(125deg, #17214a, #3c2974 58%, #1a4757);
}
.game-tier-burst {
  display: grid; place-items: center; inline-size: 3.1rem; aspect-ratio: 1;
  border-radius: 50%; border: 2px solid #ffe08a; background: #00000040;
  font-size: 1.55rem; color: #fff6cf;
}

.wallet-section + .wallet-section { margin-top: .95rem; }
.wallet-section h3 { font-size: .98rem; }
.wallet-section h3 span { margin-inline-start: .3rem; color: #ffd28e; font-size: .83rem; }
.game-wallet .wallet-section p { margin: .27rem 0 .52rem; font-size: .86rem; }
.wallet-games { display: flex; flex-wrap: wrap; gap: .3rem; padding: 0; margin: .44rem 0 0; list-style: none; }
.wallet-games li { border: 1px solid #7181a0; border-radius: .4rem; padding: .16rem .35rem; color: #dce5f6; font-size: .76rem; }
.wallet-games .is-earned { border-color: #c4a269; background: #413633; color: #ffe2a2; }
.wallet-games .is-earned::after { content: ' ✓'; }
.wallet-themes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .38rem; margin: .48rem 0; }
.wallet-shop-grid { grid-template-columns: repeat(auto-fit, minmax(5.8rem, 1fr)); }
.wallet-theme { display: grid; justify-items: center; gap: .17rem; min-width: 0; padding: .33rem .16rem; white-space: normal; font-size: .79rem; }
.wallet-theme.is-tier-locked { opacity: .76; border-style: dashed; }
.wallet-theme[aria-pressed="true"] { border-color: #ffca7c; color: #ffe3ac; background: #42363f; }
.games-hall-page .wallet-theme[aria-pressed="true"] { border-color: #c5953c; color: #4d2e08; background: #fff0c7; }
.wallet-swatch { width: min(100%, 3.1rem); height: .55rem; border-radius: .3rem; background: linear-gradient(105deg, #275195, #e4b566); }
[data-wallet-theme="bamboo"] .wallet-swatch { background: linear-gradient(105deg, #21645b, #b1e8aa); }
[data-wallet-theme="orchid"] .wallet-swatch { background: linear-gradient(105deg, #6c4a90, #deaff9); }
.wallet-shop-group + .wallet-shop-group { margin-top: .62rem; }
.wallet-shop-head { display: flex; align-items: baseline; justify-content: space-between; gap: .4rem; margin-bottom: .18rem; }
.wallet-shop-head strong { font-size: .84rem; color: inherit; }
.wallet-shop-head small { font-size: .74rem; color: color-mix(in srgb, currentColor 68%, transparent); }
.games-hall-page .game-wallet .game-dialog-header h2 { color: #1b2f5e; }
.games-hall-page .game-wallet .wallet-section h3 span { color: #2d5196; }
[data-shop-swatch="cardBack:classic"] { background: linear-gradient(105deg, #74282b, #e7c072); }
[data-shop-swatch="cardBack:jade-gold"] { background: linear-gradient(105deg, #12533f, #f5cd70); }
[data-shop-swatch="cardBack:star-violet"] { background: linear-gradient(105deg, #3c2270, #c89eff 62%, #ffe08a); }
[data-shop-swatch="cardBack:master-crimson"] { background: linear-gradient(105deg, #6b1224, #b72742 52%, #ffd778); }
[data-shop-swatch="boardStyle:classic"] { background: linear-gradient(105deg, #e7c28c, #b57d50); }
[data-shop-swatch="boardStyle:celadon"] { background: linear-gradient(105deg, #b8decb, #5c9883); }
[data-shop-swatch="boardStyle:obsidian"] { background: linear-gradient(105deg, #262e42, #5c6b8f 70%, #f1c76b); }
[data-shop-swatch="boardStyle:grandmaster-ink"] { background: linear-gradient(105deg, #1a2826, #35574f 58%, #f3cd7a); }
[data-shop-swatch="title:classic"] { background: linear-gradient(105deg, #35578f, #8eb6f0); }
[data-shop-swatch="title:card-master"] { background: linear-gradient(105deg, #1b6b50, #f5cf72); }
[data-shop-swatch="title:grand-hammer"] { background: linear-gradient(105deg, #9c4a1a, #ffd66b 55%, #b57bff); }
[data-shop-swatch="title:king-crown"] { background: linear-gradient(105deg, #1d1812, #7a5c1d 55%, #ffe073); }
[data-shop-swatch="title:radiant-aura"] { background: linear-gradient(105deg, #22d6bd, #9b6dff 52%, #ffe070); }
[data-shop-swatch="aura:classic"] { background: linear-gradient(105deg, #4b5c7a, #8ca1c4); }
[data-shop-swatch="aura:gold-spark"] { background: linear-gradient(105deg, #8b5a14, #ffd86b 60%, #fff2be); }
[data-shop-swatch="aura:cyber-prism"] { background: linear-gradient(105deg, #1d649e, #8a64ff 55%, #65f0e0); }
[data-shop-swatch="aura:radiant-halo"] { background: linear-gradient(105deg, #23f0d0, #b37bff 48%, #ffe16e); }

/* Cross-game card-back cosmetics (Doudizhu / Bluff / Party Cards) */
body[data-game-card-back="jade-gold"] .ddz-kitty-card.is-back,
body[data-game-card-back="jade-gold"] .bluff-card-back,
body[data-game-card-back="jade-gold"] .party-card-back {
  border-color: #f4d078;
  background: repeating-linear-gradient(135deg, #ffd98226 0 2px, transparent 2px 6px), linear-gradient(145deg, #145a44, #0a3326);
  color: #ffe8a3;
}
body[data-game-card-back="star-violet"] .ddz-kitty-card.is-back,
body[data-game-card-back="star-violet"] .bluff-card-back,
body[data-game-card-back="star-violet"] .party-card-back {
  border-color: #dec2ff;
  background: repeating-linear-gradient(135deg, #f3d6ff24 0 2px, transparent 2px 6px), radial-gradient(circle at 30% 25%, #5b3794, #241645 78%);
  color: #ffeaad;
}
body[data-game-card-back="master-crimson"] .ddz-kitty-card.is-back,
body[data-game-card-back="master-crimson"] .bluff-card-back,
body[data-game-card-back="master-crimson"] .party-card-back {
  border-color: #ffd875;
  background: repeating-linear-gradient(135deg, #ffd7782a 0 2px, transparent 2px 6px), radial-gradient(circle at 28% 22%, #9e1c36, #4a0b19 78%);
  color: #ffe9a8;
  box-shadow: inset 0 0 0 1px #ffd87559;
}
/* Cross-game board-style cosmetics (Gomoku / Jieqi / 2048 / Sudoku / Mines / Klotski) */
body[data-game-board-style="celadon"] :is(.gomoku-board, .jieqi-board) {
  border-color: #5b937e;
  color: #1c3a32;
  background:
    repeating-linear-gradient(6deg, transparent 0 9px, #21574714 10px 11px, transparent 12px 17px),
    linear-gradient(145deg, #d7eee2, #a8d4bf 75%, #8ec1ab);
  box-shadow: inset 0 0 1.2rem #2b5f4f45, 0 4px #457766;
}
body[data-game-board-style="celadon"] :is(.merge-board, .sudoku-board, .mines-board, .klotski-board) {
  border-color: #63a88e;
  box-shadow: 0 0 0 2px #63a88e55, inset 0 0 1.4rem #2a6e5938;
}
body[data-game-board-style="obsidian"] :is(.gomoku-board, .jieqi-board) {
  border-color: #8f7e58;
  color: #f3dfb0;
  background:
    repeating-linear-gradient(6deg, transparent 0 10px, #ffe4a310 11px 12px, transparent 13px 18px),
    linear-gradient(145deg, #3c465e, #252d42 75%, #1c2335);
  box-shadow: inset 0 0 1.4rem #0b101c8c, 0 4px #161b29;
}
body[data-game-board-style="obsidian"] :is(.merge-board, .sudoku-board, .mines-board, .klotski-board) {
  border-color: #a69160;
  box-shadow: 0 0 0 2px #a6916059, 0 .5rem 1.8rem #0b101d66;
}
body[data-game-board-style="grandmaster-ink"] :is(.gomoku-board, .jieqi-board) {
  border-color: #d6b15c;
  color: #f8e5b4;
  background:
    repeating-linear-gradient(6deg, transparent 0 10px, #f7d68314 11px 12px, transparent 13px 19px),
    linear-gradient(145deg, #2a4640, #192d2a 70%, #101e1d);
  box-shadow: inset 0 0 1.5rem #08121199, 0 4px #10201d;
}
body[data-game-board-style="grandmaster-ink"] :is(.merge-board, .sudoku-board, .mines-board, .klotski-board) {
  border-color: #dfb962;
  box-shadow: 0 0 0 2px #dfb96266, 0 .55rem 1.9rem #0e242166;
}
/* Site-wide 16-game Aura cosmetics */
body[data-game-aura="gold-spark"] .merge-nav { border-bottom-color: #e6ba58; box-shadow: 0 1px 16px #f3c45633; }
body[data-game-aura="gold-spark"] [data-game-panel] { box-shadow: 0 0 0 1px #f0c66566, 0 .65rem 2.2rem #d69d2c24; }
body[data-game-aura="cyber-prism"] .merge-nav { border-bottom-color: #7ae2f5; box-shadow: 0 1px 18px #7e7bff3b; }
body[data-game-aura="cyber-prism"] [data-game-panel] { box-shadow: 0 0 0 1px #85d4ff66, 0 .65rem 2.2rem #7e6bff2e; }
body[data-game-aura="radiant-halo"] .merge-nav { border-bottom-color: #78f6e1; box-shadow: 0 2px 22px #78f6e140; }
body[data-game-aura="radiant-halo"] [data-game-panel] { box-shadow: 0 0 0 1.5px #78f6e173, 0 .7rem 2.5rem #8868ff38; }
body[data-game-aura="radiant-halo"] .game-coin-toast { border-color: #7df6e2; box-shadow: 0 .6rem 2rem #52e8d255; }
.game-wallet .wallet-status { margin: .35rem 0 0; color: #ffdca0; font-size: .86rem; }
.merge-page[data-game-skin="bamboo"] { --game-accent: #b7e8ad; --game-skin-trim: #84bd9a; --game-skin-shadow: #3e9a6952; }
.merge-page[data-game-skin="orchid"] { --game-accent: #e5bdfc; --game-skin-trim: #ad83d3; --game-skin-shadow: #8b50c652; }
.merge-page[data-game-skin] { box-shadow: inset 0 0 12rem var(--game-skin-shadow); }
.merge-page[data-game-skin] .merge-nav { border-bottom-color: var(--game-skin-trim); }
.merge-page[data-game-skin] main h1 span { color: var(--game-accent); }
@media (max-width: 62rem) {
  .merge-nav:has(.game-nav-trail) .wordmark { display: none; }
  .merge-nav:has(.game-nav-trail) .identity img { width: 30px; height: 30px; }
}
@media (max-width: 48rem) {
  .merge-nav:has(.game-nav-trail) {
    flex-wrap: wrap; gap: .32rem .4rem; min-height: 0; padding-block: .36rem;
  }
  .merge-nav:has(.game-nav-trail) .merge-nav-links { display: contents; }
  .merge-nav:has(.game-nav-trail) .game-nav-trail { order: 1; gap: .28rem; }
  .merge-nav:has(.game-nav-trail) .identity { min-width: 0; min-height: 36px; gap: .28rem; padding: 0; }
  .merge-nav:has(.game-nav-trail) .identity img { width: 26px; height: 26px; }
  .merge-nav:has(.game-nav-trail) .nav-home-tag { padding: .14rem .38rem; font-size: .72rem; }
  .merge-nav:has(.game-nav-trail) .game-lobby-back { min-height: 34px; padding: 0 .48rem; font-size: .77rem; }
  .merge-nav:has(.game-nav-trail) [data-game-account] {
    order: 2; margin-inline-start: auto; min-height: 36px; padding: 0 .44rem; font-size: .77rem;
    max-width: 5.5rem; overflow: hidden; text-overflow: ellipsis;
  }
  .merge-nav:has(.game-nav-trail) .wallet-button {
    order: 2; min-height: 36px; gap: .18rem; padding: 0 .38rem; font-size: .77rem;
  }
  .merge-nav:has(.game-nav-trail) .wallet-button-name,
  .merge-nav:has(.game-nav-trail) .wallet-tier-tag { display: none; }
  .merge-nav:has(.game-nav-trail) .wallet-button .wallet-coin { --coin-size: 1.04rem; }
  .merge-nav:has(.game-nav-trail) .game-tools {
    order: 3; flex: 1 0 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    gap: .28rem; padding-top: .3rem; border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  }
  .merge-nav:has(.game-nav-trail) .game-tools .game-tool {
    min-width: 0; min-height: 36px; padding: 0 .35rem; font-size: .78rem;
  }
  .merge-nav:has(.game-nav-trail) .game-tools .game-tool span:last-child { display: inline; }
}
@media (max-width: 34rem) {
  .games-hall-page .merge-nav .wordmark { display: none; }
  .games-hall-page .merge-nav .identity { gap: .32rem; min-width: 0; }
  .games-hall-page .merge-nav .identity img { width: 28px; height: 28px; }
  .games-hall-page .merge-nav .nav-home-tag { padding: .16rem .4rem; font-size: .73rem; }
  .games-hall-page .wallet-button-name,
  .games-hall-page .wallet-tier-tag { display: none; }
  .games-hall-page .wallet-button { gap: .18rem; padding-inline: .38rem; font-size: .78rem; }
  .games-hall-page .merge-nav-links { gap: .24rem; }
  .games-hall-page .merge-directory { white-space: nowrap; }
  .xh-pass-card { padding: .78rem .78rem .72rem; }
  .xh-pass-emblem { width: 2.45rem; height: 2.45rem; font-size: 1.22rem; }
}
@media (prefers-reduced-motion: reduce) {
  .xh-pass-card[data-pass-tier="radiant"] .xh-pass-shine { animation: none; }
}
.wallet-checkin { display: inline-flex; align-items: center; min-height: 44px; margin-top: .35rem; }
.wallet-section [data-wallet-week-claim] { margin-top: .42rem; }
.wallet-history { margin-top: .85rem; padding-top: .42rem; border-top: 1px solid var(--game-line); }
.wallet-history summary { min-height: 44px; padding: .5rem .1rem; font-weight: 750; cursor: pointer; }
.wallet-history ul { margin: 0; padding: 0; list-style: none; }
.wallet-history li { display: flex; justify-content: space-between; align-items: baseline; gap: .55rem; border-bottom: 1px solid var(--game-line); padding: .43rem 0; font-size: .84rem; }
.wallet-history li strong { flex: none; }
.merge-page [data-game-finish-reward] { font-size: .86rem; color: var(--game-accent); }
.crossword-console [data-game-finish-reward] { color: #245d49; }
.game-menu-ready main .game-switch { display: none; }
.game-menu { width: min(30rem, calc(100% - 1.35rem)); max-height: 88dvh; background: #1d2a44; color: #f0f5ff; }
.game-menu-destinations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .44rem; margin: .68rem 0 .25rem; }
.game-menu-destinations a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; text-decoration: none; font-weight: 740; }
.game-menu-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem; margin: .6rem 0; padding: 0; list-style: none; }
.game-menu-links a { display: flex; align-items: center; min-height: 44px; padding: .34rem .45rem; border: 1px solid #6980a3; border-radius: .52rem; background: #223451; color: #edf3ff; font-size: .84rem; }
.game-menu-links a[aria-current="page"] { border-color: #dcb47b; background: #3d343a; color: #ffdfaa; }
.game-menu-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.game-menu-actions a { display: inline-flex; align-items: center; }
.game-menu-settings { margin-top: .65rem; padding-top: .43rem; border-top: 1px solid #6b7d9f; }
.game-menu-settings :is(summary, label) { min-height: 44px; padding-block: .49rem; cursor: pointer; }
.game-menu-settings label { display: block; font-size: .93rem; }
.game-audio-dialog { width: min(27rem, calc(100% - 1.5rem)); }
.game-audio-dialog fieldset { min-inline-size: 0; margin: .65rem 0 0; padding: .2rem .64rem; border: 1px solid var(--game-line); border-radius: .6rem; }
.game-audio-dialog legend { padding-inline: .25rem; font-size: .84rem; }
.game-audio-dialog label { display: flex; align-items: center; justify-content: space-between; gap: .65rem; min-height: 44px; padding-inline: .16rem; cursor: pointer; }
.game-audio-dialog label + label { border-top: 1px solid var(--game-line); }
.game-audio-dialog input { flex: none; inline-size: 1.15rem; block-size: 1.15rem; accent-color: var(--game-accent); }
.game-audio-dialog .game-form-hint { margin-block: .72rem 0; }
.game-tool[data-audio-open].is-silent { opacity: .72; }
.merge-dialog .game-rank-table { width: 100%; border-collapse: separate; border-spacing: 0 .28rem; font-variant-numeric: tabular-nums; }
.game-rank-table thead th { padding: .36rem .47rem; }
.game-rank-table tbody td { padding: .46rem .5rem; border: 0; background: color-mix(in srgb, currentColor 5%, transparent); }
.game-rank-table tbody td:first-child { border-radius: .55rem 0 0 .55rem; }
.game-rank-table tbody td:last-child { border-radius: 0 .55rem .55rem 0; }
.game-rank-table tbody td:nth-child(2) { overflow-wrap: anywhere; }
.game-rank-table tbody tr[data-podium="1"] { --rank-tone: #ffc250; }
.game-rank-table tbody tr[data-podium="2"] { --rank-tone: #a9bad3; }
.game-rank-table tbody tr[data-podium="3"] { --rank-tone: #da986a; }
.game-rank-table tbody tr[data-podium] td { background: color-mix(in srgb, var(--rank-tone) 19%, transparent); }
.game-rank-table tbody tr[data-mine] td { box-shadow: inset 0 -2px #d9ad59; }
.game-rank-position { display: inline-grid; min-inline-size: 1.7rem; min-block-size: 1.7rem; place-content: center; border-radius: .45rem; font-weight: 780; }
.game-rank-table [data-podium] .game-rank-position { font-size: 1.32rem; background: color-mix(in srgb, var(--rank-tone) 19%, transparent); }
.game-rank-you { display: inline-block; margin-inline-start: .4em; padding: .05rem .3rem; border-radius: .3rem; background: #ffe0a2; color: #422b13; font-size: .69rem; font-weight: 780; }
.game-rank-self { padding: .54rem .68rem; border-inline-start: .2rem solid #d9ad59; border-radius: .48rem; background: #f1bb5830; font-size: .87rem; font-weight: 720; }
.merge-page .merge-dialog.game-leaderboard {
  --rank-ink: #162943;
  --rank-canvas: #f8faff;
  --rank-header: #172d4b;
  --rank-header-end: #284d78;
  --rank-inset: clamp(.7rem, 3.5vw, 1.35rem);
  width: min(37rem, calc(100% - 1rem)); max-height: min(88dvh, 46rem);
  padding: 0 0 .85rem; border: 1px solid #93a5be; border-radius: 1rem;
  color: var(--rank-ink); background: var(--rank-canvas);
  box-shadow: 0 1.3rem 5rem #0b183780;
}
:is([data-game="nightwatch"], [data-game="mines"]) .merge-dialog.game-leaderboard { --rank-header: #143a40; --rank-header-end: #316a63; }
:is([data-game="doudizhu"], [data-game="bluff"]) .merge-dialog.game-leaderboard { --rank-header: #10382b; --rank-header-end: #24634e; }
[data-game="patterns"] .merge-dialog.game-leaderboard { --rank-header: #1a4440; --rank-header-end: #326a60; }
:is([data-game="goldclaw"], [data-game="klotski"]) .merge-dialog.game-leaderboard { --rank-header: #3e2b22; --rank-header-end: #6b4b30; }
.merge-page .game-leaderboard > .game-dialog-header {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  gap: .58rem; margin: 0 0 .85rem; padding: clamp(.68rem, 3vw, 1.18rem) var(--rank-inset);
  border: 0; color: #fff5dd; background:
    radial-gradient(ellipse at 20% 0, #ffffff24, transparent 60%),
    linear-gradient(115deg, var(--rank-header), var(--rank-header-end));
}
.merge-page .game-leaderboard > .game-dialog-header h2 { color: inherit; margin: 0; font-size: clamp(1.1rem, 4.4vw, 1.66rem); line-height: 1.25; overflow-wrap: anywhere; }
.merge-page .game-leaderboard > .game-dialog-header button { min-height: 42px; padding-inline: .62rem; color: #fff; border-color: #c4d3e17d; background: #0c1e3940; }
.game-rank-mark {
  display: grid; place-items: center; inline-size: clamp(2rem, 9vw, 3rem); aspect-ratio: 1;
  border: 1px solid #ffe3a78c; border-radius: .75rem; background: #f9c6672e; box-shadow: inset 0 1px #fff6ca52;
}
.game-rank-mark::after { content: ''; width: 62%; height: 57%; background: #ffd578; clip-path: polygon(23% 20%, 23% 0, 77% 0, 77% 20%, 100% 20%, 97% 46%, 85% 60%, 61% 64%, 57% 82%, 72% 82%, 72% 100%, 28% 100%, 28% 82%, 43% 82%, 39% 64%, 15% 60%, 3% 46%, 0 20%); }
.merge-page .game-leaderboard > :not(.game-dialog-header) { margin-inline: var(--rank-inset); }
.merge-page .game-leaderboard > :is(p, .rank-scroll, .campaign-rank-scroll) { margin-block: .55rem; color: #465b77; font-size: .86rem; }
.merge-page .game-leaderboard > :is(.rank-mine, .game-rank-self) { padding: .6rem .69rem; border: 1px solid #d9b875; border-radius: .65rem; color: #624212; background: #fff2d7; }
.merge-page .game-leaderboard :is(.merge-modes, .rank-tabs) { border-color: #c3d2e7; background: #eaf1fc; }
.merge-page .game-leaderboard [aria-pressed] { color: #294767; min-height: 40px; }
.merge-page .game-leaderboard [aria-pressed="true"] { color: #fff; border-color: #295a93; background: #2e5d94; }
.game-leaderboard :is(.rank-scroll, .campaign-rank-scroll) { padding: .2rem .4rem .32rem; border: 1px solid #d9e4f2; border-radius: .72rem; background: #fff; overflow-x: auto; }
.game-leaderboard table { width: 100%; color: var(--rank-ink); }
.game-leaderboard table thead th { padding: .38rem .36rem; border: 0; background: transparent; color: #4c6180; font-size: .74rem; white-space: nowrap; }
.game-leaderboard .game-rank-table tbody td { padding: .44rem .36rem; background: #edf3fb; line-height: 1.22; }
.game-leaderboard .game-rank-table td:first-child { width: 2.42rem; }
.game-leaderboard .game-rank-table td:nth-child(2) { font-weight: 720; }
.game-leaderboard .game-rank-table td:nth-child(n+3) { white-space: nowrap; }
.game-leaderboard [data-podium] .game-rank-position { min-inline-size: 1.72rem; min-block-size: 1.72rem; color: #242b3c; background: var(--rank-tone); font-size: .93rem; border-radius: 50%; }
.game-leaderboard .game-rank-table tbody tr[data-podium] td { background: color-mix(in srgb, var(--rank-tone) 20%, #fff); }
.game-leaderboard .game-rank-table tbody tr[data-mine] td { box-shadow: inset 0 -2px #4676af; background: #e4f0ff; }
.game-rank-preference { display: flex; align-items: center; justify-content: space-between; gap: .55rem; min-height: 44px; margin-top: .65rem; padding: .2rem .65rem; border-radius: .55rem; color: #354d6d; background: #eaf1fb; font-size: .8rem; cursor: pointer; }
.game-rank-preference input { flex: none; inline-size: 1.15rem; block-size: 1.15rem; accent-color: #2d629d; }
.game-leaderboard > .merge-dialog-actions .merge-button { color: #fff; border-color: #2b5287; background: #305d94; }
.game-next-daily { display: inline-flex; align-items: center; min-height: 42px; margin-block: .15rem .35rem; font-size: .88rem; font-weight: 740; text-decoration: underline; text-underline-offset: .23em; }
.game-next-daily[hidden] { display: none; }
.game-daily-switch { display: flex; flex: 1 0 100%; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .35rem .9rem; margin-block: .42rem; padding: .3rem .65rem; border: 1px solid #d9b87c; border-radius: .65rem; color: #523d24; background: #fff2d7; }
.game-daily-switch p { margin: 0; font-size: .86rem; }
.game-daily-switch button { min-height: 42px; color: #472f1b; background: #ffdfa0; border-color: #c59a5e; }
.game-daily-switch[hidden] { display: none; }
.game-coin-toast-host[popover]:not(:popover-open) { display: none; }
.game-coin-toast-host:not([popover]),
.game-coin-toast-host:popover-open {
  position: fixed; z-index: 60; inset: auto 0 max(.65rem, env(safe-area-inset-bottom)) 0;
  top: auto; inset-block-start: auto; right: 0; left: 0;
  bottom: .65rem; bottom: max(.65rem, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  box-sizing: border-box; width: 100%; max-width: 100%;
  height: auto; block-size: auto; min-height: 0; max-height: max-content;
  margin: 0; margin-block: auto 0; padding: 0 .75rem;
  border: 0; background: transparent; box-shadow: none; overflow: visible;
  pointer-events: none; align-self: end; justify-self: center;
}
.game-coin-toast {
  position: relative; flex: 0 0 auto;
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .8rem;
  box-sizing: border-box; width: min(22rem, 100%); height: auto; min-height: 0;
  margin: 0 auto; padding: .67rem .94rem;
  border: 1px solid #ffd68e; border-radius: .86rem; pointer-events: none;
  color: #fff4d5; background: radial-gradient(ellipse at 8% 0, #8a572c, #3c2931 52%, #27283b 100%);
  box-shadow: 0 .55rem 1.7rem #1a18267a, inset 0 1px #fff1bc50;
  animation: game-coin-arrive 380ms var(--xh-ease-spring) both;
}
.game-coin-toast.is-leaving { animation: game-coin-leave var(--xh-dur-fast) var(--xh-ease-exit) both; }
@keyframes game-coin-leave { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(.65rem) scale(.96); } }
.game-coin-toast strong { display: block; color: #ffdc88; font-size: clamp(1.26rem, 5vw, 1.65rem); font-variant-numeric: tabular-nums; line-height: 1.16; }
.game-coin-toast [data-coin-reason] { display: block; margin-top: .14rem; color: #fff0d0; font-size: .78rem; }
.game-coin-burst { position: relative; display: grid; place-items: center; inline-size: 3.4rem; aspect-ratio: 1; isolation: isolate; }
.game-coin-burst .wallet-coin { --coin-size: 2.75rem; filter: drop-shadow(0 .14rem .52rem #ffbe4f8c); animation: game-coin-turn 790ms cubic-bezier(.16,.74,.22,1) both; }
.game-coin-burst::before { content: ''; position: absolute; inset: .24rem; z-index: -1; border: 1px solid #ffc970; border-radius: 50%; animation: game-coin-ring 1.2s ease-out both; }
.game-coin-burst i { position: absolute; inset: auto; inline-size: .32rem; aspect-ratio: 1; background: #ffe08a; transform: rotate(45deg); box-shadow: 0 0 .44rem #ffc865; animation: game-coin-spark 1s 110ms ease-out both; }
.game-coin-burst i:nth-of-type(1) { --spark-x: -1.72rem; --spark-y: -.94rem; }
.game-coin-burst i:nth-of-type(2) { --spark-x: 1.55rem; --spark-y: -1.35rem; }
.game-coin-burst i:nth-of-type(3) { --spark-x: 1.64rem; --spark-y: 1.18rem; }
.game-coin-burst i:nth-of-type(4) { --spark-x: -1.34rem; --spark-y: 1.46rem; }
@keyframes game-coin-arrive { from { opacity: 0; transform: translateY(1.5rem) scale(.93); } to { opacity: 1; transform: none; } }
@keyframes game-coin-turn { from { transform: perspective(10rem) rotateY(-175deg) scale(.54); } 70% { transform: perspective(10rem) rotateY(12deg) scale(1.08); } to { transform: none; } }
@keyframes game-coin-ring { from { opacity: .8; transform: scale(.55); } to { opacity: 0; transform: scale(1.7); } }
@keyframes game-coin-spark { from { opacity: 0; } 28% { opacity: 1; } to { opacity: 0; transform: translate(var(--spark-x), var(--spark-y)) rotate(150deg) scale(.4); } }
.game-reduced-motion :is(.game-coin-toast, .game-coin-burst .wallet-coin) { animation: none; }
.game-reduced-motion .game-coin-burst::before, .game-reduced-motion .game-coin-burst i { display: none; }
@media (prefers-reduced-motion: reduce) {
  .game-coin-toast, .game-coin-burst .wallet-coin { animation: none; }
  .game-coin-burst::before, .game-coin-burst i { display: none; }
}
.game-menu-url { width: 100%; margin-top: .45rem; padding: .32rem; }
.game-share-preview { display: inline-flex; align-items: center; min-height: 40px; margin: .28rem .43rem .28rem 0; }
[hidden] + .game-share-preview { display: none; }
.game-reduced-motion *, .game-reduced-motion *::before, .game-reduced-motion *::after {
  scroll-behavior: auto !important;
  animation-duration: .001ms !important;
  transition-duration: .001ms !important;
}
.game-network-status {
  position: fixed; z-index: 12; bottom: max(1rem, env(safe-area-inset-bottom)); inset-inline: .75rem; width: fit-content;
  margin-inline: auto; padding: .45rem .68rem; border: 1px solid #c79675; border-radius: .5rem;
  background: #392b2a; color: #fff0db; font-size: .81rem; text-align: center; pointer-events: none;
}
.game-save-warning { max-width: 100%; margin: .35rem .65rem; }

/* 全生态赚币地图（钱包面板） */
.wallet-eco-list { list-style: none; display: grid; gap: .42rem; margin: .55rem 0 0; padding: 0; }
.wallet-eco-item {
  display: flex; align-items: center; justify-content: space-between; gap: .65rem;
  padding: .48rem .68rem; border: 1px solid #d9e2f2; border-radius: .68rem;
  background: #f8fafd; color: #1b2436;
}
.wallet-eco-item.is-done { background: #effaf3; border-color: #a6e2bd; }
.wallet-eco-copy { display: grid; gap: .12rem; min-width: 0; }
.wallet-eco-product { font-size: .72rem; font-weight: 700; color: #546685; letter-spacing: .02em; }
.wallet-eco-copy strong { font-size: .85rem; font-weight: 700; color: #131d30; }
.wallet-eco-done {
  flex: none; padding: .22rem .58rem; border-radius: 999px;
  background: #d6f5e3; color: #11643a; font-size: .76rem; font-weight: 800; white-space: nowrap;
}
.wallet-eco-go {
  flex: none; display: inline-flex; align-items: center; padding: .28rem .66rem; border-radius: 999px;
  background: #2246a8; color: #fff; font-size: .76rem; font-weight: 700; text-decoration: none; white-space: nowrap;
}
.wallet-eco-go:hover { background: #1a3787; }

/* PWA 安装引导条 */
.wallet-install-bar {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
  margin-top: .75rem; padding: .62rem .8rem; border-radius: .72rem;
  border: 1px solid #c7d9fa; background: linear-gradient(135deg, #eef4ff, #f7faff); color: #1a2d54; font-size: .82rem; font-weight: 600;
}
.wallet-install-bar[hidden] { display: none; }

/* 第 5 装扮槽位：全站头像框 swatches 与实时佩戴特效 */
[data-shop-swatch="frame:classic"] { background: radial-gradient(circle, #eef2f9 45%, #8a99b2 46%, #8a99b2 100%); }
[data-shop-swatch="frame:cobalt-ring"] { background: conic-gradient(from 0deg, #1d4ed8, #60a5fa, #1e3a8a, #38bdf8, #1d4ed8); box-shadow: inset 0 0 0 4px #fff; }
[data-shop-swatch="frame:amber-crown"] { background: conic-gradient(from 40deg, #b45309, #fde68a, #d97706, #fef08a, #b45309); box-shadow: inset 0 0 0 4px #fff; }
[data-shop-swatch="frame:aurora-halo"] { background: conic-gradient(from 90deg, #7c3aed, #38bdf8, #e879f9, #34d399, #7c3aed); box-shadow: inset 0 0 0 4px #fff; }
[data-shop-swatch="frame:radiant-frame"] { background: conic-gradient(from 0deg, #fde047, #5eead4, #818cf8, #f472b6, #fde047); box-shadow: 0 0 8px rgba(112, 245, 223, .65); }

[data-frame="cobalt-ring"] { box-shadow: 0 0 0 2.5px #2563eb, 0 0 12px rgba(37, 99, 235, .42) !important; }
[data-frame="amber-crown"] { box-shadow: 0 0 0 2.5px #f59e0b, 0 0 14px rgba(245, 158, 11, .52) !important; }
[data-frame="aurora-halo"] { box-shadow: 0 0 0 2.5px #a855f7, 0 0 16px rgba(56, 189, 248, .55) !important; }
[data-frame="radiant-frame"] { box-shadow: 0 0 0 2.5px #70f5df, 0 0 18px rgba(254, 240, 138, .72) !important; }

/* 卡阶晋升：高光揭幕弹窗 */
.xh-tierup-dialog {
  max-width: min(26rem, calc(100vw - 1.5rem));
  text-align: center;
  padding: 1.35rem 1.25rem 1.2rem;
  border-radius: 1.15rem;
  background: linear-gradient(180deg, #ffffff, #f5f7fc);
  color: #162033;
  overflow: hidden;
}
.xh-tierup-eyebrow { margin: 0 0 .25rem; font-size: .72rem; font-weight: 800; letter-spacing: .12em; color: #3656b5; }
.xh-tierup-dialog h2 { margin: 0 0 .9rem; font-size: 1.32rem; font-weight: 900; color: #111827; }
.xh-tierup-card {
  position: relative;
  padding: 1.1rem 1.15rem;
  border-radius: 1rem;
  color: #fff;
  text-align: left;
  background: linear-gradient(135deg, #2b313d, #191f2a 60%, #444d5f);
  border: 1px solid rgba(255, 255, 255, .32);
  box-shadow: 0 16px 36px rgba(15, 23, 42, .28), inset 0 1px 0 rgba(255, 255, 255, .28);
  overflow: hidden;
  animation: xh-tierup-flip 650ms cubic-bezier(.16, .9, .24, 1) both;
}
.xh-tierup-card[data-pass-tier="bronze"] { background: linear-gradient(135deg, #56311d, #2d180c 58%, #8f5432); }
.xh-tierup-card[data-pass-tier="silver"] { background: linear-gradient(135deg, #435266, #242e3c 58%, #778ca6); }
.xh-tierup-card[data-pass-tier="gold"] { background: linear-gradient(135deg, #6b4810, #352205 58%, #b38022); }
.xh-tierup-card[data-pass-tier="platinum"] { background: linear-gradient(135deg, #164f5e, #0c2c35 58%, #2e8496); }
.xh-tierup-card[data-pass-tier="diamond"] { background: linear-gradient(135deg, #1d3678, #0f1b42 58%, #3460c8); }
.xh-tierup-card[data-pass-tier="master"] { background: linear-gradient(135deg, #4f1c6b, #280d3a 58%, #8b32a8); }
.xh-tierup-card[data-pass-tier="grandmaster"] { background: linear-gradient(135deg, #691722, #380b12 58%, #b02a38); }
.xh-tierup-card[data-pass-tier="king"] { background: linear-gradient(135deg, #1d1914, #4c3914 52%, #171410); border-color: rgba(255, 216, 107, .65); }
.xh-tierup-card[data-pass-tier="radiant"] { background: linear-gradient(130deg, #131838, #3c2e82 40%, #15666e 76%, #63440d); border-color: rgba(112, 245, 223, .72); }
.xh-tierup-shine {
  position: absolute; inset: -40% -20%; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .24) 50%, transparent 62%);
  animation: xh-tierup-sweep 1.1s 180ms ease-out both;
}
.xh-tierup-card > :not(.xh-tierup-shine) { position: relative; z-index: 1; }
.xh-tierup-card-top { display: flex; justify-content: space-between; align-items: center; font-size: .74rem; opacity: .86; margin-bottom: .65rem; }
.xh-tierup-no { font-family: ui-monospace, monospace; letter-spacing: .05em; }
.xh-tierup-card-mid { display: flex; align-items: center; gap: .75rem; margin-bottom: .65rem; }
.xh-tierup-emblem {
  display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 50%;
  background: rgba(0, 0, 0, .28); border: 1.5px solid rgba(255, 255, 255, .55); font-size: 1.45rem;
}
.xh-tierup-lv { display: block; font-size: .76rem; font-weight: 800; opacity: .88; letter-spacing: .06em; }
.xh-tierup-card-mid strong { font-size: 1.45rem; font-weight: 900; }
.xh-tierup-perk { margin: 0; font-size: .82rem; line-height: 1.45; color: rgba(255, 255, 255, .92); }
.xh-tierup-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .55rem; margin-top: 1rem; }
.xh-tierup-actions button { min-height: 40px; }
@keyframes xh-tierup-flip {
  from { opacity: 0; transform: perspective(36rem) rotateY(-28deg) scale(.86) translateY(.6rem); }
  to { opacity: 1; transform: none; }
}
@keyframes xh-tierup-sweep {
  from { transform: translateX(-85%); }
  to { transform: translateX(85%); }
}
@media (prefers-reduced-motion: reduce) {
  .xh-tierup-card, .xh-tierup-shine, .game-toast, .game-coin-toast, .xh-skeleton::after,
  .xh-pop, .xh-shake, .xh-num-tick, .xh-seg-indicator, .xh-pass-card, .xh-pass-meter span {
    animation: none !important; transition: none !important;
  }
}

/* === 全站苹果级统一动效与交互原语（XHGameMotion） === */
.xh-seg-host { position: relative; isolation: isolate; }
.xh-seg-host > :not(.xh-seg-indicator) { position: relative; z-index: 1; }
.xh-seg-indicator {
  position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none;
  box-sizing: border-box; border-radius: .5rem; opacity: 0;
  background: var(--xh-seg-bg, #223d96);
  border: 1px solid var(--xh-seg-border, transparent);
  box-shadow: 0 2px 8px #0c17332e;
  transition: transform var(--xh-dur-base) var(--xh-ease-spring), width var(--xh-dur-base) var(--xh-ease-spring), height var(--xh-dur-base) var(--xh-ease-spring), opacity var(--xh-dur-fast) var(--xh-ease-spring);
  will-change: transform, width;
}
.xh-seg-indicator.is-ready { opacity: 1; }
.xh-seg-indicator.is-instant { transition: none !important; }
.xh-seg-host.has-seg-pill > [aria-pressed="true"],
.xh-seg-host.has-seg-pill > [aria-selected="true"] {
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

/* 原地二次轻确认（非阻塞防误触，4.5秒自动收回） */
.xh-confirm-armed {
  border-color: #f49b52 !important;
  background: linear-gradient(155deg, #b83b28, #8c261c) !important;
  color: #fff6e8 !important;
  box-shadow: 0 0 0 2px #ff9d6048, 0 4px 12px #52130d45 !important;
}
@media (hover: hover) {
  .xh-confirm-armed:hover:not(:disabled) {
    border-color: #ffb978 !important;
    background: linear-gradient(155deg, #c94631, #9e2d22) !important;
  }
}

/* 统一主题优雅确认弹窗（替代原生 window.confirm） */
.xh-confirm-dialog { width: min(24rem, calc(100% - 1.6rem)); }
.xh-confirm-dialog h2 { margin: 0 0 .45rem; font-size: 1.15rem; }
.xh-confirm-dialog p { margin: 0 0 1.05rem; line-height: 1.55; }
.xh-confirm-dialog .xh-confirm-danger {
  border-color: #f39a76; background: linear-gradient(155deg, #c74132, #992a22); color: #fff6f2;
}
.games-hall-page .xh-confirm-dialog { background: #fffdf8; color: #1c2641; border-color: #cfd8ea; }
.games-hall-page .xh-confirm-dialog p { color: #4a556e; }

/* 复制成功锁定反馈 */
.xh-copied {
  border-color: #4dc488 !important;
  background: linear-gradient(155deg, #1d7a4f, #16603e) !important;
  color: #effff6 !important;
}

/* 轻抖纠错 / 弹性点亮 / 数值跳动 */
.xh-shake { animation: xh-shake 280ms var(--xh-ease-spring) both; }
@keyframes xh-shake {
  0%, 100% { transform: translateX(0); }
  22% { transform: translateX(-5px); }
  48% { transform: translateX(4px); }
  74% { transform: translateX(-2px); }
}
.xh-pop { animation: xh-pop var(--xh-dur-base) var(--xh-ease-pop) both; }
@keyframes xh-pop {
  0% { transform: scale(.84); }
  65% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
.xh-num-tick { animation: xh-num-tick 320ms var(--xh-ease-spring) both; }
@keyframes xh-num-tick {
  0% { transform: translateY(-2px) scale(1.06); }
  100% { transform: none; }
}

/* 骨架屏加载态（浅色与深色自动适配） */
.xh-skeleton-list { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .46rem; }
.xh-skeleton-row {
  position: relative; overflow: hidden; height: 2.85rem; border-radius: .68rem;
  background: color-mix(in srgb, currentColor 9%, transparent);
}
.xh-skeleton-row::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(95deg, transparent 25%, color-mix(in srgb, currentColor 11%, transparent) 50%, transparent 75%);
  transform: translateX(-100%);
  animation: xh-shimmer 1.15s ease-in-out infinite;
}
@keyframes xh-shimmer { to { transform: translateX(100%); } }
.game-reduced-motion :is(.xh-tierup-card, .xh-tierup-shine, .game-toast, .game-coin-toast, .xh-skeleton-row::after, .xh-pop, .xh-shake, .xh-num-tick, .xh-seg-indicator, .xh-pass-card, .xh-pass-meter span) {
  animation: none !important; transition: none !important;
}
