/* ====== 1. Variables & Reset ====== */
/* rem.js: 设计稿 750px, 1rem = 100px */
:root {
  --color-primary: #d4a017;
  --color-secondary: #8b4513;
  --color-accent: #ff4444;
  --color-text: #ffffff;
  --color-text-dark: #333333;
  --color-bg-dark: #1a1a1a;
  --color-bg-card: rgba(0, 0, 0, 0.6);
  --color-mask: rgba(0, 0, 0, 0.7);
  --color-border-gold: #c9a050;

  --space-xs: 0.04rem;
  --space-sm: 0.08rem;
  --space-md: 0.16rem;
  --space-lg: 0.24rem;
  --space-xl: 0.32rem;

  --font-sm: 0.12rem;
  --font-md: 0.14rem;
  --font-lg: 0.16rem;
  --font-xl: 0.2rem;
  --font-xxl: 0.28rem;

  --radius-sm: 0.04rem;
  --radius-md: 0.08rem;
  --radius-lg: 0.16rem;

  --z-top-bar: 1000;
  --z-side-bar: 900;
  --z-tab-bar: 900;
  --z-sheet: 2000;

  --design-width: 7.5rem;
  --top-bar-h: 1.29rem;
}

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

html,
body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  background-color: var(--color-bg-dark);
  font-family: -apple-system, "PingFang SC", "Helvetica Neue", sans-serif;
  color: var(--color-text);
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  border: none;
  outline: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* ====== 2. Layout ====== */
.app {
  position: relative;
  width: 100%;
  max-width: var(--design-width);
  margin: 0 auto;
  min-height: 100vh;
}

/* 屏幕通用 */
.screen {
  display: none;
  width: 100%;
  min-height: 100vh;
}

.screen.active {
  display: block;
}

.screen__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-xl);
  text-align: center;
}

.screen__placeholder-text {
  color: rgba(255, 255, 255, 0.4);
  font-size: var(--font-lg);
}

/* ====== 3. Components ====== */

/* --- twpop 弹窗 z-index 覆盖（库未设 z-index，需高于侧边栏 900） --- */
.twpop-mask,
.twpop-main {
  z-index: 2000;
}

/* --- twModal 弹窗覆盖 --- */
/* 居中显示（原库默认 flex-start） */
.tw-overlay {
  align-items: center;
}
/* 海报弹窗：无背景无边框 */
.poster-modal {
  background: transparent;
  box-shadow: none;
  border: none;
  border-radius: 0;
}
/* 关闭按钮：底部居中 */
.poster-modal .tw-close-btn {
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  width: 0.60rem;
  height: 0.60rem;
  font-size: 0.28rem;
  top: 96%;
  right: auto;
  left: 50%;
  transform: translateX(-50%) translateY(0.2rem);
  border-radius: 50%;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.poster-modal .tw-close-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

/* --- 雪碧图 (sprite.png: 580x1049px → 5.80rem x 10.49rem) --- */
.sprite {
  background-image: url("../images/sprite.png");
  background-repeat: no-repeat;
  background-size: 5.80rem 10.49rem;
  display: inline-block;
}

.sprite--btn-sign {
  width: 4.04rem;
  height: 0.93rem;
  background-position: 0 -5.44rem;
}

.sprite--btn-side {
  width: 0.6rem;
  height: 2.93rem;
  background-position: -4.08rem -6.39rem;
}

.sprite--btn-enter {
  width: 1.83rem;
  height: 0.54rem;
  background-position: 0 -9.95rem;
}

.sprite--btn-login {
  width: 1.28rem;
  height: 0.48rem;
  background-position: -2.78rem -6.39rem;
}

.sprite--btn-logout {
  width: 1.28rem;
  height: 0.48rem;
  background-position: -4.45rem -9.34rem;
}

.sprite--btn-confirm {
  width: 4.09rem;
  height: 0.76rem;
  background-position: 0 -0.76rem;
}

.sprite--btn-think {
  width: 4.09rem;
  height: 0.76rem;
  background-position: 0 -1.54rem;
}

.sprite--btn-collect-ready {
  width: 2.76rem;
  height: 0.59rem;
  background-position: 0 -6.39rem;
}

.sprite--btn-collect-away {
  width: 2.76rem;
  height: 0.59rem;
  background-position: 0 -9.34rem;
}

.sprite--btn-claim {
  width: 1.65rem;
  height: 0.47rem;
  background-position: -4.06rem -5.44rem;
  margin-left: auto;
}

.sprite--btn-recharge {
  width: 1.65rem;
  height: 0.47rem;
  background-position: -2.78rem -9.34rem;
  margin-left: auto;
}

.sprite--btn-claim-all {
  width: 4.09rem;
  height: 0.76rem;
  background-position: 0 -2.32rem;
}

.sprite--btn-close {
  width: 4.09rem;
  height: 0.76rem;
  background-position: 0 -3.10rem;
}

.sprite--btn-collect-confirm {
  width: 4.09rem;
  height: 0.76rem;
  background-position: 0 -3.88rem;
}

.sprite--btn-collect-later {
  width: 4.09rem;
  height: 0.76rem;
  background-position: 0 -4.66rem;
}

.sprite--btn-rank-prize {
  width: 5.80rem;
  height: 0.74rem;
  background-position: 0 0;
}

/* --- 排名徽章雪碧图 (rank-badge-sprite.png: 196x48px → 1.96rem x 0.48rem) --- */
.rank-badge {
  background-image: url("../images/rank-badge-sprite.png");
  background-repeat: no-repeat;
  background-size: 1.96rem 0.48rem;
  display: inline-block;
}

.rank-badge--gold {
  width: 0.54rem;
  height: 0.48rem;
  background-position: -0.45rem 0;
}

.rank-badge--silver {
  width: 0.50rem;
  height: 0.48rem;
  background-position: -1.46rem 0;
}

.rank-badge--bronze {
  width: 0.43rem;
  height: 0.43rem;
  background-position: 0 -0.02rem;
}

.rank-badge--normal {
  width: 0.43rem;
  height: 0.43rem;
  background-position: -1.01rem -0.02rem;
}

/* --- 顶部导航栏 --- */
.top-bar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--design-width);
  z-index: var(--z-top-bar);
  height: var(--top-bar-h);
  background-image: url("../images/top-bar.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center top;
}

