/* ============================================================
   SOULBEAST — 山海经灵魂异兽卡
   Mobile-first Web Prototype Styles
   ============================================================ */

/* ---------- TOKENS ---------- */
:root {
  --bg: #0a0a0f;
  --bg-chat: #0d0d14;
  --bg-msg-bot: rgba(255,255,255,0.06);
  --bg-msg-user: rgba(212,168,83,0.12);
  --bg-msg-gotcha: rgba(194,58,58,0.08);
  --bg-input: rgba(255,255,255,0.06);
  --bg-card: linear-gradient(170deg, #0d0f1a 0%, #1a1530 40%, #0f1a20 100%);

  --text: #e8e6e3;
  --text-2: rgba(232,230,227,0.65);
  --text-3: rgba(232,230,227,0.35);

  --gold: #d4a853;
  --gold-dim: rgba(212,168,83,0.3);
  --crimson: #c23a3a;
  --jade: #2eb886;
  --violet: #8b5cf6;
  --indigo: #5b6abf;

  --border: rgba(255,255,255,0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;

  --font: -apple-system, 'PingFang SC', 'Noto Sans SC', 'Helvetica Neue', sans-serif;
  --font-serif: 'Noto Serif SC', 'Songti SC', serif;

  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

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

/* ---------- SCREENS ---------- */
.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  z-index: 0;
}
.screen.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 10;
}

/* ============================================================
   SCREEN 1: INTRO — 玄墨鎏金游戏级首屏（三卡灵阵 + 书法印章 + 青铜玉牌）
   ============================================================ */
.screen-intro {
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 24%, #171726 0%, #0d0e16 56%, #08090e 100%);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.intro-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 28%, rgba(218, 174, 96, 0.12) 0%, rgba(139, 92, 246, 0.06) 36%, transparent 66%),
    radial-gradient(ellipse at 18% 82%, rgba(194, 58, 58, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 78%, rgba(46, 184, 134, 0.05) 0%, transparent 50%);
  animation: intro-aurora 14s ease-in-out infinite alternate;
  pointer-events: none;
}

.intro-stardust {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 18% 22%, rgba(246, 224, 168, 0.55) 50%, transparent 100%),
    radial-gradient(1px 1px at 82% 18%, rgba(246, 224, 168, 0.45) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 74% 38%, rgba(186, 160, 255, 0.4) 50%, transparent 100%),
    radial-gradient(1px 1px at 26% 42%, rgba(246, 224, 168, 0.38) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 88% 58%, rgba(246, 224, 168, 0.32) 50%, transparent 100%),
    radial-gradient(1px 1px at 14% 64%, rgba(246, 224, 168, 0.28) 50%, transparent 100%);
}

@keyframes intro-aurora {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.06) translate(-1.5%, 1.5%); }
}

.intro-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  text-align: center;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 24px calc(22px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 三卡悬浮水墨灵阵 Hero */
.hero-card-shrine {
  position: relative;
  width: 296px;
  height: 196px;
  margin: 6px auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 900px;
}

.hero-astrolabe {
  position: absolute;
  width: 224px;
  height: 224px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: astro-spin 42s linear infinite;
  pointer-events: none;
}

@keyframes astro-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

.shrine-card {
  position: absolute;
  width: 122px;
  height: 170px;
  border-radius: 13px;
  overflow: hidden;
  background: #121318;
  border: 1.2px solid rgba(232, 198, 126, 0.42);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.72), 0 0 22px rgba(212, 168, 83, 0.14);
  cursor: pointer;
  transition: transform 0.52s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.42s ease, box-shadow 0.42s ease, border-color 0.42s ease;
}

.shrine-card::before {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 9px;
  border: 0.7px solid rgba(255, 236, 192, 0.18);
  pointer-events: none;
  z-index: 3;
}

.shrine-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
}

.shrine-card-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 13, 20, 0.08) 0%, rgba(12, 13, 20, 0) 48%, rgba(10, 11, 16, 0.9) 100%);
  pointer-events: none;
  z-index: 1;
}

.shrine-rarity {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 2;
  padding: 1.5px 7px;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #f4ecff;
  background: linear-gradient(180deg, rgba(155, 118, 240, 0.9), rgba(88, 58, 166, 0.92));
  border: 0.8px solid rgba(232, 214, 255, 0.55);
}

.shrine-rarity.is-ssr {
  color: #201404;
  background: linear-gradient(180deg, #fce394, #cf942c);
  border-color: rgba(255, 245, 210, 0.8);
}

.shrine-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  z-index: 2;
  font-family: 'Ma Shan Zheng', var(--font-serif);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: #faf3e4;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
}

.shrine-card.pos-center {
  z-index: 5;
  transform: translateX(0) translateY(-4px) scale(1.06) rotate(0deg);
  border-color: rgba(246, 216, 146, 0.78);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.82), 0 0 32px rgba(226, 182, 98, 0.28);
}

.shrine-card.pos-left {
  z-index: 2;
  opacity: 0.72;
  transform: translateX(-82px) translateY(12px) scale(0.84) rotate(-11deg);
  filter: brightness(0.8);
}

.shrine-card.pos-right {
  z-index: 2;
  opacity: 0.72;
  transform: translateX(82px) translateY(12px) scale(0.84) rotate(11deg);
  filter: brightness(0.8);
}

/* 书法标题 + 朱砂方印 */
.intro-title-wrap {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
}

.intro-title {
  font-family: 'Ma Shan Zheng', var(--font-serif);
  font-size: 2.6rem;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.06em;
  background: linear-gradient(180deg, #fffaf0 0%, #f1d48e 56%, #c69644 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 4px 16px rgba(212, 168, 83, 0.24));
}

.intro-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  width: 22px;
  height: 36px;
  margin-top: 6px;
  border-radius: 4px;
  font-family: var(--font-serif);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffdcd8;
  background: linear-gradient(160deg, rgba(190, 48, 44, 0.9), rgba(132, 26, 26, 0.95));
  border: 1px solid rgba(255, 190, 180, 0.45);
  box-shadow: 0 4px 12px rgba(176, 40, 40, 0.35);
}

.intro-subtitle {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: rgba(234, 226, 210, 0.72);
  margin-bottom: 14px;
}

/* 单行细金卖点带 */
.intro-ritual-strip {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 9px 12px;
  margin-bottom: 16px;
  font-size: 0.73rem;
  color: rgba(236, 224, 200, 0.82);
  background: linear-gradient(90deg, transparent 0%, rgba(212, 168, 83, 0.07) 50%, transparent 100%);
  border-top: 1px solid rgba(212, 168, 83, 0.16);
  border-bottom: 1px solid rgba(212, 168, 83, 0.16);
}

.ritual-diamond {
  width: 4px;
  height: 4px;
  background: rgba(232, 198, 126, 0.68);
  transform: rotate(45deg);
  flex-shrink: 0;
}

/* 主/次等宽按钮组 */
.intro-cta-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.btn-start {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 18px;
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #141008;
  background: linear-gradient(180deg, #f6dc96 0%, #dca94c 55%, #bf882d 100%);
  border: 1px solid rgba(255, 242, 204, 0.58);
  border-radius: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 232, 0.65),
    0 10px 28px rgba(212, 168, 83, 0.28);
  transition: transform 0.22s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn-start-ornament {
  font-size: 0.72rem;
  opacity: 0.72;
}

.btn-start::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 28%, rgba(255, 252, 238, 0.38) 50%, transparent 72%);
  transform: translateX(-110%);
  animation: btn-shine 3.8s ease-in-out infinite;
}

@keyframes btn-shine {
  0%, 72%, 100% { transform: translateX(-110%); }
  36% { transform: translateX(110%); }
}

.btn-start:active { transform: scale(0.98); }

.intro-hint {
  font-size: 0.72rem;
  color: rgba(220, 212, 198, 0.45);
  margin-top: 12px;
  letter-spacing: 0.04em;
}

