/* ============ 字型（與 zhuge.fun 官網一致） ============ */
/* 拉丁/西里爾/希臘/越南文：Inter（官網同源 woff2，按 unicode-range 分片）
   中文/日文/韓文：與官網相同的系統字體棧——標題楷體系、正文黑體系 */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('assets/fonts/inter/inter-cyrillic-ext.woff2') format('woff2'); unicode-range: u+0460-052f, u+1c80-1c8a, u+20b4, u+2de0-2dff, u+a640-a69f, u+fe2e-fe2f; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('assets/fonts/inter/inter-cyrillic.woff2') format('woff2'); unicode-range: u+0301, u+0400-045f, u+0490-0491, u+04b0-04b1, u+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('assets/fonts/inter/inter-symbols.woff2') format('woff2'); unicode-range: u+1f??; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('assets/fonts/inter/inter-greek.woff2') format('woff2'); unicode-range: u+0370-0377, u+037a-037f, u+0384-038a, u+038c, u+038e-03a1, u+03a3-03ff; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('assets/fonts/inter/inter-vietnamese.woff2') format('woff2'); unicode-range: u+0102-0103, u+0110-0111, u+0128-0129, u+0168-0169, u+01a0-01a1, u+01af-01b0, u+0300-0301, u+0303-0304, u+0308-0309, u+0323, u+0329, u+1ea0-1ef9, u+20ab; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('assets/fonts/inter/inter-latin-ext.woff2') format('woff2'); unicode-range: u+0100-02ba, u+02bd-02c5, u+02c7-02cc, u+02ce-02d7, u+02dd-02ff, u+0304, u+0308, u+0329, u+1d00-1dbf, u+1e00-1e9f, u+1ef2-1eff, u+2020, u+20a0-20ab, u+20ad-20c0, u+2113, u+2c60-2c7f, u+a720-a7ff; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('assets/fonts/inter/inter-latin.woff2') format('woff2'); unicode-range: u+00??, u+0131, u+0152-0153, u+02bb-02bc, u+02c6, u+02da, u+02dc, u+0304, u+0308, u+0329, u+2000-206f, u+20ac, u+2122, u+2191, u+2193, u+2212, u+2215, u+feff, u+fffd; }

/* ============ 全局变量与基础（对齐 zhuge.fun 官网配色） ============ */
:root {
  /* 背景 */
  --bg-page: #000000;
  --bg-card: linear-gradient(125deg, rgba(87,64,18,0.42) 6%, rgba(35,23,1,0.70) 17%, rgba(20,13,2,0.78) 70%, rgba(87,64,18,0.38) 100%);
  --bg-card-locked: linear-gradient(125deg, rgba(87,64,18,0.22) 6%, rgba(35,23,1,0.55) 20%, rgba(8,6,2,0.88) 100%);

  /* 金色系 */
  --gold-primary: #BFA36E;
  --gold-bright: #FBF5D2;
  --gold-dim: rgba(191,163,110,0.45);

  /* 文字 */
  --text-primary: #D8C9AB;
  --text-secondary: rgba(216,201,171,0.62);

  /* 状态 */
  --glow-selected: rgba(216,201,171,0.35);

  /* 势力色 */
  --shu: #5FA05F;
  --wei: #5A86C7;
  --wu:  #C75555;
  --qun: #9B6BC5;
  --shen: #F2C94C;   /* 神級：不分陣營，取最高等級金 */

  /* 稀有度色（⚪普通 / 🔵稀有 / 🟣傳說 / 🟡神級） */
  --r-common: #C9C2B4;
  --r-rare:   #5A86C7;
  --r-legend: #9B6BC5;
  --r-divine: #F2C94C;
}

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

html, body {
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: 'Inter', 'Noto Sans TC', 'Noto Sans S Chinese', 'PingFang SC', 'PingFang TC', 'Microsoft JhengHei', 'Hiragino Kaku Gothic ProN', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* 背景纹理叠层（对齐官网 radial 金晕） */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 12%, rgba(191,163,110,0.20), transparent 34%),
    radial-gradient(circle at 28% 78%, rgba(191,163,110,0.20), transparent 23%),
    radial-gradient(circle at 52% 68%, rgba(193,165,110,0.08), transparent 60%),
    repeating-radial-gradient(circle at 50% 50%, rgba(191,163,110,0.04) 0 1px, transparent 1px 80px);
  opacity: 0.9;
}