.top-bar__enter {
  position: absolute;
  right: var(--space-md);
  top: 40%;
  transform: translateY(-50%);
}

.top-bar__enter:active {
  opacity: 0.7;
}

.top-bar__login {
  position: absolute;
  right: var(--space-md);
  top: 1.2rem;
  z-index: var(--z-top-bar);
}

.top-bar__login:active {
  opacity: 0.7;
}

/* --- 账号信息胶囊 --- */
.top-bar__capsule {
  position: absolute;
  right: 1.6rem;
  top: 1.24rem;
  display: none;
  align-items: center;
  gap: 0.08rem;
  padding: 0.08rem 0.26rem;
  border-radius: 0.3rem;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: var(--z-top-bar);
  text-align: center;
}

.top-bar__capsule--visible {
  display: flex;
}

.top-bar__capsule-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.08rem;
  overflow: hidden;
  line-height: 1.3;
}

.top-bar__capsule-name {
  font-size: 0.24rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 2rem;
}

.top-bar__capsule-server {
  font-size: 0.24rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 2rem;
}

/* --- 右侧悬浮按钮 --- */
.side-bar {
  position: fixed;
  right: 0;
  top: 40%;
  transform: translateY(-50%);
  z-index: var(--z-side-bar);
}

.side-bar__bg {
  display: block;
}

.side-bar__btn {
  display: block;
  width: 100%;
  height: 50%;
  background: transparent;
  border: none;
}

.side-bar__btn:active {
  opacity: 0.7;
}

/* --- 底部 Tab (sprite: 750x200px → 7.5rem x 2.0rem) --- */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--design-width);
  height: 1.0rem;
  display: flex;
  z-index: var(--z-tab-bar);
  background-image: url("../images/tab-bar.png");
  background-size: 7.5rem 2.0rem;
  background-repeat: no-repeat;
  background-position: 0 0; /* 默认：灵宠激活 (y=0) */
}

.tab-bar--rank-active {
  background-position: 0 -1.0rem; /* 排行榜激活 (y=100px) */
}

.tab-bar__item {
  flex: 1;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0;
  color: transparent;
  cursor: pointer;
}

/* --- Sheet 弹窗 --- */
.sheet-wrap {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-mask);
  z-index: var(--z-sheet);
  justify-content: center;
  align-items: flex-end; /* 底部对齐 */
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sheet-wrap.open {
  display: flex;
  opacity: 1;
}

.sheet {
  width: 100%;
  max-width: var(--design-width);
  max-height: 80vh;
  background-image: url("../images/dialog-bg.png");
  background-size: cover;
  background-repeat: no-repeat;
  border: 1px solid var(--color-border-gold);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0; /* 仅顶部圆角 */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* 初始状态：滑到屏幕底部 + 透明 */
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.3s ease;
}

.sheet-wrap.open .sheet {
  transform: translateY(0);
  opacity: 1;
}

.sheet__header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--space-lg) var(--space-lg) var(--space-sm);
}

.sheet__title {
  font-size: var(--font-xl);
  color: var(--color-primary);
  font-weight: bold;
}

/* --- 签约确认弹窗专属 --- */
.sheet--confirm .sheet__header {
  flex-direction: column;
  gap: var(--space-sm);
}

.sheet--confirm .sheet__title {
  font-family: "SourceHanSerifSC", "Noto Serif SC", "SimSun", serif;
  font-size: 0.56rem;
  font-weight: bold;
  /* background: linear-gradient(180deg, #FADFB1 0%, #FADFB1 50%, #DF7B31 50%, #DF7B31 100%); */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
   background-image: linear-gradient(to right, #FADFB1 0%, #DF7B31 100%);
}

.sheet--confirm .sheet__subtitle {
  font-family: "SourceHanSerifSC", "Noto Serif SC", "SimSun", serif;
  font-size: 0.34rem;
  color: #FFE0B0;
}

.sheet--confirm .sheet__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg) var(--space-lg);
}