/* 陈列柜顶部古金印徽（替代系统龙 Emoji） */
.cabinet-crest {
  position: relative;
  width: 58px;
  height: 58px;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cabinet-crest svg {
  width: 100%;
  height: 100%;
}

.cabinet-crest-text {
  position: absolute;
  font-family: 'Ma Shan Zheng', var(--font-serif);
  font-size: 1.12rem;
  color: #f3d794;
  letter-spacing: 0.04em;
}

/* ============================================================
   SCREEN 2: CHAT
   ============================================================ */
.screen-chat {
  background: var(--bg-chat);
}

/* --- Chat Header --- */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  background: rgba(13,13,20,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 5;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-avatar-small {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(212,168,83,0.2), rgba(139,92,246,0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.chat-header-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.chat-header-status {
  font-size: 0.75rem;
  color: var(--jade);
  opacity: 1;
  transition: opacity 0.3s;
}

.chat-header-status.hidden { opacity: 0; }

.chat-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-progress-dots {
  display: flex;
  gap: 4px;
}

.chat-progress-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.3s ease;
}

.chat-progress-dots .dot.active {
  background: var(--gold);
  box-shadow: 0 0 6px rgba(212,168,83,0.4);
}

.chat-progress-dots .dot.done {
  background: var(--jade);
}

.chat-progress-text {
  font-size: 0.75rem;
  color: var(--text-3);
  min-width: 24px;
  text-align: right;
}

/* --- Chat Messages --- */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.chat-messages::-webkit-scrollbar { display: none; }

.msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 0.92rem;
  line-height: 1.6;
  animation: msg-appear 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  word-break: break-word;
}

@keyframes msg-appear {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.msg-bot {
  background: var(--bg-msg-bot);
  border: 1px solid var(--border);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.msg-user {
  background: var(--bg-msg-user);
  border: 1px solid rgba(212,168,83,0.15);
  color: var(--text);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.msg-gotcha {
  background: var(--bg-msg-gotcha);
  border: 1px solid rgba(194,58,58,0.3);
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  animation: gotcha-entrance 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes gotcha-entrance {
  0% { opacity: 0; transform: translateY(12px) scale(0.9); }
  40% { transform: translateY(-4px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.msg-gotcha .gotcha-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--crimson);
  background: rgba(194,58,58,0.15);
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 8px;
  animation: badge-pop 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

@keyframes badge-pop {
  0% { opacity: 0; transform: scale(0.3) rotate(-10deg); }
  60% { transform: scale(1.15) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

.msg .highlight {
  color: var(--gold);
  font-weight: 600;
}

/* Typing indicator */
.msg-typing {
  display: flex;
  gap: 4px;
  padding: 14px 20px;
  align-self: flex-start;
  background: var(--bg-msg-bot);
  border: 1px solid var(--border);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-3);
  animation: typing-bounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* --- Chat Input --- */
.chat-input-area {
  padding: 12px 16px;
  padding-bottom: calc(12px + var(--safe-bottom));
  background: rgba(13,13,20,0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 6px 6px 6px 18px;
  transition: border-color 0.3s;
}

.chat-input-wrapper:focus-within {
  border-color: rgba(212,168,83,0.3);
}

.chat-input {
  flex: 1;
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.4;
  max-height: 100px;
  padding: 8px 0;
}

.chat-input::placeholder { color: var(--text-3); }

.chat-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gold-dim);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
  opacity: 0.4;
}

.chat-send-btn:not(:disabled) {
  background: var(--gold);
  color: #0a0a0f;
  opacity: 1;
}

.chat-send-btn:not(:disabled):active {
  transform: scale(0.9);
}

.chat-input-area.disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ============================================================
   SCREEN 3: ANALYZING
   ============================================================ */
.screen-analyzing {
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.analyzing-container {
  text-align: center;
  padding: 40px 32px;
  position: relative;
}

.analyzing-beast {
  font-size: 4rem;
  position: relative;
  z-index: 2;
  animation: analyzing-pulse 2s ease-in-out infinite;
}

@keyframes analyzing-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.analyzing-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -80%);
  z-index: 1;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.ring-1 {
  width: 100px; height: 100px;
  border-color: rgba(212,168,83,0.2);
  animation: ring-pulse 2s ease-out infinite;
}
.ring-2 {
  width: 160px; height: 160px;
  border-color: rgba(139,92,246,0.15);
  animation: ring-pulse 2s ease-out infinite 0.4s;
}
.ring-3 {
  width: 220px; height: 220px;
  border-color: rgba(46,184,134,0.1);
  animation: ring-pulse 2s ease-out infinite 0.8s;
}

@keyframes ring-pulse {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.3); opacity: 0; }
}

.analyzing-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin: 40px 0 32px;
  color: var(--text);
}

.analyzing-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 280px;
  margin: 0 auto;
}

.analyzing-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-3);
  transition: all 0.5s ease;
  transform: translateX(-10px);
  opacity: 0;
}

.analyzing-step.active {
  color: var(--text-2);
  transform: translateX(0);
  opacity: 1;
}

.analyzing-step.done {
  color: var(--jade);
  transform: translateX(0);
  opacity: 0.6;
}

.step-icon { font-size: 1.1rem; }

/* ============================================================
   SCREEN 4: CARD REVEAL
   ============================================================ */
.screen-reveal {
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow-y: auto;
}

.reveal-container {
  text-align: center;
  padding: 40px 24px;
  width: 100%;
  max-width: 400px;
}

/* Rarity Announce */
.rarity-announce {
  opacity: 0;
  transform: scale(3);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  margin-bottom: 24px;
}

.rarity-announce.show {
  opacity: 1;
  transform: scale(1);
}

.rarity-text {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--violet), var(--jade));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.1em;
  animation: rarity-shimmer 2s ease-in-out infinite;
  background-size: 200% 200%;
}

@keyframes rarity-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Card Flip — exact 900:1280 collector ratio, zero edge crop */
.card-wrapper {
  perspective: 1400px;
  margin: 0 auto 22px;
  width: min(326px, calc(100vw - 44px));
  aspect-ratio: 900 / 1280;
  height: auto;
}

.card-flipper {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.95s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.card-flipper.flipped {
  transform: rotateY(180deg) rotateX(var(--tilt-rx, 0deg)) rotateY(var(--tilt-ry, 0deg));
}

.card-wrapper.is-tilting .card-flipper.flipped {
  transition: transform 0.08s ease-out;
}

.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 16px;
  overflow: hidden;
}

/* --- Card Back (Obsidian Ink & Antique Gold) --- */
.card-back {
  background: radial-gradient(circle at 50% 38%, #1d1e29 0%, #111218 62%, #0a0b0f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(232, 198, 126, 0.42);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.65),
    0 0 34px rgba(212, 168, 83, 0.14),
    inset 0 0 24px rgba(212, 168, 83, 0.06);
}

.card-back-pattern {
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(232, 198, 126, 0.24);
  border-radius: 11px;
  background:
    radial-gradient(circle at 50% 50%, rgba(232, 198, 126, 0.07) 0%, transparent 56%),
    repeating-linear-gradient(45deg, transparent, transparent 14px, rgba(232, 198, 126, 0.025) 14px, rgba(232, 198, 126, 0.025) 15px),
    repeating-linear-gradient(-45deg, transparent, transparent 14px, rgba(232, 198, 126, 0.025) 14px, rgba(232, 198, 126, 0.025) 15px);
}

.card-back-ornament {
  position: absolute;
  width: 148px;
  height: 148px;
  border: 1px solid rgba(232, 198, 126, 0.22);
  transform: rotate(45deg);
  pointer-events: none;
}

.card-back-ornament::after {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(232, 198, 126, 0.14);
}

.card-back-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.card-back-emblem {
  font-size: 2rem;
  color: #f2d590;
  text-shadow: 0 0 18px rgba(232, 198, 126, 0.65);
  animation: intro-float 3.2s ease-in-out infinite;
}

.card-back-icon { font-size: 2.6rem; }

.card-back-text {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: #f3dfb0;
  letter-spacing: 0.28em;
  padding-left: 0.28em;
}

.card-back-sub {
  font-family: 'Cinzel', var(--font-serif);
  font-size: 0.66rem;
  letter-spacing: 0.34em;
  padding-left: 0.34em;
  color: rgba(232, 198, 126, 0.56);
}

/* --- Card Front (Clean Retina Canvas Stage — zero double-border clash) --- */
.card-front {
  transform: rotateY(180deg);
  background: #101117;
  position: relative;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.72),
    0 0 36px rgba(214, 174, 96, 0.14);
}

.card-front::before {
  display: none;
}

.card-front::after {
  display: none;
}

.card-canvas-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 14px;
  user-select: none;
  -webkit-user-drag: none;
}

/* Interactive 3D Metallic Foil Specular Sheen */
.card-foil-sheen {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
  z-index: 12;
  opacity: var(--sheen-opacity, 0);
  transition: opacity 0.35s ease;
  background:
    radial-gradient(
      circle at var(--sheen-x, 50%) var(--sheen-y, 35%),
      rgba(255, 246, 218, 0.28) 0%,
      rgba(236, 198, 120, 0.12) 26%,
      rgba(167, 139, 250, 0.06) 46%,
      transparent 68%
    ),
    linear-gradient(
      118deg,
      transparent 22%,
      rgba(255, 248, 224, 0.14) 46%,
      rgba(255, 255, 255, 0.22) 50%,
      rgba(232, 196, 118, 0.10) 54%,
      transparent 78%
    );
  mix-blend-mode: screen;
}

.card-tilt-surface {
  position: relative;
  transform-style: preserve-3d;
  transform: perspective(1200px) rotateX(var(--tilt-rx, 0deg)) rotateY(var(--tilt-ry, 0deg));
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.card-tilt-surface.is-tilting {
  transition: transform 0.08s ease-out;
}

.card-front-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 18px;
  position: relative;
  z-index: 1;
  background: linear-gradient(170deg, #0d0f1a 0%, #1a1530 40%, #0f1a20 100%);
  border-radius: 18px;
}

/* Card header */
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.card-beast-name {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold), #f0d48a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card-rarity-badge {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  padding: 3px 10px;
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(212,168,83,0.25), rgba(139,92,246,0.25));
  color: var(--gold);
  border: 1px solid rgba(212,168,83,0.3);
}

.card-beast-title {
  font-size: 0.78rem;
  color: var(--text-2);
  margin-bottom: 12px;
}

