* { box-sizing: border-box; user-select: none; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at 50% 25%, #241911 0%, #0d0906 100%);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
#stage-shell {
  width: 100vw; height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 6px;
}
#phone-frame {
  position: relative;
  width: min(calc(100vw - 12px), calc(min(calc(100vh - 12px), 920px) * 750 / 1334));
  aspect-ratio: 750 / 1334;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.85), 0 0 0 2px rgba(226, 173, 74, 0.45);
  background: #231810;
}
#game-canvas {
  width: 100%; height: 100%; display: block; cursor: pointer;
}
.hidden { display: none !important; }

/* ─── Top HUD: Ornate Carved Plaque + Wave Bar ─── */
.hud-top {
  position: absolute; top: 6px; left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  pointer-events: none; z-index: 14;
}
.plaque-row {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  pointer-events: auto;
}
.stage-plaque {
  min-width: 214px; height: 34px; padding: 0 36px;
  border: none; cursor: pointer;
  background: url("/textures/processed/ui_plaque.webp") center / 100% 100% no-repeat;
  color: #ffe8a6; font-size: 12px; font-weight: 900; letter-spacing: 0.4px;
  text-shadow: 0 2px 3px #140802, 0 0 8px rgba(255, 200, 80, 0.45);
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,0.65));
}
.stage-plaque:hover { filter: drop-shadow(0 0 8px rgba(255, 212, 102, 0.75)); }
.mech-badge {
  background: url("/textures/processed/ui_pill_btn.webp") center / 100% 100% no-repeat;
  color: #b7ffdf; padding: 4px 12px; font-size: 10px; font-weight: 800;
  text-shadow: 0 1px 2px #000;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.6));
}

.wave-bar-wrap {
  position: relative; width: 64%; height: 22px;
  background: url("/textures/processed/ui_wave_bar_frame.webp") center / 100% 100% no-repeat;
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.65));
}
.wave-bar-inner {
  position: absolute; left: 7%; right: 7%; top: 27%; bottom: 27%;
  background: rgba(18, 11, 7, 0.85); border-radius: 99px; overflow: hidden;
}
.wave-bar-fill {
  width: 5%; height: 100%;
  background: linear-gradient(90deg, #e08d1e, #ffe066, #fff3b0);
  box-shadow: 0 0 8px rgba(255, 212, 92, 0.7);
  transition: width 0.2s ease-out;
}
.wave-bar-labels {
  position: relative; z-index: 2; width: 84%;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px; font-weight: 900; color: #fff8de;
  text-shadow: 0 1px 3px #000, 0 0 4px #000;
}
.wave-banner {
  background: linear-gradient(90deg, transparent, rgba(160, 32, 22, 0.92) 20%, rgba(160, 32, 22, 0.92) 80%, transparent);
  color: #fff2c2; font-size: 11px; font-weight: 900; padding: 3px 26px;
  text-shadow: 0 1px 3px #000; letter-spacing: 0.5px;
}

/* ─── Top-Left Controls (Sleek Reference Column) ─── */
.hud-left-top {
  position: absolute; top: 52px; left: 7px;
  display: flex; flex-direction: column; align-items: center; gap: 3px; z-index: 15;
}
.g-icon-btn {
  width: 34px; height: 34px; padding: 0; border: none; background: transparent;
  cursor: pointer; position: relative;
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.75));
}
.g-icon-btn:hover { filter: drop-shadow(0 0 7px rgba(255, 214, 102, 0.85)); }
.g-icon-btn img { width: 100%; height: 100%; object-fit: contain; }
.g-icon-btn.text-btn {
  background: url("/textures/processed/icon_frame_blank.webp") center / 100% 100% no-repeat;
  color: #ffeab0; font-size: 11px; font-weight: 900; text-shadow: 0 1px 2px #000;
}
.speed-btn span {
  position: absolute; right: 3px; bottom: 1px;
  font-size: 11px; font-weight: 900; color: #ffe578;
  text-shadow: 0 1px 2px #000, 0 0 3px #000;
}
.timer-readout {
  font-size: 10px; font-weight: 800; color: #fff0d0;
  text-shadow: 0 1px 2px #000; margin-top: -3px;
}
.res-pill {
  display: flex; align-items: center; gap: 3px;
  background: rgba(24, 14, 8, 0.82); border: 1px solid rgba(226, 174, 72, 0.78);
  border-radius: 999px; padding: 2px 7px;
  font-size: 10px; font-weight: 900; color: #ffe285;
  text-shadow: 0 1px 2px #000; white-space: nowrap;
}
.res-pill img { width: 14px; height: 14px; object-fit: contain; }
.spirit-pill { border-color: rgba(92, 206, 255, 0.85); color: #9deaff; }
.pill-tag { color: #5ce1ff; font-weight: 900; }

/* ─── Left Mid: Auto + 4 Ornate Gold Medallion Treasures ─── */
.hud-left-skills {
  position: absolute; left: 7px; top: 48%;
  display: flex; flex-direction: column; align-items: center; gap: 4px; z-index: 15;
}
.auto-pill {
  display: flex; align-items: center; gap: 3px;
  background: rgba(24, 18, 12, 0.86); border: 1.5px solid #8a7558;
  color: #cbbba2; border-radius: 999px; padding: 2px 7px;
  font-size: 10px; font-weight: 900; cursor: pointer;
}
.auto-pill.active {
  border-color: #52f0a2; color: #90ffc8; background: rgba(14, 58, 40, 0.9);
  box-shadow: 0 0 8px rgba(82, 240, 162, 0.45);
}
.auto-pill img { width: 14px; height: 14px; }
.treasure-bar { display: flex; flex-direction: column; gap: 5px; }
.treasure-slot {
  width: 44px; height: 44px; border: none; padding: 0; border-radius: 50%;
  background: transparent; position: relative; cursor: pointer;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,0.8));
}
.treasure-slot.ready {
  filter: drop-shadow(0 0 8px rgba(255, 224, 110, 0.95));
}
.treasure-slot img { width: 100%; height: 100%; object-fit: contain; display: block; }
.treasure-cd {
  position: absolute; inset: 3px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.58);
  color: #fff; font-size: 11px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  text-shadow: 0 1px 2px #000;
}
.treasure-cost {
  position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%);
  background: rgba(14, 18, 26, 0.88); border: 1px solid rgba(112, 214, 255, 0.8);
  border-radius: 99px; padding: 0 5px;
  font-size: 9px; font-weight: 900; color: #8eeeff; line-height: 13px;
}