/* 首屏柔和金色光晕 */
body::after {
  content: '';
  position: fixed;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(216,201,171,0.10), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ============ 顶部导航 ============ */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(191,163,110,0.35);
}
.topnav .nav-left {
  display: flex;
  align-items: center;
  gap: 24px;
}
.topnav .back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--gold-dim);
  color: var(--gold-primary);
  padding: 6px 14px;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 2px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
  text-decoration: none;
}
.topnav .back-btn:hover {
  border-color: var(--gold-primary);
  color: var(--gold-bright);
  background: rgba(191,163,110,0.08);
}
.topnav .brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.topnav .brand .logo {
  font-family: 'BiauKai', 'Kaiti TC', 'STKaiti', 'Noto Serif TC', 'Noto Serif SC', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  font-size: 28px;
  color: var(--gold-bright);
  letter-spacing: 2px;
}
.topnav .brand .sub {
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 4px;
}
.topnav .navlinks {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.topnav .navlinks a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 2px;
  padding: 6px 4px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.topnav .navlinks a:hover { color: var(--gold-bright); }
.topnav .navlinks a.active {
  color: var(--gold-bright);
  border-bottom-color: var(--gold-primary);
}
.topnav .login-btn {
  background: var(--gold-bright);
  color: #231701;
  border: 1px solid var(--gold-bright);
  padding: 8px 24px;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 2px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}
.topnav .login-btn:hover {
  box-shadow: 0 0 14px rgba(216,201,171,0.35);
}

/* ============ 主容器 ============ */
.main {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 40px 48px 80px;
}

/* 标题区 */
.title-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--gold-dim);
  margin-bottom: 28px;
}
.title-bar h1 {
  font-family: 'BiauKai', 'Kaiti TC', 'STKaiti', 'Noto Serif TC', 'Noto Serif SC', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  font-size: 42px;
  color: var(--gold-bright);
  letter-spacing: 6px;
  text-shadow: 0 0 20px rgba(251,245,210,0.25);
}
.title-bar .subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  letter-spacing: 2px;
  text-align: right;
  max-width: 480px;
}

/* ============ 卡牌网格 ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .grid { grid-template-columns: repeat(2, 1fr); } }

/* 卡片 */
/* 比例 2:3 與立繪素材（1027×1531）一致，完整顯示卡面邊框不裁切 */
.card {
  position: relative;
  aspect-ratio: 2 / 3;
  background: var(--bg-card);
  border: 1px solid rgba(191,163,110,0.55);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-primary);
  box-shadow: 0 8px 24px rgba(0,0,0,0.6), 0 0 18px var(--glow-selected);
}
.card.selected {
  border: 1px solid var(--gold-bright);
  box-shadow: 0 0 24px var(--glow-selected), inset 0 0 12px rgba(191,163,110,0.15);
}
.card .portrait {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card .portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* 立繪待補佔位（神級卡尚未有立繪時） */
.img-ph {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, rgba(191,163,110,0.07) 0 6px, transparent 6px 12px);
  color: var(--gold-dim);
  font-size: 12px;
  letter-spacing: 3px;
  border: 1px dashed rgba(160,126,76,0.5);
}
.portrait img.img-missing,
.m-portrait img.img-missing { display: none; }
.portrait img.img-missing + .img-ph,
.m-portrait img.img-missing + .img-ph { display: flex; }
/* 名称条覆盖底部 */
.card .namebar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  color: var(--text-primary);
  font-size: 15px;
  letter-spacing: 3px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.85));
  border-top: 1px solid rgba(160,126,76,0.4);
}
/* 稀有度角标 */
.card .rarity {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  letter-spacing: 2px;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 3px;
  background: rgba(5,3,1,0.7);
  z-index: 2;
}
.card .rarity.common  { color: var(--r-common); }
.card .rarity.rare    { color: var(--r-rare); }
.card .rarity.legend  { color: var(--r-legend); }
.card .rarity.divine  {
  color: var(--r-divine);
  box-shadow: 0 0 10px rgba(242,201,76,0.45);
}
/* 高稀有度卡牌邊框微調 */
.card.r-legend { border-color: rgba(155,107,197,0.55); }
.card.r-divine {
  border-color: rgba(242,201,76,0.7);
  box-shadow: inset 0 0 18px rgba(242,201,76,0.08);
}
/* 势力角标 */
.card .faction {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'BiauKai', 'Kaiti TC', 'STKaiti', 'Noto Serif TC', 'Noto Serif SC', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  font-size: 14px;
  color: var(--gold-bright);
  border-radius: 3px;
  z-index: 2;
  background: rgba(5,3,1,0.7);
  border: 1px solid currentColor;
}
.card .faction.shu { color: var(--shu); }
.card .faction.wei { color: var(--wei); }
.card .faction.wu  { color: var(--wu); }
.card .faction.qun { color: var(--qun); }
.card .faction.shen { color: var(--shen); text-shadow: 0 0 8px rgba(242,201,76,0.6); }
/* 立繪完整卡（clean）：素材圖自帶金色邊框、抬頭與名牌，隱藏頁面重疊的角標與名字條 */
.card.clean .rarity,
.card.clean .faction,
.card.clean .namebar { display: none; }
/* 持有數量標註（重複卡） */
.card .dup-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  font-size: 11px;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(5,3,1,0.82);
  border: 1px solid var(--gold-primary);
  color: var(--gold-bright);
  box-shadow: 0 0 8px rgba(191,163,110,0.25);
}
.card.locked .dup-badge { display: none; }