/* Beast illustration */
.card-illust {
  flex: 1;
  min-height: 100px;
  max-height: 160px;
  background: radial-gradient(ellipse at center, rgba(212,168,83,0.06) 0%, transparent 70%);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}

.card-illust::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(13,15,26,0.8), transparent);
  border-radius: 0 0 10px 10px;
}

/* Stats grid */
.card-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 10px;
}

.card-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 5px 8px;
  background: rgba(255,255,255,0.025);
  border-radius: 6px;
  font-size: 0.68rem;
}

.card-stat-label { color: var(--text-3); font-size: 0.62rem; }
.card-stat-bar {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.card-stat-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--violet));
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-stat-value {
  color: var(--gold);
  font-weight: 700;
  font-family: var(--font-serif);
  font-size: 0.8rem;
  align-self: flex-end;
}

/* Skills */
.card-skill {
  padding: 7px 10px;
  background: rgba(255,255,255,0.025);
  border-radius: 6px;
  border-left: 2px solid var(--gold);
  margin-bottom: 6px;
}

.card-skill-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 2px;
}

.card-skill-desc {
  font-size: 0.68rem;
  color: var(--text-2);
  line-height: 1.4;
}

/* Weakness */
.card-weakness {
  padding: 6px 10px;
  background: rgba(194,58,58,0.06);
  border-radius: 6px;
  border-left: 2px solid var(--crimson);
  margin-bottom: 8px;
}

.card-weakness-name {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--crimson);
  margin-bottom: 2px;
}

.card-weakness-desc {
  font-size: 0.68rem;
  color: var(--text-2);
  line-height: 1.4;
}

/* Flavor text */
.card-flavor {
  font-size: 0.68rem;
  font-style: italic;
  color: var(--text-3);
  text-align: center;
  padding-top: 6px;
  border-top: 1px solid var(--border);
  margin-top: auto;
  line-height: 1.5;
}

/* Lie count badge */
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 0.6rem;
  color: var(--text-3);
}

.card-lie-count {
  color: var(--crimson);
  font-weight: 600;
}

/* --- Reveal Actions --- */
.reveal-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease 0.5s;
}

.reveal-actions.show {
  opacity: 1;
  transform: translateY(0);
}

.btn-action {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.btn-action:active { transform: scale(0.95); }

.btn-share {
  background: var(--gold);
  color: #0a0a0f;
}

.btn-fusion {
  background: linear-gradient(135deg, rgba(139,92,246,0.3), rgba(91,106,191,0.3));
  border: 1px solid rgba(139,92,246,0.3);
  color: var(--violet);
}

.btn-retry {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-2);
}

/* ============================================================
   SCREEN 5: V2 FUSION CARD
   ============================================================ */
.screen-fusion {
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow-y: auto;
}

.fusion-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--violet), var(--indigo));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.fusion-subtitle {
  font-size: 0.85rem;
  color: var(--text-3);
  margin-bottom: 24px;
}

.fusion-cards {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.fusion-card-mini {
  width: 90px;
  height: 120px;
  border-radius: 10px;
  background: linear-gradient(170deg, #0d0f1a, #1a1530);
  border: 1px solid rgba(212,168,83,0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px;
  font-size: 0.65rem;
  color: var(--text-2);
}

.fusion-card-mini .mini-beast { font-size: 2rem; }
.fusion-card-mini .mini-name {
  font-family: var(--font-serif);
  font-size: 0.7rem;
  color: var(--gold);
}

.fusion-symbol {
  font-size: 1.5rem;
  color: var(--violet);
  animation: fusion-pulse 1.5s ease-in-out infinite;
}

@keyframes fusion-pulse {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
}

/* Fusion card front inner */
.fusion-card-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: linear-gradient(170deg, #0f0a1e 0%, #1e1040 40%, #0a0f20 100%);
  border-radius: 18px;
}

.fusion-relation-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--violet);
  background: rgba(139,92,246,0.15);
  padding: 3px 12px;
  border-radius: 20px;
  margin: 8px auto;
}

.fusion-section {
  padding: 8px 10px;
  background: rgba(255,255,255,0.025);
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 0.72rem;
  color: var(--text-2);
  line-height: 1.5;
}

.fusion-section-title {
  font-size: 0.65rem;
  color: var(--text-3);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ============================================================
   SCREEN 6: V3 SHADOW CARD
   ============================================================ */
.screen-shadow {
  align-items: center;
  justify-content: center;
  background: var(--bg);
  overflow-y: auto;
}

.shadow-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 8px;
}

.shadow-subtitle {
  font-size: 0.85rem;
  color: var(--text-3);
  margin-bottom: 24px;
}

.shadow-dual-cards {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.shadow-card-wrapper {
  width: min(326px, calc(100vw - 44px));
  aspect-ratio: 900 / 1280;
  height: auto;
  perspective: 1400px;
  margin: 0 auto;
}

.shadow-card-wrapper:first-child {
  width: min(326px, calc(100vw - 44px));
  aspect-ratio: auto;
  height: auto;
}

.shadow-vs {
  font-family: 'Cinzel', var(--font-serif);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: rgba(240, 134, 126, 0.85);
}

.shadow-light-card {
  position: static;
  transform: none;
  backface-visibility: visible;
  border-radius: 12px;
  padding: 10px 14px;
  background: rgba(20, 22, 30, 0.82);
  border: 1px solid rgba(232, 198, 126, 0.22);
  font-size: 0.78rem;
  color: var(--text-2);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  text-align: left;
  box-shadow: none;
}

.shadow-dark-back {
  background: radial-gradient(circle at 50% 38%, #261218 0%, #12090c 70%, #090507 100%) !important;
  border-color: rgba(212, 85, 80, 0.42) !important;
}

.shadow-dark-card {
  border-radius: 16px;
  padding: 0;
  background: #120c10;
  border: none;
  font-size: 0.75rem;
  color: var(--text-2);
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.76),
    0 0 36px rgba(212, 85, 80, 0.22);
}

.shadow-stat-gap {
  font-size: 0.6rem;
  font-weight: 600;
}
.shadow-stat-gap.positive { color: var(--jade); }
.shadow-stat-gap.negative { color: var(--crimson); }

/* ============================================================
   UTILITY ANIMATIONS
   ============================================================ */

/* Particles background for reveal */
.screen-reveal::before,
.screen-fusion::before,
.screen-shadow::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(212,168,83,0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(139,92,246,0.05) 0%, transparent 50%);
  animation: intro-aurora 10s ease-in-out infinite alternate;
}

/* ============================================================
   RESPONSIVE — larger screens: center in phone frame
   ============================================================ */
@media (min-width: 500px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #050508;
  }

  .screen {
    width: 390px;
    height: 844px;
    max-height: 95vh;
    border-radius: 40px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 0 80px rgba(0,0,0,0.5);
    overflow: hidden;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    position: absolute;
  }
}

/* ========== FUSION CARD ILLUSTRATION ========== */

.fusion-illust {
  position: relative;
  width: 100%;
  height: 140px;
  border-radius: 10px;
  overflow: hidden;
  margin: 6px 0;
  background: linear-gradient(135deg, #0a0515, #150a20);
}

.fusion-img {
  position: absolute;
  width: 70%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.fusion-img-left {
  left: 0;
  clip-path: polygon(0 0, 80% 0, 50% 100%, 0 100%);
}

.fusion-img-right {
  right: 0;
  clip-path: polygon(50% 0, 100% 0, 100% 100%, 20% 100%);
  mix-blend-mode: screen;
}

.fusion-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(139,92,246,0.35) 0%, transparent 70%);
  pointer-events: none;
  animation: fusionPulse 2s ease-in-out infinite;
}

@keyframes fusionPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ========== SHADOW CARD ILLUSTRATION ========== */

.shadow-illust {
  position: relative;
  width: 70px;
  height: 70px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.shadow-beast-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: hue-rotate(180deg) saturate(1.4) brightness(0.6) contrast(1.3);
}

.shadow-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(139,47,47,0.4) 0%, rgba(0,0,0,0.6) 80%);
  pointer-events: none;
}

/* ========== FUSION MINI CARDS with images ========== */

.fusion-card-mini {
  width: 90px;
  height: 120px;
  border-radius: 10px;
  background: linear-gradient(170deg, #0d0f1a, #1a1530);
  border: 1px solid rgba(212,168,83,0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px;
  overflow: hidden;
}

.mini-beast-img {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
}

/* ========== FRIEND SHADOW QUESTIONNAIRE ========== */

.shadow-q-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text-1);
  font-size: 0.8rem;
  font-family: var(--font-sans);
  resize: none;
  transition: border-color 0.3s;
}

.shadow-q-input:focus {
  outline: none;
  border-color: var(--crimson);
}

.shadow-q-input::placeholder {
  color: var(--text-3);
  font-style: italic;
}

.btn-shadow {
  background: linear-gradient(135deg, var(--crimson), #8b1a1a);
  color: white;
}

/* Share link toast */
.share-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(212,168,83,0.95);
  color: #0d0f1a;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 999;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.2s forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; transform: translateX(-50%) translateY(20px); }
}

/* ============================================================
   SCREEN 9: CABINET — 灵魂陈列柜
   ============================================================ */