/* ─── Right Top: Hero Ultimate Medallions ─── */
.hud-right-ults {
  position: absolute; right: 7px; top: 58px;
  display: flex; flex-direction: column; gap: 6px; z-index: 15;
}
.ult-orb {
  width: 42px; height: 42px; border-radius: 50%; position: relative;
  background: radial-gradient(circle, #35281e, #16100c);
  border: 2px solid #cfa04e; padding: 2px; cursor: pointer; overflow: hidden;
  box-shadow: 0 3px 6px rgba(0,0,0,0.75);
}
.ult-orb.ready {
  border-color: #63ffba;
  box-shadow: 0 0 12px rgba(72, 255, 172, 0.9), inset 0 0 8px rgba(99, 255, 186, 0.5);
}
.ult-orb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.ult-pct {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(0, 0, 0, 0.72); color: #ffeaa0;
  font-size: 9px; font-weight: 900; text-align: center;
}

/* ─── Right Mid: Roster Gallery Entry Button ─── */
.hud-right-mid {
  position: absolute; right: 7px; top: 47%; z-index: 15;
  display: flex; flex-direction: column; gap: 6px;
}
.side-entry-btn {
  display: flex; flex-direction: column; align-items: center;
  padding: 5px 7px; border-radius: 10px; cursor: pointer;
  background: linear-gradient(180deg, rgba(154, 42, 28, 0.92), rgba(88, 18, 12, 0.95));
  border: 1.5px solid #ffd470;
  box-shadow: 0 4px 10px rgba(0,0,0,0.75), 0 0 10px rgba(255, 140, 56, 0.45);
}
.side-entry-btn:hover { filter: drop-shadow(0 0 8px rgba(255, 200, 90, 0.9)); }
.sc-title { font-size: 10px; font-weight: 900; color: #ffe89e; text-shadow: 0 1px 2px #000; }
.sc-sub { font-size: 8px; font-weight: 700; color: #ffd0b0; }

/* ─── Bottom Action Bar & Ornate Gold-Jade Wall HP Frame ─── */
.hud-bottom-actions {
  position: absolute; left: 10px; right: 10px; bottom: 30px;
  display: flex; flex-direction: row; justify-content: flex-end; gap: 6px;
  align-items: center; z-index: 15; pointer-events: none;
}
.guofeng-btn {
  pointer-events: auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  border-radius: 999px; padding: 5px 12px;
  font-size: 11px; font-weight: 900; cursor: pointer;
  text-shadow: 0 1px 2px #000; white-space: nowrap;
  box-shadow: 0 3px 8px rgba(0,0,0,0.75), inset 0 1px 0 rgba(255,255,255,0.28);
}
.guofeng-btn:hover { filter: drop-shadow(0 0 7px rgba(255, 224, 120, 0.8)); }
.guofeng-btn img { width: 15px; height: 15px; object-fit: contain; }
.jade-btn {
  background: linear-gradient(180deg, #2d7d59, #184933);
  border: 1.5px solid #76e8b2; color: #eafff4;
}
.gold-btn {
  background: linear-gradient(180deg, #cf831e, #7c4209);
  border: 1.5px solid #ffe07d; color: #fff7dc;
}
.red-btn {
  background: linear-gradient(180deg, #c23925, #76190d);
  border: 1.5px solid #ffa473; color: #fff2d6;
}
.blue-btn {
  background: linear-gradient(180deg, #2778b5, #14446b);
  border: 1.5px solid #7dd3ff; color: #e8f8ff;
}
.dark-btn {
  background: linear-gradient(180deg, #543e2c, #312115);
  border: 1.5px solid #c2985c; color: #f5e2c2;
}

.hud-wall-bar {
  position: absolute; left: 8px; right: 8px; bottom: 4px; z-index: 15;
  display: flex; justify-content: center; pointer-events: none;
}
.wall-frame-wrap {
  position: relative; width: 96%; height: 24px;
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,0.8));
}
.wall-inner-track {
  position: absolute; left: 5.5%; right: 5.5%; top: 24%; bottom: 24%;
  background: #170e09; border-radius: 99px; overflow: hidden;
}
.wall-fill {
  width: 100%; height: 100%;
  background: linear-gradient(90deg, #299e52, #5ce079, #9bff9c);
  transition: width 0.16s ease-out;
}
.wall-shield {
  position: absolute; top: 0; bottom: 0; right: 0; width: 0%;
  background: linear-gradient(90deg, rgba(72, 206, 255, 0.85), rgba(180, 245, 255, 0.95));
}
.wall-frame-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: fill; pointer-events: none;
}
.wall-label {
  position: relative; z-index: 3; font-size: 10px; font-weight: 900;
  color: #fffef0; text-shadow: 0 1px 3px #000, 0 0 4px #000;
}

/* ─── V18 Frameless Transparent Ultimate Cut-In Splash (Zero Obstructive Backdrop!) ─── */
.cutin-overlay {
  position: absolute; top: 162px; left: 0; width: 100%; height: 124px;
  pointer-events: none; z-index: 26; overflow: visible;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.cutin-overlay.active {
  animation: cutinBannerIn 0.24s cubic-bezier(0.14, 1.08, 0.26, 1) both;
}
.cutin-overlay.closing {
  opacity: 0;
  transform: translateX(18%);
}
@keyframes cutinBannerIn {
  0%   { transform: translateX(-30%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
.cutin-slash {
  position: absolute; inset: 0; z-index: 1; overflow: hidden;
  background: transparent !important;
  box-shadow: none !important;
  pointer-events: none;
}
.cutin-slash::before {
  content: none;
}
.cutin-slash::after {
  content: '';
  position: absolute; top: 18%; bottom: 18%; left: -35%; width: 38%;
  background: linear-gradient(90deg, transparent, rgba(255, 246, 196, 0.45), transparent);
  transform: skewX(-24deg);
  animation: cutinSweep 0.55s ease-out 0.04s 1 both;
}
@keyframes cutinSweep {
  0%   { left: -40%; opacity: 0.85; }
  100% { left: 125%; opacity: 0; }
}
.cutin-img {
  position: absolute; left: 6px; top: -38px; width: 188px; height: 188px; z-index: 4;
  object-fit: contain; opacity: 1 !important;
  filter: drop-shadow(0 0 12px rgba(255, 228, 120, 0.88)) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.9));
  animation: cutinHeroPop 0.3s cubic-bezier(0.16, 1.28, 0.32, 1) both;
}
@keyframes cutinHeroPop {
  0%   { transform: translateX(-42px) scale(0.78); opacity: 0; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}
.cutin-copy {
  position: absolute; top: 24px; left: 42%; right: 14px; z-index: 3;
  display: flex; flex-direction: column; gap: 5px; text-align: right;
  animation: cutinTextSlide 0.28s cubic-bezier(0.16, 1.12, 0.3, 1) 0.04s both;
}
@keyframes cutinTextSlide {
  0%   { transform: translateX(30px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
.cutin-title {
  font-size: 29px; font-weight: 900; font-style: italic; letter-spacing: 2px; line-height: 1.1;
  color: #ffe97d;
  text-shadow:
    -2px -2px 0 #140802, 2px -2px 0 #140802, -2px 2px 0 #140802, 2px 2px 0 #140802,
    0 4px 10px rgba(0, 0, 0, 0.96), 0 0 18px rgba(255, 210, 90, 0.9);
}
.cutin-vo {
  font-size: 12px; font-weight: 900; line-height: 1.35; color: #fffdf0;
  text-shadow:
    -1.5px -1.5px 0 #120804, 1.5px -1.5px 0 #120804, -1.5px 1.5px 0 #120804, 1.5px 1.5px 0 #120804,
    0 2px 6px #000;
}

/* ─── Full-Screen UR Ultimate Cinematic Canvas ─── */
.ur-cutin-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 28;
}

/* ─── Ornate Guofeng Scroll Panels & Modals ─── */
.radial-menu {
  position: absolute; inset: 0; background: rgba(8, 5, 3, 0.42);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 94px; z-index: 30;
}
.modal-mask {
  position: absolute; inset: 0; background: rgba(6, 4, 2, 0.72);
  display: flex; align-items: center; justify-content: center; z-index: 80;
}
#ad-reward-modal, #boot-error-modal {
  z-index: 95;
}
.scroll-panel {
  width: 92%; max-height: 83%; overflow-y: auto;
  background:
    radial-gradient(circle at 50% 0%, rgba(72, 168, 146, 0.24), transparent 52%),
    radial-gradient(circle at 50% 100%, rgba(212, 158, 56, 0.14), transparent 55%),
    linear-gradient(180deg, rgba(18, 30, 34, 0.96) 0%, rgba(11, 20, 24, 0.97) 58%, rgba(8, 14, 18, 0.98) 100%);
  backdrop-filter: blur(14px);
  border: 2px solid #eab95c;
  outline: 1.5px solid rgba(92, 206, 178, 0.28);
  outline-offset: -6px;
  border-radius: 18px; padding: 15px; color: #fff4da;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.82), inset 0 0 26px rgba(255, 214, 118, 0.12);
}
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 900; margin-bottom: 10px; font-size: 15px; letter-spacing: 1px; color: #ffe799;
  font-family: "STKaiti", "Kaiti SC", "KaiTi", "PingFang SC", serif;
  border-bottom: 1px solid rgba(234, 185, 92, 0.38); padding-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
}
.panel-banner {
  text-align: center; font-size: 18px; font-weight: 900; color: #ffe388;
  margin-bottom: 12px; letter-spacing: 1px;
  text-shadow: 0 2px 4px #000, 0 0 10px rgba(255, 196, 72, 0.4);
  background: url("/textures/processed/ui_plaque.webp") center / 88% 100% no-repeat;
  padding: 6px 0;
}
.close-x {
  background: linear-gradient(180deg, #7c3824, #4b1d10); color: #ffe9b8;
  border: 1.5px solid #e6b655; border-radius: 8px; width: 26px; height: 26px;
  cursor: pointer; font-weight: 900;
}

.radial-body { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; max-height: 290px; overflow-y: auto; padding-right: 2px; }
.radial-opt {
  background: linear-gradient(180deg, rgba(96, 62, 34, 0.55), rgba(46, 28, 16, 0.82));
  border: 1.5px solid #c99742; border-radius: 10px;
  padding: 8px; color: #fff; cursor: pointer; text-align: left; font-size: 12px;
  display: flex; align-items: center; gap: 8px;
}
.radial-opt:hover { border-color: #ffe284; background: rgba(154, 102, 46, 0.55); }
.radial-opt img { width: 42px; height: 42px; object-fit: cover; border-radius: 8px; border: 1px solid rgba(255, 224, 128, 0.45); background: radial-gradient(circle, rgba(255, 220, 140, 0.2), rgba(14, 9, 6, 0.85)); }
.radial-opt.danger { border-color: #e05d4a; color: #ffc2b8; }
.radial-opt.locked {
  border-color: rgba(130, 118, 98, 0.5);
  background: linear-gradient(180deg, rgba(34, 30, 28, 0.72), rgba(16, 14, 14, 0.90));
  color: #b7aa92;
  opacity: 0.78;
}
.radial-opt.locked:hover {
  border-color: rgba(212, 168, 92, 0.7);
  background: linear-gradient(180deg, rgba(46, 38, 30, 0.78), rgba(20, 16, 14, 0.92));
}
.radial-opt.locked img { filter: grayscale(0.92) brightness(0.62); border-color: rgba(140, 128, 108, 0.45); }
.radial-opt.temp-unlocked {
  border-color: #63ffba;
  background: linear-gradient(180deg, rgba(24, 96, 76, 0.78), rgba(14, 48, 40, 0.92));
  box-shadow: inset 0 0 12px rgba(99, 255, 186, 0.25);
}
.radial-opt.ad-unlock-ssr {
  border-color: #d68cff;
  background: linear-gradient(180deg, rgba(84, 34, 124, 0.78), rgba(38, 16, 62, 0.92));
  color: #f9ecff;
  box-shadow: inset 0 0 14px rgba(214, 140, 255, 0.25);
}
.radial-opt.ad-unlock-ssr:hover {
  border-color: #f0c2ff;
  background: linear-gradient(180deg, rgba(112, 46, 162, 0.85), rgba(50, 22, 82, 0.95));
}
.radial-opt.ad-unlock-ur {
  border-color: #ffcf5c;
  background: linear-gradient(180deg, rgba(154, 28, 22, 0.86), rgba(74, 14, 12, 0.95));
  color: #fff6d6;
  box-shadow: 0 0 12px rgba(255, 118, 48, 0.35), inset 0 0 16px rgba(255, 214, 92, 0.28);
}
.radial-opt.ad-unlock-ur:hover {
  border-color: #fff099;
  background: linear-gradient(180deg, rgba(186, 38, 28, 0.92), rgba(92, 18, 14, 0.96));
}

.roster-entry-btn {
  background: linear-gradient(180deg, rgba(28, 112, 104, 0.94), rgba(14, 58, 56, 0.96)) !important;
  border-color: #6ef0c8 !important;
  margin-bottom: 6px;
}
.roster-box { width: 95%; max-height: 86%; }
.roster-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-bottom: 12px;
}
.roster-card {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 6px 5px 7px; border-radius: 10px; cursor: pointer;
  background: linear-gradient(180deg, rgba(84, 54, 30, 0.72), rgba(28, 17, 10, 0.94));
  border: 1.5px solid rgba(214, 166, 82, 0.65); color: #fff6df;
  transition: transform 0.14s ease, border-color 0.14s ease;
}
.roster-card:hover { transform: translateY(-2px); border-color: #ffe488; }
.roster-card.starter {
  border-color: #6cffb8;
  box-shadow: 0 0 12px rgba(72, 240, 162, 0.45), inset 0 0 12px rgba(72, 240, 162, 0.16);
}
.roster-portrait-wrap {
  width: 84px; height: 84px; border-radius: 10px; overflow: hidden; margin-bottom: 4px;
  background: radial-gradient(circle at 50% 35%, rgba(255, 218, 130, 0.22), rgba(14, 10, 8, 0.9));
  border: 1.5px solid rgba(235, 192, 98, 0.55);
  display: flex; align-items: center; justify-content: center;
}
.roster-portrait-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.roster-tag {
  position: absolute; top: 4px; right: 4px; padding: 1px 5px; border-radius: 6px;
  font-size: 9px; font-weight: 900; background: rgba(16, 12, 8, 0.86); color: #ffe48c;
  border: 1px solid rgba(255, 214, 108, 0.5);
}
.roster-starter-badge {
  position: absolute; top: 4px; left: 4px; padding: 1px 5px; border-radius: 6px;
  font-size: 9px; font-weight: 900; background: #198c58; color: #eafff4;
  border: 1px solid #78ffbe;
}
.roster-lock-badge {
  position: absolute; top: 4px; left: 4px; padding: 1px 5px; border-radius: 6px;
  font-size: 9px; font-weight: 900; background: rgba(24, 16, 14, 0.92); color: #ffcf7d;
  border: 1px solid rgba(232, 170, 74, 0.65);
}
.roster-card.locked {
  opacity: 0.76;
  border-color: rgba(136, 120, 98, 0.48);
  background: linear-gradient(180deg, rgba(36, 32, 28, 0.8), rgba(16, 14, 14, 0.95));
}
.roster-card.locked .roster-portrait-wrap img {
  filter: grayscale(0.92) brightness(0.6);
}
.roster-card b { font-size: 11px; color: #ffe9a8; line-height: 1.2; }
.roster-card small { font-size: 9px; color: #d6c5a3; line-height: 1.25; margin-top: 2px; }

.card-box {
  width: 96%; padding: 12px 10px 14px;
}
.card-list {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-bottom: 14px; align-items: stretch;
}
.rogue-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  border-radius: 12px; padding: 24px 6px 10px; min-height: 178px;
  cursor: pointer; border: 2px solid #b59e78; color: #fff;
  background: linear-gradient(180deg, rgba(92, 62, 36, 0.92), rgba(34, 21, 12, 0.97));
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.16s ease-out, filter 0.16s ease-out;
}
.rogue-card:hover {
  transform: translateY(-4px);
  filter: drop-shadow(0 0 10px rgba(255, 218, 112, 0.78));
}
.rogue-card.white {
  border-color: #d9d0be;
  background: linear-gradient(180deg, rgba(88, 72, 58, 0.92), rgba(34, 26, 20, 0.97));
}
.rogue-card.blue {
  border-color: #62c2ff;
  background: linear-gradient(180deg, rgba(30, 86, 152, 0.92), rgba(14, 34, 66, 0.97));
}
.rogue-card.purple {
  border-color: #ca82ff;
  background: linear-gradient(180deg, rgba(98, 36, 150, 0.92), rgba(38, 14, 64, 0.97));
}
.rogue-card.orange {
  border-color: #ffc842;
  background: linear-gradient(180deg, rgba(168, 88, 12, 0.94), rgba(72, 30, 6, 0.98));
  box-shadow: 0 0 18px rgba(255, 184, 48, 0.45), inset 0 0 14px rgba(255, 210, 96, 0.25);
}
.card-rarity-ribbon {
  position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  padding: 2px 8px; border-radius: 0 0 8px 8px;
  font-size: 9px; font-weight: 900; letter-spacing: 0.5px; white-space: nowrap;
  background: rgba(20, 14, 10, 0.88); color: #efe4cc;
  border: 1px solid rgba(255, 255, 255, 0.25); border-top: none;
}
.rogue-card.blue .card-rarity-ribbon { background: #1c66a8; color: #d6f2ff; border-color: #7cd4ff; }
.rogue-card.purple .card-rarity-ribbon { background: #6f26ad; color: #f4dcff; border-color: #d99eff; }
.rogue-card.orange .card-rarity-ribbon { background: linear-gradient(90deg, #cf6c08, #f5b324); color: #fffbe0; border-color: #ffe88c; }
.card-icon-wrap {
  width: 58px; height: 58px; border-radius: 50%; margin-bottom: 8px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, rgba(255, 226, 140, 0.28), rgba(14, 9, 6, 0.85));
  border: 2px solid rgba(235, 192, 98, 0.8);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.65), 0 3px 8px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}
.rogue-card.blue .card-icon-wrap { border-color: #70ceff; background: radial-gradient(circle, rgba(96, 204, 255, 0.34), rgba(12, 26, 48, 0.85)); }
.rogue-card.purple .card-icon-wrap { border-color: #d694ff; background: radial-gradient(circle, rgba(196, 114, 255, 0.36), rgba(32, 12, 52, 0.85)); }
.rogue-card.orange .card-icon-wrap { border-color: #ffe070; background: radial-gradient(circle, rgba(255, 194, 62, 0.44), rgba(58, 24, 6, 0.88)); }
.card-icon-wrap img {
  width: 46px; height: 46px; object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.75));
}
.rogue-card b {
  font-size: 12px; line-height: 1.25; display: block; margin-bottom: 5px;
  color: #fff4d2; text-shadow: 0 1px 2px #000;
}
.rogue-card small {
  font-size: 10px; line-height: 1.35; color: #e8dcc4;
  display: block; word-break: break-word;
}

.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

/* 100-Level Selector */
.chapter-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.ch-tab {
  background: #462e1c; color: #ebd7b5; border: 1px solid #9c7542;
  border-radius: 6px; padding: 4px 7px; font-size: 11px; font-weight: 700; cursor: pointer;
}
.ch-tab.active { background: #266e4d; color: #fff; border-color: #79e6af; }
.chapter-desc {
  font-size: 11px; color: #b7ffdf; background: rgba(16, 52, 40, 0.72);
  border: 1px solid rgba(86, 214, 160, 0.45);
  padding: 6px 9px; border-radius: 8px; margin-bottom: 8px;
}
.level-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.lvl-btn {
  background: #472f1e; color: #fff3d6; border: 1px solid #b58843; border-radius: 8px;
  padding: 6px 2px; font-size: 11px; font-weight: 800; cursor: pointer; text-align: center;
}
.lvl-btn.boss { border-color: #ff7059; background: #662218; color: #ffe0a3; }
.lvl-btn.current { box-shadow: 0 0 0 2px #7dffbe; }

/* ─── Competitor-Grade Flame-Gold Victory / Result Modal ─── */
.result-mask {
  background: radial-gradient(circle at 50% 35%, rgba(62, 34, 14, 0.88), rgba(10, 6, 4, 0.94));
}
.result-panel {
  width: 92%; max-height: 86%; overflow-y: auto; padding: 18px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(44, 24, 12, 0.94), rgba(20, 11, 7, 0.97));
  border: 2px solid #ffbe4a;
  box-shadow: 0 0 34px rgba(255, 142, 38, 0.5), inset 0 0 26px rgba(255, 180, 72, 0.2);
}
.result-calligraphy {
  text-align: center; font-size: 36px; font-weight: 900; letter-spacing: 4px;
  color: #ffe46b;
  text-shadow:
    -2px -2px 0 #5c1e04, 2px -2px 0 #5c1e04, -2px 2px 0 #5c1e04, 2px 2px 0 #5c1e04,
    0 5px 14px rgba(0, 0, 0, 0.9), 0 0 22px rgba(255, 168, 42, 0.85);
}
.result-score-pill {
  text-align: center; font-size: 13px; font-weight: 900; color: #fff2c4;
  margin: 6px auto 12px; padding: 4px 14px; width: fit-content;
  background: rgba(94, 48, 16, 0.72); border: 1px solid #e6b450; border-radius: 999px;
}
.result-divider {
  text-align: center; margin: 8px 0 10px;
}
.result-divider span {
  display: inline-block; padding: 3px 20px; font-size: 12px; font-weight: 900; color: #ffe7a8;
  background: url("/textures/processed/ui_plaque.webp") center / 100% 100% no-repeat;
}
.reward-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px;
}
.reward-cell {
  border-radius: 10px; padding: 8px 5px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 900; text-align: center;
  box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.45), 0 3px 8px rgba(0, 0, 0, 0.6);
  animation: rewardPop 0.25s ease-out backwards;
}
@keyframes rewardPop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.reward-cell img { width: 34px; height: 34px; object-fit: contain; }
.reward-cell.red { border: 2px solid #ff5a47; background: radial-gradient(circle, rgba(196, 36, 28, 0.65), rgba(68, 10, 8, 0.92)); color: #ffdfd9; }
.reward-cell.orange { border: 2px solid #ffad33; background: radial-gradient(circle, rgba(198, 108, 16, 0.62), rgba(74, 34, 6, 0.92)); color: #ffebc2; }
.reward-cell.purple { border: 2px solid #c97dff; background: radial-gradient(circle, rgba(126, 46, 186, 0.6), rgba(46, 14, 72, 0.92)); color: #f2dcff; }
.reward-cell.blue { border: 2px solid #58beff; background: radial-gradient(circle, rgba(32, 108, 184, 0.58), rgba(14, 38, 72, 0.92)); color: #d6f0ff; }
.reward-cell.green { border: 2px solid #62e08e; background: radial-gradient(circle, rgba(28, 134, 68, 0.56), rgba(12, 48, 26, 0.92)); color: #d8ffe4; }

.stats-body { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.stat-row { display: flex; justify-content: space-between; background: rgba(0, 0, 0, 0.3); padding: 7px 10px; border-radius: 8px; border: 1px solid rgba(226, 174, 72, 0.3); }
.ad-reward-info { text-align: center; font-size: 12px; color: #d7efff; margin-bottom: 12px; }

/* Toast positioned safely in lower-mid area so it NEVER collides with top Cut-in */
.toast {
  position: absolute; bottom: 72px; left: 50%; transform: translateX(-50%);
  background: rgba(20, 12, 7, 0.92); color: #ffe799; border: 1.5px solid #e6b655;
  border-radius: 999px; padding: 6px 16px; font-size: 12px; font-weight: 900; z-index: 120;
  max-width: 88%; text-align: center; pointer-events: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.75);
}

/* Commercial locked-level and disabled-button states */
.lvl-btn.locked {
  opacity: 0.42;
  filter: grayscale(0.75);
  cursor: not-allowed;
}
.guofeng-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

/* ═══════════════════════════════════════════════════════════════════════
   V12 FLAGSHIP GUOFENG XIANXIA MAIN LOBBY, CELESTIAL PALACE & 5-TAB DOCK
   ═══════════════════════════════════════════════════════════════════════ */
.lobby-screen {
  position: absolute;
  inset: 0;
  z-index: 35;
  display: flex;
  flex-direction: column;
  background-color: #0b161a;
  background-image:
    linear-gradient(180deg, rgba(8, 22, 26, 0.38) 0%, rgba(10, 22, 24, 0.04) 24%, rgba(10, 18, 20, 0.06) 66%, rgba(6, 12, 16, 0.72) 100%),
    url('/textures/ui_deluxe_v12/lobby_bg_palace.webp');
  background-size: cover;
  background-position: center top;
  color: #fff5dc;
  overflow: hidden;
  transition: background-image 0.25s ease;
}
.lobby-screen.tab-mode-sub {
  background-image:
    linear-gradient(180deg, rgba(7, 16, 20, 0.84) 0%, rgba(10, 22, 26, 0.80) 45%, rgba(6, 12, 16, 0.92) 100%),
    url('/textures/ui_deluxe_v12/lobby_bg_palace.webp');
}
.lobby-screen.hidden { display: none; }

/* Top Translucent Carved Jade-Gold Account & Currency Bar */
.lobby-header {
  position: relative; z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 10px 9px;
  background: linear-gradient(180deg, rgba(10, 24, 28, 0.84) 0%, rgba(14, 30, 34, 0.68) 100%);
  backdrop-filter: blur(12px);
  border-bottom: 1.5px solid rgba(242, 198, 104, 0.62);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.36);
}
.lh-profile {
  display: flex; align-items: center; gap: 7px; min-width: 0;
  padding: 2px 8px 2px 3px; border-radius: 24px;
  background: rgba(8, 18, 22, 0.56);
  border: 1px solid rgba(238, 194, 98, 0.45);
}
.lh-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 228, 134, 0.32), rgba(14, 38, 34, 0.92));
  border: 1.5px solid #f7d478;
  box-shadow: 0 0 10px rgba(255, 204, 84, 0.45);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.lh-avatar img { width: 30px; height: 30px; object-fit: contain; }
.lh-realm { font-size: 11.5px; font-weight: 900; color: #ffebb0; white-space: nowrap; text-shadow: 0 1px 2px #000; }
.lh-power { font-size: 10.5px; font-weight: 800; color: #72ffd2; white-space: nowrap; text-shadow: 0 1px 2px #000; }

.lh-currencies { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.lh-curr {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 7px; border-radius: 16px;
  background: rgba(8, 18, 22, 0.72);
  border: 1px solid rgba(235, 190, 96, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 240, 190, 0.14);
  font-size: 11px; font-weight: 800; color: #fff6dc;
}
.curr-ico { width: 15px; height: 15px; object-fit: contain; }
.curr-k {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%;
  background: linear-gradient(135deg, #ff7048, #b82c12); color: #fff; font-size: 9.5px; font-weight: 900;
}
.curr-k.gold { background: linear-gradient(135deg, #ffd65c, #b87410); color: #2b1204; }
.curr-k.jade { background: linear-gradient(135deg, #3ce8b5, #0e7a62); color: #04241c; }
.curr-plus {
  width: 15px; height: 15px; border-radius: 50%; border: none;
  background: linear-gradient(180deg, #ffe27a, #cc8214); color: #241004;
  font-weight: 900; font-size: 11px; line-height: 1; cursor: pointer; padding: 0;
}
.lh-mute-btn {
  padding: 4px 7px; border-radius: 14px;
  background: rgba(16, 36, 40, 0.82); border: 1px solid rgba(235, 190, 96, 0.52);
  color: #ffebb0; font-size: 10.5px; font-weight: 800; cursor: pointer;
}

/* Main Tab Viewport */
.lobby-body {
  position: relative;
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lobby-screen.tab-mode-home .lobby-body {
  overflow: hidden;
  padding: 8px 10px 10px;
}

/* ─── HOME SCREEN (出征): Full-Bleed Sunlit Celestial Palace + Live 3D Heroes ─── */
.lobby-home-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  width: 100%;
}

/* Floating Left & Right Painted 3D Activity Rails (NO flat brown boxes!) */
.lobby-rail {
  position: absolute;
  top: 6px;
  z-index: 8;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lobby-rail-left { left: 2px; }
.lobby-rail-right { right: 2px; }

.lobby-act-pill {
  position: relative;
  width: 66px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 2px 0;
  background: transparent;
  border: none;
  color: #fff6d6;
  cursor: pointer;
}
.act-icon-img {
  width: 52px; height: 52px; object-fit: contain;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, 0.65)) drop-shadow(0 0 8px rgba(255, 212, 108, 0.32));
  transition: transform 0.22s cubic-bezier(0.2, 1.5, 0.35, 1), filter 0.2s ease;
}
.lobby-act-pill:hover .act-icon-img {
  transform: scale(1.12) translateY(-2px);
  filter: drop-shadow(0 7px 12px rgba(0, 0, 0, 0.72)) drop-shadow(0 0 14px rgba(255, 224, 120, 0.75));
}
.act-lbl {
  font-size: 10.5px; font-weight: 900; letter-spacing: 0.4px;
  padding: 1px 7px; border-radius: 10px;
  background: linear-gradient(180deg, rgba(10, 24, 28, 0.86), rgba(8, 16, 20, 0.94));
  border: 1px solid rgba(242, 198, 106, 0.58);
  color: #ffeeb8;
  text-shadow: 0 1px 2px #000;
  white-space: nowrap;
}

.red-dot {
  position: absolute; top: 1px; right: 5px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #ff2a40; border: 1.5px solid #fff;
  box-shadow: 0 0 8px #ff3048;
  z-index: 3;
}
.red-dot.hidden { display: none; }

/* Center-Top Translucent Calligraphy Chapter Plaque */
.palace-chapter-plaque {
  align-self: center;
  margin-top: 2px;
  width: 242px;
  padding: 9px 14px 10px;
  border-radius: 16px;
  text-align: center;
  background: linear-gradient(180deg, rgba(10, 24, 28, 0.76) 0%, rgba(12, 28, 30, 0.62) 100%);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(244, 204, 114, 0.72);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 245, 200, 0.35);
  z-index: 5;
}
.pcp-ornament {
  font-size: 9.5px; font-weight: 800; letter-spacing: 1.5px;
  color: #7effd4; text-shadow: 0 1px 3px #000;
}
.pcp-title {
  font-family: "STKaiti", "Kaiti SC", "KaiTi", serif;
  font-size: 21px; font-weight: 900; letter-spacing: 1.5px;
  color: #ffec9c; margin-top: 1px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.95), 0 0 12px rgba(255, 200, 72, 0.45);
}
.pcp-sub {
  font-size: 11px; font-weight: 800; color: #e6fff7; margin-top: 2px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
.stage-ctrl-row {
  display: flex; justify-content: center; gap: 7px; margin-top: 7px;
}
.palace-chip-btn {
  padding: 4px 10px; border-radius: 14px; cursor: pointer;
  font-size: 10.5px; font-weight: 800; color: #ffefb8;
  background: linear-gradient(180deg, rgba(40, 26, 16, 0.85), rgba(22, 14, 8, 0.92));
  border: 1px solid rgba(242, 198, 102, 0.72);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.palace-chip-btn.jade {
  background: linear-gradient(180deg, rgba(16, 84, 74, 0.88), rgba(10, 48, 44, 0.94));
  border-color: #6df2c8; color: #eafff7;
}
.palace-chip-btn:hover { filter: brightness(1.16); transform: translateY(-1px); }

/* Center Celestial Terrace: Live Animated 3D Heroes Standing on Jade Platform */
.palace-hero-terrace {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 14px;
  pointer-events: none;
}
.terrace-aura-ring {
  position: absolute;
  bottom: 18px;
  width: 280px;
  height: 112px;
  object-fit: contain;
  mix-blend-mode: screen;
  opacity: 0.46;
  pointer-events: none;
  animation: fxTerracePulse 3.6s ease-in-out infinite;
}
@keyframes fxTerracePulse {
  0%, 100% { transform: scale(0.96); opacity: 0.36; }
  50%      { transform: scale(1.06); opacity: 0.56; }
}

.stage-hero-duo {
  position: relative; z-index: 4;
  display: flex; justify-content: center; align-items: flex-end; gap: 8px;
  pointer-events: auto;
}
.duo-hero-item {
  position: relative;
  width: 184px;
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer;
}
.duo-sprite-wrap {
  position: relative;
  width: 184px; height: 196px;
  display: flex; align-items: flex-end; justify-content: center;
}
.duo-ground-shadow {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  width: 118px; height: 24px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(6, 18, 16, 0.68) 0%, rgba(12, 30, 26, 0.25) 55%, transparent 80%);
}
.duo-3d-sprite {
  position: relative; z-index: 3;
  width: 184px; height: 194px;
  object-fit: contain; opacity: 1 !important;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.78));
  transition: transform 0.2s cubic-bezier(0.2, 1.5, 0.35, 1);
}
.duo-hero-item.slot-1 .duo-3d-sprite { transform: scaleX(-1); }
.duo-hero-item.slot-0 .duo-sprite-wrap:hover .duo-3d-sprite { transform: scale(1.06) translateY(-4px); }
.duo-hero-item.slot-1 .duo-sprite-wrap:hover .duo-3d-sprite { transform: scaleX(-1) scale(1.06) translateY(-4px); }

.duo-plate {
  margin-top: -6px; z-index: 3;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(10, 24, 28, 0.88), rgba(8, 16, 20, 0.96));
  border: 1px solid rgba(242, 198, 102, 0.72);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.55);
}
.rarity-dot {
  padding: 0 4px; border-radius: 4px; font-size: 9px; font-weight: 900;
}
.rarity-dot.ur { background: #e83820; color: #fff6c2; }
.rarity-dot.ssr { background: #e09e1c; color: #241004; }
.rarity-dot.sr { background: #269c7e; color: #eafff7; }
.duo-name { font-size: 11.5px; font-weight: 900; color: #ffedb2; }
.duo-meta { font-size: 10px; font-weight: 800; color: #78ffd0; }

/* Bottom Floating Heroic CTA Row */
.lobby-cta-row {
  position: relative; z-index: 6;
  display: flex; gap: 10px; align-items: stretch;
  padding: 0 2px;
}
.lobby-idle-box {
  width: 148px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(16, 62, 56, 0.90), rgba(8, 34, 34, 0.95));
  backdrop-filter: blur(8px);
  border: 1.5px solid #6cf0c4;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(180, 255, 232, 0.35);
  color: #e8fff6;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 8px 7px; cursor: pointer;
}
.idle-mini-ico { width: 32px; height: 32px; object-fit: contain; flex-shrink: 0; }
.idle-copy { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.idle-t { font-size: 12px; font-weight: 900; color: #eafff6; white-space: nowrap; }
.idle-s { font-size: 9.5px; font-weight: 800; color: #ffe796; margin-top: 1px; white-space: nowrap; }

.lobby-fight-cta {
  flex: 1; border-radius: 18px;
  background: linear-gradient(180deg, #ffea88 0%, #f0a426 42%, #c44a10 88%, #8f2a06 100%);
  border: 2.5px solid #fff5c8;
  box-shadow: 0 8px 24px rgba(235, 132, 24, 0.56), inset 0 2px 0 rgba(255, 255, 230, 0.85);
  color: #2b0d02; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 9px 14px;
}
.lobby-fight-cta:hover { filter: brightness(1.08); transform: translateY(-1px); }
.fight-main {
  font-family: "STKaiti", "Kaiti SC", "KaiTi", serif;
  font-size: 25px; font-weight: 900; letter-spacing: 5px; line-height: 1.08;
  text-shadow: 0 1px 0 rgba(255, 248, 210, 0.65);
}
.fight-cost { font-size: 11px; font-weight: 900; color: #4a1804; margin-top: 1px; }

/* Bottom 5-Tab Carved Jade & Gold Dock with Elevated Center Crest */
.lobby-nav-dock {
  position: relative; z-index: 10;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px;
  padding: 6px 8px 9px;
  background: linear-gradient(180deg, rgba(12, 26, 30, 0.94) 0%, rgba(6, 14, 18, 0.99) 100%);
  backdrop-filter: blur(12px);
  border-top: 2px solid rgba(242, 198, 106, 0.72);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.55);
}
.lobby-tab-btn {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px;
  padding: 4px 2px 3px; border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  color: #b8c8c4; cursor: pointer;
}
.lt-ico-img {
  width: 34px; height: 34px; object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.65)) saturate(0.88);
  transition: transform 0.2s cubic-bezier(0.2, 1.5, 0.35, 1), filter 0.2s ease;
}
.lobby-tab-btn.active {
  background: linear-gradient(180deg, rgba(242, 188, 72, 0.26), rgba(18, 56, 50, 0.62));
  border-color: rgba(255, 224, 128, 0.72);
  color: #fff3b8;
  box-shadow: inset 0 0 14px rgba(255, 206, 86, 0.24);
}
.lobby-tab-btn.active .lt-ico-img {
  transform: scale(1.12) translateY(-2px);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 10px rgba(255, 214, 96, 0.72)) saturate(1.15);
}
.lobby-tab-btn.main-tab {
  overflow: visible;
}
.lobby-tab-btn.main-tab.active {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}
.main-tab-halo {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; margin-top: -22px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 222, 114, 0.35) 0%, rgba(16, 42, 42, 0.94) 68%);
  border: 2px solid rgba(244, 202, 108, 0.78);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.65), 0 0 14px rgba(255, 204, 84, 0.35);
}
.lobby-tab-btn.main-tab.active .main-tab-halo {
  background: radial-gradient(circle, #ffe478 0%, #c86414 68%, #682206 100%);
  border-color: #fff6cc;
  box-shadow: 0 4px 20px rgba(255, 182, 54, 0.72), 0 0 22px rgba(255, 214, 92, 0.6);
}
.main-tab-halo .lt-ico-img { width: 40px; height: 40px; }
.lt-txt { font-size: 11px; font-weight: 900; letter-spacing: 0.5px; text-shadow: 0 1px 2px #000; }

/* ─── SUB-TABS: Heroes / Summon / Forge / Shop (Translucent Obsidian-Jade Glass) ─── */
.tab-subbar {
  background: linear-gradient(90deg, rgba(16, 44, 46, 0.88), rgba(22, 56, 54, 0.88), rgba(16, 44, 46, 0.88));
  border: 1px solid rgba(240, 196, 102, 0.58);
  border-radius: 12px; padding: 8px 10px; font-size: 11.5px; color: #ffebb0;
  text-align: center; font-weight: 800; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.32);
}
.tab-art-banner {
  border-radius: 16px; padding: 20px 14px 14px; text-align: center;
  background-size: cover; background-position: center;
  border: 1.5px solid rgba(242, 198, 106, 0.75);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), inset 0 0 24px rgba(0, 0, 0, 0.35);
}
.tab-art-title {
  font-family: "STKaiti", "Kaiti SC", "KaiTi", serif;
  font-size: 21px; font-weight: 900; letter-spacing: 2px; color: #ffeb9c;
  text-shadow: 0 2px 6px #000, 0 0 12px rgba(255, 192, 62, 0.55);
}
.tab-art-sub { font-size: 11.5px; color: #e2fff6; font-weight: 800; margin-top: 4px; text-shadow: 0 1px 3px #000; }
.tab-art-sub strong { color: #ffe578; }

.comm-hero-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.comm-hero-card {
  background: linear-gradient(180deg, rgba(16, 34, 38, 0.90), rgba(9, 18, 22, 0.95));
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(220, 180, 96, 0.55); border-radius: 14px; padding: 8px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.42);
}
.comm-hero-card.rarity-ur {
  border-color: #ff7e48;
  background: linear-gradient(180deg, rgba(64, 24, 16, 0.90), rgba(22, 10, 10, 0.96));
  box-shadow: inset 0 0 18px rgba(255, 114, 48, 0.25), 0 6px 16px rgba(0, 0, 0, 0.45);
}
.comm-hero-card.rarity-ssr {
  border-color: #f4c852;
  background: linear-gradient(180deg, rgba(44, 26, 62, 0.90), rgba(16, 12, 26, 0.96));
  box-shadow: inset 0 0 16px rgba(235, 188, 72, 0.2), 0 6px 16px rgba(0, 0, 0, 0.45);
}
.comm-hero-card.is-starter { box-shadow: 0 0 14px rgba(84, 245, 182, 0.58); border-color: #6df2c4; }
.ch-head { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.rarity-tag { padding: 1px 7px; border-radius: 6px; font-size: 10px; font-weight: 900; }
.rarity-tag.ur { background: linear-gradient(135deg, #ff542e, #b81e0e); color: #fff7c8; }
.rarity-tag.ssr { background: linear-gradient(135deg, #ffd854, #c48010); color: #241004; }
.rarity-tag.sr { background: linear-gradient(135deg, #2cb894, #146a5c); color: #eafff7; }
.ch-star { font-size: 11px; color: #ffd966; text-shadow: 0 1px 2px #000; }
.ch-stage {
  width: 100%; height: 104px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 62%, rgba(92, 224, 190, 0.22) 0%, rgba(12, 24, 28, 0.65) 75%);
  border: 1px solid rgba(255, 226, 138, 0.22);
}
.comm-hero-card.rarity-ur .ch-stage {
  background: radial-gradient(circle at 50% 62%, rgba(255, 154, 62, 0.34) 0%, rgba(28, 10, 8, 0.72) 75%);
}
.comm-hero-card.rarity-ssr .ch-stage {
  background: radial-gradient(circle at 50% 62%, rgba(188, 126, 255, 0.30) 0%, rgba(18, 12, 28, 0.72) 75%);
}
.ch-img { width: 96px; height: 96px; object-fit: contain; cursor: pointer; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6)); }
.ch-name { font-size: 13.5px; font-weight: 900; color: #ffebb0; margin-top: 1px; }
.ch-name em { font-style: normal; font-size: 11px; color: #76ffce; }
.ch-sub { font-size: 10px; color: #a6efe0; font-weight: 700; }
.ch-shards { font-size: 10px; color: #e2cfa8; }
.ch-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; width: 100%; margin-top: 2px; }
.mini-act {
  padding: 5px 4px; border-radius: 8px; font-size: 10px; font-weight: 800;
  border: 1px solid rgba(236, 192, 98, 0.58);
  background: linear-gradient(180deg, rgba(46, 36, 22, 0.92), rgba(24, 18, 12, 0.96));
  color: #ffedb4; cursor: pointer;
}
.mini-act.equip-btn {
  grid-column: span 2;
  background: linear-gradient(180deg, #1e7462, #11443a);
  border-color: #6df2c8; color: #eafff6;
}
.mini-act.equip-btn.on { background: rgba(14, 48, 42, 0.85); color: #7ef7cc; }
.mini-act.unlock-go-btn {
  grid-column: span 2;
  background: linear-gradient(180deg, #a64a1c, #5e200c);
  border-color: #ffca68;
  color: #fff3c8;
  padding: 6px 4px;
}
.mini-act.unlock-go-btn:hover {
  background: linear-gradient(180deg, #c85c24, #7c2a10);
}
.comm-hero-card.is-locked {
  border-color: rgba(154, 134, 102, 0.45);
  background: linear-gradient(180deg, rgba(22, 24, 28, 0.90), rgba(10, 12, 16, 0.96));
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.45);
}
.comm-hero-card.is-locked .ch-stage {
  position: relative;
  background: radial-gradient(circle at 50% 62%, rgba(90, 96, 110, 0.20) 0%, rgba(12, 14, 18, 0.85) 75%);
}
.comm-hero-card.is-locked .ch-img {
  filter: grayscale(0.92) brightness(0.55) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.65));
}
.ch-lock-pill {
  font-size: 10px; font-weight: 900; color: #ffd485;
  padding: 1px 6px; border-radius: 6px;
  background: rgba(68, 32, 16, 0.88);
  border: 1px solid rgba(255, 198, 92, 0.45);
}
.ch-lock-seal {
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  padding: 2px 9px; border-radius: 999px; white-space: nowrap;
  font-size: 10px; font-weight: 900; letter-spacing: 0.5px;
  background: rgba(14, 10, 12, 0.86); color: #ffda88;
  border: 1px solid rgba(244, 192, 86, 0.65);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
  pointer-events: none;
}
.ch-shards.locked-hint { color: #f2c484; font-weight: 700; }

/* Summon Shrine Tab */
.summon-panel { display: flex; flex-direction: column; gap: 12px; }
.summon-banner {
  border-radius: 18px; padding: 16px 14px 14px; text-align: center;
  background-size: cover; background-position: center;
  border: 2px solid #f4c45c;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), inset 0 0 28px rgba(255, 206, 92, 0.16);
}
.sb-badge {
  display: inline-block; padding: 3px 12px; border-radius: 12px;
  background: linear-gradient(135deg, #e83820, #a81c0c);
  border: 1px solid #ffe494; color: #fff6c8; font-size: 11px; font-weight: 900;
}
.sb-title {
  font-family: "STKaiti", "Kaiti SC", "KaiTi", serif;
  font-size: 24px; font-weight: 900; letter-spacing: 2px; color: #ffec96; margin: 6px 0 4px;
  text-shadow: 0 2px 8px #000, 0 0 16px rgba(255, 196, 62, 0.65);
}
.sb-heroes { display: flex; justify-content: center; align-items: flex-end; gap: 4px; margin: 6px 0; }
.sb-heroes img { width: 108px; height: 116px; object-fit: contain; }
.sb-pity {
  display: inline-block; padding: 4px 14px; border-radius: 14px;
  background: rgba(10, 20, 24, 0.78); border: 1px solid rgba(244, 200, 106, 0.55);
  font-size: 12px; color: #ffe5a4; font-weight: 800;
}
.summon-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.summon-rates {
  font-size: 11px; color: #b8ccc6; text-align: left; line-height: 1.5;
  padding: 10px 12px; border-radius: 12px; background: rgba(10, 22, 26, 0.78);
  border: 1px solid rgba(230, 190, 102, 0.32);
  display: flex; flex-direction: column; gap: 6px;
}
.sr-title {
  font-size: 11.5px; font-weight: 900; color: #ffe49c; text-align: center;
}
.summon-rate-grid { display: flex; flex-direction: column; gap: 5px; }
.sr-row {
  display: grid; grid-template-columns: 42px 1fr 48px auto; align-items: center; gap: 6px;
  padding: 4px 8px; border-radius: 8px;
  background: rgba(20, 34, 38, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.sr-row.ur { border-color: rgba(255, 114, 62, 0.48); background: rgba(58, 22, 16, 0.62); }
.sr-row.ssr { border-color: rgba(244, 200, 82, 0.42); background: rgba(42, 26, 56, 0.56); }
.sr-row strong { font-size: 12px; font-weight: 900; color: #fff2be; text-align: right; }
.sr-row small { font-size: 10px; color: #c7d9d4; }
.sr-label { font-size: 11px; font-weight: 800; color: #eef7f4; }
.sr-note { font-size: 10.5px; color: #b8ccc6; text-align: center; line-height: 1.45; }

.gacha-result-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.gacha-card {
  background: linear-gradient(180deg, rgba(20, 36, 40, 0.94), rgba(10, 18, 22, 0.98));
  border: 1.5px solid #d4a04c; border-radius: 12px;
  padding: 8px; text-align: center;
}
.gacha-card.rarity-ur { border-color: #ff6238; }
.gacha-card.rarity-ssr { border-color: #ffd854; }
.gacha-card.is-new {
  box-shadow: 0 0 16px rgba(255, 214, 88, 0.55), inset 0 0 12px rgba(255, 214, 88, 0.22);
}
.gc-top { display: flex; justify-content: space-between; align-items: center; gap: 4px; min-height: 18px; }
.gc-new-badge {
  padding: 1px 6px; border-radius: 6px; font-size: 9.5px; font-weight: 900;
  background: linear-gradient(135deg, #ff5b2e, #ffbe3b); color: #240c04;
  box-shadow: 0 0 8px rgba(255, 166, 48, 0.65);
}
.gacha-card img { width: 76px; height: 76px; object-fit: contain; display: block; margin: 4px auto; }
.gc-name { font-size: 12px; font-weight: 900; color: #ffe8aa; }
.gc-shard { font-size: 10px; color: #7ef5c0; }
.gc-shard.new-unlock { color: #ffe066; font-weight: 900; }

/* Forge Sanctum Tab */
.forge-list { display: flex; flex-direction: column; gap: 10px; }
.forge-card {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 14px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(16, 36, 40, 0.90), rgba(10, 20, 24, 0.95));
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(236, 190, 96, 0.58);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.36);
}
.fc-title { font-size: 15px; font-weight: 900; color: #ffea9e; }
.fc-title span { font-size: 12px; color: #74ffce; margin-left: 6px; }
.fc-desc { font-size: 11px; color: #cde2dc; margin-top: 4px; }

/* Shop Pavilion Tab */
.monthly-card-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 15px 14px; border-radius: 16px;
  background-size: cover; background-position: center;
  border: 2px solid #f6ce68;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.48), inset 0 0 22px rgba(255, 212, 102, 0.16);
}
.mc-badge {
  display: inline-block; padding: 1px 8px; border-radius: 8px; margin-bottom: 3px;
  background: linear-gradient(135deg, #ffd85c, #c47412); color: #2b1004;
  font-size: 10px; font-weight: 900;
}
.mc-title { font-size: 15px; font-weight: 900; color: #ffed9c; text-shadow: 0 2px 4px #000; }
.mc-desc { font-size: 11px; color: #eefef8; margin-top: 3px; text-shadow: 0 1px 3px #000; }
.shop-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.shop-card {
  background: linear-gradient(180deg, rgba(16, 36, 40, 0.90), rgba(9, 18, 22, 0.96));
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(226, 182, 92, 0.52);
  border-radius: 14px; padding: 11px 10px; text-align: center;
  display: flex; flex-direction: column; gap: 5px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.36);
}
.shop-card.sold-out { opacity: 0.52; }
.sc-tag {
  align-self: center; font-size: 10px; font-weight: 900; padding: 2px 9px; border-radius: 10px;
  background: linear-gradient(135deg, #d8421e, #98220c); color: #fff5c8;
  border: 1px solid rgba(255, 224, 134, 0.5);
}
.sc-name { font-size: 13.5px; font-weight: 900; color: #ffeba8; }
.sc-desc { font-size: 11px; color: #cfe6df; }
.sc-limit { font-size: 10px; color: #8cb2a8; }

.mini-btn { padding: 6px 10px !important; font-size: 11px !important; }
.full-w-btn { width: 100%; margin-top: 10px; }

/* Commercial Popups (Jade-Obsidian Glass) */
.comm-modal-panel { width: 92%; max-height: 82%; display: flex; flex-direction: column; }
.comm-modal-body { overflow-y: auto; padding: 8px 4px; display: flex; flex-direction: column; gap: 8px; }
.checkin-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.checkin-cell {
  background: linear-gradient(180deg, rgba(20, 42, 46, 0.92), rgba(11, 24, 28, 0.96));
  border: 1px solid rgba(224, 180, 92, 0.48);
  border-radius: 12px; padding: 9px 8px; text-align: center;
}
.checkin-cell.today { border-color: #ffe26a; box-shadow: 0 0 14px rgba(255, 214, 78, 0.45); }
.checkin-cell.claimed { opacity: 0.52; }
.ci-day { font-size: 11px; font-weight: 900; color: #ffe694; }
.ci-title { font-size: 12.5px; font-weight: 800; color: #fff6dc; margin-top: 1px; }
.ci-desc { font-size: 10.5px; color: #7dffce; margin-top: 2px; }
.ci-state { font-size: 10px; color: #ffd67a; margin-top: 3px; }

.chest-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.chest-pill {
  padding: 7px 4px; border-radius: 10px; border: 1px solid rgba(228, 182, 92, 0.52);
  background: rgba(18, 38, 42, 0.92); color: #ffeaa8; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; font-size: 10px;
}
.chest-pill.ready { border-color: #6df2c4; background: linear-gradient(180deg, #1c6252, #103c34); }
.chest-pill.claimed { opacity: 0.48; }
.quest-list, .bp-list { display: flex; flex-direction: column; gap: 7px; }
.quest-row, .bp-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 11px; border-radius: 12px;
  background: rgba(18, 36, 40, 0.90); border: 1px solid rgba(220, 176, 88, 0.42);
}
.qr-title { font-size: 12px; font-weight: 800; color: #ffecb2; }
.qr-sub { font-size: 10px; color: #8af5ce; }
.bp-row { display: grid; grid-template-columns: 44px 1fr 1fr; gap: 5px; align-items: center; }
.bp-row.bp-free-only { grid-template-columns: 44px 1fr; }
.bp-lv { font-size: 11px; font-weight: 900; color: #ffe692; text-align: center; }
.bp-cell {
  padding: 7px 4px; border-radius: 9px; font-size: 10px; font-weight: 700;
  border: 1px solid rgba(216, 174, 88, 0.45); background: rgba(18, 36, 40, 0.92); color: #f6e4bc; cursor: pointer;
}
.bp-cell.ready { border-color: #6ef5c4; background: linear-gradient(180deg, #1c6654, #103e34); color: #fff; }
.bp-cell.claimed { opacity: 0.45; }
.firstpack-box, .idle-modal-box { text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.fp-hero { width: 158px; height: 158px; object-fit: contain; }
.fp-title { font-size: 15px; font-weight: 900; color: #ffe68a; }
.fp-items, .im-rew { font-size: 12px; color: #82fbd0; font-weight: 700; }
.im-time { font-size: 13px; color: #ffebb6; }
.pause-actions { flex-direction: column; gap: 8px; }

/* ═══════════════════════════════════════════════════════════════════════
   DELUXE COMMERCIAL JUICE, SHEEN, 3D CARD FLIP, GACHA CINEMA & SURGE VFX
   ═══════════════════════════════════════════════════════════════════════ */
.lobby-fx-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 115;
}

/* Elastic modal pop-in with overshoot */
.modal-mask:not(.hidden) .scroll-panel,
.modal-mask:not(.hidden) .result-panel {
  animation: fxModalPop 0.34s cubic-bezier(0.22, 1.35, 0.36, 1) both;
}
@keyframes fxModalPop {
  0%   { opacity: 0; transform: scale(0.72) translateY(28px); }
  65%  { opacity: 1; transform: scale(1.04) translateY(-4px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Juicy spring press & hover on all commercial interactive elements */
.lobby-act-pill, .lobby-fight-cta, .lobby-idle-box, .guofeng-btn,
.mini-act, .chest-pill, .bp-cell, .lobby-tab-btn, .duo-hero-item,
.comm-hero-card, .shop-card, .forge-card {
  transition: transform 0.16s cubic-bezier(0.2, 1.5, 0.35, 1), box-shadow 0.2s ease, filter 0.18s ease;
}
.shop-card:hover, .forge-card:hover, .comm-hero-card:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(255, 204, 84, 0.32);
}
.lobby-act-pill:hover {
  transform: translateY(-2px) scale(1.05);
}
.lobby-act-pill:active, .lobby-fight-cta:active, .guofeng-btn:active,
.mini-act:active, .chest-pill:active, .bp-cell:active, .lobby-tab-btn:active {
  transform: scale(0.91) !important;
  filter: brightness(1.18);
}

/* Compact hero level button so text never awkwardly wraps */
.mini-act.lv-btn { font-size: 9.5px; white-space: nowrap; padding: 4px 3px; }

/* Continuous sweeping diagonal golden sheen on major commercial CTAs! */
.lobby-fight-cta, .gold-btn, .monthly-card-banner, .summon-banner, .checkin-cell.today {
  position: relative; overflow: hidden;
}
.lobby-fight-cta::after, .gold-btn::after, .checkin-cell.today::after {
  content: "";
  position: absolute; top: -20%; left: -75%; width: 45%; height: 140%;
  background: linear-gradient(110deg, transparent 10%, rgba(255, 252, 215, 0.62) 50%, transparent 90%);
  transform: skewX(-22deg);
  animation: fxSheenSweep 2.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes fxSheenSweep {
  0%, 35% { left: -75%; }
  75%, 100% { left: 135%; }
}

/* Pulsing heroic breath on primary Fight CTA & Active Tab */
.lobby-fight-cta {
  animation: fxCtaPulse 2.2s ease-in-out infinite;
  box-shadow: 0 0 22px rgba(255, 178, 52, 0.55), inset 0 1px 0 rgba(255, 250, 210, 0.7);
}
@keyframes fxCtaPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(255, 178, 52, 0.45), 0 4px 12px rgba(0, 0, 0, 0.55); transform: scale(1); }
  50%      { box-shadow: 0 0 28px rgba(255, 214, 92, 0.85), 0 6px 16px rgba(0, 0, 0, 0.6); transform: scale(1.022); }
}

/* Exaggerated bouncing red dots & ready chests/rewards! */
.red-dot {
  animation: fxDotBeat 1.2s ease-in-out infinite;
  box-shadow: 0 0 8px #ff2e4d;
}
@keyframes fxDotBeat {
  0%, 100% { transform: scale(1); }
  45%      { transform: scale(1.38); box-shadow: 0 0 14px #ff5c77; }
}
.chest-pill.ready, .bp-cell.ready, .checkin-cell.today {
  animation: fxReadyWiggle 1.45s ease-in-out infinite;
  box-shadow: 0 0 14px rgba(110, 248, 186, 0.58);
}
@keyframes fxReadyWiggle {
  0%, 60%, 100% { transform: scale(1) rotate(0deg); }
  70% { transform: scale(1.06) rotate(-2.5deg); }
  80% { transform: scale(1.06) rotate(2.5deg); }
  90% { transform: scale(1.03) rotate(-1.2deg); }
}

/* Activity top emblem floating shine */
.lobby-act-pill .act-emblem {
  transition: transform 0.25s ease;
  box-shadow: 0 0 10px rgba(255, 198, 72, 0.48), inset 0 1px 2px rgba(255,255,255,0.55);
}
.lobby-act-pill:hover .act-emblem {
  transform: scale(1.14) rotate(-6deg);
}

/* Staggered cascade entrance for cards on every tab switch */
.comm-hero-card, .shop-card, .forge-card, .quest-row, .bp-row, .checkin-cell {
  animation: fxCardRise 0.34s cubic-bezier(0.2, 1.2, 0.35, 1) both;
}
.comm-hero-card:nth-child(2n), .shop-card:nth-child(2n), .checkin-cell:nth-child(2n) { animation-delay: 45ms; }
.comm-hero-card:nth-child(3n), .shop-card:nth-child(3n), .checkin-cell:nth-child(3n) { animation-delay: 85ms; }
.comm-hero-card:nth-child(4n), .forge-card:nth-child(2) { animation-delay: 115ms; }
.forge-card:nth-child(3) { animation-delay: 165ms; }
@keyframes fxCardRise {
  0%   { opacity: 0; transform: translateY(16px) scale(0.94); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Radiant floating UR hero showcase in First-Pack & Summon Banner */
.fp-hero, .sb-heroes img {
  animation: fxHeroFloat 2.8s ease-in-out infinite;
  filter: drop-shadow(0 0 14px rgba(255, 196, 72, 0.65));
}
.sb-heroes img:nth-child(2) { animation-delay: 0.45s; }
.sb-heroes img:nth-child(3) { animation-delay: 0.9s; }
@keyframes fxHeroFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-6px) scale(1.04); }
}

/* Header currency pill elastic bounce when flying coins land! */
.fx-pill-pop {
  animation: fxPillPop 0.28s cubic-bezier(0.2, 1.7, 0.4, 1);
  box-shadow: 0 0 14px rgba(255, 224, 102, 0.9) !important;
}
@keyframes fxPillPop {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.24); filter: brightness(1.35); }
  100% { transform: scale(1); }
}

/* Phone-frame micro-shake on forge smash, star-up, chest pop & UR gacha! */
.fx-shake-med { animation: fxShakeMed 0.32s ease-out; }
.fx-shake-heavy { animation: fxShakeHeavy 0.40s ease-out; }
@keyframes fxShakeMed {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-4px, 3px); }
  40% { transform: translate(4px, -3px); }
  60% { transform: translate(-3px, -2px); }
  80% { transform: translate(2px, 2px); }
}
@keyframes fxShakeHeavy {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-8px, 6px) rotate(-0.5deg); }
  30% { transform: translate(8px, -6px) rotate(0.5deg); }
  45% { transform: translate(-6px, -4px); }
  65% { transform: translate(5px, 4px); }
  85% { transform: translate(-3px, 2px); }
}

/* Exaggerated "战力飙升" Golden Calligraphy Surge Banner */
.fx-power-surge {
  position: absolute; left: 50%; top: 16%; transform: translateX(-50%);
  z-index: 125; pointer-events: none; min-width: 245px; text-align: center;
  padding: 10px 22px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(66, 28, 6, 0.95), rgba(140, 74, 14, 0.94), rgba(56, 22, 6, 0.95));
  border: 2px solid #ffe47a;
  box-shadow: 0 0 32px rgba(255, 198, 52, 0.92), inset 0 0 18px rgba(255, 234, 132, 0.45);
}
.fx-power-surge.active { animation: fxPowerIn 1.65s cubic-bezier(0.16, 1.35, 0.3, 1) forwards; }
@keyframes fxPowerIn {
  0%   { opacity: 0; transform: translateX(-50%) scale(0.45) translateY(24px); }
  18%  { opacity: 1; transform: translateX(-50%) scale(1.12) translateY(0); }
  30%  { opacity: 1; transform: translateX(-50%) scale(1.0) translateY(0); }
  82%  { opacity: 1; transform: translateX(-50%) scale(1.02) translateY(-4px); }
  100% { opacity: 0; transform: translateX(-50%) scale(0.92) translateY(-22px); }
}
.fps-tag {
  font-size: 12px; font-weight: 900; letter-spacing: 3px; color: #fff6c2;
  text-shadow: 0 0 10px #ffae00, 0 2px 3px #000;
}
.fps-val {
  font-size: 22px; font-weight: 900; color: #ffe566;
  text-shadow: 0 0 14px rgba(255, 180, 0, 0.9), 0 2px 4px #000;
}
.fps-delta {
  font-style: normal; font-size: 15px; color: #74ffbe; margin-left: 6px;
  text-shadow: 0 0 10px rgba(72, 255, 168, 0.85), 0 1px 3px #000;
}

/* Full-Screen "寻仙降临" Gacha Summon Cinema Overlay */
.fx-gacha-cinema {
  position: absolute; inset: 0; z-index: 112;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 48%, rgba(44, 22, 68, 0.92), rgba(8, 4, 14, 0.97));
  overflow: hidden; transition: opacity 0.28s ease;
}
.fx-gacha-cinema.tier-ur {
  background: radial-gradient(circle at 50% 48%, rgba(120, 56, 8, 0.94), rgba(14, 5, 4, 0.98));
}
.fx-gacha-cinema.fade-out { opacity: 0; pointer-events: none; }
.gc-portal {
  position: relative; width: 320px; height: 320px;
  display: flex; align-items: center; justify-content: center;
}
.gc-array-outer, .gc-array-inner {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; mix-blend-mode: screen;
}
.gc-array-outer { animation: fxSpinCW 1.1s linear infinite, fxPortalZoom 0.85s ease-out forwards; }
.gc-array-inner { width: 72%; height: 72%; inset: 14%; animation: fxSpinCCW 0.75s linear infinite; }
.gc-core-beam {
  width: 68px; height: 68px; border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #ffe666 45%, transparent 75%);
  animation: fxCoreExplode 0.9s cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}
.gc-banner {
  margin-top: 14px; font-size: 20px; font-weight: 900; letter-spacing: 3px;
  color: #fff3b0; text-shadow: 0 0 18px #ffaa00, 0 2px 6px #000;
  animation: fxModalPop 0.4s ease-out;
}
.gc-flash {
  position: absolute; inset: 0; background: #fff8d6; opacity: 0; pointer-events: none;
  animation: fxWhiteFlash 0.92s ease-in forwards;
}
@keyframes fxSpinCW { to { transform: rotate(360deg); } }
@keyframes fxSpinCCW { to { transform: rotate(-360deg); } }
@keyframes fxPortalZoom { 0% { transform: scale(0.3) rotate(0deg); } 100% { transform: scale(1.22) rotate(220deg); } }
@keyframes fxCoreExplode { 0% { transform: scale(0.3); opacity: 0.4; } 65% { transform: scale(2.8); opacity: 1; } 100% { transform: scale(7.5); opacity: 0; } }
@keyframes fxWhiteFlash { 0%, 60% { opacity: 0; } 84% { opacity: 0.95; } 100% { opacity: 0; } }

/* Staggered 3D Gacha Result Cards with UR Rainbow-Gold Halo */
.gacha-card {
  animation: fxGachaFlip 0.52s cubic-bezier(0.2, 1.35, 0.35, 1) both;
  transform-style: preserve-3d;
}
.gacha-card.rarity-ur {
  border: 2px solid #ff8c24 !important;
  box-shadow: 0 0 24px rgba(255, 118, 20, 0.92), inset 0 0 16px rgba(255, 146, 36, 0.45);
  background: linear-gradient(160deg, #4f1c06, #7a2e08, #2e0e04) !important;
}
.gacha-card.rarity-ssr {
  border: 2px solid #b8d6f0 !important;
  box-shadow: 0 0 18px rgba(154, 202, 245, 0.78), inset 0 0 14px rgba(196, 228, 255, 0.24);
  background: linear-gradient(160deg, #1b2838, #2b3e54, #121b26) !important;
}
@keyframes fxGachaFlip {
  0%   { opacity: 0; transform: perspective(600px) rotateY(155deg) scale(0.55); }
  70%  { opacity: 1; transform: perspective(600px) rotateY(-10deg) scale(1.08); }
  100% { opacity: 1; transform: perspective(600px) rotateY(0deg) scale(1); }
}

/* "恭喜获得" Rotating Golden Sunburst Reward Fanfare Overlay */
.fx-fanfare-overlay {
  position: absolute; inset: 0; z-index: 110;
  background: rgba(8, 4, 2, 0.78);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; animation: fxFadeIn 0.2s ease-out;
}
.fx-fanfare-overlay.closing { opacity: 0; transition: opacity 0.2s ease; }
.ff-sunburst {
  position: absolute; width: 520px; height: 520px; pointer-events: none; opacity: 0.42;
  background: repeating-conic-gradient(from 0deg, rgba(255, 214, 92, 0.55) 0deg 12deg, transparent 12deg 24deg);
  border-radius: 50%; filter: blur(2px);
  animation: fxSpinCW 11s linear infinite;
}
.ff-card {
  position: relative; z-index: 2; width: 84%; padding: 20px 16px 16px;
  border-radius: 18px; text-align: center;
  background: linear-gradient(180deg, rgba(20, 40, 44, 0.96) 0%, rgba(10, 20, 24, 0.98) 100%);
  border: 2px solid #ffd866;
  box-shadow: 0 0 36px rgba(255, 194, 52, 0.65), 0 12px 30px rgba(0, 0, 0, 0.85);
  animation: fxModalPop 0.38s cubic-bezier(0.2, 1.4, 0.35, 1) both;
}
.ff-ribbon {
  font-size: 20px; font-weight: 900; letter-spacing: 2px; color: #ffe98a;
  text-shadow: 0 0 14px #ff9d00, 0 2px 4px #000;
}
.ff-sub { font-size: 12px; color: #d8c29a; margin: 4px 0 12px; }
.ff-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 14px; }
.ff-chip {
  padding: 8px 12px; border-radius: 10px; min-width: 82px;
  background: rgba(255, 212, 92, 0.14); border: 1.5px solid rgba(255, 216, 102, 0.72);
  display: flex; flex-direction: column; gap: 2px;
  animation: fxModalPop 0.38s cubic-bezier(0.2, 1.4, 0.35, 1) both;
}
.ff-chip-k { font-size: 10px; color: #f5ddb0; }
.ff-chip-v { font-size: 15px; color: #7dffbe; text-shadow: 0 1px 3px #000; }
.ff-ok-btn { width: 72%; padding: 9px 14px; font-size: 14px; }
@keyframes fxFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ═══════════════════════════════════════════════════════════════════════════
   4 Distinct Exaggerated Lobby Ascension Cinemas (升阶 / 突破升星)
   ═══════════════════════════════════════════════════════════════════════════ */
.fx-ascend-cinema {
  position: absolute; inset: 0; z-index: 125;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  overflow: hidden; cursor: pointer;
  animation: fxFadeIn 0.16s ease-out;
}
.fx-ascend-cinema.closing { opacity: 0; transition: opacity 0.22s ease; pointer-events: none; }
.fx-ascend-cinema.theme-jade {
  background: radial-gradient(circle at 50% 45%, rgba(30, 140, 108, 0.72), rgba(6, 22, 20, 0.94) 72%);
}
.fx-ascend-cinema.theme-thunder {
  background: radial-gradient(circle at 50% 44%, rgba(92, 42, 168, 0.78), rgba(10, 6, 28, 0.96) 72%);
}
.fx-ascend-cinema.theme-fire {
  background: radial-gradient(circle at 50% 45%, rgba(188, 56, 16, 0.80), rgba(22, 6, 4, 0.96) 74%);
}
.fx-ascend-cinema.theme-imperial {
  background: radial-gradient(circle at 50% 44%, rgba(215, 140, 26, 0.82), rgba(38, 12, 58, 0.94) 48%, rgba(8, 4, 18, 0.98) 82%);
}

/* Speed lines for Imperial Transcendence */
.asc-speedlines {
  position: absolute; width: 760px; height: 760px; top: 50%; left: 50%;
  margin: -380px 0 0 -380px; pointer-events: none; opacity: 0.52;
  background: repeating-conic-gradient(from 0deg, rgba(255, 232, 118, 0.72) 0deg 3deg, transparent 3deg 11deg);
  border-radius: 50%;
  animation: fxSpinCW 6s linear infinite;
}

/* Towering Sky Pillar for Fire / Imperial */
.asc-sky-pillar {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 170px; margin-left: -85px;
  pointer-events: none; mix-blend-mode: screen;
  animation: ascPillarSlam 1.5s cubic-bezier(0.15, 0.9, 0.25, 1) forwards;
}
.theme-fire .asc-sky-pillar {
  background: linear-gradient(90deg, transparent, rgba(255, 92, 24, 0.75) 24%, #fff7d6 50%, rgba(255, 92, 24, 0.75) 76%, transparent);
}
.theme-imperial .asc-sky-pillar {
  width: 220px; margin-left: -110px;
  background: linear-gradient(90deg, transparent, rgba(255, 128, 240, 0.55) 16%, rgba(255, 214, 72, 0.92) 36%, #ffffff 50%, rgba(255, 214, 72, 0.92) 64%, rgba(102, 240, 255, 0.55) 84%, transparent);
}
@keyframes ascPillarSlam {
  0%   { transform: scaleY(0.05) scaleX(0.3); opacity: 0; transform-origin: top center; }
  18%  { transform: scaleY(1) scaleX(1.35); opacity: 1; transform-origin: top center; }
  55%  { transform: scaleY(1) scaleX(0.95); opacity: 0.92; }
  100% { transform: scaleY(1) scaleX(0.25); opacity: 0; }
}

/* Triple Jagged Lightning Bolts for Thunder Tribulation */
.asc-bolts {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 4; mix-blend-mode: screen;
}
.asc-bolt {
  fill: none; stroke: #ffffff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 12px #b870ff) drop-shadow(0 0 24px #60f2ff);
  opacity: 0;
}
.asc-bolt.b1 { animation: ascBoltFlash 0.42s ease-out 0.04s 1 forwards; }
.asc-bolt.b2 { animation: ascBoltFlash 0.42s ease-out 0.22s 1 forwards; }
.asc-bolt.b3 { stroke-width: 8; animation: ascBoltFlash 0.52s ease-out 0.42s 1 forwards; }
@keyframes ascBoltFlash {
  0%   { opacity: 0; }
  15%  { opacity: 1; }
  45%  { opacity: 0.85; }
  100% { opacity: 0; }
}

/* Golden Elixir Condensing Orb for Jade */
.asc-elixir-orb {
  position: absolute; width: 64px; height: 64px; border-radius: 50%; z-index: 5;
  background: radial-gradient(circle, #ffffff 10%, #ffe866 42%, #3df5b4 76%, transparent 100%);
  box-shadow: 0 0 36px #5effc8, 0 0 64px #ffe066;
  animation: ascElixirPop 0.95s ease-out forwards;
}
@keyframes ascElixirPop {
  0%   { transform: scale(0.25); opacity: 0.2; }
  32%  { transform: scale(1.15); opacity: 1; }
  52%  { transform: scale(3.4); opacity: 0.85; }
  100% { transform: scale(5.0); opacity: 0; }
}

/* Central Hero & Dual Rotating Formation Stage */
.asc-stage {
  position: relative; width: 320px; height: 320px; z-index: 3;
  display: flex; align-items: center; justify-content: center;
}
.asc-arr-outer, .asc-arr-inner {
  position: absolute; pointer-events: none; mix-blend-mode: screen;
}
.asc-arr-outer {
  width: 310px; height: 310px; opacity: 0.92;
  animation: fxSpinCW 4.2s linear infinite, ascArrBurst 0.55s cubic-bezier(0.2, 1.4, 0.3, 1) both;
}
.asc-arr-inner {
  width: 225px; height: 225px; opacity: 0.88;
  animation: fxSpinCCW 3.1s linear infinite, ascArrBurst 0.45s cubic-bezier(0.2, 1.4, 0.3, 1) 0.08s both;
}
@keyframes ascArrBurst {
  0%   { transform: scale(0.18) rotate(-45deg); opacity: 0; }
  100% { transform: scale(1) rotate(0deg); opacity: 0.92; }
}
.asc-shockwave {
  position: absolute; width: 90px; height: 90px; border-radius: 50%; pointer-events: none;
  border: 4px solid #ffe875; box-shadow: 0 0 22px #ffe875;
  animation: ascShock 0.85s ease-out forwards;
}
.asc-shockwave.sw2 { animation-delay: 0.18s; border-color: #66ffd8; }
.theme-thunder .asc-shockwave { border-color: #c880ff; box-shadow: 0 0 24px #70f0ff; }
.theme-fire .asc-shockwave { border-color: #ff7733; box-shadow: 0 0 26px #ffd84d; }
@keyframes ascShock {
  0%   { transform: scale(0.35); opacity: 1; }
  100% { transform: scale(4.8); opacity: 0; }
}

/* Intact V18 Hero Cut-in + Luminous Celestial Avatar Ghost (Zero Distortion!) */
.asc-hero-ghost {
  position: absolute; width: 280px; height: 280px; object-fit: contain; z-index: 2;
  mix-blend-mode: screen; pointer-events: none;
  filter: drop-shadow(0 0 24px #ffe466) brightness(1.55);
  animation: ascGhostRise 1.35s ease-out forwards;
}
@keyframes ascGhostRise {
  0%   { transform: scale(0.95) translateY(10px); opacity: 0; }
  28%  { transform: scale(1.38) translateY(-18px); opacity: 0.82; }
  100% { transform: scale(1.85) translateY(-56px); opacity: 0; }
}
.asc-hero-main {
  position: relative; z-index: 10; width: 256px; height: 256px; object-fit: contain;
  opacity: 1 !important;
  filter: drop-shadow(0 0 18px rgba(255, 224, 110, 0.92)) drop-shadow(0 10px 22px rgba(0, 0, 0, 0.92));
  animation: ascHeroPop 0.58s cubic-bezier(0.18, 1.42, 0.32, 1) both;
}
@keyframes ascHeroPop {
  0%   { transform: scale(0.42) translateY(34px); opacity: 0; }
  65%  { transform: scale(1.08) translateY(-6px); opacity: 1; }
  100% { transform: scale(1.0) translateY(0); opacity: 1; }
}

/* Guofeng Breakthrough Plaque */
.asc-plaque {
  position: relative; z-index: 6; margin-top: 8px; padding: 12px 24px; text-align: center;
  min-width: 82%; border-top: 2px solid #ffe478; border-bottom: 2px solid #ffe478;
  background: linear-gradient(90deg, transparent, rgba(16, 12, 22, 0.90) 16%, rgba(44, 24, 12, 0.95) 50%, rgba(16, 12, 22, 0.90) 84%, transparent);
  animation: ascPlaqueSlam 0.42s cubic-bezier(0.18, 1.4, 0.3, 1) 0.16s both;
}
.theme-jade .asc-plaque { border-color: #54f5be; }
.theme-thunder .asc-plaque { border-color: #c880ff; }
.theme-fire .asc-plaque { border-color: #ff7b33; }
@keyframes ascPlaqueSlam {
  0%   { transform: scale(1.65); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.asc-badge {
  display: inline-block; padding: 2px 12px; margin-bottom: 5px; border-radius: 12px;
  font-size: 11px; font-weight: 900; letter-spacing: 1px; color: #241002;
  background: linear-gradient(180deg, #fff2a6, #f5ae28);
  box-shadow: 0 0 12px rgba(255, 206, 72, 0.85);
}
.asc-title {
  font-size: 21px; font-weight: 900; letter-spacing: 1.5px; color: #fff2a8;
  text-shadow: 0 0 16px #ff9d00, 0 2px 5px #000;
}
.theme-jade .asc-title { color: #82ffd2; text-shadow: 0 0 14px #24e6a4, 0 2px 5px #000; }
.theme-thunder .asc-title { color: #e2b8ff; text-shadow: 0 0 16px #a05cff, 0 2px 5px #000; }
.theme-fire .asc-title { color: #ffd47a; text-shadow: 0 0 16px #ff5412, 0 2px 5px #000; }
.asc-sub { font-size: 12px; font-weight: 700; color: #f6e4be; margin-top: 4px; text-shadow: 0 1px 3px #000; }

.asc-flash {
  position: absolute; inset: 0; z-index: 8; pointer-events: none;
  background: radial-gradient(circle, #ffffff, rgba(255, 236, 160, 0.85));
  animation: ascScreenFlash 0.45s ease-out forwards;
}
@keyframes ascScreenFlash {
  0%   { opacity: 0.78; }
  100% { opacity: 0; }
}
@keyframes fxSpinCCW { from { transform: rotate(360deg); } to { transform: rotate(0deg); } }

/* ═══════════════════════════════════════════════════════════════════════════
   Two-Stage New-Player Onboarding & Guided Tutorial Level (新手引导系统)
   ═══════════════════════════════════════════════════════════════════════════ */
.palace-chip-btn.guide-chip {
  background: linear-gradient(180deg, rgba(242, 184, 60, 0.28), rgba(140, 82, 16, 0.56));
  border-color: rgba(255, 224, 118, 0.85);
  color: #fff3b8;
}

/* Stage 1: Lobby Spotlight Tour Overlay */
.tut-lobby-overlay {
  position: absolute; inset: 0; z-index: 140;
  overflow: hidden;
  animation: fxFadeIn 0.2s ease-out;
}
.tut-backdrop-dim {
  position: absolute; inset: 0;
  background: rgba(5, 10, 14, 0.78);
}
.tut-spotlight {
  position: absolute; z-index: 2; border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(4, 10, 14, 0.78), 0 0 26px rgba(255, 224, 110, 0.92);
  border: 2.5px solid #ffe478;
  pointer-events: none;
  transition: left 0.28s cubic-bezier(0.2, 1, 0.3, 1), top 0.28s cubic-bezier(0.2, 1, 0.3, 1), width 0.28s cubic-bezier(0.2, 1, 0.3, 1), height 0.28s cubic-bezier(0.2, 1, 0.3, 1);
}
.tut-spot-ring {
  position: absolute; inset: -6px; border-radius: 18px;
  border: 2px solid rgba(102, 255, 210, 0.85);
  animation: tutSpotPulse 1.3s ease-in-out infinite;
}
@keyframes tutSpotPulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50%      { transform: scale(1.05); opacity: 0.35; }
}
.tut-pointer {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-size: 26px; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.85));
  animation: tutBounce 0.85s ease-in-out infinite;
}
@keyframes tutBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-8px); }
}

.tut-dialog-card {
  position: absolute; left: 50%; z-index: 5; width: 90%; max-width: 368px;
  padding: 14px 14px 12px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(16, 36, 40, 0.97) 0%, rgba(9, 20, 24, 0.98) 100%);
  border: 2px solid #f7cf6b;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85), 0 0 24px rgba(255, 206, 86, 0.35);
  transition: top 0.28s ease, bottom 0.28s ease;
}
.tut-dialog-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.tut-avatar {
  width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover; opacity: 1 !important;
  border: 2px solid #ffe278;
  background: radial-gradient(circle, rgba(42, 138, 108, 0.7), rgba(10, 24, 26, 0.95));
  box-shadow: 0 0 14px rgba(102, 255, 204, 0.55);
}
.tut-head-meta { flex: 1; min-width: 0; }
.tut-badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 10px; font-weight: 900; color: #1b1204;
  background: linear-gradient(180deg, #fff0a0, #f0ac28);
  margin-bottom: 3px;
}
.tut-title {
  font-size: 15px; font-weight: 900; color: #fff4c2; line-height: 1.25;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85);
}
.tut-skip-btn {
  align-self: flex-start; padding: 3px 9px; border-radius: 10px;
  border: 1px solid rgba(255, 224, 140, 0.4);
  background: rgba(255, 255, 255, 0.08); color: #e2cfa4;
  font-size: 11px; font-weight: 700; cursor: pointer;
}
.tut-body {
  font-size: 12.5px; line-height: 1.58; color: #eef7f2;
  padding: 8px 10px; border-radius: 10px;
  background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(108, 224, 186, 0.22);
}
.tut-dots {
  display: flex; justify-content: center; gap: 5px; margin: 10px 0 8px;
}
.tut-dot {
  width: 7px; height: 7px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.22); transition: width 0.2s ease, background 0.2s ease;
}
.tut-dot.done { background: #5ef0bc; }
.tut-dot.active { width: 20px; background: #ffe26a; }
.tut-footer {
  display: flex; justify-content: flex-end; gap: 8px;
}
.tut-act-btn { flex: 1; padding: 8px 10px; font-size: 13px; }

/* Stage 2: Battle Guided Tutorial Coach Banner (non-blocking, safely above battlefield actors) */
.tut-battle-coach {
  position: absolute; top: 82px; left: 50%; transform: translateX(-50%);
  width: 92%; z-index: 28; pointer-events: auto;
  padding: 8px 10px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(14, 34, 38, 0.94), rgba(8, 18, 22, 0.96));
  border: 1.8px solid #ffe066;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.78), 0 0 18px rgba(255, 210, 82, 0.42);
}
.tbc-row { display: flex; align-items: center; gap: 9px; }
.tbc-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover; opacity: 1 !important;
  border: 2px solid #ffe066; background: #14322e;
}
.tbc-copy { flex: 1; min-width: 0; }
.tbc-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 3px; }
.tbc-tag { font-size: 12.5px; font-weight: 900; color: #ffe87a; }
.tbc-btns { display: flex; gap: 5px; }
.tbc-mini-btn {
  padding: 2px 7px; border-radius: 8px; font-size: 10px; font-weight: 800; cursor: pointer;
  border: 1px solid rgba(255, 224, 118, 0.75);
  background: rgba(255, 206, 72, 0.22); color: #fff0a8;
}
.tbc-mini-btn.muted {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08); color: #cfd8d4;
}
.tbc-desc { font-size: 11.5px; line-height: 1.42; color: #f2fbf7; }

/* Pulsing DOM Highlight for Treasure Bar & Ultimate Bar during Battle Tutorial */
.tut-dom-pulse {
  outline: 3px solid #ffe666 !important;
  outline-offset: 4px;
  border-radius: 14px;
  box-shadow: 0 0 24px rgba(255, 224, 92, 0.95), 0 0 42px rgba(92, 255, 204, 0.75) !important;
  animation: tutDomPulse 1.05s ease-in-out infinite;
}
@keyframes tutDomPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.06); }
}

/* Guide Replay Menu Modal */
.tut-menu-hero {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
  padding: 10px; border-radius: 12px; background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 224, 128, 0.35);
}
.tut-menu-img { width: 84px; height: 84px; object-fit: contain; opacity: 1 !important; }
.tut-menu-title { font-size: 15px; font-weight: 900; color: #ffe888; margin-bottom: 4px; }
.tut-menu-sub { font-size: 12px; line-height: 1.45; color: #e2f2ea; }
.tut-menu-actions { display: flex; flex-direction: column; gap: 10px; }
.tut-menu-actions .guofeng-btn { width: 100%; padding: 10px; font-size: 14px; }

/* Tutorial Graduation Celebration Overlay */
.tut-grad-overlay {
  position: absolute; inset: 0; z-index: 145;
  background: rgba(6, 12, 16, 0.84);
  display: flex; align-items: center; justify-content: center;
  animation: fxFadeIn 0.24s ease-out;
}
.tut-grad-card {
  width: 88%; padding: 18px 16px; border-radius: 18px; text-align: center;
  background: linear-gradient(180deg, rgba(20, 44, 48, 0.97) 0%, rgba(10, 22, 26, 0.99) 100%);
  border: 2px solid #ffe066;
  box-shadow: 0 0 38px rgba(255, 206, 72, 0.6), 0 14px 32px rgba(0, 0, 0, 0.88);
  animation: fxModalPop 0.38s cubic-bezier(0.18, 1.38, 0.32, 1) both;
}
.tut-grad-ribbon {
  font-size: 19px; font-weight: 900; color: #ffef9a; letter-spacing: 1px;
  text-shadow: 0 0 14px #ff9d00, 0 2px 4px #000;
}
.tut-grad-hero {
  width: 148px; height: 148px; object-fit: contain; opacity: 1 !important; margin: 6px auto 4px;
  filter: drop-shadow(0 0 16px rgba(102, 255, 204, 0.72));
}
.tut-grad-sub { font-size: 12.5px; line-height: 1.5; color: #e9f6ef; margin-bottom: 12px; }
.tut-grad-rewards {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px;
}
.tgr-chip {
  padding: 7px 10px; border-radius: 10px;
  background: rgba(255, 214, 92, 0.14); border: 1.5px solid rgba(255, 218, 102, 0.7);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: #f6e2b4;
}
.tgr-chip strong { color: #7dffbe; font-size: 14px; }
.tut-grad-claimed { font-size: 12px; color: #9ce6c8; margin-bottom: 12px; }
.tut-grad-actions { display: flex; flex-direction: column; gap: 8px; }
.tut-grad-actions .guofeng-btn { width: 100%; padding: 10px; font-size: 14px; }


/* ═══════════════════════════════════════════════════════════════════════════
   Minimalist Cinematic GuoFeng Splash Loading Screen (国风极简启动页)
   ═══════════════════════════════════════════════════════════════════════════ */
.boot-loading-screen {
  position: absolute;
  inset: 0;
  z-index: 260;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 54px 28px 42px;
  background: #081216;
  transition: opacity 0.36s ease, transform 0.36s ease;
}
.boot-loading-screen.fade-out {
  opacity: 0;
  transform: scale(1.03);
  pointer-events: none;
}
.boot-splash-bg {
  position: absolute;
  inset: -12px;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 218, 126, 0.22), transparent 58%),
    url('/textures/ui_deluxe_v12/lobby_bg_palace.webp') center / cover no-repeat;
  filter: saturate(1.12) brightness(0.86);
  animation: bootBgDrift 14s ease-in-out infinite alternate;
}
@keyframes bootBgDrift {
  from { transform: scale(1.02) translateY(0); }
  to   { transform: scale(1.08) translateY(-8px); }
}
.boot-splash-array {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 340px;
  height: 340px;
  margin: -195px 0 0 -170px;
  z-index: 1;
  background: url('/textures/vfx_pack_v10/vfx_array_gold.webp') center / contain no-repeat;
  mix-blend-mode: screen;
  opacity: 0.42;
  pointer-events: none;
  animation: bootAuraSpin 26s linear infinite;
}
@keyframes bootAuraSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.boot-splash-hero {
  position: absolute;
  left: 50%;
  bottom: 84px;
  width: 370px;
  height: 370px;
  transform: translateX(-50%);
  object-fit: contain;
  z-index: 2;
  opacity: 1 !important;
  pointer-events: none;
  filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.78)) drop-shadow(0 0 22px rgba(108, 245, 204, 0.35));
  animation: bootHeroFloat 3.6s ease-in-out infinite;
}
@keyframes bootHeroFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(-8px); }
}
.boot-splash-vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(6, 14, 18, 0.62) 0%,
    rgba(6, 14, 18, 0.08) 30%,
    rgba(6, 14, 18, 0.12) 62%,
    rgba(5, 11, 15, 0.92) 88%,
    rgba(4, 9, 12, 0.98) 100%
  );
}
.boot-brand-lockup {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 12px;
}
.boot-brand-main {
  display: flex;
  align-items: center;
  gap: 8px;
}
.boot-title-text {
  font-family: "STKaiti", "KaiTi", "Songti SC", "SimSun", serif;
  font-size: 46px;
  font-weight: 900;
  letter-spacing: 8px;
  background: linear-gradient(180deg, #fffbe2 0%, #ffe082 48%, #d48c24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.92)) drop-shadow(0 0 18px rgba(255, 198, 72, 0.45));
}
.boot-seal {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 13px;
  font-weight: 900;
  color: #fff2dc;
  background: linear-gradient(180deg, #d93829, #8f160d);
  border: 1px solid rgba(255, 224, 158, 0.78);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.65);
  transform: translateY(-6px);
}
.boot-subtitle-text {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 8px;
  padding-left: 8px;
  color: #e7f6ee;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
  opacity: 0.9;
}
.boot-bar-dock {
  position: relative;
  z-index: 4;
  width: 100%;
  max-width: 316px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}
.boot-load-bar-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(10, 22, 26, 0.88);
  border: 1px solid rgba(246, 206, 118, 0.58);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.7), inset 0 1px 3px rgba(0, 0, 0, 0.8);
  overflow: visible;
  position: relative;
}
.boot-load-bar-fill {
  position: relative;
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2be0a8 0%, #f5cb5c 68%, #fff6be 100%);
  box-shadow: 0 0 14px rgba(245, 204, 92, 0.75);
  transition: width 0.16s ease-out;
}
.boot-load-spark {
  position: absolute;
  right: -4px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: radial-gradient(circle, #ffffff 15%, #ffe98a 55%, transparent 100%);
  box-shadow: 0 0 12px #ffe680, 0 0 22px #5effc8;
}
.boot-bar-caption {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255, 242, 204, 0.92);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
}
.boot-load-retry {
  margin-top: 4px;
  padding: 7px 26px;
}


/* ═══════════════════════════════════════════════════════════════════════════
   Web Full Auto-Play Demo Mode & Save Archive Controls
   ═══════════════════════════════════════════════════════════════════════════ */
.autoplay-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1.5px solid rgba(246, 202, 102, 0.78);
  background: linear-gradient(180deg, rgba(46, 28, 12, 0.92), rgba(22, 13, 6, 0.96));
  color: #ffe8a6;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
  transition: transform 0.14s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.autoplay-pill:hover {
  transform: translateY(-1px);
  filter: brightness(1.12);
}
.autoplay-pill .ap-ico {
  color: #ffd560;
  font-size: 11px;
  line-height: 1;
}
.autoplay-pill.active {
  border-color: #7cffce;
  color: #fffbe0;
  background: linear-gradient(180deg, rgba(18, 102, 74, 0.96), rgba(10, 56, 44, 0.98));
  box-shadow: 0 0 14px rgba(104, 255, 198, 0.75), inset 0 1px 0 rgba(255, 248, 192, 0.45);
  animation: autoPlayPulse 1.6s ease-in-out infinite;
}
.autoplay-pill.active .ap-ico {
  color: #84ffcf;
}
@keyframes autoPlayPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(104, 255, 198, 0.65), inset 0 1px 0 rgba(255, 248, 192, 0.4); }
  50% { box-shadow: 0 0 18px rgba(255, 224, 118, 0.95), inset 0 1px 0 rgba(255, 255, 220, 0.65); }
}

.autoplay-banner {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px 3px 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(12, 46, 38, 0.92), rgba(34, 24, 10, 0.92));
  border: 1px solid rgba(116, 246, 196, 0.75);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.62);
  color: #eefef7;
  font-size: 10.5px;
  font-weight: 800;
  pointer-events: auto;
  max-width: 92%;
}
.autoplay-banner .ap-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6effc0;
  box-shadow: 0 0 8px #6effc0;
  flex-shrink: 0;
  animation: apBlink 1.1s ease-in-out infinite;
}
@keyframes apBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}
.autoplay-banner .ap-tag {
  color: #ffe388;
  flex-shrink: 0;
}
.autoplay-banner .ap-status {
  color: #d6fff0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.autoplay-banner .ap-stop-btn {
  border: 1px solid rgba(255, 160, 128, 0.78);
  background: rgba(140, 32, 22, 0.88);
  color: #ffeae4;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
  flex-shrink: 0;
}
.autoplay-banner .ap-stop-btn:hover {
  filter: brightness(1.18);
}

.rogue-card.auto-picked {
  transform: translateY(-4px) scale(1.03);
  border-color: #82ffd0 !important;
  box-shadow: 0 0 22px rgba(120, 255, 202, 0.95), 0 0 8px #ffe066 !important;
}

/* Lobby Auto-Play & Archive Controls */
.stage-auto-row {
  display: flex;
  justify-content: center;
  margin-top: 7px;
}
.palace-autoplay-btn {
  padding: 5px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #fff6cf;
  background: linear-gradient(180deg, rgba(16, 98, 76, 0.92), rgba(8, 52, 44, 0.96));
  border: 1.5px solid #72f6c8;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.48), 0 0 12px rgba(96, 240, 192, 0.35);
  transition: transform 0.14s ease, filter 0.14s ease;
}
.palace-autoplay-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.14);
}
.palace-autoplay-btn.active {
  background: linear-gradient(180deg, rgba(196, 118, 22, 0.96), rgba(120, 52, 10, 0.98));
  border-color: #ffe88a;
  color: #fffbe6;
  animation: autoPlayPulse 1.6s ease-in-out infinite;
}
.palace-chip-btn.archive-chip {
  background: linear-gradient(180deg, rgba(28, 52, 86, 0.88), rgba(14, 28, 52, 0.94));
  border-color: rgba(132, 202, 255, 0.78);
  color: #dff2ff;
}

.lobby-checkpoint-bar {
  position: relative;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 2px 8px;
  padding: 7px 10px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(16, 56, 52, 0.94), rgba(26, 22, 14, 0.94));
  border: 1.5px solid rgba(110, 242, 198, 0.72);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
.lcp-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.lcp-info strong {
  font-size: 11.5px;
  color: #88ffd2;
}
.lcp-info span {
  font-size: 10.5px;
  color: #efe2c0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lcp-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.lcp-drop {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(255, 200, 140, 0.45);
  background: rgba(40, 20, 14, 0.78);
  color: #e8cfa0;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.save-meta-box {
  background: rgba(12, 34, 34, 0.72);
  border: 1px solid rgba(112, 232, 194, 0.42);
  border-radius: 10px;
  padding: 8px 10px;
  color: #dcf7ec;
  font-size: 12px;
  line-height: 1.45;
}
.save-action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 8px 0;
}
.save-action-grid .guofeng-btn {
  width: 100%;
  padding: 7px 8px;
  font-size: 12px;
}

/* ─── Per-Level Difficulty Progression UI ─── */
.result-unlock-pill {
  margin: 6px auto 2px;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(164, 96, 18, 0.92), rgba(226, 152, 34, 0.96), rgba(164, 96, 18, 0.92));
  border: 1.5px solid #ffe999;
  color: #fffbe6;
  font-size: 12.5px;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 0 14px rgba(255, 206, 86, 0.48);
}

.diff-modal-tip {
  font-size: 12px;
  color: #d6cbb2;
  text-align: center;
  margin-bottom: 10px;
  line-height: 1.45;
}
.diff-modal-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.diff-card {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid rgba(226, 178, 86, 0.52);
  background: linear-gradient(180deg, rgba(36, 26, 18, 0.94), rgba(22, 16, 12, 0.96));
  color: #fff2d2;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, filter 0.14s ease;
}
.diff-card:hover:not(.locked) {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.diff-card.active {
  border-color: #78f5c8;
  background: linear-gradient(180deg, rgba(18, 56, 48, 0.96), rgba(12, 34, 30, 0.98));
  box-shadow: 0 0 14px rgba(100, 240, 192, 0.32);
}
.diff-card.hell:not(.locked):not(.active) {
  border-color: rgba(255, 114, 78, 0.72);
  background: linear-gradient(180deg, rgba(64, 20, 18, 0.94), rgba(34, 12, 12, 0.96));
}
.diff-card.locked {
  opacity: 0.62;
  filter: grayscale(0.45);
  border-color: rgba(140, 130, 116, 0.45);
  background: rgba(24, 22, 20, 0.85);
}
.diff-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.diff-card-title {
  font-size: 15px;
  font-weight: 900;
  color: #ffe99c;
}
.diff-card.locked .diff-card-title {
  color: #b8b0a0;
}
.diff-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}
.diff-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
}
.diff-badge.selected {
  background: rgba(54, 194, 146, 0.28);
  border: 1px solid #6ef2c4;
  color: #9effdc;
}
.diff-badge.cleared {
  background: rgba(242, 188, 66, 0.22);
  border: 1px solid #f5cb66;
  color: #ffe796;
}
.diff-badge.locked {
  background: rgba(120, 110, 98, 0.25);
  border: 1px solid rgba(168, 156, 140, 0.5);
  color: #cfc6b8;
}
.diff-card-desc {
  font-size: 11.5px;
  color: #d9ceb6;
  line-height: 1.4;
}
.diff-lock-tip {
  margin-top: 5px;
  font-size: 11px;
  font-weight: 800;
  color: #ffb878;
}

.lvl-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.lvl-diff-dots {
  display: inline-flex;
  gap: 3px;
  margin-top: 1px;
}
.lvl-diff-dot {
  font-size: 9px;
  line-height: 1;
  padding: 1px 3px;
  border-radius: 4px;
  font-weight: 800;
}
.lvl-diff-dot.normal { background: rgba(74, 198, 154, 0.35); color: #9effdc; }
.lvl-diff-dot.hard   { background: rgba(240, 178, 58, 0.38); color: #ffe58a; }
.lvl-diff-dot.hell   { background: rgba(232, 74, 58, 0.42); color: #ffc0b4; }


/* ─── Simulated Human Touch Ripple & Tap Highlight (Auto-Play Human Simulation) ─── */
.auto-tap-ripple {
  position: absolute;
  width: 44px;
  height: 44px;
  margin-left: -22px;
  margin-top: -22px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 232, 138, 0.95);
  background: radial-gradient(circle, rgba(118, 255, 206, 0.42) 0%, rgba(255, 224, 118, 0.16) 58%, transparent 100%);
  box-shadow: 0 0 14px rgba(255, 224, 118, 0.85), 0 0 22px rgba(102, 255, 204, 0.45);
  pointer-events: none;
  z-index: 320;
  animation: autoTapRipple 0.68s cubic-bezier(0.18, 0.88, 0.32, 1) forwards;
}
@keyframes autoTapRipple {
  0% {
    transform: scale(0.32);
    opacity: 0.96;
  }
  70% {
    transform: scale(1.25);
    opacity: 0.52;
  }
  100% {
    transform: scale(1.65);
    opacity: 0;
  }
}
.auto-tap-highlight {
  filter: brightness(1.24) !important;
  box-shadow: 0 0 16px rgba(255, 226, 122, 0.92), inset 0 0 8px rgba(132, 255, 210, 0.45) !important;
  transition: filter 0.12s ease, box-shadow 0.12s ease;
}

/* =====================================================================
 * V20 Bespoke Hero Rarity Avatar Frames & Emblems
 *  - SR  (普通英雄): ZERO avatar border / completely clean borderless portrait
 *  - SSR (灵品仙将): Forged titanium-silver metallic frame + metallic SSR emblem
 *  - UR  (绝世天将): Blazing molten-orange phoenix flame frame + orange UR emblem
 * ===================================================================== */

@keyframes ssrMetalPulse {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(168, 214, 255, 0.65)) brightness(1.0); }
  50%      { filter: drop-shadow(0 0 10px rgba(212, 238, 255, 0.95)) brightness(1.16); }
}

@keyframes urOrangeBlaze {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(255, 114, 18, 0.85)) drop-shadow(0 0 14px rgba(255, 168, 42, 0.55)) brightness(1.02); }
  50%      { filter: drop-shadow(0 0 12px rgba(255, 138, 24, 1.0)) drop-shadow(0 0 22px rgba(255, 196, 62, 0.82)) brightness(1.14); }
}

/* Rarity Emblem Icons (SSR Metallic Crest vs UR Blazing Orange Phoenix Crest) */
.rarity-emblem {
  display: inline-block;
  object-fit: contain;
  vertical-align: middle;
  pointer-events: none;
  flex-shrink: 0;
}
.rarity-emblem.ssr {
  height: 24px;
  width: auto;
  filter: drop-shadow(0 1px 4px rgba(154, 206, 255, 0.72));
}
.rarity-emblem.ur {
  height: 26px;
  width: auto;
  filter: drop-shadow(0 1px 6px rgba(255, 126, 22, 0.9));
}
.rarity-emblem.mini { height: 17px; }
.rarity-emblem.duo-emblem { height: 20px; }
.rarity-emblem.rate-emblem { height: 22px; justify-self: center; }
.rarity-emblem.roster-emblem {
  position: absolute;
  top: 2px;
  right: 2px;
  height: 20px;
  z-index: 4;
}

/* Unified Hero Avatar Box (SR = ZERO border, SSR = Metallic Frame, UR = Blazing Orange Frame) */
.hero-avatar-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: visible;
}
.hero-avatar-box.lg { width: 100px; height: 100px; }
.hero-avatar-box.gacha { width: 88px; height: 88px; margin: 4px auto; }
.hero-avatar-box.roster { width: 84px; height: 84px; margin-bottom: 4px; }
.hero-avatar-box.sm { width: 48px; height: 48px; }

.hero-avatar-box .hero-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  position: relative;
  z-index: 1;
}
.hero-avatar-box.sm .hero-avatar-img,
.hero-avatar-box.roster .hero-avatar-img {
  object-fit: cover;
  object-position: top center;
}

/* SR: COMPLETELY BORDERLESS PORTRAIT */
.hero-avatar-box.rarity-sr {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}
.hero-avatar-box.rarity-sr .hero-avatar-img {
  border-radius: 8px;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.55));
}

/* SSR: Forged Titanium-Silver Metallic Octagon Armor Frame */
.hero-avatar-box.rarity-ssr .hero-avatar-img {
  width: 78%;
  height: 78%;
  border-radius: 14%;
  background: radial-gradient(circle at 50% 42%, rgba(164, 206, 245, 0.28), rgba(14, 22, 34, 0.88)) !important;
}
.hero-avatar-box.rarity-ssr.sm .hero-avatar-img {
  width: 74%;
  height: 74%;
}

/* UR: Blazing Molten-Orange Imperial Phoenix Halo Frame */
.hero-avatar-box.rarity-ur .hero-avatar-img {
  width: 79%;
  height: 79%;
  margin-top: 4%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, rgba(255, 146, 42, 0.34), rgba(34, 12, 4, 0.9)) !important;
}
.hero-avatar-box.rarity-ur.sm .hero-avatar-img {
  width: 76%;
  height: 76%;
  margin-top: 3%;
}

.hero-avatar-frame {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  object-fit: contain;
  pointer-events: none;
  z-index: 2;
  border: none !important;
  background: transparent !important;
}
.hero-avatar-frame.ssr {
  animation: ssrMetalPulse 2.8s ease-in-out infinite;
}
.hero-avatar-frame.ur {
  inset: -7%;
  width: 114%;
  height: 114%;
  animation: urOrangeBlaze 2.2s ease-in-out infinite;
}

/* Override legacy card/stage borders so SSR = Metallic Silver-Steel, UR = Blazing Orange, SR = Clean Borderless Avatar */
.comm-hero-card.rarity-sr .ch-stage {
  border: none !important;
  background: radial-gradient(circle at 50% 62%, rgba(84, 198, 170, 0.14) 0%, transparent 72%) !important;
}
.comm-hero-card.rarity-ssr {
  border-color: #a8c8e6;
  background: linear-gradient(180deg, rgba(28, 42, 58, 0.94), rgba(14, 20, 30, 0.97));
  box-shadow: inset 0 0 18px rgba(164, 210, 255, 0.22), 0 6px 16px rgba(0, 0, 0, 0.48);
}
.comm-hero-card.rarity-ssr .ch-stage {
  border: none;
  background: radial-gradient(circle at 50% 56%, rgba(154, 206, 255, 0.24) 0%, rgba(12, 18, 28, 0.72) 74%);
}
.comm-hero-card.rarity-ur {
  border-color: #ff8a24;
  background: linear-gradient(180deg, rgba(72, 26, 8, 0.94), rgba(26, 10, 4, 0.97));
  box-shadow: inset 0 0 22px rgba(255, 132, 28, 0.34), 0 0 14px rgba(255, 118, 18, 0.32), 0 6px 18px rgba(0, 0, 0, 0.52);
}
.comm-hero-card.rarity-ur .ch-stage {
  border: none;
  background: radial-gradient(circle at 50% 56%, rgba(255, 146, 36, 0.36) 0%, rgba(30, 10, 4, 0.72) 74%);
}
.comm-hero-card.is-locked .hero-avatar-frame {
  filter: grayscale(0.75) brightness(0.65) !important;
  animation: none !important;
}

/* Summon Rate Table accents */
.sr-row.ssr {
  border-color: rgba(168, 210, 245, 0.55);
  background: rgba(24, 38, 54, 0.72);
}
.sr-row.ur {
  border-color: rgba(255, 136, 32, 0.68);
  background: rgba(68, 24, 8, 0.72);
}

/* Battle Right-Side Ultimate Medallions (.ult-orb) */
.hud-right-ults {
  gap: 10px;
}
.ult-orb {
  width: 48px;
  height: 48px;
  padding: 0;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ult-orb.rarity-sr {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 10px;
}
.ult-orb.rarity-sr .ult-portrait {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  object-position: top center;
  border: none !important;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.78));
}
.ult-orb.rarity-sr.ready .ult-portrait {
  filter: drop-shadow(0 0 8px rgba(84, 255, 184, 0.95));
}
.ult-orb.rarity-ssr {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}
.ult-orb.rarity-ssr .ult-portrait {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  object-fit: cover;
  object-position: top center;
  background: #142030;
}
.ult-orb.rarity-ur {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}
.ult-orb.rarity-ur .ult-portrait {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  background: #2c1004;
}
.ult-frame {
  position: absolute;
  inset: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  object-fit: contain;
  pointer-events: none;
  z-index: 2;
}
.ult-frame.ssr {
  animation: ssrMetalPulse 2.8s ease-in-out infinite;
}
.ult-frame.ur {
  inset: -6px;
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  animation: urOrangeBlaze 2.1s ease-in-out infinite;
}
.ult-orb.ready .ult-frame.ssr {
  filter: drop-shadow(0 0 11px rgba(154, 232, 255, 1)) brightness(1.22);
}
.ult-orb.ready .ult-frame.ur {
  filter: drop-shadow(0 0 14px rgba(255, 148, 28, 1)) drop-shadow(0 0 22px rgba(255, 220, 72, 0.9)) brightness(1.22);
}
.ult-orb .ult-pct {
  bottom: -4px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  padding: 0 5px;
  border-radius: 6px;
  z-index: 4;
  white-space: nowrap;
}

/* Battle Radial Recruit / Upgrade Menu */
.radial-copy { min-width: 0; flex: 1; }
.radial-title-row { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.radial-title-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radial-opt .radial-turret-img {
  width: 42px; height: 42px; object-fit: cover; border-radius: 8px;
  border: 1px solid rgba(255, 224, 128, 0.45);
}
.radial-opt.ad-unlock-ssr {
  border-color: #a8cce8;
  background: linear-gradient(180deg, rgba(36, 56, 78, 0.88), rgba(18, 28, 42, 0.95));
  color: #eef6ff;
  box-shadow: inset 0 0 14px rgba(164, 212, 255, 0.28);
}
.radial-opt.ad-unlock-ssr:hover {
  border-color: #dff0ff;
  background: linear-gradient(180deg, rgba(48, 74, 102, 0.92), rgba(24, 38, 56, 0.96));
}
.radial-opt.ad-unlock-ur {
  border-color: #ff9428;
  background: linear-gradient(180deg, rgba(132, 42, 10, 0.9), rgba(56, 16, 4, 0.96));
  color: #fff3d6;
  box-shadow: 0 0 14px rgba(255, 118, 18, 0.45), inset 0 0 16px rgba(255, 164, 42, 0.32);
}
.radial-opt.ad-unlock-ur:hover {
  border-color: #ffc45c;
  background: linear-gradient(180deg, rgba(162, 54, 14, 0.94), rgba(74, 22, 6, 0.98));
}
.radial-opt.locked .hero-avatar-img {
  filter: grayscale(0.9) brightness(0.6);
}
.radial-opt.locked .hero-avatar-frame {
  filter: grayscale(0.75) brightness(0.65) !important;
  animation: none !important;
}

/* Roster Selector Modal (SR = borderless portrait, SSR = metallic, UR = orange) */
.roster-card.rarity-ssr {
  border-color: #a8cae8;
  background: linear-gradient(180deg, rgba(32, 48, 68, 0.85), rgba(14, 22, 32, 0.96));
}
.roster-card.rarity-ur {
  border-color: #ff8e24;
  background: linear-gradient(180deg, rgba(84, 30, 10, 0.88), rgba(32, 12, 4, 0.96));
  box-shadow: inset 0 0 14px rgba(255, 128, 24, 0.28);
}
.roster-portrait-wrap {
  border: none !important;
  background: transparent !important;
  overflow: visible !important;
}
.roster-card.locked .hero-avatar-frame {
  filter: grayscale(0.75) brightness(0.65) !important;
  animation: none !important;
}