.sheet--confirm .sheet__rounded-box {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #c57b2b;
  border-radius: 0.30rem;
  overflow: hidden;
  background: linear-gradient(180deg, #f0aa71 0%, #f5ca8a 100%);
}

.sheet--confirm .sheet__rounded-box:first-child {
  height: 1.45rem;
  padding: 0.30rem 0.24rem 0.20rem;
}

.sheet--confirm .sheet__rounded-box:last-child {
  height: 1.83rem;
  padding: 0.28rem 0.24rem 0.20rem;
  margin-top: var(--space-md);
}

/* --- 绑定警告组件（第一个容器） --- */
.sheet--confirm .sheet__binding-warning__primary {
  display: flex;
  align-items: flex-start;
  gap: 0.08rem;
}

.sheet--confirm .sheet__binding-warning__icon {
  width: 0.43rem;
  flex: 0 0 0.43rem;
  margin-top: -0.10rem;
  font-family: "Segoe UI Symbol", sans-serif;
  font-size: 0.44rem;
  line-height: 0.40rem;
  color: #ff313c;
}

.sheet--confirm .sheet__binding-warning__first-line,
.sheet--confirm .sheet__binding-warning__second-line {
  width: fit-content;
  margin: 0;
  font-family: "SimHei", "Microsoft YaHei", sans-serif;
  font-weight: 700;
  letter-spacing: 0;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.sheet--confirm .sheet__binding-warning__first-line {
  font-size: 0.30rem;
  line-height: 0.30rem;
  background-image: linear-gradient(180deg, #3d140e 0%, #641b10 100%);
}

.sheet--confirm .sheet__binding-warning__second-line {
  margin: 0.20rem 0 0 0.04rem;
  font-size: 0.295rem;
  line-height: 0.32rem;
  white-space: nowrap;
  background-image: linear-gradient(180deg, #842111 0%, #a32714 100%);
}

.sheet--confirm .sheet__rounded-box__label,
.sheet--confirm .sheet__rounded-box__server {
  width: fit-content;
  margin: 0;
  font-family: "SimHei", "Microsoft YaHei", sans-serif;
  font-size: 0.29rem;
  line-height: 0.29rem;
  font-weight: 700;
  letter-spacing: 0;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(180deg, #3d140e 0%, #a32714 100%);
}

.sheet--confirm .sheet__rounded-box__character {
  width: fit-content;
  margin: 0.13rem 0 0.12rem;
  font-family: "SimHei", "Microsoft YaHei", sans-serif;
  font-size: 0.36rem;
  line-height: 0.36rem;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  transform: scaleX(1.03);
  transform-origin: left center;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(180deg, #2d00dc 0%, #a7000b 100%);
}

/* --- 品阶进化路线弹窗专属 --- */
.sheet--evolve .sheet__header {
  padding: 0.28rem var(--space-lg) 0.16rem;
  flex-direction: column;
  align-items: center;
  gap: 0.08rem;
}

.sheet--evolve .sheet__title {
  font-size: 0.32rem;
  font-family: "SourceHanSerifSC", "Noto Serif SC", "SimSun", serif;
  background: linear-gradient(180deg, #FADFB1 0%, #FADFB1 50%, #DF7B31 50%, #DF7B31 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.sheet--evolve .sheet__body {
  overscroll-behavior: contain;
}

.evolve__tip {
  font-size: 0.22rem;
  color: #c8a860;
  line-height: 1;
  white-space: nowrap;
}

.evolve__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-md) var(--space-lg) var(--space-lg);
}

.evolve__item {
  width: 100%;
  box-sizing: border-box;
  padding: 0.24rem 0.28rem;
  border-radius: 0.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.12rem;
}

.evolve__item:last-child {
  margin-bottom: 0;
}

.evolve__item--white {
  background: linear-gradient(135deg, rgba(180, 180, 180, 0.18) 0%, rgba(60, 60, 60, 0.3) 100%);
  border: 1px solid rgba(180, 180, 180, 0.3);
}

.evolve__item--green {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.2) 0%, rgba(20, 50, 20, 0.3) 100%);
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.evolve__item--purple {
  background: linear-gradient(135deg, rgba(156, 39, 176, 0.2) 0%, rgba(40, 10, 50, 0.3) 100%);
  border: 1px solid rgba(156, 39, 176, 0.3);
}

.evolve__item--gold {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.22) 0%, rgba(80, 60, 0, 0.3) 100%);
  border: 1px solid rgba(255, 215, 0, 0.4);
  box-shadow: 0 0 0.12rem rgba(255, 215, 0, 0.15);
}

.evolve__name {
  font-size: 0.3rem;
  font-weight: bold;
  font-family: "SourceHanSerifSC", "Noto Serif SC", "SimSun", serif;
  flex-shrink: 0;
  text-shadow: 0 0.02rem 0.04rem rgba(0, 0, 0, 0.6);
}

.evolve__name--white {
  color: #c8c8c8;
}

.evolve__name--green {
  color: #5fd35f;
}

.evolve__name--purple {
  color: #c451d9;
}

.evolve__name--gold {
  color: #ffd700;
  text-shadow: 0 0 0.08rem rgba(255, 215, 0, 0.4), 0 0.02rem 0.04rem rgba(0, 0, 0, 0.6);
}

.evolve__desc {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.08rem;
  min-width: 0;
}

.evolve__unlock {
  font-size: 0.2rem;
  color: #b09870;
  white-space: nowrap;
}

.evolve__yield {
  font-size: 0.2rem;
  color: #c8a860;
  white-space: nowrap;
}

.evolve__yield em {
  font-style: normal;
  font-size: 0.28rem;
  font-weight: bold;
  color: #ffdd88;
}


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

/* --- 我的奖励弹窗专属 --- */
.sheet--reward .sheet__header {
  padding: 0.28rem var(--space-lg) 0.16rem;
  flex-direction: column;
  gap: 0.06rem;
}

.sheet--reward .sheet__subtitle {
  font-size: 0.2rem;
  color: #c8a860;
}

.sheet--reward .sheet__title {
  font-family: "SourceHanSerifSC", "Noto Serif SC", "SimSun", serif;
  font-size: 0.32rem;
  font-weight: bold;
  /* background: linear-gradient(180deg, #FADFB1 0%, #FADFB1 50%, #DF7B31 50%, #DF7B31 100%); */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  background-image: linear-gradient(to right, #FADFB1 0%, #DF7B31 100%);
}

.sheet--reward .sheet__body {
  padding: 0.2rem 0.32rem 0.4rem;
}

.reward-summary {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--color-border-gold);
  border-radius: 0.12rem;
  padding: 0.32rem 0.16rem;
  margin-bottom: 0.24rem;
}

.reward-summary__item {
  flex: 1;
  text-align: center;
}

.reward-summary__num {
  display: block;
  font-size: 0.56rem;
  font-weight: bold;
  color: #ffdd88;
  line-height: 1;
}

.reward-summary__label {
  display: block;
  font-size: 0.2rem;
  color: #c8a860;
  margin-top: 0.12rem;
}

.reward-summary__divider {
  width: 1px;
  height: 0.8rem;
  background: rgba(193, 154, 107, 0.4);
}

/* --- 活动规则弹窗专属 --- */
.sheet--rules .sheet__header {
  padding: 0.28rem var(--space-lg) 0.16rem;
}

.sheet--rules .sheet__title {
  font-size: 0.32rem;
  font-family: "SourceHanSerifSC", "Noto Serif SC", "SimSun", serif;
  /* background: linear-gradient(180deg, #FADFB1 0%, #FADFB1 50%, #DF7B31 50%, #DF7B31 100%); */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.06rem;
    background-image: linear-gradient(to right, #FADFB1 0%, #DF7B31 100%);
}

.sheet--rules .sheet__body {
  padding: 0.08rem var(--space-lg) var(--space-lg);
}

.rules__section {
  margin-bottom: 0.28rem;
  padding-bottom: 0.28rem;
  border-bottom: 1px solid rgba(201, 160, 80, 0.15);
}

.rules__section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.rules__heading {
  font-size: 0.24rem;
  font-weight: bold;
  color: #ffc952;
  margin-bottom: 0.12rem;
  padding-left: 0.14rem;
  border-left: 4px solid #d4a017;
  line-height: 1.4;
  letter-spacing: 0.02rem;
}

.rules__text {
  font-size: 0.2rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.88);
}

.rules__text strong {
  color: #ffe082;
  font-weight: 600;
}

.rules__list {
  padding-left: 0.3rem;
  font-size: 0.2rem;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.88);
}

.rules__list--disc {
  list-style-type: disc;
}

.rules__item {
  margin-bottom: 0.1rem;
  padding-left: 0.04rem;
}

.rules__item strong {
  color: #ffe082;
  font-weight: 600;
}

.rules__item--highlight {
  color: #ffd54f;
  background: linear-gradient(135deg, rgba(255, 204, 128, 0.12) 0%, rgba(255, 183, 77, 0.06) 100%);
  border: 1px solid rgba(255, 204, 128, 0.2);
  border-radius: var(--radius-md);
  padding: 0.1rem 0.14rem;
  margin-top: 0.08rem;
  font-weight: 500;
}

/* --- 充值领龙晶弹窗专属 --- */
.sheet--rc .sheet__header {
  flex-direction: column;
  gap: var(--space-sm);
  padding: 0.28rem var(--space-lg) 0.08rem;
}

.sheet--rc .sheet__title {
  font-family: "SourceHanSerifSC", "Noto Serif SC", "SimSun", serif;
  font-size: 0.56rem;
  font-weight: bold;
  background: linear-gradient(180deg, #FADFB1 0%, #FADFB1 50%, #DF7B31 50%, #DF7B31 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sheet__rc-subtitle {
  text-align: center;
  font-size: 0.22rem;
  color: #ffe0b0;
  margin: 0 0 0.16rem;
}

/* 汇总卡片 */
.sheet__rc-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.24rem 0.32rem;
  border-radius: 0.16rem;
  background-image: url("../images/record-card-bg.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  margin-bottom: 0.2rem;
}

.sheet__rc-summary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.04rem;
}

.sheet__rc-summary-label {
  font-size: 0.22rem;
  color: #ffe0b0;
}

.sheet__rc-summary-value {
  font-size: 0.56rem;
  font-weight: bold;
  color: #ffd700;
  font-variant-numeric: tabular-nums;
}

/* 充值记录列表 */
.sheet__rc-list {
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
  margin-bottom: 0.2rem;
  max-height: 5rem;
  overflow-y: auto;
  padding: 0.04rem 0.04rem;
}

.sheet__rc-list-title {
  font-size: 0.22rem;
  color: #ffe0b0;
  margin-bottom: 0.08rem;
}

.sheet__rc-record {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #c57b2b;
  border-radius: 0.16rem;
  overflow: hidden;
  background: linear-gradient(180deg, #f0aa71 0%, #f5ca8a 100%);
  padding: 0.24rem 0.28rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: auto !important;
  margin-top: 0 !important;
  flex-shrink: 0;
}

.sheet__rc-record-info {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.sheet__rc-record-date {
  font-size: 0.22rem;
  color: #5a2a0a;
  font-weight: bold;
}

.sheet__rc-record-amount {
  font-size: 0.28rem;
  color: #8b1a0a;
  font-weight: bold;
}

.sheet__rc-record--pending {
  border-color: #dc3c16;
  box-shadow: inset 0 0 0 1px rgba(220, 60, 22, 0.2);
}

.sheet__rc-record-detail {
  font-size: 0.2rem;
  line-height: 1.4;
  color: #78401f;
  font-variant-numeric: tabular-nums;
}

/* 操作按钮 */
.sheet__rc-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  padding-bottom: 0.16rem;
}

.sheet__rc-btn-claim-all:active,
.sheet__rc-btn-close:active {
  opacity: 0.8;
}

.sheet__rc-btn-claim-all--disabled {
  filter: grayscale(1) brightness(0.6);
  pointer-events: none;
}

/* --- 角色信息组件（第二个容器） --- */

.sheet__body {
  padding: var(--space-lg);
  overflow-y: auto;
  flex: 1;
}

/* ====== 4. Page: 签约页 (s0) ====== */
.screen--signup {
  position: relative;
  min-height: 100vh;
}

.signup__bg {
  position: absolute;
  left: 0;
  width: 100%;
  z-index: 0;
}

.signup__bg-top {
  width: 100%;
  height: 10.58rem;
  background-image: url("../images/s0-bg-top.jpg");
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.signup__bg-bottom {
  width: 100%;
  height: 7.59rem;
  background-image: url("../images/s0-bg-bottom.jpg");
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.signup__content {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  padding-top: 10.2rem;
}

.signup__dialog {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 0 var(--space-md);
  margin-top: 0.1rem;
}

.signup__dialog img {
  width: 6.53rem;
  height: 2.72rem;
}

.signup__gift {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 0 var(--space-md);
  margin-top: -0.5rem;
}

.signup__gift-frame {
  position: relative;
  z-index: 1;
  width: 7rem;
  height: 4.51rem;
  background-image: url("../images/gift-frame.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.08rem;
}

.signup__gift-crystal {
  font-size: 1rem;
  font-weight: bold;
  /* color: #ffd700; */
    background-image: linear-gradient(to right, #FFFFAD 0%, #D18634 100%);
  /* font-variant-numeric: tabular-nums; */
  -webkit-background-clip: text;
  color: transparent;
  background-clip: text;
}

.signup__gift-crystal-unit {
  font-size: 0.4rem;
  margin-top: 0.44rem;
     background-image: linear-gradient(to right, #FFFFAD 0%, #D18634 100%);
  /* font-variant-numeric: tabular-nums; */
  -webkit-background-clip: text;
  color: transparent;
  background-clip: text;
}

.signup__sign-btn {
  display: block;
  margin: -0.2rem auto 0;
  border: none;
  background-color: transparent;
}

.signup__sign-btn:active {
  opacity: 0.7;
}

/* ====== 5. Page: 主页 (s1) ====== */
.screen--home {
  position: relative;
  padding-top: var(--top-bar-h);
  padding-bottom: 0.6rem;
}

.home__bg {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  z-index: 0;
  display: flex;
  flex-direction: column;
}

.home__bg-img {
  width: 100%;
  height: 10.94rem;
  background-image: url("../images/s1-bg.jpg");
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.home__bg-bottom {
  width: 100%;
  flex: 1;
  background-color: #1A0802;
}

.home__pet {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100vh - var(--top-bar-h) - 0.6rem);
  padding: 0.2rem 0 0.2rem;
}

.home__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0.5rem;
  transform: translateX(-2.4rem);
}

.home__title-main {
  width: 2.4rem;
  height: auto;
}

.home__date {
  margin-top: 0.08rem;
  font-size: 0.26rem;
  color: #efdc9e;
  letter-spacing: 0.02rem;
   transform: translateX(-1.8rem);
   font-family: "SourceHanSansCN", "Noto Sans SC", "SimSun", sans-serif;
}

.home__pet-view {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 2.8rem;
  margin-top: 0.1rem;
}

.home__pet-img {
  width: 2rem;
  height: auto;
  object-fit: contain;
  animation: pet-float 2s ease-in-out infinite;
  transform-origin: center bottom;
  cursor: pointer;
  filter: drop-shadow(0 0.08rem 0.16rem rgba(0, 0, 0, 0.45));
}

@keyframes pet-float {
  0%, 100% {
    transform: translateY(0) scale(1) rotate(0deg);
    filter: drop-shadow(0 0.06rem 0.12rem rgba(255, 200, 80, 0.15));
  }
  50% {
    transform: translateY(-0.22rem) scale(1.06) rotate(2deg);
    filter: drop-shadow(0 0.18rem 0.28rem rgba(255, 200, 80, 0.35));
  }
}

.home__pet-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.06rem;
  margin-top: 0.08rem;
}

.home__pet-level {
  font-size: 0.22rem;
  font-weight: bold;
  color: #ffdd88;
  text-shadow: 0 0.02rem 0.04rem rgba(0, 0, 0, 0.5);
}

.home__pet-help {
  width: 0.36rem;
  height: 0.36rem;
  padding: 0;
  border: none;
  background: transparent;
}

.home__pet-help img {
  display: block;
  width: 100%;
  height: 100%;
}

.home__pet-help:active {
  opacity: 0.7;
}

.home__collect-btn {
  margin-top: 0.2rem;
  padding: 0;
  border: none;
}

.home__collect-btn:active {
  opacity: 0.8;
}

/* --- S1 面板背景容器 --- */
.home__panel {
  width: 100%;
  /* height: 10.82rem; */
  /* background-image: url("../images/home-panel-bg.png"); */
  /* background-size: 7.5rem 10.82rem; */
  background-repeat: no-repeat;
  background-position: top center;
  padding: 0.24rem 0.28rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
  margin-top: 0.2rem;
  padding-bottom: 1.2rem;
}

.home__panel-section {
  padding: 0.16rem 0.2rem;
  border-radius: 0.08rem;
  background: rgba(0, 0, 0, 0.25);
}

/* 我的龙晶区块 */
.home__panel-section--crystal {
  position: relative;
  width: 6.96rem;
  height: 3.89rem;
  background-image: url("../images/panel-crystal-bg.png");
  background-size: 6.96rem 3.89rem;
  background-repeat: no-repeat;
}
.home__panel-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.08rem;
  margin-top: 0.46rem;
}

.home__panel-crystal-num {
  font-size: 1rem;
  font-weight: 600;
     background-image: linear-gradient(to right, #FFFFAD 0%, #D18634 100%);
  /* font-variant-numeric: tabular-nums; */
  -webkit-background-clip: text;
  color: transparent;
  background-clip: text;
}

.home__panel-crystal-unit {
  font-size: 0.4rem;
    background-image: linear-gradient(to right, #FFFFAD 0%, #D18634 100%);
  /* font-variant-numeric: tabular-nums; */
  -webkit-background-clip: text;
  color: transparent;
  background-clip: text;
  margin-top: 0.54rem;
}

.home__panel-crystal-desc {
  font-size: 0.26rem;
  color: #efdc9e;
  text-align: center;
}

.home__panel-crystal-extra {
  font-size: 0.16rem;
  color: #efdc9e;
  text-align: center;
  margin-top: 0.06rem;
}

.home__panel-crystal-extra em {
  font-style: normal;
  color: #ffdd88;
  font-weight: bold;
}

.home__panel-crystal-extra__empty {
  display: none;
  font-size: 0.16rem;
  color: #efdc9e;
  margin-top: 0.3rem;
}

.home__panel-crystal-extra--empty .home__panel-crystal-extra__has {
  display: none;
}

.home__panel-crystal-extra--empty .home__panel-crystal-extra__empty {
  display: block;
}

.home__panel-pending {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.1rem;
  font-size: 0.13rem;
  color: #c8a860;
}

.home__panel-pending__has {
  display: flex;
  position: absolute;
  left: 0.56rem;
  right: 0;
  bottom: 0.22rem;
  font-size: 0.2rem;
  color: #efdc9e;
  flex-direction: row;
  align-items: center;
  /* justify-content: center; */
  gap: 0.16rem;
  padding-right: 0.20rem;
}

.home__panel-pending__empty {
  display: none;
  position: absolute;
  left: 0.56rem;
  right: 0;
  bottom: 0.22rem;
  font-size: 0.2rem;
  color: #efdc9e;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.16rem;
  padding-right: 0.20rem;
}

.home__panel-pending--empty .home__panel-pending__has {
  display: none;
}

.home__panel-pending--empty .home__panel-pending__empty {
  display: flex;
}

.home__panel-pending em {
  font-style: normal;
  color: #ffdd88;
  font-weight: bold;
}

/* 收宝区块 */
.home__panel-section--collect {
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.home__panel-collect-img {
  display: block;
  width: 100%;
  height: auto;
}

/* 出征记录区块 */
.home__panel-section--record {
  border: 1px solid var(--color-border-gold);
  border-radius: 0.17rem;
  overflow: hidden;
  padding: 0;
  background-image: url("../images/dialog-bg.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.home__record-header {
  position: relative;
  width: 100%;
  height: 0.93rem;
  background-image: url("../images/record-header.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
}

.home__record-days-text {
  position: absolute;
  right: 0.3rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.22rem;
  color: #ffe0b0;
  white-space: nowrap;
}

.home__record-days-text em {
  font-style: normal;
  font-weight: bold;
  color: #ffdd88;
}

.home__record-body {
  background: rgba(0, 0, 0, 0.25);
  padding: 0.16rem 0.2rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.16rem;
}

.home__panel-record-book {
  width: 1.03rem;
  height: 1.01rem;
  flex-shrink: 0;
}

.home__panel-record-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
}

.home__panel-record-story {
  font-size: 0.38rem;
  color: #c8a860;
  line-height: 1.4;
}

.home__panel-record-desc {
  font-size: 0.28rem;
  color: #c8a860;
  line-height: 1.5;
  opacity: 0.8;
}

/* --- 收宝弹窗专属 --- */
.sheet--collect .sheet__header {
  flex-direction: column;
  gap: var(--space-sm);
  padding: 0.28rem var(--space-lg) 0.08rem;
}

.sheet--collect .sheet__title {
  font-family: "SourceHanSerifSC", "Noto Serif SC", "SimSun", serif;
  font-size: 0.56rem;
  font-weight: bold;
  /* background: linear-gradient(180deg, #FADFB1 0%, #FADFB1 50%, #DF7B31 50%, #DF7B31 100%); */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
    background-image: linear-gradient(to right, #FADFB1 0%, #DF7B31 100%);
}

.sheet__collect-subtitle {
  text-align: center;
  font-size: 0.22rem;
  color: #ffe0b0;
  margin: 0 0 0.16rem;
}

/* 奖励卡片 */
.sheet__collect-reward {
  width: 100%;
  box-sizing: border-box;
  border-radius: 0.24rem;
  overflow: hidden;
  background-image: url("../images/record-card-bg.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  padding: 0.20rem 0.24rem;
  text-align: center;
  margin-bottom: 0.2rem;
}

.sheet__collect-reward-num {
  font-size: 1.0rem;
  font-weight: bold;
  /* background: linear-gradient(180deg, #ffffff 0%, #ffe066 50%, #f0c040 100%); */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
   background-image: linear-gradient(to bottom, #fff 0%, #DF7B31 100%);
   /* text-shadow: #fff 1px 0 0; */
    -webkit-text-stroke: 2px #9D0000;
}

.sheet__collect-reward-num em {
  font-style: normal;
}

.sheet__collect-reward-desc {
  font-size: 0.22rem;
  /* background: linear-gradient(180deg, #FFE486 0%, #FFE486 50%, #FFE486 100%); */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 0.05px #FFE486;
  margin-top: 0.06rem;
    background-image: linear-gradient(to right, #FADFB1 0%, #fff 100%);
}

/* 出征战报卡片 */
.sheet__collect-report {
  width: 100%;
  box-sizing: border-box;
  border-radius: 0.24rem;
  overflow: hidden;
  background-image: url("../images/record-card-bg.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  padding: 0.24rem 0.28rem;
  margin-bottom: 0.16rem;
}

.sheet__collect-report-title {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  margin-bottom: 0.12rem;
}

.sheet__collect-report-title-icon {
  width: 0.73rem;
  height: 0.67rem;
  flex-shrink: 0;
}

.sheet__collect-report-title-text {
  font-size: 0.32rem;
  font-weight: bold;
  color: #fff;
  font-family: "SourceHanSerifSC", "Noto Serif SC", "SimSun", serif;
}

.sheet__collect-report-story {
  font-size: 0.24rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  padding-left: 0.5rem;
}

/* 分享区域（收宝后显示） */
.sheet__collect-share {
  display: none;
  margin-bottom: 0.16rem;
}

.sheet__collect-share-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  margin-bottom: 0.20rem;
}

.sheet__collect-share-divider::before,
.sheet__collect-share-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 160, 80, 0.4), transparent);
}

.sheet__collect-share-divider-icon {
  width: 0.44rem;
  height: 0.43rem;
  flex-shrink: 0;
}

.sheet__collect-share-divider-text {
  font-size: 0.20rem;
  color: #ffe0b0;
  white-space: nowrap;
}

.sheet__collect-share-options {
  display: flex;
  justify-content: center;
  gap: 0.90rem;
  margin-bottom: 0.12rem;
}

/* 分享按钮雪碧图 (share-btn-sprite.png: 665x195px → 6.65rem x 1.95rem) */
.sheet__collect-share-btn {
  width: 2.91rem;
  height: 1.95rem;
  background-image: url("../images/share-btn-sprite.png");
  background-size: 6.65rem 1.95rem;
  background-repeat: no-repeat;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
  flex-shrink: 0;
}

.sheet__collect-share-btn:active {
  opacity: 0.8;
}

.sheet__collect-share-btn--poster {
  background-position: 0 0;
}

.sheet__collect-share-btn--link {
  background-position: -3.73rem 0;
}

.sheet__collect-share-hint {
  margin: 0 auto;
  padding: 0.08rem 0.40rem;
  border-radius: 0.40rem;
  border: 1px solid rgba(201, 160, 80, 0.5);
  background: rgba(40, 15, 5, 0.8);
  font-size: 0.18rem;
  color: #ffe0b0;
  text-align: center;
  white-space: nowrap;
  width: fit-content;
}

/* 收宝成功状态 */
.sheet--collect.sheet--collected .sheet__collect-actions {
  display: none;
}

.sheet--collect.sheet--collected .sheet__collect-share {
  display: block;
}

/* 操作按钮 */
.sheet__collect-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  padding-bottom: 0.16rem;
}

.sheet__collect-actions .sprite:active {
  opacity: 0.8;
}

/* --- 排名奖励档位弹窗专属 --- */
.sheet--rankprize .sheet__header {
  padding: 0.28rem var(--space-lg) 0.08rem;
}

.sheet--rankprize .sheet__title {
  font-family: "SourceHanSerifSC", "Noto Serif SC", "SimSun", serif;
  font-size: 0.56rem;
  font-weight: bold;
  background: linear-gradient(180deg, #FADFB1 0%, #FADFB1 50%, #DF7B31 50%, #DF7B31 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.rankprize__subtitle {
  text-align: center;
  font-size: 0.20rem;
  color: #c8a872;
  margin: 0 0 0.20rem;
  padding: 0 0.32rem;
}

.rankprize__list {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0 0.04rem;
}

.rankprize__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.18rem 0.24rem;
  border-radius: 0.08rem;
  border: 1px solid;
  position: relative;
  overflow: hidden;
}

.rankprize__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0.06rem;
}

/* 第 1 名：主导地位 */
.rankprize__item--gold {
  padding: 0.24rem 0.24rem;
  border: 2px solid rgba(255, 215, 0, 0.6);
  background: linear-gradient(135deg, rgba(255, 200, 50, 0.22) 0%, rgba(60, 40, 0, 0.4) 100%);
  box-shadow: 0 0 0.16rem rgba(255, 200, 50, 0.2), inset 0 0 0.12rem rgba(255, 215, 0, 0.08);
}



/* 第 2-10 名 */
.rankprize__item--silver {
  border-color: rgba(200, 200, 210, 0.35);
  background: linear-gradient(135deg, rgba(180, 180, 200, 0.12) 0%, rgba(30, 30, 40, 0.35) 100%);
}



/* 第 11-30 名 */
.rankprize__item--bronze {
  border-color: rgba(180, 120, 50, 0.35);
  background: linear-gradient(135deg, rgba(180, 120, 50, 0.12) 0%, rgba(40, 25, 10, 0.35) 100%);
}


/* 排名区域 */
.rankprize__rank {
  display: flex;
  align-items: center;
  gap: 0.16rem;
}

/* 排名徽章 */
.rankprize__badge {
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.24rem;
  font-weight: bold;
  font-family: "DIN Alternate", "Impact", sans-serif;
  flex-shrink: 0;
}

.rankprize__badge--gold {
  background: radial-gradient(circle at 35% 35%, #FFEE88, #FFD700 40%, #B8860B 100%);
  color: #4a3000;
  box-shadow: 0 0 0.08rem rgba(255, 215, 0, 0.5);
}

.rankprize__badge--silver {
  background: radial-gradient(circle at 35% 35%, #E8E8F0, #C0C0C8 40%, #707078 100%);
  color: #333338;
}

.rankprize__badge--bronze {
  background: radial-gradient(circle at 35% 35%, #E8A870, #CD7F32 40%, #8B5A2B 100%);
  color: #3a2008;
}

.rankprize__rank-text {
  font-size: 0.24rem;
  font-weight: bold;
  color: #e0d0b8;
}

.rankprize__item--gold .rankprize__rank-text {
  font-size: 0.28rem;
  color: #FFE8A0;
}

/* 奖励区域 */
.rankprize__reward {
  display: flex;
  align-items: baseline;
  gap: 0.10rem;
}

.rankprize__reward-label {
  font-size: 0.20rem;
  color: #b09870;
}

.rankprize__reward-days {
  font-size: 0.40rem;
  font-weight: bold;
  font-family: "DIN Alternate", "Impact", sans-serif;
  background: linear-gradient(180deg, #FFE8A0 0%, #FFD700 50%, #D4A017 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.rankprize__item--silver .rankprize__reward-days {
  background: linear-gradient(180deg, #E8E8F0 0%, #C0C0C8 50%, #909098 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.rankprize__item--bronze .rankprize__reward-days {
  background: linear-gradient(180deg, #E8A870 0%, #CD7F32 50%, #8B5A2B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.rankprize__reward-unit {
  font-size: 0.18rem;
  font-weight: normal;
  color: #b09870;
  -webkit-text-fill-color: #b09870;
  margin-left: 0.02rem;
}

.rankprize__note {
  margin-top: 0.20rem;
  padding: 0.14rem 0.18rem;
  border-radius: 0.08rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(201, 160, 80, 0.12);
  font-size: 0.17rem;
  line-height: 1.7;
  color: rgba(255, 224, 176, 0.5);
}

/* ====== 6. Page: 排行榜 (s4) ====== */
.screen--rank {
  position: relative;
  height: 100vh;
  min-height: 100vh;
  padding-top: var(--top-bar-h);
  padding-bottom: 1.4rem;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.rank__bg {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  z-index: 0;
}

.rank__bg-img {
  width: 100%;
  height: 100%;
  background-image: url("../images/rank-bg.jpg");
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.rank__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(100vh - var(--top-bar-h) - 0.6rem);
  padding: 0.2rem 0 0;
}

.rank__header {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 0.4rem;
  border-bottom: 1px solid var(--color-border-gold);
}

.rank__header-img {
  width: 7.5rem;
  height: 0.89rem;
  object-fit: contain;
}

.rank__notice {
  width: 6.77rem;
  margin-top: 0.16rem;
}

.rank__notice-img {
  width: 100%;
  height: auto;
}

/* --- 限定外观展示区 --- */
.rank__appearance {
  position: relative;
  width: 6.81rem;
  height: 5.72rem;
  background-image: url("../images/rank-appearance-bg.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  margin-top: 0.2rem;
}

.rank__appearance-btn {
  position: absolute;
  bottom: 0.16rem;
  left: 50%;
  transform: translateX(-50%);
}

.rank__appearance-btn:active {
  opacity: 0.8;
}

/* --- 龙晶排行榜列表 --- */
.rank__list {
  position: relative;
  width: 7.41rem;
  height: 6.05rem;
  margin-top: 0.20rem;
  background-image: url("../images/rank-list-frame.png");
  background-size: 7.41rem 8.82rem;
  background-repeat: no-repeat;
  background-position: 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 顶部装饰条（金色龙纹角饰，含表头文字） */
.rank__list-head {
  position: relative;
  width: 100%;
  height: 1.01rem;
  background-image: url("../images/rank-list-header.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  /* 5 列：前 4 列与表头图内文字中心（x=89/246/423/579px）对齐，第 5 列为右侧 spacer */
  display: grid;
  grid-template-columns: 1.78rem 1.36rem 2.18rem 0.94rem 1.15rem;
  align-items: center;
  box-sizing: border-box;
}

.rank__list-head span {
  font-size: 0.24rem;
  font-weight: bold;
  color: #ffe6a8;
  text-align: center;
  font-family: "SourceHanSerifSC", "Noto Serif SC", "SimSun", serif;
  letter-spacing: 0.02rem;
  text-shadow: 0 0.02rem 0.04rem rgba(0, 0, 0, 0.6);
}

/* 数据行列表 */
.rank__list-body {
  list-style: none;
  margin: 0;
  /* padding: 0.06rem 0; */
  margin-top: -0.24rem;
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  background: linear-gradient(
    to right,
    transparent 0,
    transparent 0.25rem,
    rgba(0, 0, 0, 0.78) 0.25rem,
    rgba(0, 0, 0, 0.78) calc(100% - 0.35rem),
    transparent calc(100% - 0.35rem),
    transparent 100%
  );
}

/* 黑底改由滚动容器自身承载，避免滚动到后段时伪元素跟随内容滚走 */
.rank__list-body::before {
  content: none;
}

.rank__list-body > .rank__list-row {
  position: relative;
  z-index: 1;
}

.rank__list-row {
  display: grid;
  /* 5 列：与表头列同宽，保证数据行与表头一一对齐 */
  grid-template-columns: 1.78rem 1.36rem 2.18rem 0.94rem 1.15rem;
  align-items: center;
  flex: none;
  min-height: 0.60rem;
  height: 0.60rem;
  box-sizing: border-box;
}

/* 允许 grid 子项内容自然溢出（避免长数字/长名字被截断） */
.rank__list-row > * {
  min-width: 0;
  overflow: visible;
  white-space: nowrap;
}

.rank__list-row + .rank__list-row {
  border-top: 1px solid rgba(201, 160, 80, 0.10);
}

/* 排名列 */
.rank__list-rank {
  display: flex;
  justify-content: center;
  align-items: center;
}

.rank__list-rank-badge {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rank__list-rank-num {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -42%);
  font-size: 0.20rem;
  font-weight: bold;
  font-family: "DIN Alternate", "Impact", sans-serif;
  color: #5a2a08;
  text-shadow: 0 0.01rem 0.02rem rgba(255, 255, 255, 0.3);
  line-height: 1;
}

/* 前 3 名徽章图自带 1/2/3 数字，不需 CSS 叠加 */

/* 4-10 名徽章数字：暖白色 */
.rank__list-row--normal .rank__list-rank-num {
  color: #efdc9e;
  text-shadow: 0 0.01rem 0.02rem rgba(0, 0, 0, 0.5);
}

/* 空占位行徽章数字 */
.rank__list-row--empty .rank__list-rank-badge {
  width: 0.43rem;
  height: 0.43rem;
  border-radius: 50%;
  border: 1px dashed rgba(201, 160, 80, 0.28);
}

/* 角色名列（前3名默认橙金色） */
.rank__list-name {
  font-size: 0.24rem;
  color: #E98F38;
  text-align: center;
  font-family: "SourceHanSerifSC", "Noto Serif SC", "SimSun", serif;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 0.08rem;
}

/* 品阶列（前3名默认橙金色，不再区分紫/绿/白） */
.rank__list-grade {
  font-size: 0.22rem;
  text-align: center;
  font-weight: bold;
  color: #E98F38;
}

.rank__list-grade--purple,
.rank__list-grade--green,
.rank__list-grade--white {
  color: #E98F38;
}

/* 机缘龙晶列（前3名默认橙金色） */
.rank__list-crystal {
  font-size: 0.24rem;
  color: #E98F38;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-family: "DIN Alternate", "Impact", sans-serif;
}

/* 4-10 名：整行统一暗红棕色 */
.rank__list-row--normal .rank__list-name,
.rank__list-row--normal .rank__list-grade,
.rank__list-row--normal .rank__list-grade--purple,
.rank__list-row--normal .rank__list-grade--green,
.rank__list-row--normal .rank__list-grade--white,
.rank__list-row--normal .rank__list-crystal {
  color: #B6815A;
}

/* 空占位行：更淡 */
.rank__list-row--empty .rank__list-name,
.rank__list-row--empty .rank__list-grade,
.rank__list-row--empty .rank__list-crystal {
  color: #5a3020;
  font-weight: normal;
}

/* 底部 我的排名 固定栏 */
.rank__list-me {
  position: relative;
  display: grid;
  grid-template-columns: 1.60rem 1fr 2.20rem;
  align-items: center;
  height: 0.80rem;
  padding: 0 0.60rem;
  box-sizing: border-box;
}

/* 背景与顶部金线仅覆盖金框内部（左 25px / 右 35px） */
.rank__list-me::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0.25rem;
  right: 0.35rem;
  background: linear-gradient(180deg, #800B00 0%, #500400 100%);
  border-top: 1px solid rgba(201, 160, 80, 0.55);
  pointer-events: none;
  z-index: 0;
}

.rank__list-me > * {
  position: relative;
  z-index: 1;
}

.rank__list-me-label {
  font-size: 0.24rem;
  color: #FFF293;
  font-family: "SourceHanSerifSC", "Noto Serif SC", "SimSun", serif;
}

.rank__list-me-rank {
  font-size: 0.22rem;
  color: #FFF293;
  text-align: center;
}

.rank__list-me-rank em {
  font-style: normal;
  font-weight: bold;
  color: #FFF293;
  font-size: 0.28rem;
  font-family: "DIN Alternate", "Impact", sans-serif;
  margin: 0 0.04rem;
}

.rank__list-me-crystal {
  font-size: 0.22rem;
  color: #FFF293;
  text-align: right;
  font-family: "SourceHanSerifSC", "Noto Serif SC", "SimSun", serif;
}

.rank__list-me-crystal em {
  font-style: normal;
  color: #ffdd88;
  font-variant-numeric: tabular-nums;
  font-family: "DIN Alternate", "Impact", sans-serif;
  margin-left: 0.06rem;
}