.screen-cabinet {
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.cabinet-container {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 24px 16px;
  padding-top: calc(24px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(24px + var(--safe-bottom));
  min-height: 100vh;
}

/* --- Cabinet Header --- */
.cabinet-header {
  text-align: center;
  margin-bottom: 24px;
  animation: fadeSlideDown 0.6s ease;
}

@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

.cabinet-header-icon {
  font-size: 2.5rem;
  margin-bottom: 6px;
  animation: intro-float 3s ease-in-out infinite;
}

.cabinet-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--gold), #f0d48a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.cabinet-subtitle {
  font-size: 0.8rem;
  color: var(--text-3);
}

/* --- Cabinet Sections --- */
.cabinet-section {
  margin-bottom: 20px;
}

.cabinet-section-label {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  color: var(--text-3);
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: 0.15em;
}

.section-count {
  color: var(--gold);
  font-family: var(--font);
}

/* --- Main Card (in cabinet) --- */
.cabinet-main-card {
  width: 100%;
  max-width: 330px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: visible;
  position: relative;
  cursor: pointer;
  animation: fadeSlideUp 0.6s ease 0.2s both;
  box-shadow:
    0 22px 58px rgba(0, 0, 0, 0.7),
    0 0 32px rgba(214, 174, 96, 0.12);
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.cabinet-main-card::before {
  display: none;
}

.cabinet-main-card .card-front-inner {
  position: relative;
  z-index: 1;
}

/* --- Selection Narrative Box --- */
.cabinet-narrative {
  max-width: 320px;
  margin: 12px auto 0;
  padding: 14px 16px;
  background: rgba(212,168,83,0.05);
  border: 1px solid rgba(212,168,83,0.15);
  border-radius: var(--radius-sm);
  animation: fadeSlideUp 0.6s ease 0.4s both;
}

.narrative-label {
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 6px;
}

.narrative-text {
  font-size: 0.78rem;
  color: var(--text-2);
  line-height: 1.7;
  font-style: italic;
}

/* --- Card Scroll Row (shadows / fusions) --- */
.cabinet-card-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.cabinet-card-scroll::-webkit-scrollbar { display: none; }

/* --- Mini Card (shadow / fusion) --- */
.cabinet-mini-card {
  flex-shrink: 0;
  width: 160px;
  min-height: 220px;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeSlideUp 0.5s ease both;
}

.cabinet-mini-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.cabinet-mini-card:active {
  transform: scale(0.97);
}

/* Shadow mini card styling */
.cabinet-mini-card.shadow-type {
  background: linear-gradient(170deg, #1a0e0e, #1e1020);
  border: 1px solid rgba(194,58,58,0.25);
}

.cabinet-mini-card.shadow-type::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: radial-gradient(ellipse at 50% 20%, rgba(194,58,58,0.08) 0%, transparent 60%);
  pointer-events: none;
}

/* Fusion mini card styling */
.cabinet-mini-card.fusion-type {
  background: linear-gradient(170deg, #0e101a, #1a1530);
  border: 1px solid rgba(139,92,246,0.25);
}

.cabinet-mini-card.fusion-type::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: radial-gradient(ellipse at 50% 20%, rgba(139,92,246,0.08) 0%, transparent 60%);
  pointer-events: none;
}

/* Mini card inner layout */
.mini-card-inner {
  padding: 12px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  position: relative;
  z-index: 1;
}

.mini-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 2px;
  background: rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-card-name {
  font-family: var(--font-serif);
  font-size: 0.82rem;
  font-weight: 600;
}

.mini-card-name.shadow-name {
  color: var(--crimson);
}

.mini-card-name.fusion-name {
  color: var(--violet);
}

.mini-card-subtitle {
  font-size: 0.6rem;
  color: var(--text-3);
}

.mini-card-rarity {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border-radius: 4px;
}

.mini-card-rarity.shadow-rarity {
  color: var(--crimson);
  background: rgba(194,58,58,0.15);
}

.mini-card-rarity.fusion-rarity {
  color: var(--violet);
  background: rgba(139,92,246,0.15);
}

.mini-card-flavor {
  font-size: 0.58rem;
  color: var(--text-3);
  font-style: italic;
  line-height: 1.5;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

/* --- Empty State --- */
.cabinet-empty {
  width: 100%;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 0.75rem;
  text-align: center;
  line-height: 1.5;
}

.empty-icon {
  font-size: 1.5rem;
  opacity: 0.4;
}

/* --- Highlight Animation (for new cards) --- */
@keyframes highlightPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,168,83,0.4); }
  50% { box-shadow: 0 0 20px 6px rgba(212,168,83,0.3); }
}

.cabinet-mini-card.highlight {
  animation: highlightPulse 1.5s ease-in-out 3;
}

.cabinet-mini-card.shadow-type.highlight {
  animation: highlightPulseCrimson 1.5s ease-in-out 3;
}

@keyframes highlightPulseCrimson {
  0%, 100% { box-shadow: 0 0 0 0 rgba(194,58,58,0.4); }
  50% { box-shadow: 0 0 20px 6px rgba(194,58,58,0.3); }
}

.cabinet-mini-card.fusion-type.highlight {
  animation: highlightPulseViolet 1.5s ease-in-out 3;
}

@keyframes highlightPulseViolet {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139,92,246,0.4); }
  50% { box-shadow: 0 0 20px 6px rgba(139,92,246,0.3); }
}

/* --- Cabinet Actions --- */
.cabinet-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
  margin: 8px auto 0;
  animation: fadeSlideUp 0.6s ease 0.6s both;
}

/* --- "Send back to TA" button in social screens --- */
.btn-send-back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #0a0a0f;
  background: linear-gradient(135deg, var(--gold), #f0d48a);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s;
  margin-top: 8px;
}

.btn-send-back:active {
  transform: scale(0.97);
}

.btn-send-back-hint {
  font-size: 0.68rem;
  color: var(--text-3);
  text-align: center;
  margin-top: 6px;
  line-height: 1.5;
}

/* ========== APPRAISER PICKER (青铜玉牌三选一，修复未选中文字对比度) ========== */

.appraiser-picker {
  margin: 0;
  width: 100%;
}

.picker-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: rgba(232, 206, 152, 0.65);
  font-family: var(--font-serif);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
}

.picker-divider::before,
.picker-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 168, 83, 0.3), transparent);
}

.picker-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.picker-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 8px 13px;
  border-radius: 13px;
  color: #efe6d6;
  background: linear-gradient(180deg, rgba(26, 28, 42, 0.78) 0%, rgba(15, 16, 24, 0.88) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  cursor: pointer;
  transition: all 0.28s ease;
}

.picker-option:hover {
  background: linear-gradient(180deg, rgba(34, 36, 54, 0.85) 0%, rgba(18, 20, 30, 0.92) 100%);
  border-color: rgba(212, 168, 83, 0.34);
  transform: translateY(-1px);
}

.picker-option.active {
  background: linear-gradient(180deg, rgba(218, 174, 96, 0.16) 0%, rgba(24, 21, 16, 0.92) 100%);
  border-color: rgba(238, 200, 122, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 240, 198, 0.22), 0 6px 20px rgba(212, 168, 83, 0.16);
}

.picker-option.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  background: #f3d589;
  transform: rotate(45deg);
}

.picker-sigil {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1px;
}

.picker-sigil svg { width: 100%; height: 100%; }
.sigil-spicy { color: #ef8a64; }
.sigil-warm  { color: #f0ca78; }
.sigil-cold  { color: #96c7ec; }

.picker-name {
  font-family: var(--font-serif);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #f0e7d6;
}

.picker-desc {
  font-size: 0.66rem;
  color: rgba(224, 214, 196, 0.62);
  white-space: nowrap;
}

.picker-option.active .picker-name {
  color: #f6dc96;
}

.picker-option.active .picker-desc {
  color: rgba(242, 224, 180, 0.86);
}

/* ========== CHAT IMAGE UPLOAD ========== */

.chat-image-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(139,92,246,0.15);
  border: 1px solid rgba(139,92,246,0.3);
  color: var(--violet);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.chat-image-btn:hover {
  background: rgba(139,92,246,0.25);
  transform: scale(1.05);
}

@keyframes bounce-in {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.animate-bounce {
  animation: bounce-in 0.5s ease 3;
}

/* ========== HIDDEN BEAST UNLOCK ========== */

.unlock-banner {
  background: linear-gradient(135deg, rgba(255,215,0,0.1), rgba(255,140,0,0.05));
  border: 1px solid rgba(255,215,0,0.3);
  border-radius: 16px;
  padding: 16px;
  margin: 16px 0;
  text-align: center;
  animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(255,215,0,0.1); }
  50% { box-shadow: 0 0 25px rgba(255,215,0,0.3); }
}

.unlock-banner .unlock-emoji {
  font-size: 2rem;
  margin-bottom: 8px;
}

.unlock-banner .unlock-name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 4px;
}

.unlock-banner .unlock-msg {
  font-size: 0.78rem;
  color: var(--text-2);
  line-height: 1.5;
}

/* ============================================================
   VISUAL POLISH v2.2 — 活泼生动升级
   ============================================================ */

/* ===== 1. 全息光泽覆盖层 ===== */
.holo-shine {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 20%,
    rgba(255,255,255,0.07) 40%,
    rgba(212,175,55,0.15) 48%,
    rgba(139,92,246,0.12) 52%,
    rgba(46,184,134,0.08) 60%,
    transparent 80%,
    transparent 100%
  );
  background-size: 300% 300%;
  pointer-events: none;
  z-index: 20;
  opacity: 0;
  transition: opacity 0.4s;
  mix-blend-mode: overlay;
}

.card-front:hover .holo-shine {
  opacity: 1;
  animation: holo-sweep 2.5s ease-in-out infinite;
}

@keyframes holo-sweep {
  0% { background-position: 200% 0%; }
  100% { background-position: -100% 100%; }
}

/* ===== 2. 屏幕闪红 (抓包触发) ===== */
.screen-flash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
}

