:root {
  --bg-outer: #09110e;
  --ink: #fff8eb;
  --muted: #b8d1c3;
  --gold: #ffd45c;
  --gold-soft: #f5d88c;
  --emerald: #44e695;
  --sky: #56ceff;
  --crimson: #ff5e6c;
  --violet: #c280ff;
  --font: 'PingFang SC', 'Microsoft YaHei UI', 'Noto Sans CJK SC', system-ui, sans-serif;
  --font-display: 'STKaiti', 'KaiTi', 'Songti SC', 'Noto Serif SC', 'STSong', 'SimSun', Georgia, serif;
  --mono: 'Cascadia Mono', 'SFMono-Regular', Consolas, monospace;
  --badge-clearance: 0px;
}
@media (max-width: 820px) {
  :root.has-host-badge {
    --badge-clearance: 68px;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

/* 细雅墨玉鎏金滚动条，彻底告别生硬系统白条 */
.drawer-list, .wardrobe-grid {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 212, 92, 0.34) transparent;
}
.drawer-list::-webkit-scrollbar, .wardrobe-grid::-webkit-scrollbar { width: 4px; height: 4px; }
.drawer-list::-webkit-scrollbar-track, .wardrobe-grid::-webkit-scrollbar-track { background: transparent; }
.drawer-list::-webkit-scrollbar-thumb, .wardrobe-grid::-webkit-scrollbar-thumb {
  background: rgba(255, 212, 92, 0.34); border-radius: 99px;
}

html, body {
  margin: 0; width: 100%; height: 100%; overflow: hidden;
  background: radial-gradient(circle at 50% 25%, #162b22 0%, #070d0b 75%);
  color: var(--ink); font-family: var(--font);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
body { display: grid; place-items: center; }

button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; touch-action: manipulation; }

.phone-stage {
  position: relative;
  width: min(100vw, calc(100dvh * 9 / 16));
  height: 100dvh;
  max-width: 460px;
  background: #13251d;
  overflow: hidden;
  touch-action: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 80px rgba(0, 0, 0, 0.78);
}
@media (max-width: 520px) {
  .phone-stage { width: 100vw; max-width: none; height: 100dvh; box-shadow: none; }
}
#game-canvas { display: block; width: 100%; height: 100%; touch-action: none; }

/* ================= HUD ================= */
.hud {
  position: absolute; inset: 0 0 auto 0;
  padding: max(10px, env(safe-area-inset-top)) 10px 0;
  pointer-events: none; display: grid; gap: 5px; z-index: 4;
}
.hud-top { display: flex; align-items: center; gap: 7px; }
.hud-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(11, 20, 17, 0.90);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  font-size: 0.75rem;
}
.hud-pill b { font-family: var(--mono); font-size: 0.8rem; }
.hud-hp { flex: 1; max-width: 185px; }
.hp-track { flex: 1; height: 9px; border-radius: 99px; background: rgba(255, 255, 255, 0.14); overflow: hidden; }
.hp-fill { height: 100%; width: 100%; border-radius: 99px; background: linear-gradient(90deg, #ff5864, #ff8f6b); transition: width 0.16s ease; }
.shield-pip { font-size: 0.85rem; filter: drop-shadow(0 0 5px #6df7ff); }

.hud-coin { color: var(--gold); border-color: rgba(255, 210, 77, 0.38); }
.hud-right-btns { margin-left: auto; display: flex; gap: 6px; pointer-events: auto; }
.hud-btn {
  width: 34px; height: 34px; border-radius: 10px;
  background: rgba(11, 20, 17, 0.82); border: 1.5px solid rgba(255, 255, 255, 0.18);
  display: grid; place-items: center; font-size: 0.9rem;
}
.hud-btn:active { transform: scale(0.94); }

.hud-sub {
  padding: 5px 10px 7px; border-radius: 10px;
  background: rgba(11, 20, 17, 0.65); border: 1px solid rgba(255, 255, 255, 0.1);
}
.stage-bar { display: flex; justify-content: space-between; font-size: 0.72rem; color: #dff3e7; margin-bottom: 4px; }
.stage-bar b { font-family: var(--mono); color: var(--gold); }
.stage-progress { height: 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.15); overflow: hidden; }
.stage-progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--sky), var(--emerald), var(--gold)); transition: width 0.12s linear; }

.hud-builds { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.build-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 8px;
  background: rgba(10, 20, 17, 0.8); border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.7rem; font-weight: 800;
}
.build-chip b { font-family: var(--mono); color: var(--gold); }
.build-chip.is-maxed {
  background: linear-gradient(90deg, rgba(46, 36, 12, 0.92), rgba(22, 34, 28, 0.92));
  box-shadow: 0 0 10px rgba(255, 212, 92, 0.28);
}
.build-chip.is-maxed b { color: #fff099; }
.build-chip.is-lv5 {
  background: linear-gradient(90deg, rgba(84, 34, 112, 0.94), rgba(74, 48, 12, 0.94));
  border-color: #ffe378 !important;
  box-shadow: 0 0 12px rgba(214, 130, 255, 0.45);
}
.build-chip.is-lv5 b { color: #ffe888; }
.build-chip.is-branch { border-color: rgba(102, 232, 173, 0.5); color: #bdf9d9; }
.build-chip.is-stat { margin-left: auto; font-family: var(--mono); color: #cde2d6; font-weight: 600; }

.hud-synergies { display: flex; flex-wrap: wrap; gap: 5px; }
.syn-pill {
  padding: 2px 9px; border-radius: 99px; font-size: 0.68rem; font-weight: 800;
  border: 1px solid rgba(255, 210, 77, 0.65);
  background: linear-gradient(90deg, rgba(66, 28, 12, 0.88), rgba(40, 18, 52, 0.88));
  color: #ffe89e; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.boss-hud {
  margin-top: 2px; padding: 7px 11px; border-radius: 11px;
  background: linear-gradient(180deg, rgba(64, 15, 34, 0.92), rgba(34, 10, 22, 0.92));
  border: 1.5px solid #ff5f87; box-shadow: 0 6px 20px rgba(255, 65, 110, 0.35);
}
.boss-hud.is-enraged { border-color: #ffdd4d; animation: enrage-pulse 0.65s ease-in-out infinite; }
@keyframes enrage-pulse { 0%, 100% { box-shadow: 0 0 12px rgba(255, 50, 70, 0.5); } 50% { box-shadow: 0 0 26px rgba(255, 180, 50, 0.85); } }
.boss-hud-head { display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; font-weight: 800; color: #ffd5df; margin-bottom: 5px; }
.boss-title-wrap { display: inline-flex; align-items: center; gap: 6px; }
.boss-phase-tag { padding: 1px 6px; border-radius: 4px; background: #ff476c; color: #fff; font-family: var(--mono); font-size: 0.68rem; }
.boss-hud-head b { font-family: var(--mono); color: var(--gold); }
.boss-bar { position: relative; height: 10px; border-radius: 99px; background: rgba(0, 0, 0, 0.5); overflow: hidden; }
.boss-bar-fill { height: 100%; width: 100%; background: linear-gradient(90deg, #ff3e66, #ff9a4b, #ffe159); transition: width 0.08s linear; }
.boss-tick { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(255, 255, 255, 0.65); }

/* ================= 底部按键 ================= */
.reroll-dock { position: absolute; left: 12px; bottom: calc(max(20px, env(safe-area-inset-bottom)) + var(--badge-clearance)); z-index: 6; }
.reroll-btn {
  width: 54px; height: 54px; border-radius: 50%; border: 2px solid #82d0ff;
  background: linear-gradient(180deg, rgba(28, 62, 92, 0.92), rgba(14, 34, 54, 0.92));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}
.reroll-btn span { font-size: 1.15rem; line-height: 1; }
.reroll-btn b { font-family: var(--mono); font-size: 0.68rem; color: var(--gold); }
.reroll-btn:disabled { opacity: 0.4; border-color: #465d6e; }

.ult-dock { position: absolute; right: 12px; bottom: calc(max(18px, env(safe-area-inset-bottom)) + var(--badge-clearance)); z-index: 6; }
.ult-btn {
  position: relative; width: 64px; height: 64px; border-radius: 50%; overflow: hidden;
  border: 2.5px solid rgba(255, 255, 255, 0.25); background: rgba(12, 24, 22, 0.86);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5); transition: transform 0.12s ease;
}
.ult-fill { position: absolute; inset: auto 0 0 0; height: 0%; background: linear-gradient(180deg, rgba(84, 240, 255, 0.65), rgba(45, 160, 255, 0.85)); transition: height 0.15s linear; z-index: 0; }
.ult-ico, .ult-label { position: relative; z-index: 1; }
.ult-ico { font-size: 1.25rem; line-height: 1; }
.ult-label { font-family: var(--mono); font-size: 0.66rem; color: #fff; text-shadow: 0 1px 4px #000; }
.ult-btn:disabled { opacity: 0.72; cursor: default; }
.ult-btn.is-ready { border-color: #ffe370; box-shadow: 0 0 22px rgba(92, 242, 255, 0.75), 0 0 10px rgba(255, 227, 112, 0.8); animation: ult-ready 1s ease-in-out infinite; }
.ult-btn.is-ready .ult-fill { background: linear-gradient(180deg, #ffe26b, #38e3ff); }
@keyframes ult-ready { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }

.banner-toast {
  position: absolute; top: 148px; left: 50%; transform: translateX(-50%);
  width: max-content; max-width: 90%;
  padding: 6px 14px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(16, 29, 25, 0.90), rgba(9, 17, 15, 0.90));
  border: 1.5px solid rgba(255, 212, 92, 0.72);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.52);
  text-align: center; font-size: 0.76rem; font-weight: 800; color: #ffe699; line-height: 1.35;
  z-index: 8; pointer-events: none; animation: pop-in 0.2s ease-out;
}
.banner-toast.is-boss { border-color: var(--crimson); color: #ffd4da; background: linear-gradient(180deg, rgba(84, 15, 28, 0.92), rgba(40, 8, 16, 0.92)); }
@keyframes pop-in { from { opacity: 0; transform: translate(-50%, -8px) scale(0.94); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }

/* ================= 封面与六大流派分级选择 ================= */
.overlay { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; padding: max(12px, env(safe-area-inset-top)) 14px calc(max(16px, env(safe-area-inset-bottom)) + var(--badge-clearance)); }
.screen-title {
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(180deg, rgba(8, 22, 17, 0.80) 0%, rgba(10, 22, 18, 0.16) 36%, rgba(8, 18, 15, 0.24) 56%, rgba(7, 15, 13, 0.96) 100%);
}
.title-spacer {
  flex: 1;
  min-height: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 4px;
  pointer-events: none;
}
.hero-loadout-pill {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(8, 18, 15, 0.72);
  border: 1px solid rgba(255, 212, 92, 0.28);
  color: #dbeee4;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  backdrop-filter: blur(5px);
}
.title-bottom-dock {
  display: grid;
  gap: 8px;
}

/* 御剑箭雨下方 · 已修流派胶囊栏（一眼看清自己已掌握哪些流派） */
.owned-schools-bar {
  margin: 7px auto 0;
  padding: 5px 10px;
  max-width: 100%;
  border-radius: 999px;
  background: rgba(9, 21, 17, 0.78);
  border: 1px solid rgba(255, 212, 92, 0.34);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  backdrop-filter: blur(6px);
}
.osb-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: #ffe399;
  letter-spacing: 0.03em;
}
.osb-chips {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.osb-chip {
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.64rem;
  font-weight: 800;
  color: #eafaf2;
}
.osb-chip.is-active {
  background: rgba(255, 212, 92, 0.2);
  border-color: rgba(255, 212, 92, 0.68);
  color: #fff2be;
}

.prep-card {
  border-color: rgba(255, 212, 92, 0.45);
}
.prep-starter-box {
  text-align: left;
  background: rgba(7, 15, 13, 0.78);
}
.title-top-bar { display: flex; justify-content: space-between; align-items: center; }

.coin-bank {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 99px;
  background: rgba(13, 24, 20, 0.9); border: 1.5px solid rgba(255, 212, 92, 0.5);
  color: var(--gold); font-family: var(--mono); font-size: 0.88rem; font-weight: 800; font-variant-numeric: tabular-nums;
  box-shadow: inset 0 1px 0 rgba(255, 232, 158, 0.16);
}
.mini-pill-btn { padding: 6px 11px; border-radius: 99px; background: rgba(13, 24, 20, 0.88); border: 1.2px solid rgba(255, 255, 255, 0.22); font-size: 0.74rem; font-weight: 700; }

.title-hero { text-align: center; }
.title-tag {
  display: inline-block; padding: 3px 13px; border-radius: 99px;
  background: linear-gradient(90deg, rgba(28, 46, 38, 0.88), rgba(48, 36, 16, 0.86));
  border: 1px solid rgba(255, 212, 92, 0.45);
  color: #f7dfa0; font-family: var(--font-display); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em;
}
.game-logo {
  margin: 6px 0 3px;
  font-family: var(--font-display);
  font-size: 2.55rem; font-weight: 900; line-height: 1.08; letter-spacing: 0.10em; white-space: nowrap;
  color: #fffaf0;
  text-shadow: 0 3px 0 #173f2e, 0 8px 24px rgba(0, 0, 0, 0.72), 0 0 22px rgba(102, 245, 198, 0.22);
}
.game-logo span {
  color: #ffd966;
  text-shadow: 0 3px 0 #7a4906, 0 8px 24px rgba(0, 0, 0, 0.72), 0 0 20px rgba(255, 212, 92, 0.32);
}
.game-tagline { margin: 2px 0 0; font-size: 0.78rem; color: #e2f2ea; letter-spacing: 0.04em; text-shadow: 0 1px 6px rgba(0, 0, 0, 0.75); }

.best-strip {
  margin: 8px auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  padding: 7px 10px; border-radius: 12px;
  background: rgba(10, 21, 17, 0.8); border: 1px solid rgba(255, 255, 255, 0.14);
}
.best-strip span { display: block; font-size: 0.64rem; color: var(--muted); }
.best-strip b { display: block; margin-top: 2px; font-family: var(--mono); font-size: 0.9rem; color: var(--gold); }

/* 3x2 分级流派选择器 */
.starter-box {
  padding: 9px; border-radius: 14px;
  background: rgba(9, 19, 16, 0.88); border: 1.5px solid rgba(255, 255, 255, 0.15); backdrop-filter: blur(8px);
}
.starter-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 7px; font-size: 0.72rem; font-weight: 800; }
.starter-head small { color: var(--gold); font-size: 0.69rem; font-weight: 700; }
.starter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.starter-card {
  position: relative; display: flex; align-items: center; gap: 6px;
  padding: 7px 7px; border-radius: 10px;
  background: rgba(20, 34, 29, 0.9); border: 1.5px solid rgba(255, 255, 255, 0.14);
  font-size: 0.72rem; font-weight: 800; color: #cfe4d8; text-align: left;
}
.starter-card .sc-ico { font-size: 1.2rem; line-height: 1; }
.starter-card .sc-meta { display: flex; flex-direction: column; min-width: 0; }
.starter-card .sc-cost { font-family: var(--mono); font-size: 0.62rem; color: var(--gold); }
.starter-card.is-selected {
  border-color: var(--gold); background: rgba(58, 45, 16, 0.92); color: #fff3c4;
  box-shadow: 0 0 12px rgba(255, 210, 77, 0.35);
}
.starter-card.is-locked { opacity: 0.62; border-style: dashed; }

/* 品阶徽章 R / SR / SSR / UR */
.rarity-tag {
  display: inline-block; padding: 1px 5px; border-radius: 4px;
  font-family: var(--mono); font-size: 0.62rem; font-weight: 900; letter-spacing: 0.04em;
}
.rarity-R   { background: #2d4c42; color: #aef0d6; border: 1px solid #538a76; }
.rarity-SR  { background: #1e4268; color: #9ad8ff; border: 1px solid #4ca4f0; }
.rarity-SSR { background: #5a3412; color: #ffd978; border: 1px solid #f5a623; }
.rarity-UR  { background: linear-gradient(90deg, #5c1f7a, #8a2456); color: #ffe5ff; border: 1px solid #e082ff; box-shadow: 0 0 8px rgba(210, 110, 255, 0.45); }

.starter-card .rarity-tag { position: absolute; top: 3px; right: 4px; font-size: 0.56rem; padding: 0 4px; }

.title-actions { display: grid; gap: 8px; }
.secondary-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.secondary-row.is-three { grid-template-columns: repeat(3, 1fr); gap: 6px; }
.secondary-row.is-three .big-btn { padding: 7px 4px; font-size: 0.8rem; min-height: 48px; }
.secondary-row.is-three .big-btn small { font-size: 0.6rem; }

.big-btn {
  width: 100%; min-height: 50px; padding: 8px 12px; border-radius: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-weight: 900; font-size: 0.95rem; letter-spacing: 0.03em; transition: transform 0.1s ease, filter 0.15s ease;
}
.big-btn small { font-size: 0.66rem; font-weight: 600; opacity: 0.88; letter-spacing: 0.02em; }
.big-btn:active { transform: translateY(2px) scale(0.99); }
.btn-play {
  min-height: 56px; font-size: 1.12rem; color: #0c2618;
  background: linear-gradient(180deg, #7efab7 0%, #31d47f 100%);
  border: 1.5px solid #ccffe3;
  box-shadow: 0 4px 0 #126a3c, 0 10px 24px rgba(49, 212, 127, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.btn-play span { font-family: var(--font-display); font-size: 1.22rem; letter-spacing: 0.12em; }
/* 统一墨玉鎏金次级牌匾体系，衬托主按钮且各具贵气辨识度 */
.btn-shop {
  color: #ffe7a3;
  background: linear-gradient(180deg, rgba(66, 48, 18, 0.96) 0%, rgba(34, 24, 9, 0.98) 100%);
  border: 1.5px solid rgba(255, 212, 92, 0.62);
  box-shadow: 0 3px 0 #1c1204, inset 0 1px 0 rgba(255, 232, 156, 0.25);
}
.btn-shop small { color: #e2c683; }
.btn-wardrobe {
  color: #f3d6ff;
  background: linear-gradient(180deg, rgba(60, 26, 78, 0.96) 0%, rgba(31, 13, 44, 0.98) 100%);
  border: 1.5px solid rgba(206, 138, 255, 0.58);
  box-shadow: 0 3px 0 #1a0826, inset 0 1px 0 rgba(240, 198, 255, 0.25);
}
.btn-wardrobe small { color: #d5b2e8; }
.btn-ach {
  color: #d6efff;
  background: linear-gradient(180deg, rgba(22, 49, 76, 0.96) 0%, rgba(12, 27, 45, 0.98) 100%);
  border: 1.5px solid rgba(114, 194, 255, 0.56);
  box-shadow: 0 3px 0 #081526, inset 0 1px 0 rgba(190, 230, 255, 0.22);
}
.btn-ach small { color: #9fc8e8; }
.btn-muted { min-height: 44px; font-size: 0.88rem; color: #dbe8e0; background: rgba(20, 34, 29, 0.94); border: 1.2px solid rgba(255, 255, 255, 0.18); box-shadow: 0 3px 0 #0a1410; }

/* ================= 商店与图鉴弹窗（墨玉鎏金卷轴边框） ================= */
.modal-sheet, .drawer-sheet { justify-content: center; align-items: center; background: rgba(4, 10, 8, 0.82); backdrop-filter: blur(8px); }
.sheet-card, .drawer-card {
  width: 100%; border-radius: 18px;
  background: linear-gradient(180deg, #172a23 0%, #0e1a16 100%);
  border: 1.5px solid rgba(255, 212, 92, 0.30);
  padding: 18px 15px;
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 234, 166, 0.22);
}
.sheet-card { text-align: center; }
.sheet-card h2 {
  margin: 6px 0 6px; font-family: var(--font-display);
  font-size: 1.65rem; letter-spacing: 0.08em; color: #ffe8a3;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}
.sheet-sub { margin: 0 0 14px; font-size: 0.8rem; color: var(--muted); line-height: 1.55; }
.sheet-actions { display: grid; gap: 9px; }

.result-badge { display: inline-block; padding: 4px 13px; border-radius: 99px; background: rgba(255, 212, 92, 0.14); border: 1px solid rgba(255, 212, 92, 0.6); color: var(--gold); font-size: 0.74rem; font-weight: 800; letter-spacing: 0.04em; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.res-box { padding: 9px; border-radius: 12px; background: rgba(7, 15, 12, 0.78); border: 1px solid rgba(255, 255, 255, 0.1); }
.res-box span { display: block; font-size: 0.7rem; color: var(--muted); }
.res-box b { display: block; margin-top: 3px; font-family: var(--mono); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.res-gold { border-color: rgba(255, 212, 92, 0.45); background: rgba(34, 27, 11, 0.6); }
.res-gold b { color: var(--gold); }

.drawer-card { max-height: calc(89dvh - var(--badge-clearance)); display: flex; flex-direction: column; gap: 10px; padding: 15px 13px; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-bottom: 4px; border-bottom: 1px solid rgba(255, 212, 92, 0.12); }
.drawer-head h2 { margin: 0; font-family: var(--font-display); font-size: 1.22rem; letter-spacing: 0.07em; color: #ffe8a3; }
.drawer-head p { margin: 3px 0 0; font-size: 0.72rem; color: var(--muted); }

.shop-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.shop-tab {
  min-height: 36px; border-radius: 9px; font-size: 0.74rem; font-weight: 800;
  background: rgba(10, 20, 17, 0.75); border: 1px solid rgba(255, 255, 255, 0.14); color: var(--muted);
}

/* ================= 独立国风皮肤衣橱 ================= */
.wardrobe-card { max-height: calc(92dvh - var(--badge-clearance)); gap: 9px; }
.wardrobe-stage {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 210, 77, 0.4);
  background: #0a1714;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.65);
}
#wardrobe-canvas {
  display: block;
  width: 100%;
  height: 196px;
  object-fit: cover;
}
.wardrobe-stage-top {
  position: absolute; top: 8px; left: 8px; right: 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.wardrobe-title-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 99px;
  background: rgba(8, 16, 14, 0.84);
  border: 1px solid rgba(255, 210, 77, 0.5);
  font-size: 0.76rem; font-weight: 900; color: #fff6d1;
}
.wardrobe-pose-btn {
  padding: 5px 10px; border-radius: 99px;
  background: rgba(20, 42, 36, 0.88);
  border: 1px solid rgba(110, 245, 210, 0.55);
  color: #a8ffea; font-size: 0.7rem; font-weight: 800;
}
.wardrobe-pose-btn.is-active {
  background: rgba(102, 240, 255, 0.22);
  border-color: #78f8ff; color: #fff;
}
.wardrobe-stage-desc {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 6px 10px;
  background: linear-gradient(180deg, rgba(8, 16, 14, 0) 0%, rgba(8, 16, 14, 0.92) 40%);
  font-size: 0.7rem; color: #d6efe5; text-align: center; line-height: 1.35;
}
.wardrobe-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  overflow-y: auto;
  padding-right: 2px;
}
.skin-thumb-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 20px 5px 7px;
  border-radius: 12px;
  background: rgba(10, 20, 17, 0.88);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  color: #d7ebe2;
  transition: transform 0.1s ease, border-color 0.15s ease;
}
.skin-thumb-card:active { transform: scale(0.97); }
.skin-thumb-card.is-selected {
  border-color: var(--gold);
  background: rgba(46, 36, 14, 0.92);
  box-shadow: 0 0 14px rgba(255, 210, 77, 0.35);
}
.skin-thumb-card.is-equipped {
  border-color: var(--emerald);
}
.skin-thumb-card .rarity-tag {
  position: absolute; top: 4px; left: 5px; font-size: 0.54rem; padding: 0 4px;
}
.skin-thumb-card .eq-dot {
  position: absolute; top: 4px; right: 5px;
  font-size: 0.54rem; font-weight: 900; padding: 1px 4px; border-radius: 4px;
  background: rgba(62, 227, 141, 0.24); color: var(--emerald); border: 1px solid rgba(62, 227, 141, 0.5);
}
.skin-thumb-canvas {
  width: 68px; height: 62px;
  border-radius: 8px;
  background: radial-gradient(circle at 50% 55%, rgba(45, 92, 78, 0.42), rgba(8, 16, 14, 0.92));
}
.skin-thumb-name { font-size: 0.74rem; font-weight: 900; color: #fff8e6; line-height: 1.15; }
.skin-thumb-price { font-family: var(--mono); font-size: 0.66rem; color: var(--gold); font-weight: 800; font-variant-numeric: tabular-nums; }
.skin-thumb-price.is-owned { color: var(--emerald); }
.wardrobe-foot {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 8px;
}
.wardrobe-foot .big-btn { min-height: 46px; font-size: 0.9rem; }
.wardrobe-foot .big-btn:disabled {
  background: #22322b; color: #849c91; border-color: rgba(255, 255, 255, 0.14); box-shadow: none; cursor: not-allowed;
}

.btn-share {
  min-height: 48px;
  color: #f6e3ff;
  background: linear-gradient(180deg, #5d2b8a 0%, #3a175e 100%);
  border: 1.5px solid rgba(215, 162, 255, 0.65);
  box-shadow: 0 3px 0 #1f0a36, inset 0 1px 0 rgba(240, 210, 255, 0.28);
}
.share-card-modal { max-height: calc(92dvh - var(--badge-clearance)); display: flex; flex-direction: column; gap: 10px; padding: 14px; }
.share-card-modal h2 { margin: 0; font-size: 1.2rem; }
.share-card-modal .sheet-sub { margin: 0; font-size: 0.74rem; }
.share-preview-wrap {
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: #08120e;
  border: 1px solid rgba(255, 210, 77, 0.35);
  padding: 6px;
}
#share-preview-img {
  max-width: 100%;
  max-height: 54dvh;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
  -webkit-touch-callout: default;
  user-select: auto;
}
.shop-tab.is-active { background: rgba(62, 227, 141, 0.2); border-color: var(--emerald); color: #eafff3; }

.drawer-list { flex: 1; overflow-y: auto; display: grid; gap: 8px; padding-right: 2px; }

.shop-item, .ach-item, .fusion-item {
  display: flex; align-items: center; justify-content: space-between; gap: 9px;
  padding: 10px 11px; border-radius: 12px;
  background: rgba(9, 18, 15, 0.84); border: 1px solid rgba(255, 255, 255, 0.12);
}
.fusion-item.is-found { border-color: rgba(255, 210, 77, 0.55); background: rgba(32, 26, 14, 0.86); }
.item-info { min-width: 0; }
.item-title { font-size: 0.85rem; font-weight: 800; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; color: #fffaf0; }
.item-lv { font-family: var(--mono); font-size: 0.66rem; color: var(--emerald); }
.item-lv.is-locked { color: #7f9a8e; }
.item-desc { margin: 4px 0 0; font-size: 0.72rem; color: #c4dbd0; line-height: 1.48; }

.buy-btn {
  flex: none; min-width: 86px; padding: 8px 10px; border-radius: 10px;
  background: linear-gradient(180deg, #ffe588 0%, #f0ad24 100%);
  color: #291300; font-family: var(--mono); font-size: 0.73rem; font-weight: 900; font-variant-numeric: tabular-nums;
  box-shadow: 0 3px 0 #8a5404, inset 0 1px 0 rgba(255, 250, 224, 0.65);
}
.buy-btn:disabled { background: #21302a; color: #789086; box-shadow: none; border: 1px solid rgba(255, 255, 255, 0.08); cursor: not-allowed; }
.buy-btn.is-claim { background: linear-gradient(180deg, #7efab7 0%, #31d47f 100%); color: #0b2617; box-shadow: 0 3px 0 #136e3e, inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.buy-btn.is-done { background: rgba(68, 230, 149, 0.14); color: var(--emerald); border: 1px solid rgba(68, 230, 149, 0.4); box-shadow: none; }

/* ================= 剧情秘卷 & 局内剧情对话条 ================= */
.title-top-actions { display: flex; align-items: center; gap: 6px; }
.story-pill-btn {
  background: rgba(58, 38, 18, 0.88);
  border-color: rgba(255, 210, 77, 0.55);
  color: #ffe599;
}
.story-pill-btn.has-unread {
  box-shadow: 0 0 12px rgba(255, 210, 77, 0.55);
  animation: pulseStory 1.6s infinite ease-in-out;
}
@keyframes pulseStory {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.story-toast {
  position: absolute;
  left: 10px; right: 10px; top: 158px;
  z-index: 16;
  pointer-events: none;
  display: flex; align-items: flex-start; gap: 9px;
  padding: 9px 11px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(14, 24, 21, 0.93), rgba(28, 22, 16, 0.92));
  border: 1.5px solid rgba(255, 210, 77, 0.65);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.58);
}
.story-toast.is-boss-line {
  background: linear-gradient(135deg, rgba(44, 14, 26, 0.94), rgba(18, 10, 26, 0.94));
  border-color: rgba(255, 96, 128, 0.78);
}
.story-toast-ico {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 1.25rem;
  background: rgba(255, 210, 77, 0.14);
  border: 1px solid rgba(255, 210, 77, 0.4);
}
.story-toast-body { min-width: 0; flex: 1; }
.story-toast-speaker {
  font-size: 0.7rem; font-weight: 900; color: #ffd978; letter-spacing: 0.04em;
}
.story-toast.is-boss-line .story-toast-speaker { color: #ff8ca0; }
.story-toast-text {
  margin-top: 2px; font-size: 0.74rem; line-height: 1.42; color: #eff8f3; font-weight: 600;
}

.story-chapter {
  padding: 11px 12px;
  border-radius: 13px;
  background: rgba(9, 18, 15, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.13);
  display: flex; flex-direction: column; gap: 6px;
}
.story-chapter.is-unlocked {
  border-color: rgba(255, 210, 77, 0.45);
  background: linear-gradient(180deg, rgba(26, 36, 30, 0.92), rgba(11, 20, 17, 0.92));
}
.story-chapter.is-locked { opacity: 0.68; border-style: dashed; }
.story-chapter-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.story-chapter-title {
  font-family: var(--font-display);
  font-size: 0.96rem; font-weight: 900; letter-spacing: 0.06em; color: #ffe599;
}
.story-chapter.is-locked .story-chapter-title { color: #9db5ab; }
.story-chapter-body {
  margin: 0; font-size: 0.75rem; line-height: 1.62; color: #d8ede3;
}
.story-chapter-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 2px; font-size: 0.68rem; color: var(--muted);
}

/* ================= v8.0 模式切换 / 连击天象 / 奇遇 / 排行榜 ================= */
.board-pill-btn {
  background: rgba(24, 48, 66, 0.9);
  border-color: rgba(116, 185, 255, 0.55);
  color: #cbe7ff;
}
.settings-pill-btn {
  background: rgba(34, 44, 42, 0.92);
  border-color: rgba(255, 255, 255, 0.28);
  color: #e9f5f0;
}

.hud-live-row {
  display: flex; justify-content: space-between; align-items: center; gap: 6px;
  margin-top: 3px; pointer-events: none;
}
.live-pill {
  padding: 2px 8px; border-radius: 99px;
  font-size: 0.65rem; font-weight: 900; letter-spacing: 0.02em;
  background: rgba(10, 20, 17, 0.85); border: 1px solid rgba(255, 255, 255, 0.2);
}
.combo-pill { color: #ffe078; border-color: rgba(255, 210, 77, 0.6); }
.combo-pill.is-sss {
  color: #fff6c8;
  background: linear-gradient(90deg, rgba(168, 45, 224, 0.85), rgba(245, 148, 36, 0.85));
  border-color: #ffe88c;
  box-shadow: 0 0 12px rgba(255, 210, 77, 0.55);
}
.weather-pill { color: #9cf2ff; border-color: rgba(110, 225, 255, 0.55); }
.weather-pill.is-blood { color: #ff9cb0; border-color: rgba(255, 92, 122, 0.65); background: rgba(64, 12, 24, 0.85); }
.weather-pill.is-spirit { color: #fff099; border-color: rgba(255, 224, 102, 0.7); background: rgba(46, 38, 12, 0.85); }

/* ================= 高质感双模式选择卡（经典闯关 vs 每日试炼） ================= */
.mode-showcase {
  display: grid; gap: 6px;
}
.mode-cards-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.mode-card {
  position: relative;
  overflow: hidden;
  padding: 11px 10px 10px;
  border-radius: 14px;
  text-align: left;
  color: #e4f4ec;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  transition: transform 0.12s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.mode-card:active { transform: scale(0.97); }
.mode-card.is-classic {
  background: linear-gradient(145deg, rgba(18, 48, 42, 0.94) 0%, rgba(10, 24, 21, 0.95) 100%);
}
.mode-card.is-daily {
  background: linear-gradient(145deg, rgba(64, 24, 20, 0.94) 0%, rgba(28, 12, 16, 0.95) 100%);
}
.mode-card::after {
  content: '';
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.11), transparent 60%);
}
.mode-card.is-active.is-classic {
  border-color: #6df7c4;
  background: linear-gradient(145deg, rgba(24, 74, 60, 0.96) 0%, rgba(12, 34, 28, 0.96) 100%);
  box-shadow: 0 0 0 1px rgba(109, 247, 196, 0.4), 0 6px 18px rgba(47, 209, 124, 0.25);
}
.mode-card.is-active.is-daily {
  border-color: #ffbe4f;
  background: linear-gradient(145deg, rgba(102, 36, 18, 0.96) 0%, rgba(44, 15, 16, 0.96) 100%);
  box-shadow: 0 0 0 1px rgba(255, 190, 79, 0.45), 0 6px 18px rgba(255, 118, 52, 0.28);
}
.mc-tag {
  position: absolute; top: 6px; right: 7px;
  padding: 1px 6px; border-radius: 99px;
  font-family: var(--mono); font-size: 0.58rem; font-weight: 900;
  background: rgba(110, 245, 200, 0.16); color: #96ffe0; border: 1px solid rgba(110, 245, 200, 0.4);
}
.mc-tag.is-hot {
  background: linear-gradient(90deg, #ff7a33, #ffbe3b);
  color: #2b0f04; border-color: #ffe899;
  box-shadow: 0 0 8px rgba(255, 156, 56, 0.45);
}
.mc-head {
  display: flex; align-items: center; gap: 8px;
}
.mc-ico {
  width: 34px; height: 34px; flex: none;
  border-radius: 10px;
  display: grid; place-items: center;
  font-size: 1.25rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.mc-title-col { display: flex; flex-direction: column; min-width: 0; }
.mc-title-col b { font-size: 0.88rem; font-weight: 900; color: #fff; line-height: 1.15; }
.mc-title-col small {
  margin-top: 2px; font-size: 0.63rem; color: #b8ddd0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mode-card.is-daily .mc-title-col small { color: #ffd4a6; }

.mode-detail-strip {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px;
  padding: 5px 10px; border-radius: 10px;
  background: rgba(9, 19, 16, 0.84);
  border: 1px solid rgba(255, 210, 77, 0.24);
  font-size: 0.66rem; color: #c7e6db; text-align: center; line-height: 1.35;
}
.active-seed-badge {
  padding: 2px 8px; border-radius: 99px;
  background: rgba(168, 85, 255, 0.24);
  border: 1px solid #d59cff; color: #f4d9ff;
  font-family: var(--mono); font-size: 0.64rem; font-weight: 800;
}

/* ================= 宗门设置弹窗 ================= */
.settings-body { gap: 10px; }
.setting-group {
  padding: 11px 12px; border-radius: 13px;
  background: rgba(9, 18, 15, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.13);
  display: grid; gap: 7px;
}
.setting-row-head {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 800; color: #ebf7f1;
}
.setting-row-head b { font-family: var(--mono); font-size: 0.76rem; color: var(--gold); }
.setting-hint { margin: 0; font-size: 0.68rem; color: var(--muted); line-height: 1.4; }
.setting-slider {
  width: 100%; accent-color: #3ee38d; cursor: pointer; height: 22px;
}
.seg-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg-btn {
  min-height: 32px; border-radius: 8px;
  background: rgba(16, 30, 25, 0.86); border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--muted); font-size: 0.74rem; font-weight: 800;
}
.seg-btn.is-active {
  background: rgba(62, 227, 141, 0.22); border-color: var(--emerald); color: #eafff3;
}
.setting-seed-btns {
  display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 6px; align-items: center;
}
.setting-seed-btns .buy-btn { min-width: 0; padding: 7px 6px; font-size: 0.7rem; }

.seed-input-row {
  display: flex; gap: 6px; align-items: center;
}
.seed-input-row input, .board-submit-row input {
  flex: 1; min-width: 0; height: 34px; padding: 0 10px; border-radius: 9px;
  background: rgba(6, 13, 11, 0.92); border: 1px solid rgba(255, 210, 77, 0.4);
  color: #fff6d6; font-family: var(--mono); font-size: 0.76rem; font-weight: 700;
  outline: none;
}
.seed-input-row input::placeholder, .board-submit-row input::placeholder { color: #749488; }

.shop-tabs.is-six { grid-template-columns: repeat(3, 1fr); gap: 5px; }
.shop-tabs.is-six .shop-tab { min-height: 32px; font-size: 0.72rem; }

/* 结算页挑战码 + 云端冲榜条 */
.res-extra-bar {
  display: grid; gap: 7px; margin-bottom: 10px;
}
.seed-copy-pill {
  width: 100%; padding: 6px 10px; border-radius: 9px;
  background: rgba(14, 29, 25, 0.9); border: 1px dashed rgba(110, 240, 200, 0.45);
  color: #a6f7df; font-family: var(--mono); font-size: 0.72rem; font-weight: 800;
}
.board-submit-row { display: flex; gap: 6px; align-items: center; }
.board-submit-row .buy-btn { min-width: 76px; padding: 7px 10px; }
.submit-status {
  font-size: 0.68rem; color: var(--emerald); font-weight: 700;
}

/* 局内奇遇三选一卷轴 */
.event-card { border-color: rgba(255, 210, 77, 0.55); }
.event-choices { display: grid; gap: 8px; text-align: left; }
.event-choice-btn {
  width: 100%; padding: 10px 12px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(16, 32, 27, 0.96), rgba(26, 34, 24, 0.94));
  border: 1.5px solid rgba(255, 210, 77, 0.38);
  color: #f4fff9; text-align: left;
  display: flex; flex-direction: column; gap: 3px;
}
.event-choice-btn:active { transform: scale(0.98); }
.event-choice-btn b { font-size: 0.86rem; color: #ffe285; }
.event-choice-btn small { font-size: 0.71rem; color: #c4e3d7; line-height: 1.4; }
.event-choice-btn.is-risk { border-color: rgba(255, 102, 112, 0.55); background: linear-gradient(135deg, rgba(44, 16, 24, 0.94), rgba(24, 14, 20, 0.94)); }
.event-choice-btn.is-risk b { color: #ff949e; }

/* 宗门风云榜列表 */
.board-row {
  display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 9px;
  padding: 9px 11px; border-radius: 12px;
  background: rgba(9, 18, 15, 0.86); border: 1px solid rgba(255, 255, 255, 0.12);
}
.board-row.is-top1 { border-color: rgba(255, 215, 80, 0.7); background: rgba(48, 36, 12, 0.88); }
.board-row.is-me { border-color: rgba(62, 227, 141, 0.65); }
.board-rank {
  text-align: center; font-family: var(--mono); font-weight: 900; font-size: 0.92rem; color: var(--gold);
}
.board-main { min-width: 0; }
.board-name { font-size: 0.82rem; font-weight: 900; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.board-meta { font-size: 0.65rem; color: var(--muted); margin-top: 2px; }
.board-score { text-align: right; font-family: var(--mono); }
.board-score b { display: block; font-size: 0.92rem; color: #7ef7d4; }
.board-score small { font-size: 0.63rem; color: #ffd24d; }

/* ================= v10.0 / v11.0 飞升境界选择器 / 突破进度 / 每日悬赏 / 金色仙缘 ================= */
.realm-stepper {
  display: grid;
  grid-template-columns: 30px 1fr 30px;
  align-items: center;
  gap: 6px;
  padding: 6px 7px;
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(16, 30, 25, 0.92), rgba(9, 18, 15, 0.94));
  border: 1px solid rgba(255, 212, 92, 0.34);
  transition: border-color 0.18s ease, background 0.18s ease;
}
.realm-stepper.is-locked {
  background: linear-gradient(180deg, rgba(24, 24, 30, 0.92), rgba(14, 15, 20, 0.95));
  border-color: rgba(168, 182, 198, 0.36);
}
.realm-stepper.is-locked .realm-title-line b { color: #c8d2dc; }
.realm-stepper.is-locked .realm-mul {
  background: rgba(160, 175, 190, 0.14); border-color: rgba(160, 175, 190, 0.35); color: #b7c4d1;
}
.realm-arrow {
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(255, 212, 92, 0.12);
  border: 1px solid rgba(255, 212, 92, 0.32);
  color: #ffe285; font-size: 0.72rem; font-weight: 900;
  display: grid; place-items: center;
}
.realm-arrow:disabled { opacity: 0.32; cursor: not-allowed; }
.realm-mid { text-align: center; min-width: 0; }
.realm-title-line { display: flex; align-items: center; justify-content: center; gap: 6px; }
.realm-title-line b {
  font-family: var(--font-display); font-size: 0.88rem; letter-spacing: 0.06em; color: #fff4d2;
}
.realm-mul {
  padding: 1px 6px; border-radius: 99px;
  background: rgba(255, 212, 92, 0.18); border: 1px solid rgba(255, 212, 92, 0.5);
  color: #ffd866; font-family: var(--mono); font-size: 0.62rem; font-weight: 900;
}
.realm-mid small {
  display: block; margin-top: 2px; font-size: 0.62rem; color: #b7d7c9;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.realm-prog-row {
  margin-top: 4px;
  display: flex; align-items: center; gap: 6px;
}
.realm-prog-track {
  flex: 1; height: 5px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.12); overflow: hidden;
}
.realm-prog-fill {
  height: 100%; width: 0%; border-radius: 99px;
  background: linear-gradient(90deg, #42e896, #ffd45c);
  transition: width 0.25s ease;
}
.realm-stepper.is-locked .realm-prog-fill {
  background: linear-gradient(90deg, #ff9966, #ffd45c);
}
.realm-prog-text {
  font-family: var(--mono); font-size: 0.6rem; font-weight: 800; color: #ffe49c;
  white-space: nowrap;
}
.realm-stepper.is-locked .realm-prog-text { color: #ffba8c; }

.btn-play.is-locked-cta {
  color: #ffe3b8;
  background: linear-gradient(180deg, rgba(64, 44, 34, 0.96) 0%, rgba(36, 22, 18, 0.98) 100%);
  border-color: rgba(255, 168, 102, 0.55);
  box-shadow: 0 4px 0 #1f100c, inset 0 1px 0 rgba(255, 210, 165, 0.25);
}
.live-pill.realm-pill {
  background: rgba(26, 46, 36, 0.88);
  border-color: rgba(110, 245, 184, 0.55);
  color: #b8ffdc;
}
.live-pill.realm-pill.is-done {
  background: rgba(68, 48, 12, 0.92);
  border-color: rgba(255, 218, 92, 0.85);
  color: #fff0a6;
}

.ach-tabs { grid-template-columns: 1fr 1fr; }
.bounty-bonus-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 11px; border-radius: 12px;
  background: linear-gradient(135deg, rgba(56, 38, 14, 0.92), rgba(28, 20, 10, 0.94));
  border: 1.5px solid rgba(255, 212, 92, 0.55);
}
.bb-info b { display: block; font-size: 0.82rem; color: #ffe48f; }
.bb-info small { font-size: 0.68rem; color: #d6c598; }
.bounty-prog-track {
  margin-top: 5px; height: 5px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.12); overflow: hidden;
}
.bounty-prog-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #44e695, #ffd45c);
}

/* 稀有金色传说奇遇（天胡神仙局！） */
.event-card.is-legendary {
  background: linear-gradient(180deg, #2e2310 0%, #171209 100%);
  border-color: #ffd866;
  box-shadow: 0 0 36px rgba(255, 210, 77, 0.42), 0 22px 64px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 245, 198, 0.45);
}
.event-card.is-legendary .result-badge {
  background: linear-gradient(90deg, #ffd866, #ff9f43);
  color: #2b1200; border-color: #fff2b8;
}
.event-choice-btn.is-gold {
  background: linear-gradient(135deg, rgba(64, 46, 14, 0.96), rgba(34, 24, 9, 0.96));
  border-color: rgba(255, 216, 102, 0.65);
}
.event-choice-btn.is-gold b { color: #ffe899; }

/* ================= v14.0 流派神通分组 + 实机特效预览弹窗 ================= */
.shop-section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 6px 4px 2px;
  font-size: 0.72rem; font-weight: 900; color: #ffe399; letter-spacing: 0.04em;
  border-bottom: 1px dashed rgba(255, 212, 92, 0.28);
}
.shop-section-head small { font-weight: 600; font-size: 0.64rem; color: var(--muted); }

.item-actions-col {
  display: flex; flex-direction: column; gap: 5px; align-items: stretch; flex-shrink: 0;
}
.preview-mini-btn {
  padding: 5px 8px; border-radius: 8px;
  background: rgba(22, 54, 68, 0.92);
  border: 1px solid rgba(114, 214, 255, 0.56);
  color: #b8ecff; font-size: 0.67rem; font-weight: 800;
  white-space: nowrap;
}
.preview-mini-btn:active { transform: scale(0.96); }

.ult-preview-card { padding: 14px 13px; border-color: rgba(255, 216, 102, 0.55); }
.ult-preview-card h2 { margin: 4px 0 8px; font-size: 1.42rem; }
.ult-preview-stage {
  position: relative;
  border-radius: 13px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 212, 92, 0.45);
  background: #091614;
  margin-bottom: 9px;
}
#ult-preview-canvas {
  display: block;
  width: 100%;
  height: 236px;
  object-fit: cover;
}
.ult-replay-pill {
  position: absolute; top: 8px; right: 8px;
  padding: 4px 9px; border-radius: 99px;
  background: rgba(10, 22, 20, 0.86);
  border: 1px solid rgba(114, 232, 255, 0.55);
  color: #b6f5ff; font-size: 0.68rem; font-weight: 800;
}
.ult-charge-pill {
  position: absolute; top: 8px; left: 8px;
  padding: 4px 9px; border-radius: 99px;
  background: rgba(16, 28, 22, 0.88);
  border: 1px solid rgba(255, 212, 92, 0.58);
  color: #ffe899; font-family: var(--mono); font-size: 0.68rem; font-weight: 900;
}
.ult-preview-desc { margin-bottom: 10px; font-size: 0.76rem; }

/* ================= v15.0 极简新手引导 + 逐步解锁 + 事件禁用态 ================= */
.title-top-actions { margin-left: auto; }
.newbie-sub {
  margin: 8px auto 0;
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(10, 22, 18, 0.76);
  border: 1px solid rgba(126, 250, 183, 0.36);
  color: #c8f7de;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  backdrop-filter: blur(5px);
}
.menu-unlock-hint {
  text-align: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(12, 24, 20, 0.78);
  border: 1px dashed rgba(255, 212, 92, 0.36);
  color: #f3dc9b;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.secondary-row.is-one { grid-template-columns: 1fr; }
.secondary-row.is-one .big-btn { min-height: 48px; font-size: 0.88rem; }
.secondary-row.is-one .big-btn small { font-size: 0.66rem; }
.shop-tabs.is-three-tabs { grid-template-columns: repeat(3, 1fr); }
.shop-tabs.is-five-tabs { grid-template-columns: repeat(5, 1fr); }
.result-unlock-banner {
  margin: 4px 0 8px;
  padding: 8px 11px;
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(66, 48, 16, 0.94), rgba(26, 44, 34, 0.94));
  border: 1.5px solid rgba(255, 216, 102, 0.75);
  color: #fff0ad;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.45;
  box-shadow: 0 0 18px rgba(255, 212, 92, 0.25);
}
.event-choice-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

/* ================= v17.0 琳琅仙阁旗舰重做：底部可滑导航 + 7大独立展台 + 境界暗黑封印 ================= */
.overlay.screen-title {
  padding-bottom: calc(82px + max(8px, env(safe-area-inset-bottom)) + var(--badge-clearance));
}
.overlay.drawer-sheet.is-hub-tab {
  z-index: 20;
  padding: max(10px, env(safe-area-inset-top)) 10px calc(80px + max(8px, env(safe-area-inset-bottom)) + var(--badge-clearance));
  background: radial-gradient(ellipse at 85% 5%, rgba(34, 100, 72, 0.25), transparent 50%),
    linear-gradient(165deg, rgba(11, 28, 25, 0.96), rgba(3, 9, 9, 0.98) 78%);
}
.overlay.drawer-sheet.is-hub-tab .drawer-card {
  height: 100%;
  max-height: none;
  border-radius: 18px;
}
.overlay.drawer-sheet.is-hub-tab .drawer-foot,
.overlay.drawer-sheet.is-hub-tab #btn-close-wardrobe {
  display: none !important;
}
.overlay.drawer-sheet.is-hub-tab .wardrobe-foot {
  grid-template-columns: 1fr;
}

.main-bottom-nav, .hub-page, .main-bottom-nav *, .hub-page * { box-sizing: border-box; }
.main-bottom-nav {
  position: absolute;
  bottom: calc(max(8px, env(safe-area-inset-bottom)) + var(--badge-clearance));
  left: 8px; right: 8px; z-index: 26;
  display: flex; align-items: stretch; gap: 2px;
  min-width: 0; height: 62px; padding: 4px;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x proximity; scroll-padding-inline: 4px;
  scrollbar-width: none; overscroll-behavior-x: contain;
  border: 1.5px solid rgba(255, 212, 92, 0.34);
  border-radius: 19px;
  background: linear-gradient(180deg, rgba(14, 38, 30, 0.95), rgba(4, 13, 12, 0.98));
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 245, 200, 0.14);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  touch-action: pan-x;
}
.main-bottom-nav::-webkit-scrollbar, .icon-grid-3::-webkit-scrollbar, .hub-fusion-list::-webkit-scrollbar { display: none; }

.bnav-item {
  position: relative; isolation: isolate; flex: 1 0 48px;
  min-width: 48px; max-width: 72px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 4px 2px; border: 1px solid transparent; border-radius: 14px;
  background: transparent; color: var(--muted); scroll-snap-align: center;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.14s;
}
.bnav-item:active { transform: scale(0.95); }
.bnav-icon { display: grid; place-items: center; width: 24px; height: 24px; font-size: 20px; line-height: 1; }
.bnav-label {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11px; font-weight: 800; line-height: 1.15; letter-spacing: 0.03em;
}
.bnav-item.is-active {
  color: var(--gold); border-color: rgba(255, 212, 92, 0.48);
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 212, 92, 0.22), transparent 75%),
    linear-gradient(145deg, rgba(39, 96, 69, 0.65), rgba(20, 46, 35, 0.85));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset 0 -2px 10px rgba(68, 230, 149, 0.14), 0 0 12px rgba(255, 212, 92, 0.16);
}
.bnav-dot {
  position: absolute; top: 5px; right: 8px; width: 7px; height: 7px; border-radius: 50%;
  border: 1px solid #ffdc83; background: #ef4d3c; box-shadow: 0 0 7px rgba(239, 77, 60, 0.7);
}
/* 未突破境界的暗黑上锁页签：纯暗灰 + 朱砂「封」印 */
.bnav-item.is-locked {
  color: #6f7873; background: rgba(0, 0, 0, 0.36); border-color: rgba(255, 255, 255, 0.05);
}
.bnav-item.is-locked .bnav-icon { filter: grayscale(1) brightness(0.42); opacity: 0.68; }
.bnav-item.is-locked .bnav-label { opacity: 0.56; }
.bnav-item.is-locked::after {
  content: "封"; position: absolute; top: 2px; right: 3px; padding: 1px 3px;
  border: 1px solid rgba(180, 156, 98, 0.38); border-radius: 4px;
  background: #0a1211; color: #c9b47e; font-size: 9px; font-weight: 800; line-height: 1.05;
}
.bnav-item.is-locked.is-active {
  border-color: rgba(196, 174, 118, 0.45);
  background: rgba(16, 22, 22, 0.92);
  box-shadow: inset 0 0 12px rgba(255, 212, 92, 0.08);
}

.overlay.hub-page {
  position: absolute; inset: 0; z-index: 20;
  display: flex; flex-direction: column; gap: 8px;
  min-width: 0; min-height: 0; overflow: hidden;
  padding: max(10px, env(safe-area-inset-top)) 12px 0;
  padding-bottom: calc(80px + max(8px, env(safe-area-inset-bottom)) + var(--badge-clearance));
  background: radial-gradient(ellipse at 85% 5%, rgba(34, 100, 72, 0.28), transparent 50%),
    radial-gradient(ellipse at 0% 65%, rgba(21, 59, 50, 0.25), transparent 60%),
    linear-gradient(165deg, #0b1c19, #030909 78%);
}
.hub-page > * { min-width: 0; }
.hub-head { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; min-height: 40px; }
.hub-head-copy { flex: 1; min-width: 0; }
.hub-head-title {
  margin: 0; font-family: var(--font-display); font-size: 1.24rem; line-height: 1.2;
  letter-spacing: 0.08em; color: #fff5d6;
}
.hub-head-subtitle {
  margin: 2px 0 0; color: var(--muted); font-size: 0.69rem; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hub-coin-pill {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border: 1px solid rgba(255, 212, 92, 0.42); border-radius: 99px;
  background: rgba(255, 212, 92, 0.1); color: var(--gold);
  font-family: var(--mono); font-size: 0.78rem; font-weight: 800;
}

.hub-subtabs {
  flex: 0 0 auto; display: flex; gap: 4px; min-width: 0; padding: 3px;
  border: 1px solid rgba(139, 195, 165, 0.24); border-radius: 99px; background: rgba(0, 0, 0, 0.35);
}
.hub-subtabs button {
  flex: 1 1 0; min-width: 0; min-height: 30px; padding: 5px 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border: 1px solid transparent; border-radius: 99px; background: transparent;
  color: var(--muted); font-size: 0.74rem; font-weight: 800;
}
.hub-subtabs button.is-active {
  border-color: rgba(255, 212, 92, 0.46);
  background: linear-gradient(135deg, rgba(255, 212, 92, 0.22), rgba(68, 230, 149, 0.16));
  color: var(--gold); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.showcase-stage {
  position: relative; isolation: isolate; flex: 0 0 auto; min-width: 0; overflow: hidden;
  border: 1.5px solid rgba(255, 212, 92, 0.44); border-radius: 18px;
  background: radial-gradient(ellipse at 50% 62%, rgba(255, 212, 92, 0.16), transparent 46%),
    radial-gradient(ellipse at 50% 42%, rgba(35, 123, 86, 0.36), transparent 72%),
    linear-gradient(155deg, #0f2922, #040c0b);
  box-shadow: inset 0 0 26px rgba(0, 0, 0, 0.55), 0 8px 22px rgba(0, 0, 0, 0.4);
}
.showcase-stage::after {
  content: ""; position: absolute; inset: 5px; border: 1px solid rgba(255, 212, 92, 0.14);
  border-radius: 13px; pointer-events: none;
}
canvas.showcase-canvas { display: block; width: 100%; height: 182px; }
.showcase-title-pill, .showcase-action-pill {
  position: absolute; top: 9px; z-index: 2; display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border: 1px solid rgba(255, 212, 92, 0.44);
  border-radius: 99px; background: rgba(6, 16, 15, 0.88);
  font-size: 0.74rem; font-weight: 800; line-height: 1.2; color: #fff5d8;
}
.showcase-title-pill { left: 9px; max-width: calc(100% - 116px); }
.showcase-title-pill span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.showcase-action-pill {
  right: 9px; color: #a8f4ff; border-color: rgba(114, 232, 255, 0.52);
  background: rgba(10, 26, 32, 0.9); font-size: 0.7rem;
}
.showcase-action-pill:active { transform: scale(0.95); }
.showcase-charge-pill {
  position: absolute; top: 39px; left: 9px; z-index: 2;
  padding: 3px 8px; border-radius: 99px;
  background: rgba(14, 26, 22, 0.86); border: 1px solid rgba(255, 212, 92, 0.42);
  color: #ffe494; font-family: var(--mono); font-size: 0.65rem; font-weight: 800;
}
.showcase-desc {
  position: absolute; inset: auto 0 0; z-index: 1; padding: 18px 11px 9px;
  background: linear-gradient(transparent, rgba(3, 11, 11, 0.94) 38%);
  color: #d5ece1; font-size: 0.71rem; line-height: 1.4;
}
.showcase-desc strong { color: #ffe699; }

.icon-grid-3 {
  flex: 1 1 0; min-width: 0; min-height: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start; gap: 8px; padding: 2px 1px 6px;
  overflow-y: auto; overflow-x: hidden;
  scrollbar-width: none; overscroll-behavior-y: contain;
}
.hub-fusion-list {
  flex: 1 1 0; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; gap: 7px; padding-bottom: 6px;
  scrollbar-width: none;
}

.icon-card {
  position: relative; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 5px 8px; overflow: hidden;
  border: 1.2px solid rgba(139, 195, 165, 0.26); border-radius: 14px;
  background: radial-gradient(ellipse at 50% 24%, rgba(63, 140, 101, 0.22), transparent 72%),
    linear-gradient(155deg, rgba(16, 36, 30, 0.95), rgba(8, 17, 16, 0.97));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: center;
  transition: border-color 0.16s, box-shadow 0.16s, transform 0.12s;
}
.icon-card:active { transform: scale(0.97); }
canvas.icon-card-canvas { display: block; flex: 0 0 auto; width: 58px; height: 58px; }
.icon-card-title {
  width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 0.78rem; font-weight: 900; color: #fff8eb; line-height: 1.2;
}
.icon-card-subline {
  max-width: 100%; color: var(--muted); font-family: var(--mono);
  font-size: 0.64rem; font-weight: 700; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.icon-card .rarity-tag {
  position: absolute; top: 5px; left: 5px; font-size: 0.56rem; padding: 1px 5px;
}
.icon-card .status-dot {
  position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--emerald); box-shadow: 0 0 7px rgba(68, 230, 149, 0.78);
}
.icon-card.is-equipped {
  border-color: rgba(68, 230, 149, 0.75);
  box-shadow: inset 0 0 14px rgba(68, 230, 149, 0.12);
}
.icon-card.is-selected {
  border-color: var(--gold);
  background: radial-gradient(ellipse at 50% 24%, rgba(255, 212, 92, 0.24), transparent 72%),
    linear-gradient(155deg, rgba(48, 42, 18, 0.96), rgba(16, 20, 15, 0.98));
  box-shadow: inset 0 0 18px rgba(255, 212, 92, 0.18), 0 0 10px rgba(255, 212, 92, 0.34);
}
.icon-card.is-locked canvas.icon-card-canvas { filter: grayscale(0.75) brightness(0.62); }
.icon-card.is-locked .icon-card-subline { color: #ffd97d; }

.hub-action-foot {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-width: 0; padding: 7px 2px 2px; border-top: 1px solid rgba(255, 212, 92, 0.2);
}
.hub-action-note {
  flex: 1; min-width: 0; color: #cbe3d7; font-size: 0.71rem; line-height: 1.38;
}
.hub-action-note strong { color: #ffe699; }
.hub-action-foot .primary-action, .jump-to-play {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 42px; padding: 8px 16px; border: 1.5px solid rgba(255, 235, 168, 0.85);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffe799 0%, #e0a732 100%);
  color: #241806; font-size: 0.82rem; font-weight: 900;
  box-shadow: 0 3px 0 #7a520e, 0 6px 16px rgba(0, 0, 0, 0.35);
}
.hub-action-foot .primary-action.is-equip {
  background: linear-gradient(180deg, #6ef2b4 0%, #24b36f 100%);
  border-color: rgba(186, 255, 224, 0.8); color: #052617;
  box-shadow: 0 3px 0 #0d5e38;
}
.hub-action-foot .primary-action.is-done, .hub-action-foot .primary-action:disabled {
  background: rgba(24, 42, 36, 0.9); border-color: rgba(140, 190, 170, 0.28);
  color: #96b5a7; box-shadow: none; cursor: default; opacity: 0.82;
}

/* 暗黑境界封印殿堂（未突破境界时展示） */
.sealed-sanctuary {
  flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; padding: 24px 18px; overflow-y: auto;
  text-align: center; border: 1.5px solid rgba(255, 212, 92, 0.24); border-radius: 20px;
  background: radial-gradient(ellipse at 50% 28%, rgba(133, 112, 67, 0.14), transparent 58%),
    linear-gradient(180deg, #0b1414, #020506);
  box-shadow: inset 0 0 64px rgba(0, 0, 0, 0.82);
}
.sealed-lock {
  flex: 0 0 auto; display: grid; place-items: center; width: 92px; height: 92px;
  border: 1.5px solid rgba(255, 212, 92, 0.38); border-radius: 50%;
  color: #d6bd79; font-size: 40px;
  background: radial-gradient(circle, rgba(255, 212, 92, 0.12), rgba(0, 0, 0, 0.5));
  box-shadow: 0 0 0 8px rgba(255, 212, 92, 0.04), 0 0 34px rgba(255, 212, 92, 0.12);
}
.sealed-realm-pill {
  padding: 4px 12px; border-radius: 99px;
  border: 1px solid rgba(255, 212, 92, 0.42); background: rgba(255, 212, 92, 0.08);
  color: #ffe28c; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em;
}
.sealed-title {
  margin: 0; font-family: var(--font-display); font-size: 1.48rem;
  color: var(--gold); letter-spacing: 0.08em;
}
.sealed-requirement {
  margin: 0; max-width: 280px; color: var(--muted); font-size: 0.78rem; line-height: 1.6;
}
.unlock-progress {
  width: min(100%, 248px); height: 7px; overflow: hidden;
  border: 1px solid rgba(255, 212, 92, 0.28); border-radius: 99px; background: rgba(0, 0, 0, 0.62);
}
.unlock-progress-fill {
  display: block; width: 0%; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, #2fb87b, var(--gold));
  transition: width 0.3s ease;
}
.unlock-progress-label {
  color: #f0d797; font-family: var(--mono); font-size: 0.72rem; font-weight: 800;
}
.sealed-swipe-tip {
  color: rgba(184, 209, 195, 0.58); font-size: 0.67rem;
}