/* 限量編號徽章（我的卡牌頁：顯示使用者抽到的限量編號，如 #03 / #12） */
.card .serial-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 4;
  font-size: 11px;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(5,3,1,0.82);
  border: 1px solid var(--gold-primary);
  color: var(--gold-bright);
  box-shadow: 0 0 8px rgba(191,163,110,0.25);
  pointer-events: none;
}

/* 全網剩餘徽章（卡面右下角：這張卡全網還剩幾張沒被抽到 / 總印量） */
.card .stock-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 4;
  font-size: 11px;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(5,3,1,0.82);
  border: 1px solid rgba(191,163,110,0.5);
  color: var(--text-secondary);
  white-space: nowrap;
  pointer-events: none;
}
.card .stock-badge.out {
  border-color: rgba(160,126,76,0.45);
  color: rgba(216,201,171,0.4);
}
/* 未收集卡：剩餘徽章壓暗，不搶「敬請期待」視覺 */
.card.locked .stock-badge { opacity: 0.7; }
/* 非 clean 卡（底部有名字條）：徽章上移避讓 */
.card:not(.clean) .serial-badge,
.card:not(.clean) .stock-badge { bottom: 48px; }
/* 锁定图标 */
.card .lock {
  display: none;
  position: absolute;
  top: 38px;
  right: 10px;
  width: 18px;
  height: 18px;
  color: var(--gold-dim);
  z-index: 3;
}
/* 锁定态（不對整卡設 opacity/filter，避免壓暗「敬請期待」徽標） */
.card.locked {
  background: var(--bg-card-locked);
}
.card.locked .portrait img {
  filter: brightness(0.4) blur(8px);   /* 完整顯示卡面後加強模糊，未收集不可辨識名牌 */
}
.card.locked .namebar { color: var(--text-secondary); }
.card.locked .lock { display: block; }
.card.locked .faction { opacity: 0.4; }
.card.locked .rarity { opacity: 0.4; }
.card.locked:hover .portrait img { filter: brightness(0.5) blur(8px); }
/* 未收集卡：敬请期待 徽标（多语言文字，位置居中不遮挡全局） */
.card .soon-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-5deg);
  z-index: 4;
  padding: 6px 14px;
  background: rgba(5, 3, 1, 0.82);
  border: 1px solid var(--gold-primary);
  color: var(--gold-bright);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

/* ============ 详情弹层 ============ */
.modal-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.modal-mask.show { display: flex; }
.modal {
  position: relative;
  width: min(880px, 95vw);
  max-height: 90vh;
  background: var(--bg-card);
  border: 1px solid var(--gold-primary);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}