.screen-flash.flash-red {
  background: radial-gradient(circle at center, rgba(194,58,58,0.4), rgba(194,58,58,0.1));
  animation: flash-burst 0.6s ease-out forwards;
}

.screen-flash.flash-gold {
  background: radial-gradient(circle at center, rgba(212,175,55,0.5), rgba(212,175,55,0.05));
  animation: flash-burst 0.8s ease-out forwards;
}

.screen-flash.flash-rainbow {
  background: conic-gradient(from 0deg, rgba(212,175,55,0.3), rgba(139,92,246,0.3), rgba(46,184,134,0.3), rgba(212,175,55,0.3));
  animation: flash-burst 1.2s ease-out forwards;
}

@keyframes flash-burst {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

/* ===== 3. 粒子画布 (SSR揭示) ===== */
#particleCanvas {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
}

/* ===== 4. 稀有度专属颜色 ===== */
.rarity-N .rarity-text {
  background: linear-gradient(135deg, #8a8a8a, #b0b0b0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.rarity-R .rarity-text {
  background: linear-gradient(135deg, #4a9eff, #77bbff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.rarity-SR .rarity-text {
  background: linear-gradient(135deg, var(--gold), #f0d48a, var(--violet));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rarity-shimmer 2s ease-in-out infinite;
}

.rarity-SSR .rarity-text {
  background: linear-gradient(135deg, #ff6b6b, var(--gold), #00ff88, var(--violet), #ff6b6b);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: ssr-rainbow 3s linear infinite;
  font-size: 3rem;
  text-shadow: 0 0 30px rgba(212,175,55,0.5);
  filter: drop-shadow(0 0 15px rgba(212,175,55,0.3));
}

@keyframes ssr-rainbow {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

/* SSR 卡片环境金芒（不叠二次彩框） */
.card-ssr .card-front {
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.78),
    0 0 46px rgba(236, 192, 92, 0.26);
}

/* ===== 5. 卡片交互倾斜 ===== */
.card-wrapper.tiltable {
  transition: transform 0.1s ease-out;
}

/* ===== 6. 对话气泡 — 按鉴定师风格变色 ===== */
.chat-warm .msg-bot {
  background: rgba(255,180,50,0.06);
  border-color: rgba(255,180,50,0.12);
}

.chat-warm .chat-avatar-small {
  background: linear-gradient(135deg, rgba(255,180,50,0.2), rgba(255,120,50,0.2));
}

.chat-cold .msg-bot {
  background: rgba(100,180,255,0.06);
  border-color: rgba(100,180,255,0.12);
}

.chat-cold .chat-avatar-small {
  background: linear-gradient(135deg, rgba(100,180,255,0.2), rgba(200,220,255,0.2));
}

/* ===== 7. 抓包计数器悬浮 ===== */
.lie-counter {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  background: rgba(194,58,58,0.15);
  border: 1px solid rgba(194,58,58,0.3);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.72rem;
  color: var(--crimson);
  font-weight: 600;
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.lie-counter.visible {
  opacity: 1;
  transform: scale(1);
}

.lie-counter.bump {
  animation: counter-bump 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes counter-bump {
  0% { transform: scale(1); }
  40% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* ===== 8. 揭示仪式增强 ===== */
.reveal-ceremony {
  position: relative;
}

.reveal-ceremony::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300px;
  height: 300px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.08) 0%, transparent 70%);
  animation: reveal-pulse 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes reveal-pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
}

/* ===== 9. 陈列柜卡片 hover 浮起 ===== */
.mini-card-item {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.mini-card-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4), 0 0 15px rgba(212,175,55,0.1);
}

/* ===== 10. 社交按钮彩色脉冲 ===== */
.btn-fusion {
  position: relative;
  overflow: hidden;
}

.btn-fusion::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(139,92,246,0.4), rgba(46,184,134,0.4));
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s;
}

.btn-fusion:hover::after {
  opacity: 1;
  animation: btn-pulse 1.5s ease-in-out infinite;
}

@keyframes btn-pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.05); opacity: 1; }
}

/* ===== 11. 首页标题入场动画 ===== */
.intro-title {
  animation: title-glow 3s ease-in-out infinite alternate;
}

@keyframes title-glow {
  0% { text-shadow: 0 0 10px rgba(212,175,55,0.1); }
  100% { text-shadow: 0 0 30px rgba(212,175,55,0.3), 0 0 60px rgba(212,175,55,0.1); }
}

.intro-beast-icon {
  animation: beast-float 3s ease-in-out infinite;
}

@keyframes beast-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ===== 12. 属性条颜色变体 ===== */
.card-stat-bar-fill.bar-high {
  background: linear-gradient(90deg, var(--gold), #ff6b6b);
}

.card-stat-bar-fill.bar-mid {
  background: linear-gradient(90deg, var(--jade), var(--gold));
}

.card-stat-bar-fill.bar-low {
  background: linear-gradient(90deg, #5588aa, var(--jade));
}

/* ============================================================
   v3: SOUL TAGS — 视觉中间层标签
   ============================================================ */
.soul-tags {
  margin: 12px auto 0;
  max-width: 300px;
  font-size: 0.82rem;
  color: var(--text-2);
}

.soul-tags summary {
  cursor: pointer;
  text-align: center;
  padding: 8px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  list-style: none;
  transition: all 0.3s ease;
}

.soul-tags summary::-webkit-details-marker { display: none; }

.soul-tags summary:hover,
.soul-tags[open] summary {
  background: rgba(212,168,83,0.08);
  border-color: rgba(212,168,83,0.2);
}

.soul-tags .tag-detail {
  padding: 12px 16px;
  margin-top: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  animation: tag-reveal 0.3s ease;
}

.soul-tags .tag-detail p {
  margin-bottom: 8px;
  line-height: 1.5;
  font-size: 0.78rem;
  color: var(--text-2);
}

.soul-tags .tag-detail p:last-child {
  margin-bottom: 0;
}

.soul-tags .tag-detail b {
  color: var(--gold);
  font-weight: 600;
}

@keyframes tag-reveal {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   v4: 全尺寸高清图卡灯箱预览
   ============================================================ */
.card-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.card-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.card-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 7, 11, 0.86);
  backdrop-filter: blur(14px);
}

.card-modal-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px;
  max-width: 94vw;
}

.card-modal-stage {
  width: min(350px, 86vw);
  aspect-ratio: 900 / 1280;
  border-radius: 16px;
  position: relative;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.85),
    0 0 42px rgba(214, 174, 96, 0.2);
}

.card-modal-actions {
  display: flex;
  gap: 10px;
}

/* v4: 重测模式切换（忠实觉醒 vs 探索新兽）& 融合来源标签 */
.draw-mode-picker {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 10px 0 14px;
}

.draw-mode-btn {
  flex: 1;
  padding: 8px 10px;
  font-size: 0.72rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--text-2);
  transition: all 0.25s ease;
}

.draw-mode-btn.active {
  background: rgba(212, 168, 83, 0.14);
  border-color: rgba(212, 168, 83, 0.45);
  color: var(--gold);
  font-weight: 600;
}

.fusion-meta-pill {
  display: inline-block;
  margin: 0 auto 14px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.74rem;
  color: #ebd49a;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(212, 168, 83, 0.32);
  letter-spacing: 0.03em;
}

.unlock-banner .btn-summon-hidden {
  margin-top: 12px;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #0d0c0f;
  background: linear-gradient(135deg, #f5d88c, #d4a448);
  cursor: pointer;
}

/* ============================================================
   v4.5: 四大新玩法样式（天时异相 / 血脉家谱树 / 全服图鉴墙 / 山海斗兽台）
   ============================================================ */

/* 1. 时辰 / 节气天时胶囊 */
.celestial-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  margin-bottom: 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #e9d9b4;
  background: rgba(20, 22, 34, 0.82);
  border: 1px solid rgba(212, 168, 83, 0.32);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.celestial-pill.anomaly-active {
  color: #fff3d6;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.24), rgba(212, 168, 83, 0.22));
  border-color: rgba(236, 198, 120, 0.65);
  box-shadow: 0 0 18px rgba(167, 139, 250, 0.28);
}

.celestial-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

.btn-codex-intro {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 13px;
  font-family: var(--font-serif);
  font-size: 0.84rem;
  letter-spacing: 0.05em;
  color: #e8d5a8;
  background: rgba(18, 20, 32, 0.74);
  border: 1px solid rgba(216, 178, 99, 0.34);
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-codex-intro:hover {
  background: rgba(212, 168, 83, 0.14);
  border-color: rgba(238, 200, 122, 0.62);
}

.btn-codex-icon {
  width: 17px;
  height: 17px;
  color: #e6c274;
  flex-shrink: 0;
}

.btn-codex-meta {
  font-family: var(--font);
  font-size: 0.7rem;
  color: rgba(232, 206, 152, 0.62);
  margin-left: 2px;
}

/* 陈列柜新增玩法按钮风格 */
.btn-lineage {
  background: linear-gradient(135deg, rgba(56, 168, 136, 0.18), rgba(28, 92, 76, 0.22));
  border: 1px solid rgba(94, 214, 174, 0.34);
  color: #a6ebd0;
}

.btn-battle {
  background: linear-gradient(135deg, rgba(196, 68, 68, 0.22), rgba(112, 34, 48, 0.24));
  border: 1px solid rgba(232, 108, 96, 0.38);
  color: #ffb8b0;
}

.btn-codex {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.20), rgba(76, 54, 148, 0.24));
  border: 1px solid rgba(167, 139, 250, 0.38);
  color: #dcd0ff;
}

.mini-duel-chip {
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 600;
  color: #ffd0c8;
  background: rgba(194, 58, 58, 0.28);
  border: 1px solid rgba(232, 104, 92, 0.48);
  cursor: pointer;
}

.mini-duel-chip:hover {
  background: rgba(212, 72, 72, 0.45);
}

/* 全服首发现冠名条 */
.discoverer-claim-bar {
  width: 100%;
  max-width: 340px;
  margin: 0 auto 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(212, 168, 83, 0.16), rgba(139, 92, 246, 0.14));
  border: 1px solid rgba(236, 198, 120, 0.45);
}

.discoverer-claim-title {
  font-size: 0.76rem;
  font-weight: 600;
  color: #f6dc9b;
  margin-bottom: 8px;
  text-align: center;
}

.discoverer-claim-row {
  display: flex;
  gap: 8px;
}

.discoverer-input,
.feature-input,
.feature-select {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 9px 11px;
  border-radius: 9px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #f3eee4;
  background: rgba(12, 13, 20, 0.88);
  border: 1px solid rgba(212, 168, 83, 0.3);
  outline: none;
  box-sizing: border-box;
}

.feature-select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23e8c67e' d='M2.2 4.2 6 8l3.8-3.8-.9-.9L6 6.2 3.1 3.3z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  text-overflow: ellipsis;
}

.discoverer-input:focus,
.feature-input:focus,
.feature-select:focus {
  border-color: rgba(236, 198, 120, 0.65);
}

.btn-discoverer-save,
.btn-feature-primary {
  padding: 8px 14px;
  border-radius: 9px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #100f14;
  background: linear-gradient(135deg, #f3d589, #cf9d42);
  cursor: pointer;
  white-space: nowrap;
}

/* 通用暗金玩法弹窗容器 */
.feature-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease;
}

.feature-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.feature-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 7, 12, 0.84);
  backdrop-filter: blur(12px);
}

.feature-modal-panel {
  position: relative;
  z-index: 1;
  width: min(460px, 95vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(175deg, #161722 0%, #0f1018 100%);
  border: 1px solid rgba(212, 168, 83, 0.34);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.8), 0 0 32px rgba(212, 168, 83, 0.12);
  overflow-y: auto;
}

.feature-modal-wide {
  width: min(560px, 96vw);
}

.feature-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.feature-modal-title {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  color: #f3d794;
}

.feature-modal-sub {
  font-size: 0.78rem;
  line-height: 1.5;
  color: #cbc4d8;
  margin-top: 4px;
}

.feature-modal-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
  font-size: 0.85rem;
  cursor: pointer;
}

.feature-tab {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  color: #d6cfe2;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
}

.feature-tab.active {
  color: #f5d88c;
  background: rgba(212, 168, 83, 0.16);
  border-color: rgba(212, 168, 83, 0.5);
  font-weight: 600;
}

/* 2. 血脉家谱树 */
.lineage-branch-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lineage-stat-chip {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  color: #bcead6;
  background: rgba(46, 184, 134, 0.12);
  border: 1px solid rgba(46, 184, 134, 0.28);
}

.lineage-tree-scroll {
  max-height: 300px;
  overflow-y: auto;
  padding: 6px 2px;
}

.lineage-node-wrap {
  position: relative;
}

.lineage-children {
  margin-left: 18px;
  padding-left: 12px;
  border-left: 1px dashed rgba(212, 168, 83, 0.34);
}

.lineage-node {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
}

.lineage-node:hover {
  border-color: rgba(212, 168, 83, 0.45);
  background: rgba(212, 168, 83, 0.07);
}

.lineage-node.is-current {
  border-color: rgba(243, 213, 137, 0.78);
  background: linear-gradient(135deg, rgba(212, 168, 83, 0.16), rgba(46, 184, 134, 0.10));
  box-shadow: 0 0 18px rgba(212, 168, 83, 0.16);
}

.lineage-avatar {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(212, 168, 83, 0.28);
}

.lineage-node-info {
  flex: 1;
  min-width: 0;
}

.lineage-node-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.lineage-gen-tag {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  color: #100f14;
  background: #e6c274;
}

.lineage-node-name {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: #f8f2e6;
}

.lineage-node-meta {
  font-size: 0.66rem;
  color: var(--text-3);
  margin-top: 2px;
}