.modal .corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--gold-primary);
  border-style: solid;
  border-width: 0;
  z-index: 3;
}
.modal .c-tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.modal .c-tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.modal .c-bl { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.modal .c-br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }
.modal .close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-bright);
  cursor: pointer;
  font-size: 22px;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  z-index: 4;
  background: rgba(5,3,1,0.6);
}
.modal .close:hover { border-color: var(--gold-primary); }
.modal .m-portrait {
  background: radial-gradient(circle at 50% 35%, rgba(191,163,110,0.18), transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  position: relative;
  overflow: hidden;
}
.modal .m-portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;   /* 完整顯示卡面，不裁切邊框 */
}
.modal .m-info {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal .m-info .m-name {
  font-family: 'BiauKai', 'Kaiti TC', 'STKaiti', 'Noto Serif TC', 'Noto Serif SC', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  font-size: 44px;
  color: var(--gold-bright);
  letter-spacing: 4px;
  margin-bottom: 8px;
  text-shadow: 0 0 16px rgba(251,245,210,0.25);
}
.modal .m-info .row {
  display: flex;
  gap: 14px;
  font-size: 14px;
  letter-spacing: 1px;
  border-bottom: 1px dashed rgba(160,126,76,0.3);
  padding-bottom: 8px;
}
.modal .m-info .row .k {
  color: var(--text-secondary);
  min-width: 80px;
}
.modal .m-info .row .v { color: var(--text-primary); }
.modal .m-info .row .v.gold { color: var(--gold-bright); }
.modal .m-info .row .v.f-shu { color: var(--shu); }
.modal .m-info .row .v.f-wei { color: var(--wei); }
.modal .m-info .row .v.f-wu  { color: var(--wu); }
.modal .m-info .row .v.f-qun { color: var(--qun); }
.modal .m-info .row .v.f-shen { color: var(--shen); }
.modal .m-info .row .v.r-common { color: var(--r-common); }
.modal .m-info .row .v.r-rare   { color: var(--r-rare); }
.modal .m-info .row .v.r-legend { color: var(--r-legend); }
.modal .m-info .row .v.r-divine { color: var(--r-divine); }

/* ---- 人物生平（詳情彈層） ---- */
/* 簡介可能很長（英文版尤甚）：m-info 自身滾動，卡面與資訊欄高度不超過視窗 */
.modal .m-info {
  overflow-y: auto;
  min-height: 0;
  max-height: 90vh;              /* 獨立上限：無論左側卡面多高，右側長文皆可滾動 */
  overscroll-behavior: contain;  /* 滾到頂/底時不帶動頁面 */
  scrollbar-width: thin;
  scrollbar-color: rgba(191,163,110,0.35) transparent;
}
.modal .m-info::-webkit-scrollbar { width: 8px; }
.modal .m-info::-webkit-scrollbar-track { background: transparent; }
.modal .m-info::-webkit-scrollbar-thumb { background: rgba(191,163,110,0.35); border-radius: 4px; }
.modal .m-info::-webkit-scrollbar-thumb:hover { background: rgba(191,163,110,0.55); }
.modal .m-info .m-alias {
  font-size: 13px;
  letter-spacing: 1px;
  color: var(--gold-primary);
  margin-top: -10px;
}
.modal .m-info .m-role {
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--text-secondary);
  margin-top: -9px;
  margin-bottom: 4px;
}
.modal .m-info .m-bio {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(191,163,110,0.28);
}
.modal .m-info .m-bio-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--gold-primary);
  margin-bottom: 10px;
}
.modal .m-info .m-bio-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(191,163,110,0.5), transparent);
}
.modal .m-info .m-bio-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.95;
  letter-spacing: 0.6px;
  color: var(--text-primary);
  text-align: justify;
  word-break: break-word;
}

/* 通用按钮 */
.btn-gold {
  background: linear-gradient(125deg, rgba(87,64,18,0.42) 6%, rgba(35,23,1,0.70) 40%, rgba(87,64,18,0.38) 100%);
  color: var(--gold-bright);
  border: 1px solid var(--gold-primary);
  padding: 10px 28px;
  font-family: inherit;
  font-size: 15px;
  letter-spacing: 3px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}
.btn-gold:hover {
  border-color: var(--gold-bright);
  box-shadow: 0 0 16px var(--glow-selected);
}
.btn-gold:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .main { padding: 24px 18px 60px; }
  .topnav { padding: 14px 18px; }
  .topnav .navlinks { display: none; }
  .topnav .back-btn span { display: none; }
  .topnav .back-btn { padding: 6px 10px; }
  .topnav .brand .sub { display: none; }
  .title-bar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .title-bar .subtitle { text-align: left; }
  .modal { grid-template-columns: 1fr; max-height: 88vh; overflow-y: auto; }
  .modal .m-portrait { min-height: 280px; }
  .modal .m-info .m-name { font-size: 34px; }
}

/* ============ 語言切換器 ============ */
.lang-switch {
  position: relative;
  margin-right: 12px;
}
.lang-switch .lang-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  padding: 6px 8px;
  cursor: pointer;
  transition: all 0.18s;
  line-height: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lang-switch .lang-btn:hover,
.lang-switch.open .lang-btn {
  color: var(--gold-bright);
}
.lang-switch .lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 208px;
  max-height: 62vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--gold-primary);
  box-shadow: 0 10px 28px rgba(0,0,0,0.65);
  z-index: 300;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-dim) transparent;
}
.lang-switch.open .lang-menu { display: block; }
.lang-switch .lang-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(160,126,76,0.25);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 0.5px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.lang-switch .lang-menu button:last-child { border-bottom: none; }
.lang-switch .lang-menu button:hover {
  background: rgba(191,163,110,0.12);
  color: var(--gold-bright);
}
.lang-switch .lang-menu button.active {
  color: var(--gold-bright);
}
.lang-switch .lang-menu .lang-check { flex-shrink: 0; }
@media (max-width: 768px) {
  .lang-switch { margin-right: 8px; }
  .lang-switch .lang-btn { padding: 5px 6px; }
  .lang-switch .lang-menu { min-width: 190px; }
}

/* 导航右侧组：语言切换紧挨钱包按钮 */
.topnav .nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.topnav .nav-right .lang-switch { margin-right: 0; }