.lineage-inherit-box {
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lineage-inherit-label {
  font-size: 0.72rem;
  color: var(--text-2);
}

.affinity-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.affinity-pill {
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 0.7rem;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  cursor: pointer;
}

.affinity-pill.active {
  color: #9ff0cc;
  background: rgba(46, 184, 134, 0.18);
  border-color: rgba(74, 212, 158, 0.58);
  font-weight: 600;
}

.lineage-inherit-row {
  display: flex;
  gap: 8px;
}

/* 3. 山海异闻图鉴墙 */
.codex-progress-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.codex-progress-fill {
  height: 100%;
  width: 4%;
  border-radius: 999px;
  background: linear-gradient(90deg, #9b7bf0, #f0c975);
  transition: width 0.4s ease;
}

.codex-previewer {
  padding: 12px;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.22);
}

.codex-previewer-title {
  font-size: 0.73rem;
  color: #d8c6ff;
  margin-bottom: 8px;
  font-weight: 600;
}

.codex-previewer-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.codex-cross {
  color: var(--gold);
  font-weight: 700;
}

.codex-preview-result {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.72rem;
  line-height: 1.55;
  color: #ece6da;
  background: rgba(10, 11, 18, 0.7);
  border: 1px solid rgba(212, 168, 83, 0.24);
}

.codex-filter-tabs,
.battle-mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.codex-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.codex-card {
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(212, 168, 83, 0.22);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.codex-card.undiscovered {
  border-color: rgba(255, 255, 255, 0.08);
  opacity: 0.78;
}

.codex-card-art {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 9px;
  overflow: hidden;
  background: #121318;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.codex-card-art img.single-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.codex-dual-thumb {
  display: flex;
  width: 100%;
  height: 100%;
}

.codex-dual-thumb img {
  width: 50%;
  height: 100%;
  object-fit: cover;
}

.codex-card.undiscovered .codex-card-art img {
  filter: brightness(0.28) saturate(0.2) blur(1px);
}

.codex-lock-tag {
  position: absolute;
  bottom: 6px;
  right: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.6rem;
  color: #f3d794;
  background: rgba(12, 13, 20, 0.85);
  border: 1px solid rgba(212, 168, 83, 0.35);
}

.codex-card-name {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  color: #f7ebd2;
}

.codex-card-title {
  font-size: 0.66rem;
  color: var(--text-3);
  line-height: 1.4;
}

.codex-discoverer-badge {
  margin-top: auto;
  padding: 4px 7px;
  border-radius: 6px;
  font-size: 0.63rem;
  color: #f4d68c;
  background: rgba(212, 168, 83, 0.1);
  border: 1px solid rgba(212, 168, 83, 0.24);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.codex-claim-btn {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.6rem;
  color: #100f14;
  background: #ecc774;
  cursor: pointer;
}

/* 4. 山海斗兽台 */
.battle-picker-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.battle-opponent-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.battle-chip {
  padding: 6px 10px;
  border-radius: 9px;
  font-size: 0.72rem;
  color: #f2e8da;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.battle-chip.active {
  border-color: rgba(236, 114, 102, 0.65);
  background: rgba(196, 62, 62, 0.22);
  color: #ffd3cc;
}

.battle-arena {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 0%, rgba(186, 56, 56, 0.16), rgba(14, 15, 22, 0.92) 70%);
  border: 1px solid rgba(212, 168, 83, 0.28);
}

.battle-fighters {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.battle-fighter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
  padding: 8px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.battle-fighter.winner {
  border-color: rgba(243, 213, 137, 0.78);
  box-shadow: 0 0 20px rgba(243, 213, 137, 0.2);
}

.battle-fighter img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid rgba(212, 168, 83, 0.34);
}

.battle-fighter-name {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  color: #fbf4e6;
}

.battle-fighter-power {
  font-size: 0.68rem;
  color: #f0ca78;
}

.battle-vs-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.battle-vs-badge {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 800;
  color: #f2786e;
  text-shadow: 0 0 12px rgba(242, 120, 110, 0.6);
}

.battle-chem-pill {
  font-size: 0.62rem;
  padding: 2px 7px;
  border-radius: 999px;
  color: #f3d794;
  background: rgba(212, 168, 83, 0.14);
  border: 1px solid rgba(212, 168, 83, 0.32);
  text-align: center;
}

.battle-power-bar {
  display: flex;
  height: 20px;
  border-radius: 999px;
  overflow: hidden;
  font-size: 0.66rem;
  font-weight: 700;
}

.battle-bar-a {
  background: linear-gradient(90deg, #c9973c, #f2d282);
  color: #100f14;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.55s ease;
}

.battle-bar-b {
  background: linear-gradient(90deg, #b83b45, #df6b62);
  color: #fff6f4;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.55s ease;
}

.battle-rounds {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.battle-round-card {
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(10, 11, 18, 0.72);
  border-left: 3px solid var(--gold);
  font-size: 0.73rem;
  line-height: 1.55;
  color: #eae4d8;
  animation: fadeSlideUp 0.4s ease both;
}

.battle-round-card.tone-crimson { border-left-color: #df6b62; }
.battle-round-card.tone-violet  { border-left-color: #a78bfa; }

.battle-round-title {
  font-weight: 700;
  color: #f3d589;
  margin-bottom: 3px;
  font-size: 0.72rem;
}

.battle-verdict {
  padding: 10px 12px;
  border-radius: 10px;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 0.82rem;
  color: #fae3ab;
  background: rgba(212, 168, 83, 0.12);
  border: 1px solid rgba(212, 168, 83, 0.34);
}

/* ============================================================
   v5: 主线清爽收口 + 交互式三回合斗兽台 + 灵境蜕变台
   ============================================================ */

.cabinet-status-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #efe6d4;
  background: rgba(20, 22, 34, 0.82);
  border: 1px solid rgba(212, 168, 83, 0.28);
}

.status-chip.chip-fire {
  color: #ffcf86;
  border-color: rgba(244, 150, 74, 0.45);
  background: rgba(244, 120, 54, 0.14);
}

.status-chip.chip-tier {
  color: #f4d68c;
  border-color: rgba(212, 168, 83, 0.48);
  background: rgba(212, 168, 83, 0.14);
}

.cabinet-art-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  margin-bottom: 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  color: #fae2a6;
  background: linear-gradient(135deg, rgba(212, 168, 83, 0.16), rgba(139, 92, 246, 0.16));
  border: 1px solid rgba(212, 168, 83, 0.42);
}

.art-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(246, 212, 134, 0.28);
  border-top-color: #f6d486;
  animation: spin 0.9s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.cabinet-mainline-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin: 14px 0 10px;
}

.mainline-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 15px;
  border-radius: 15px;
  text-align: left;
  cursor: pointer;
  border: 1px solid rgba(212, 168, 83, 0.28);
  background: rgba(18, 20, 30, 0.86);
  color: #f5efe2;
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.mainline-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(240, 204, 122, 0.56);
}

.mainline-btn:active {
  transform: scale(0.985);
}

.mainline-battle {
  background: linear-gradient(135deg, rgba(218, 168, 72, 0.22), rgba(184, 72, 62, 0.22));
  border-color: rgba(236, 186, 92, 0.52);
  box-shadow: 0 8px 22px rgba(212, 168, 83, 0.14);
}

.mainline-evolve {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(46, 184, 134, 0.14));
  border-color: rgba(167, 139, 250, 0.42);
}

.mainline-social {
  background: linear-gradient(135deg, rgba(46, 184, 134, 0.14), rgba(190, 74, 88, 0.16));
  border-color: rgba(114, 219, 180, 0.34);
}

.mainline-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: rgba(10, 12, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.mainline-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.mainline-title {
  font-family: var(--font-serif);
  font-size: 0.96rem;
  font-weight: 700;
  color: #fbf4e6;
}

.mainline-sub {
  font-size: 0.72rem;
  color: rgba(230, 222, 208, 0.72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mainline-arrow {
  font-size: 1.35rem;
  color: rgba(240, 208, 134, 0.72);
  line-height: 1;
}

.cabinet-util-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.cabinet-util-btn {
  padding: 9px 6px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(18, 20, 30, 0.6);
  color: #d6cec0;
  font-size: 0.74rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.cabinet-util-btn:hover {
  border-color: rgba(212, 168, 83, 0.42);
  color: #f6df9d;
}

/* 灵境蜕变弹窗 */
.evo-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.enhance-tier-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.enhance-tier-node {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 2px;
  padding: 10px 6px;
  border-radius: 12px;
  text-align: center;
  background: rgba(12, 14, 22, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #b7b2a8;
  font-size: 0.69rem;
}

.enhance-tier-node .tier-lv {
  font-size: 0.68rem;
  font-weight: 700;
  color: #f3d285;
  letter-spacing: 0.04em;
}

.enhance-tier-node strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.8rem;
  color: #ece4d6;
  margin-bottom: 2px;
  white-space: nowrap;
}

.guest-card-banner {
  padding: 7px 10px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(167, 139, 250, 0.42);
  color: #e6dcff;
  font-size: 0.74rem;
  font-weight: 600;
}

.enhance-tier-node.done {
  border-color: rgba(78, 201, 155, 0.5);
  background: rgba(46, 184, 134, 0.12);
  color: #9cead0;
}

.enhance-tier-node.next {
  border-color: rgba(236, 186, 92, 0.72);
  background: rgba(212, 168, 83, 0.16);
  color: #fae0a0;
  box-shadow: 0 0 18px rgba(212, 168, 83, 0.16);
}

.enhance-preview-box {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(12, 14, 22, 0.78);
  border: 1px solid rgba(212, 168, 83, 0.26);
  font-size: 0.76rem;
  line-height: 1.6;
  color: #e6dfd1;
}

.enhance-preview-box .preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  color: #f6d98c;
  font-weight: 700;
}

.enhance-cta-row {
  display: flex;
  gap: 8px;
}

.enhance-cta-row button {
  flex: 1;
  padding: 12px 14px;
  font-size: 0.86rem;
}

.lineage-section-head {
  font-size: 0.72rem;
  color: #c8beac;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.affinity-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.surpass-tag {
  font-size: 0.62rem;
  padding: 1px 6px;
  border-radius: 999px;
  color: #15110a;
  background: linear-gradient(90deg, #f7d682, #f29d52);
  font-weight: 700;
}

/* 拉好友玩弹窗 */
.social-hub-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-hub-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  border: 1px solid rgba(212, 168, 83, 0.3);
  background: rgba(16, 18, 28, 0.88);
  color: #f5eee0;
  transition: transform 0.16s ease, border-color 0.2s ease;
}

.social-hub-card:hover {
  transform: translateY(-1px);
  border-color: rgba(242, 206, 120, 0.6);
}

.social-hub-fusion {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(212, 168, 83, 0.16));
}

.social-hub-shadow {
  background: linear-gradient(135deg, rgba(186, 60, 68, 0.22), rgba(26, 22, 34, 0.88));
}

.social-hub-icon {
  font-size: 1.55rem;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  flex-shrink: 0;
}

.social-hub-text strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.94rem;
  margin-bottom: 3px;
  color: #fbf3e2;
}

.social-hub-text small {
  display: block;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #c7bfb0;
}

/* 交互式三回合斗兽台 */
.battle-round-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.battle-round-pill {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  font-weight: 700;
  color: #f7db92;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(212, 168, 83, 0.16);
  border: 1px solid rgba(212, 168, 83, 0.4);
}

.battle-switch-btn {
  font-size: 0.68rem;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: #ccc5b8;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.battle-fighters-live {
  position: relative;
}

.battle-fighter {
  position: relative;
  transition: transform 0.22s ease, box-shadow 0.25s ease;
}

.battle-fighter.anim-lunge-right {
  animation: lungeRight 0.38s ease;
}

.battle-fighter.anim-lunge-left {
  animation: lungeLeft 0.38s ease;
}

.battle-fighter.anim-hit {
  animation: hitShake 0.42s ease;
  box-shadow: 0 0 22px rgba(242, 92, 84, 0.55) !important;
}

@keyframes lungeRight {
  0%, 100% { transform: translateX(0); }
  45% { transform: translateX(16px) scale(1.04); }
}

@keyframes lungeLeft {
  0%, 100% { transform: translateX(0); }
  45% { transform: translateX(-16px) scale(1.04); }
}

@keyframes hitShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  45% { transform: translateX(7px); }
  70% { transform: translateX(-4px); }
}

.battle-hp-wrap, .battle-rage-wrap {
  width: 100%;
  margin-top: 4px;
}

.battle-meter-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.62rem;
  color: #cec7b8;
  margin-bottom: 2px;
}

.battle-meter-track {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.battle-hp-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #34d399, #a3e635);
  transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.battle-hp-fill.hp-mid {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.battle-hp-fill.hp-low {
  background: linear-gradient(90deg, #dc2626, #f87171);
}

.battle-rage-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #a855f7, #f59e0b);
  transition: width 0.45s ease;
}

.battle-rage-fill.rage-ready {
  background: linear-gradient(90deg, #f59e0b, #fde047);
  box-shadow: 0 0 10px rgba(253, 224, 71, 0.75);
}

.battle-dmg-pop {
  position: absolute;
  top: -10px;
  right: 6px;
  padding: 2px 7px;
  border-radius: 8px;
  font-size: 0.66rem;
  font-weight: 800;
  color: #fff;
  background: rgba(220, 56, 56, 0.94);
  box-shadow: 0 4px 12px rgba(220, 56, 56, 0.5);
  z-index: 4;
  animation: dmgFloat 0.6s ease both;
}

.battle-dmg-pop.pop-heal {
  background: rgba(34, 168, 120, 0.92);
}

@keyframes dmgFloat {
  0% { opacity: 0; transform: translateY(8px) scale(0.8); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.battle-shout {
  margin-top: 5px;
  font-size: 0.64rem;
  line-height: 1.35;
  color: #f4dfad;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 4px 6px;
  text-align: center;
}

.battle-telegraph {
  padding: 9px 11px;
  border-radius: 11px;
  background: rgba(240, 184, 76, 0.1);
  border: 1px solid rgba(240, 184, 76, 0.34);
  font-size: 0.74rem;
  line-height: 1.5;
  color: #fae5b2;
}

.battle-telegraph small {
  display: block;
  margin-top: 3px;
  font-size: 0.67rem;
  color: #c8beac;
}

.battle-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.battle-triangle-tip {
  text-align: center;
  font-size: 0.66rem;
  color: #b7b0a4;
}

.battle-move-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.battle-move-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 6px;
  border-radius: 12px;
  border: 1px solid rgba(212, 168, 83, 0.34);
  background: rgba(18, 20, 32, 0.92);
  color: #f7f0e2;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.2s ease, background 0.2s ease;
}

.battle-move-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(246, 206, 114, 0.72);
}

.battle-move-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.battle-move-btn.move-strike { border-color: rgba(246, 186, 78, 0.48); background: linear-gradient(180deg, rgba(212,150,48,0.18), rgba(18,20,32,0.92)); }
.battle-move-btn.move-pierce { border-color: rgba(242, 110, 110, 0.48); background: linear-gradient(180deg, rgba(196,62,62,0.18), rgba(18,20,32,0.92)); }
.battle-move-btn.move-guard  { border-color: rgba(94, 186, 240, 0.48); background: linear-gradient(180deg, rgba(58,132,196,0.18), rgba(18,20,32,0.92)); }

.move-head {
  font-size: 0.76rem;
  font-weight: 700;
}

.move-detail {
  font-size: 0.62rem;
  color: #bfb7a8;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-ultimate-btn {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  font-family: var(--font-serif);
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(24, 24, 34, 0.72);
  color: #8f897f;
  cursor: not-allowed;
  transition: all 0.25s ease;
}

.battle-ultimate-btn.ready {
  cursor: pointer;
  color: #161006;
  border-color: rgba(255, 240, 190, 0.82);
  background: linear-gradient(90deg, #f6d476, #f09e42, #f6d476);
  box-shadow: 0 6px 22px rgba(240, 174, 68, 0.45);
  animation: ultPulse 1.6s ease-in-out infinite;
}

@keyframes ultPulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(240, 174, 68, 0.42); }
  50% { box-shadow: 0 6px 32px rgba(255, 212, 102, 0.85); }
}

.battle-finish-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.battle-reward-box {
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(244, 134, 58, 0.14);
  border: 1px solid rgba(244, 162, 78, 0.42);
  text-align: center;
  font-size: 0.76rem;
  color: #ffd99c;
  line-height: 1.5;
}

.battle-finish-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.battle-rematch-btn {
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #ece4d6;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

/* ============================================================
   v5.5: 社畜×山海 二期裂变（五行罗盘 / 3秒帮顶班甩锅 / 15秒标签拆台 / 挑衅书）
   ============================================================ */

.five-elem-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 14px;
  width: fit-content;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: rgba(16, 18, 28, 0.78);
  border: 1px solid rgba(212, 168, 83, 0.28);
  cursor: pointer;
}

.five-elem-label {
  font-size: 0.68rem;
  color: #bfb7a7;
  margin-right: 2px;
}

.elem-orb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.elem-orb.lit {
  color: #13110c;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.6);
}

.five-elem-count {
  font-size: 0.68rem;
  color: #f4d68c;
  font-weight: 600;
  margin-left: 2px;
}

.enhance-assist-box {
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(139, 92, 246, 0.11);
  border: 1px solid rgba(167, 139, 250, 0.34);
  font-size: 0.73rem;
  color: #e4dbf6;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.enhance-assist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 600;
}

.enhance-assist-btn {
  padding: 7px 11px;
  border-radius: 9px;
  border: 1px solid rgba(240, 198, 114, 0.45);
  background: rgba(212, 168, 83, 0.14);
  color: #fae0a0;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.social-hub-assist {
  background: linear-gradient(135deg, rgba(244, 150, 74, 0.2), rgba(212, 168, 83, 0.16));
}

.battle-provoke-btn {
  width: 100%;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid rgba(242, 110, 110, 0.5);
  background: linear-gradient(135deg, rgba(204, 62, 72, 0.28), rgba(212, 146, 54, 0.24));
  color: #ffdfcc;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

/* 邀请页与15秒拆台页：不透明深色全屏底，彻底杜绝底层首页透字 */
.screen-invite,
.screen-friend-shadow {
  background: radial-gradient(ellipse at top, #171528 0%, #0b0c14 55%, #07080d 100%);
  overflow-y: auto;
}

.screen-invite .reveal-container {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 18px 36px;
}

.screen-invite #inviteTitle {
  font-size: 1.22rem;
  line-height: 1.42;
  text-wrap: balance;
}

/* 3秒帮顶班护法 / 趁机甩锅落地页 */
.invite-assist-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 360px;
  margin: 0 auto 14px;
  padding: 13px;
  border-radius: 14px;
  background: rgba(18, 20, 32, 0.96);
  border: 1px solid rgba(212, 168, 83, 0.42);
  text-align: left;
}

.assist-field-label {
  font-size: 0.72rem;
  color: #d7cfb8;
  font-weight: 600;
  margin-top: 2px;
}

.screen-invite.is-assist-mode #btnInviteTest {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #dcd5c8;
  box-shadow: none;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 11px 16px;
}

.screen-invite.is-assist-mode .assist-boost {
  box-shadow: 0 6px 18px rgba(42, 168, 126, 0.28);
}

.screen-invite.is-assist-mode .assist-sabotage {
  box-shadow: 0 6px 18px rgba(208, 56, 66, 0.28);
}

.invite-assist-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.assist-btn {
  padding: 10px 8px;
  border-radius: 11px;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  cursor: pointer;
  color: #fff6e8;
}

.assist-btn small {
  display: block;
  margin-top: 2px;
  font-size: 0.62rem;
  font-weight: 400;
  opacity: 0.86;
}

.assist-boost {
  border: 1px solid rgba(78, 201, 155, 0.56);
  background: linear-gradient(135deg, rgba(42, 168, 126, 0.32), rgba(24, 92, 76, 0.45));
}

.assist-sabotage {
  border: 1px solid rgba(240, 96, 102, 0.6);
  background: linear-gradient(135deg, rgba(208, 56, 66, 0.36), rgba(112, 24, 34, 0.5));
}

.invite-assist-result {
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 0.74rem;
  line-height: 1.5;
  color: #fae2a6;
  background: rgba(212, 168, 83, 0.14);
  border: 1px solid rgba(212, 168, 83, 0.36);
}

/* 15秒极速标签拆台 */
.roast-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  width: 100%;
  max-width: 356px;
  margin: 0 auto;
}

.roast-label {
  display: block;
  color: var(--gold);
  font-size: 0.76rem;
  font-weight: 600;
  margin-bottom: 7px;
}

.roast-tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.roast-tag-btn {
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 0.72rem;
  line-height: 1.3;
  color: #ddd6c8;
  background: rgba(18, 20, 32, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
  transition: all 0.16s ease;
}

.roast-tag-btn.active {
  color: #fff6e8;
  border-color: rgba(242, 110, 110, 0.78);
  background: rgba(206, 58, 68, 0.28);
  box-shadow: 0 0 12px rgba(226, 78, 88, 0.25);
}

/* 补齐邀请页 / 15秒拆台页 .btn-gold 统一鎏金高定按钮质感 */
.btn-gold {
  width: 100%;
  padding: 13px 18px;
  border-radius: 13px;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #161108;
  background: linear-gradient(180deg, #f6dc96 0%, #dca94c 58%, #be862b 100%);
  border: 1px solid rgba(255, 242, 204, 0.56);
  box-shadow: 0 8px 22px rgba(212, 168, 83, 0.28);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.2s ease;
}

.btn-gold:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(212, 168, 83, 0.42);
}

.btn-gold:active {
  transform: scale(0.985);
}
