/* WordClash · 单词大作战 玩具盲盒街机风样式表（全息闪卡镀膜 + 375px 零溢出 + 180° 同屏双打） */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg-sky: #F0F7FF;
  --bg-card: #FFFFFF;
  --ink: #1E293B;
  --muted: #64748B;
  --border: #CBD5E1;
  --primary: #3B82F6;
  --primary-dark: #1D4ED8;
  --warn: #F59E0B;
  --warn-dark: #B45309;
  --success: #10B981;
  --success-dark: #047857;
  --danger: #EF4444;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  background: linear-gradient(180deg, #E0F2FE 0%, #F5F3FF 55%, #FFFBEB 100%);
  min-height: 100vh;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  user-select: none;
}

.hidden {
  display: none !important;
}

/* ==================== 顶部导航栏 ==================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid #E2E8F0;
  padding: 8px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-logo {
  font-size: 22px;
}

.brand-title {
  font-size: 15px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.15;
}

.brand-sub {
  font-size: 11px;
  color: #D97706;
  font-weight: 700;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.pill-btn {
  border: 2px solid #CBD5E1;
  background: #FFFFFF;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.1s;
}

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

.tier-toggle {
  background: #ECFDF5;
  border-color: #34D399;
  color: #065F46;
}

.tier-toggle.explorer {
  background: #EEF2FF;
  border-color: #818CF8;
  color: #3730A3;
}

.code-btn {
  background: #FFFBEB;
  border-color: #FBBF24;
  color: #92400E;
}

.stat-chip {
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
  border-radius: 999px;
  background: #FEF3C7;
  color: #92400E;
  border: 2px solid #FCD34D;
}

.icon-btn {
  border: 2px solid #E2E8F0;
  background: #FFFFFF;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* ==================== 主体与底部导航 ==================== */
.main-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 12px 12px 86px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 45;
  background: #FFFFFF;
  border-top: 2px solid #E2E8F0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
}

.nav-item {
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  font-weight: 700;
  color: #64748B;
  cursor: pointer;
  padding: 4px 2px;
  border-radius: 10px;
  position: relative;
}

.nav-item .nav-ico {
  font-size: 20px;
}

.nav-item.active {
  color: #1D4ED8;
  background: #EFF6FF;
}

.badge-dot {
  font-style: normal;
  background: #EF4444;
  color: #FFFFFF;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 99px;
}

/* ==================== 拆闪卡台 ==================== */
.hero-banner {
  background: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
  color: #FFFFFF;
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.22);
}

.hero-text h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.hero-text p {
  margin: 4px 0 0;
  font-size: 12px;
  opacity: 0.92;
}

.collection-mini {
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.pack-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}

@media (min-width: 640px) {
  .pack-selector {
    grid-template-columns: repeat(4, 1fr);
  }
}

.pack-tab-card {
  background: #FFFFFF;
  border: 2.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

.pack-tab-card.active {
  border-color: #3B82F6;
  background: #EFF6FF;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(59, 130, 246, 0.16);
}

.pack-tab-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 20px;
}

.lock-pill {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 99px;
  background: #FEF3C7;
  color: #92400E;
  font-weight: 700;
}

.pack-tab-name {
  font-size: 13px;
  font-weight: 800;
  margin-top: 4px;
  color: #0F172A;
}

.pack-tab-desc {
  font-size: 11px;
  color: #64748B;
  margin-top: 2px;
  line-height: 1.3;
}

.pack-stage-card {
  margin-top: 14px;
  background: #FFFFFF;
  border: 2px solid #E2E8F0;
  border-radius: 20px;
  padding: 18px 14px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.foil-pack-wrapper {
  display: flex;
  justify-content: center;
  perspective: 900px;
}

.foil-pack {
  width: 230px;
  border-radius: 18px;
  background: linear-gradient(145deg, #F59E0B 0%, #EC4899 50%, #6366F1 100%);
  padding: 4px;
  box-shadow: 0 14px 28px rgba(99, 102, 241, 0.28);
  animation: floatPack 3s ease-in-out infinite;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.foil-pack.tearing {
  animation: tearShake 0.45s ease forwards;
}

@keyframes floatPack {
  0%, 100% { transform: translateY(0px) rotate(-1deg); }
  50% { transform: translateY(-7px) rotate(1deg); }
}

@keyframes tearShake {
  0% { transform: scale(1); }
  40% { transform: scale(1.08) rotate(4deg); filter: brightness(1.3); }
  100% { transform: scale(0.85); opacity: 0.2; }
}

.pack-tear-strip {
  background: repeating-linear-gradient(45deg, rgba(255,255,255,0.28), rgba(255,255,255,0.28) 8px, rgba(0,0,0,0.12) 8px, rgba(0,0,0,0.12) 16px);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  padding: 8px 6px;
  border-radius: 14px 14px 0 0;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.85);
}

.pack-body-art {
  background: rgba(15, 23, 42, 0.24);
  border-radius: 0 0 14px 14px;
  padding: 20px 12px 18px;
  color: #FFFFFF;
}

.pack-big-icon {
  font-size: 58px;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.25));
}

.pack-title {
  font-size: 18px;
  font-weight: 900;
  margin-top: 6px;
}

.pack-en {
  font-size: 11px;
  letter-spacing: 1px;
  opacity: 0.9;
  margin-top: 2px;
}

.pack-rates {
  margin-top: 10px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 5px 8px;
}

.pack-cta-area {
  margin-top: 16px;
}

.pack-sub-note {
  margin-top: 8px;
  font-size: 12px;
  color: #64748B;
}

/* ==================== 街机果冻立体按钮 ==================== */
.arcade-btn {
  border: none;
  border-radius: 14px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 900;
  color: #FFFFFF;
  cursor: pointer;
  transition: transform 0.08s, box-shadow 0.08s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.primary-btn {
  background: linear-gradient(180deg, #3B82F6 0%, #2563EB 100%);
  box-shadow: 0 5px 0 #1E40AF;
}

.warn-btn {
  background: linear-gradient(180deg, #F59E0B 0%, #D97706 100%);
  box-shadow: 0 5px 0 #92400E;
}

.success-btn {
  background: linear-gradient(180deg, #10B981 0%, #059669 100%);
  box-shadow: 0 5px 0 #065F46;
}

.arcade-btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3);
}

.big-open-btn {
  width: 100%;
  max-width: 340px;
  font-size: 16px;
}

.full-w {
  width: 100%;
}

.small-outline-btn {
  border: 2px solid #CBD5E1;
  background: #FFFFFF;
  color: #1E293B;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==================== 五级全息镭射闪卡通用组件 ==================== */
.wc-card {
  position: relative;
  border-radius: 14px;
  padding: 7px;
  background: #FFFFFF;
  border: 3px solid #94A3B8;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.wc-card:hover {
  transform: translateY(-3px);
}

.wc-card.rarity-N { border-color: #94A3B8; background: linear-gradient(180deg, #FFFFFF, #F8FAFC); }
.wc-card.rarity-R { border-color: #3B82F6; background: linear-gradient(180deg, #EFF6FF, #FFFFFF); box-shadow: 0 4px 12px rgba(59,130,246,0.18); }
.wc-card.rarity-SR { border-color: #F59E0B; background: linear-gradient(180deg, #FFFBEB, #FEF3C7); box-shadow: 0 6px 16px rgba(245,158,11,0.28); }
.wc-card.rarity-SSR {
  border-color: #A855F7;
  background: linear-gradient(135deg, #FAF5FF 0%, #FCE7F3 50%, #EFF6FF 100%);
  box-shadow: 0 8px 22px rgba(168, 85, 247, 0.36);
}
.wc-card.rarity-UR {
  border-color: #FBBF24;
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF08A 35%, #FDE68A 70%, #F3E8FF 100%);
  box-shadow: 0 10px 26px rgba(234, 179, 8, 0.48);
}

/* 全息彩虹流光镀膜层（SSR / UR 专属） */
.wc-card.rarity-SSR::after,
.wc-card.rarity-UR::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    115deg,
    transparent 20%,
    rgba(255, 0, 128, 0.18) 36%,
    rgba(0, 229, 255, 0.22) 48%,
    rgba(255, 230, 0, 0.22) 60%,
    transparent 78%
  );
  background-size: 220% 220%;
  animation: holoShimmer 3.2s linear infinite;
  mix-blend-mode: color-dodge;
}

@keyframes holoShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.card-top-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 900;
  margin-bottom: 4px;
}

.rarity-tag {
  padding: 1px 6px;
  border-radius: 6px;
  color: #FFFFFF;
  font-size: 10px;
}
.rarity-tag.r-N { background: #64748B; }
.rarity-tag.r-R { background: #2563EB; }
.rarity-tag.r-SR { background: #D97706; }
.rarity-tag.r-SSR { background: linear-gradient(90deg, #9333EA, #EC4899); }
.rarity-tag.r-UR { background: linear-gradient(90deg, #B45309, #EF4444, #7C3AED); }

.new-flag {
  position: absolute;
  top: 28px;
  right: 6px;
  z-index: 3;
  background: #EF4444;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 6px;
}

.card-art-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: radial-gradient(circle, #FFFFFF 0%, #E2E8F0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.card-art-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-emoji-fallback {
  font-size: 46px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.16));
}

.ai-corner-mark {
  position: absolute;
  right: 4px;
  bottom: 3px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(15, 23, 42, 0.42);
  padding: 0 4px;
  border-radius: 4px;
}

.card-word-area {
  text-align: center;
  margin-top: 5px;
}

.card-en {
  font-size: 15px;
  font-weight: 900;
  color: #0F172A;
  line-height: 1.15;
}

.card-phonics {
  font-size: 11px;
  color: #4F46E5;
  font-weight: 700;
  margin-top: 1px;
}

.card-zh {
  font-size: 12px;
  color: #475569;
  font-weight: 700;
  margin-top: 1px;
}

.card-stats-row {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin-top: 5px;
  font-size: 10px;
  font-weight: 800;
}

.atk-pill {
  background: #FEE2E2;
  color: #B91C1C;
  padding: 2px 5px;
  border-radius: 6px;
  flex: 1;
  text-align: center;
}

.hp-pill {
  background: #DCFCE7;
  color: #15803D;
  padding: 2px 5px;
  border-radius: 6px;
  flex: 1;
  text-align: center;
}

/* ==================== 拆包 5 连翻牌遮罩 ==================== */
.fullscreen-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  overflow-y: auto;
}

.reveal-inner {
  width: 100%;
  max-width: 780px;
  text-align: center;
}

.reveal-title {
  color: #FEF08A;
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 14px;
}

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

@media (min-width: 640px) {
  .reveal-five-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.flip-slot {
  perspective: 800px;
}

.card-back-cover {
  aspect-ratio: 3 / 4.3;
  border-radius: 14px;
  background: linear-gradient(135deg, #1E3A8A, #4F46E5);
  border: 3px solid #93C5FD;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.card-back-cover.glow-SSR {
  border-color: #E879F9;
  box-shadow: 0 0 22px #D946EF;
}

.card-back-cover.glow-UR {
  border-color: #FACC15;
  box-shadow: 0 0 28px #FACC15;
  animation: urPulse 1s ease-in-out infinite;
}

@keyframes urPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

.reveal-actions {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* ==================== 对战大厅与竞技场 ==================== */
.section-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.section-head p {
  margin: 4px 0 12px;
  font-size: 12px;
  color: var(--muted);
}

.deck-bar-card {
  background: #FFFFFF;
  border: 2px solid #CBD5E1;
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 14px;
}

.deck-bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 10px;
}

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

.deck-tip {
  margin-top: 8px;
  font-size: 11px;
  color: #64748B;
  text-align: center;
}

.mode-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.mode-card {
  background: #FFFFFF;
  border: 2px solid #E2E8F0;
  border-radius: 18px;
  padding: 14px;
  position: relative;
}

.mode-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 99px;
  background: #DBEAFE;
  color: #1E40AF;
}

.hot-badge { background: #DCFCE7; color: #065F46; }
.pro-badge { background: #F3E8FF; color: #6B21A8; }

.mode-icon {
  font-size: 28px;
  margin-top: 6px;
}

.mode-card h3 {
  margin: 4px 0;
  font-size: 16px;
  font-weight: 900;
}

.mode-card p {
  margin: 0 0 10px;
  font-size: 12px;
  color: #475569;
  line-height: 1.45;
}

.stage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

@media (min-width: 600px) {
  .stage-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stage-btn {
  border: 2px solid #E2E8F0;
  background: #F8FAFC;
  border-radius: 12px;
  padding: 8px 4px;
  text-align: center;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.stage-btn.cleared {
  border-color: #34D399;
  background: #ECFDF5;
}

.room-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.clean-input {
  width: 100%;
  border: 2px solid #CBD5E1;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 16px;
  font-weight: 700;
  outline: none;
}

.clean-input:focus {
  border-color: #3B82F6;
}

.room-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.join-box {
  display: flex;
  gap: 6px;
  flex: 1;
  min-width: 180px;
}

.code-num-input {
  text-align: center;
  letter-spacing: 3px;
  font-size: 16px;
}

/* ==================== PVE 实时战斗舞台 ==================== */
.arena-box {
  background: #FFFFFF;
  border: 2.5px solid #CBD5E1;
  border-radius: 20px;
  padding: 12px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.arena-box.shake {
  animation: hitShake 0.35s ease;
}

@keyframes hitShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}

.arena-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 10px;
}

.arena-stage-title {
  font-size: 14px;
  font-weight: 900;
}

.combo-pill {
  background: #FEF3C7;
  color: #B45309;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 99px;
}

.fighter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FEF2F2;
  border: 2px solid #FECACA;
  border-radius: 14px;
  padding: 10px 12px;
}

.boss-avatar {
  font-size: 44px;
}

.fighter-info {
  flex: 1;
}

.fighter-name-line {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 4px;
}

.el-tag {
  font-size: 11px;
  font-weight: 800;
}

.hp-bar-outer {
  width: 100%;
  height: 14px;
  background: #E2E8F0;
  border-radius: 99px;
  overflow: hidden;
}

.hp-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #EF4444, #F97316);
  transition: width 0.28s ease;
}

.hp-nums {
  font-size: 11px;
  font-weight: 800;
  color: #64748B;
  margin-top: 2px;
  text-align: right;
}

.battle-center-stage {
  margin: 12px 0;
  min-height: 185px;
  background: linear-gradient(180deg, #F8FAFC, #EFF6FF);
  border: 2px dashed #93C5FD;
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.battle-log-banner {
  font-size: 14px;
  font-weight: 900;
  color: #1E3A8A;
  margin-bottom: 10px;
}

.quiz-bubbles-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}

.quiz-bubble-btn {
  border: 2.5px solid #60A5FA;
  background: #FFFFFF;
  border-radius: 14px;
  padding: 10px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-weight: 900;
  transition: transform 0.1s;
}

.quiz-bubble-btn:active {
  transform: scale(0.93);
}

.quiz-bubble-btn img {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
}

.voice-meter-wrap {
  width: 100%;
  max-width: 320px;
  margin: 8px auto;
}

.voice-bar-bg {
  height: 18px;
  background: #E2E8F0;
  border-radius: 99px;
  overflow: hidden;
  border: 2px solid #94A3B8;
}

.voice-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22C55E, #F59E0B, #EF4444);
  transition: width 0.08s linear;
}

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

.hand-label {
  font-size: 12px;
  font-weight: 800;
  color: #475569;
  margin-bottom: 6px;
}

.wc-card.ko-card {
  opacity: 0.42;
  filter: grayscale(0.85);
  pointer-events: none;
}

/* ==================== 180° 同屏面对面双人抢拍台 ==================== */
.local2p-modal {
  padding: 0;
  background: #0F172A;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.split-half {
  flex: 1;
  width: 100%;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.top-rotated {
  background: linear-gradient(180deg, #FEF2F2, #FEE2E2);
  transform: rotate(180deg);
}

.bottom-normal {
  background: linear-gradient(180deg, #EFF6FF, #DBEAFE);
}

.center-referee-bar {
  width: 100%;
  background: #1E293B;
  color: #FEF08A;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 3px solid #F59E0B;
  border-bottom: 3px solid #F59E0B;
}

.referee-prompt {
  font-size: 15px;
  font-weight: 900;
  text-align: center;
}

.tiny-exit-btn, .tiny-replay-btn {
  border: 1.5px solid #94A3B8;
  background: #334155;
  color: #FFFFFF;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.p-bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 900;
}

.p-options-row {
  width: 100%;
  max-width: 480px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.p-status-msg {
  font-size: 13px;
  font-weight: 900;
  color: #1E293B;
}

/* ==================== 图鉴与弹窗 ==================== */
.album-header-card {
  background: #FFFFFF;
  border: 2px solid #E2E8F0;
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.album-header-card h2 {
  margin: 0;
  font-size: 16px;
}

.album-header-card p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.filter-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 0;
}

.filter-pill {
  border: 2px solid #CBD5E1;
  background: #FFFFFF;
  border-radius: 99px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.filter-pill.active {
  background: #2563EB;
  border-color: #2563EB;
  color: #FFFFFF;
}

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

@media (min-width: 540px) {
  .cards-album-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.wc-card.locked-slot {
  opacity: 0.55;
  background: #F1F5F9;
  border-style: dashed;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 75;
  background: rgba(15, 23, 42, 0.68);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}

.dialog-card {
  width: 100%;
  max-width: 420px;
  max-height: 88vh;
  overflow-y: auto;
  background: #FFFFFF;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
}

.wide-dialog {
  max-width: 680px;
}

.detail-dialog {
  max-width: 330px;
  text-align: center;
}

.detail-actions {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.dialog-head h3 {
  margin: 0;
  font-size: 16px;
}

.dialog-reason {
  font-size: 12px;
  color: #475569;
  line-height: 1.45;
  margin: 0 0 12px;
}

.code-big-input {
  text-align: center;
  font-size: 16px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.error-text {
  color: #DC2626;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.shop-guide-box {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1.5px dashed #CBD5E1;
  font-size: 12px;
  color: #475569;
}

.shop-guide-title {
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 4px;
}

.math-gate-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.math-q {
  font-size: 18px;
  font-weight: 900;
  color: #1D4ED8;
  white-space: nowrap;
}

.eye-preset-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.eye-note {
  margin-top: 10px;
  font-size: 12px;
  color: #059669;
  font-weight: 700;
}

.disconnect-alert {
  background: #FEF3C7;
  border: 2px solid #F59E0B;
  border-radius: 10px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  color: #92400E;
  margin-bottom: 10px;
}

.review-box {
  background: #FFFFFF;
  border: 2px solid #E2E8F0;
  border-radius: 18px;
  padding: 16px;
  text-align: center;
}

.sleep-overlay {
  background: #0F172A;
  color: #FFFFFF;
}

.sleep-card {
  max-width: 360px;
  text-align: center;
  padding: 20px;
}

.sleep-icon {
  font-size: 64px;
}

.sleep-en {
  color: #FDE047;
  font-weight: 800;
}

.toast {
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 95;
  background: rgba(15, 23, 42, 0.92);
  color: #FFFFFF;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  max-width: 92vw;
  text-align: center;
}

/* ==================== V2 极简一条龙引导与 500 词升星视觉升级 ==================== */
.loop-guide-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  background: #FFFFFF;
  border: 2px solid #DBEAFE;
  border-radius: 14px;
  padding: 7px 10px;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 800;
  color: #64748B;
}

.step-pill {
  padding: 3px 8px;
  border-radius: 99px;
  background: #F1F5F9;
}

.step-pill.active {
  background: linear-gradient(90deg, #2563EB, #7C3AED);
  color: #FFFFFF;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.25);
}

.step-pill.done {
  background: #DCFCE7;
  color: #065F46;
}

.step-arrow {
  color: #94A3B8;
  font-size: 11px;
}

.onboarding-callout {
  margin-top: 10px;
  background: linear-gradient(90deg, #FEF3C7, #FDE68A);
  border: 2.5px solid #F59E0B;
  border-radius: 16px;
  padding: 11px 14px;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.2);
}

.callout-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: #78350F;
}

.callout-text strong {
  font-size: 14px;
  color: #92400E;
}

.sub-section-title {
  margin-top: 16px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 900;
  color: #1E293B;
}

@media (min-width: 720px) {
  .pack-selector {
    grid-template-columns: repeat(5, 1fr);
  }
}

.pack-tab-card.stage-locked {
  opacity: 0.78;
  background: #F8FAFC;
  border-style: dashed;
}

.lock-pill.open-pill {
  background: #DCFCE7;
  color: #065F46;
}

.lock-pill.stage-pill {
  background: #E0E7FF;
  color: #3730A3;
}

.empty-deck-card {
  background: linear-gradient(180deg, #FFFBEB, #FFFFFF);
  border: 2.5px dashed #F59E0B;
  border-radius: 18px;
  padding: 22px 16px;
  text-align: center;
  margin-bottom: 14px;
}

.empty-deck-card h3 {
  margin: 6px 0 4px;
  font-size: 17px;
  color: #92400E;
}

.empty-deck-card p {
  margin: 0 0 14px;
  font-size: 13px;
  color: #78350F;
}

/* 四大元素高颜值立体炫彩徽章底板（让未烘焙原画的卡也像真玩具闪卡一样漂亮！） */
.card-art-box.art-el-fire {
  background: radial-gradient(circle at 50% 38%, #FFF7ED 0%, #FED7AA 48%, #FB923C 100%);
}
.card-art-box.art-el-water {
  background: radial-gradient(circle at 50% 38%, #F0F9FF 0%, #BAE6FD 48%, #38BDF8 100%);
}
.card-art-box.art-el-nature {
  background: radial-gradient(circle at 50% 38%, #F0FDF4 0%, #BBF7D0 48%, #4ADE80 100%);
}
.card-art-box.art-el-tech {
  background: radial-gradient(circle at 50% 38%, #FAF5FF 0%, #E9D5FF 48%, #A78BFA 100%);
}

.emblem-ring {
  width: 74%;
  height: 74%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  border: 2.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12), inset 0 2px 6px rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
}

.star-badge-line {
  position: absolute;
  left: 5px;
  bottom: 4px;
  background: rgba(15, 23, 42, 0.68);
  color: #FDE047;
  font-size: 10px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 99px;
  letter-spacing: 0.5px;
}

.star-badge-line.crown-max {
  background: linear-gradient(90deg, #B45309, #DC2626);
  color: #FEF08A;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.45);
}

.star-up-flag {
  position: absolute;
  top: 28px;
  left: 5px;
  z-index: 4;
  background: linear-gradient(90deg, #F59E0B, #EF4444);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(239, 68, 68, 0.4);
}

.dup-progress-line {
  font-size: 10px;
  font-weight: 800;
  color: #6366F1;
  text-align: center;
  margin-top: 3px;
}

.counter-tag {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  background: #DC2626;
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 900;
  padding: 1px 7px;
  border-radius: 99px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.4);
}

.wc-card.active-selected {
  outline: 3.5px solid #2563EB;
  transform: translateY(-5px);
}

.sprout-listen-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.super-gauge-pills {
  display: inline-flex;
  gap: 6px;
  margin-top: 2px;
}

.gauge-bolt {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #E2E8F0;
  color: #94A3B8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all 0.2s;
}

.gauge-bolt.lit {
  background: #FEF08A;
  color: #D97706;
  border: 2px solid #F59E0B;
  transform: scale(1.12);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

.reveal-actions {
  flex-wrap: wrap;
}

/* ==================== V2.4 卡包置顶 + 双语抢拍闪卡 + 全站真手机深度适配 ==================== */
.pack-selector,
.deck-slots,
.battle-hand-cards,
.p-options-row,
.quiz-bubbles-row,
.cards-album-grid,
.reveal-five-grid,
.stage-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.deck-slots,
.battle-hand-cards,
.p-options-row,
.quiz-bubbles-row,
.stage-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (min-width: 600px) {
  .stage-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 540px) {
  .cards-album-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 640px) {
  .pack-selector {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .reveal-five-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 760px) {
  .pack-selector {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* 卡包选择置顶标题栏与中英双语卡片 */
.sub-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 8px;
}

.sub-section-head .sub-section-title {
  margin: 0;
}

.sub-section-tip {
  font-size: 11px;
  font-weight: 800;
  color: #2563EB;
  background: #EFF6FF;
  padding: 3px 8px;
  border-radius: 99px;
  white-space: nowrap;
}

.pack-selector {
  margin-top: 0;
}

.pack-tab-en {
  font-size: 11px;
  font-weight: 700;
  color: #4F46E5;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pack-mobile-cta {
  margin-top: 5px;
  font-size: 10.5px;
  font-weight: 800;
  color: #64748B;
}

.pack-mobile-cta.selected-cta {
  color: #1D4ED8;
}

.stage-step-tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 12px;
  border-radius: 99px;
  background: #EFF6FF;
  border: 1.5px solid #BFDBFE;
  color: #1E40AF;
  font-size: 12px;
  font-weight: 900;
  max-width: 100%;
}

.pack-stage-card.stage-pulse {
  animation: stageFocusPulse 0.55s ease;
}

@keyframes stageFocusPulse {
  0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.45); border-color: #3B82F6; }
  60% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); border-color: #3B82F6; }
  100% { box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05); border-color: #E2E8F0; }
}

/* 选关按钮中英双语 Boss 名 */
.stage-boss-zh {
  color: #1E293B;
  font-weight: 800;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage-boss-en {
  font-size: 9.5px;
  color: #64748B;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 图 2 同屏双打、联机抢答与特训营：中英文双语闪卡按钮 */
.quiz-bubble-btn.bilingual-opt {
  padding: 8px 6px;
  gap: 3px;
  min-width: 0;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.1);
}

.quiz-emblem {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.1);
  flex-shrink: 0;
}

.quiz-emblem.art-el-fire {
  background: radial-gradient(circle at 50% 35%, #FFF7ED 0%, #FED7AA 55%, #FB923C 100%);
}
.quiz-emblem.art-el-water {
  background: radial-gradient(circle at 50% 35%, #F0F9FF 0%, #BAE6FD 55%, #38BDF8 100%);
}
.quiz-emblem.art-el-nature {
  background: radial-gradient(circle at 50% 35%, #F0FDF4 0%, #BBF7D0 55%, #4ADE80 100%);
}
.quiz-emblem.art-el-tech {
  background: radial-gradient(circle at 50% 35%, #FAF5FF 0%, #E9D5FF 55%, #A78BFA 100%);
}

.quiz-opt-en {
  font-size: clamp(12px, 3.4vw, 16px);
  font-weight: 900;
  color: #0F172A;
  line-height: 1.15;
  text-align: center;
  word-break: break-word;
  max-width: 100%;
}

.quiz-opt-phonics {
  font-size: 10px;
  font-weight: 700;
  color: #6366F1;
  line-height: 1.1;
}

.quiz-opt-zh {
  font-size: 11.5px;
  font-weight: 800;
  color: #475569;
  line-height: 1.2;
  text-align: center;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 180° 同屏双打全屏锁定与手机刘海/地址栏适配 */
.local2p-modal {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.top-rotated {
  /* 旋转180°后原本的 bottom 位于物理屏幕顶部，需避开手机顶部状态栏 */
  padding: 10px 12px calc(10px + env(safe-area-inset-top, 0px));
}

.bottom-normal {
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
}

.tiny-exit-btn,
.tiny-replay-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.filter-pills {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.filter-pills::-webkit-scrollbar {
  display: none;
}

/* ==================== 手机端专项适配 (< 640px) ==================== */
@media (max-width: 639px) {
  .topbar {
    padding: calc(6px + env(safe-area-inset-top, 0px)) 10px 6px;
    gap: 5px;
  }

  .brand-logo {
    font-size: 19px;
  }

  .brand-title {
    font-size: 14px;
  }

  .brand-sub {
    font-size: 10.5px;
  }

  .top-actions {
    width: 100%;
    justify-content: space-between;
    gap: 4px;
  }

  .pill-btn,
  .stat-chip {
    font-size: 11.5px;
    padding: 4px 8px;
  }

  .icon-btn {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .main-container {
    padding: 8px 10px calc(80px + env(safe-area-inset-bottom, 0px));
  }

  /* 一条龙步骤条在手机上严格单行对齐 */
  .loop-guide-bar {
    flex-wrap: nowrap;
    gap: 3px;
    padding: 6px 6px;
    margin-bottom: 8px;
    font-size: 10.5px;
  }

  .step-pill {
    padding: 3px 6px;
    white-space: nowrap;
  }

  /* 顶部紫卡横幅紧凑化，把手机首屏留给卡包选择 */
  .hero-banner {
    padding: 10px 12px;
    border-radius: 14px;
    gap: 6px;
  }

  .hero-text h1 {
    font-size: 15.5px;
  }

  .hero-text p {
    font-size: 11px;
    margin-top: 2px;
  }

  .collection-mini {
    font-size: 11px;
    padding: 4px 10px;
  }

  .onboarding-callout {
    margin-top: 8px;
    padding: 9px 11px;
    border-radius: 13px;
  }

  .callout-text strong {
    font-size: 12.5px;
  }

  .callout-text span {
    font-size: 11px;
  }

  /* 手机端卡包卡片：精简长段描述，一目了然展示图标+中英包名+解锁状态 */
  .pack-tab-card {
    padding: 8px 9px;
    border-radius: 12px;
  }

  .pack-tab-head {
    font-size: 18px;
  }

  .pack-tab-name {
    font-size: 12.5px;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pack-tab-desc {
    display: none;
  }

  /* 手机端撕卡舞台紧凑有力，按钮绝不孤字折行 */
  .pack-stage-card {
    margin-top: 12px;
    padding: 14px 12px;
    border-radius: 16px;
  }

  .foil-pack {
    width: 196px;
  }

  .pack-body-art {
    padding: 14px 10px 12px;
  }

  .pack-big-icon {
    font-size: 46px;
  }

  .pack-title {
    font-size: 16px;
  }

  .big-open-btn {
    font-size: 14.5px;
    padding: 11px 14px;
    white-space: nowrap;
  }

  /* 拆包 5 连翻牌弹窗手机端防切头 + 2+2+1 对称阵型 */
  #packRevealOverlay {
    align-items: flex-start;
    padding: 14px 10px 26px;
  }

  .reveal-title {
    font-size: 15px;
    margin-bottom: 10px;
  }

  .reveal-five-grid > .flip-slot:nth-child(5):last-child {
    grid-column: 1 / -1;
    width: calc(50% - 5px);
    margin: 0 auto;
  }

  /* 3 列并排小手牌在 375px 手机屏下的精致排版 */
  .deck-slots,
  .battle-hand-cards {
    gap: 6px;
  }

  .deck-slots .wc-card,
  .battle-hand-cards .wc-card {
    padding: 5px;
    border-width: 2px;
    border-radius: 11px;
  }

  .deck-slots .card-top-line,
  .battle-hand-cards .card-top-line {
    font-size: 9.5px;
    margin-bottom: 3px;
  }

  .deck-slots .rarity-tag,
  .battle-hand-cards .rarity-tag {
    font-size: 9px;
    padding: 1px 4px;
  }

  .deck-slots .card-emoji-fallback,
  .battle-hand-cards .card-emoji-fallback {
    font-size: 32px;
  }

  .deck-slots .card-en,
  .battle-hand-cards .card-en {
    font-size: 12px;
    word-break: break-word;
  }

  .deck-slots .card-phonics,
  .battle-hand-cards .card-phonics {
    font-size: 9.5px;
  }

  .deck-slots .card-zh,
  .battle-hand-cards .card-zh {
    font-size: 10.5px;
  }

  .deck-slots .card-stats-row,
  .battle-hand-cards .card-stats-row {
    font-size: 9.5px;
    gap: 3px;
  }

  .deck-slots .atk-pill,
  .deck-slots .hp-pill,
  .battle-hand-cards .atk-pill,
  .battle-hand-cards .hp-pill {
    padding: 2px 2px;
    white-space: nowrap;
  }

  .deck-slots .dup-progress-line,
  .battle-hand-cards .dup-progress-line {
    font-size: 9px;
  }

  .deck-slots .star-badge-line,
  .battle-hand-cards .star-badge-line {
    font-size: 9px;
    padding: 1px 4px;
  }

  /* PVE 战斗舞台手机一屏完整同框（无需上下滚动找手牌） */
  .arena-box {
    padding: 10px;
    border-radius: 16px;
  }

  .fighter-row {
    padding: 8px 10px;
    gap: 8px;
  }

  .boss-avatar {
    font-size: 34px;
  }

  .battle-center-stage {
    margin: 8px 0;
    min-height: 112px;
    padding: 10px 8px;
  }

  .battle-log-banner {
    font-size: 12.5px;
    margin-bottom: 6px;
  }

  .hand-label {
    font-size: 11px;
    margin-bottom: 5px;
  }

  /* 联机房间按钮与卡册导出按钮手机全宽对齐 */
  .room-btn-row > .arcade-btn {
    width: 100%;
  }

  .join-box {
    width: 100%;
  }

  .album-header-card .arcade-btn {
    width: 100%;
  }

  /* 180° 同屏双打手机窄屏微调 */
  .center-referee-bar {
    padding: 6px 8px;
  }

  .referee-prompt {
    font-size: 12px;
    line-height: 1.25;
  }

  .p-bar {
    font-size: 11.5px;
  }

  .p-options-row {
    gap: 6px;
  }

  .p-status-msg {
    font-size: 12px;
    text-align: center;
  }
}

/* 矮屏手机（如 iPhone SE 667px 或含浏览器地址栏视口）180° 分屏防拥挤 */
@media (max-height: 740px) {
  .local2p-modal .split-half {
    padding: 6px 10px;
  }

  .local2p-modal .quiz-bubble-btn img,
  .local2p-modal .quiz-emblem {
    width: 42px;
    height: 42px;
    font-size: 22px;
  }

  .local2p-modal .quiz-bubble-btn.bilingual-opt {
    padding: 6px 4px;
    gap: 2px;
  }
}

/* ==================== V2.6 两步清晰选包页 + 实时发音字幕 + 双屏胜负大海报 ==================== */
.compact-hero {
  margin-bottom: 12px;
}

.pack-tab-card.ready-pack {
  border-color: #60A5FA;
  background: linear-gradient(180deg, #FFFFFF 0%, #F0F9FF 100%);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.pack-tab-card.ready-pack:hover {
  transform: translateY(-2px);
  border-color: #2563EB;
}

.pack-detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.pack-progress-pill {
  font-size: 12px;
  font-weight: 800;
  color: #1E40AF;
  background: #DBEAFE;
  padding: 5px 12px;
  border-radius: 99px;
}

.pack-preview-box {
  margin: 14px auto 4px;
  max-width: 520px;
  background: #F8FAFC;
  border: 2px dashed #CBD5E1;
  border-radius: 14px;
  padding: 10px;
}

.preview-title {
  font-size: 12px;
  font-weight: 800;
  color: #334155;
  margin-bottom: 8px;
}

.pack-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.preview-mini-card {
  border: 1.5px solid #E2E8F0;
  background: #FFFFFF;
  border-radius: 10px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
}

.preview-mini-card:active {
  transform: scale(0.95);
  border-color: #3B82F6;
}

.pm-emo {
  font-size: 22px;
}

.pm-en {
  font-size: 11.5px;
  font-weight: 900;
  color: #0F172A;
  word-break: break-word;
}

.pm-zh {
  font-size: 10px;
  font-weight: 700;
  color: #475569;
}

.quick-battle-row {
  margin-top: 10px;
}

/* 翻牌页实时发音字幕与高亮卡片 */
.reveal-voice-sub {
  display: inline-block;
  margin: 0 auto 12px;
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  border: 1.5px solid rgba(253, 224, 71, 0.65);
  color: #FFFFFF;
  font-size: 12.5px;
  line-height: 1.35;
  max-width: 100%;
}

.reveal-voice-sub strong {
  color: #FDE047;
}

.wc-card.speaking-card {
  outline: 3.5px solid #FACC15;
  box-shadow: 0 0 22px rgba(250, 204, 21, 0.85);
}

.tap-speak-hint {
  margin-top: 3px;
  font-size: 9.5px;
  font-weight: 800;
  color: #2563EB;
  text-align: center;
}

/* 战场大喇叭动态声波环 */
.speaker-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.speaker-wave-badge {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #FEF3C7;
  border: 2.5px solid #F59E0B;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.speaker-wave-badge.speaking {
  animation: speakerRipple 0.85s ease-in-out infinite;
}

@keyframes speakerRipple {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55); }
  50% { transform: scale(1.12); box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
}

/* PVE 闯关胜负大奖杯结算卡 */
.pve-finish-card {
  width: 100%;
  border-radius: 16px;
  padding: 14px 12px;
  text-align: center;
}

.pve-finish-card.win-theme {
  background: linear-gradient(180deg, #FFFBEB 0%, #FEF3C7 100%);
  border: 2.5px solid #F59E0B;
}

.pve-finish-card.try-theme {
  background: linear-gradient(180deg, #EFF6FF 0%, #DBEAFE 100%);
  border: 2.5px solid #60A5FA;
}

.finish-big-ico {
  font-size: 46px;
  line-height: 1.1;
}

.finish-main-title {
  font-size: 17px;
  font-weight: 900;
  color: #0F172A;
  margin-top: 4px;
}

.finish-coin-pill {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 12px;
  border-radius: 99px;
  background: #FFFFFF;
  border: 1.5px solid #FCD34D;
  color: #B45309;
  font-size: 13px;
  font-weight: 900;
}

.pve-unlock-banner {
  margin: 8px auto 0;
  padding: 7px 12px;
  background: #DCFCE7;
  border: 1.5px solid #34D399;
  color: #065F46;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 900;
}

.finish-btn-group {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 180° 同屏面对面双打：双方各自正方向全屏胜负大海报 */
.p-options-row.result-mode {
  grid-template-columns: minmax(0, 1fr) !important;
  max-width: 440px;
}

.duel-finish-card {
  width: 100%;
  border-radius: 20px;
  padding: 16px 14px;
  text-align: center;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
  animation: popResult 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

@keyframes popResult {
  0% { transform: scale(0.84); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.duel-finish-card.duel-win {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF08A 55%, #FDE68A 100%);
  border: 3.5px solid #F59E0B;
}

.duel-finish-card.duel-lose {
  background: linear-gradient(135deg, #FFFFFF 0%, #EFF6FF 65%, #E0E7FF 100%);
  border: 3px solid #60A5FA;
}

.duel-res-ico {
  font-size: 48px;
  line-height: 1.05;
}

.duel-res-title {
  font-size: clamp(18px, 5vw, 24px);
  font-weight: 900;
  color: #0F172A;
  margin-top: 4px;
}

.duel-win .duel-res-title {
  color: #B45309;
}

.duel-res-score {
  font-size: 13px;
  font-weight: 800;
  color: #334155;
  margin-top: 4px;
}

.duel-res-btns {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-height: 740px) {
  .duel-finish-card {
    padding: 10px 12px;
  }

  .duel-res-ico {
    font-size: 34px;
  }

  .duel-res-title {
    font-size: 17px;
  }

  .duel-res-btns {
    margin-top: 8px;
  }

  .duel-res-btns .arcade-btn {
    padding: 8px 14px;
    font-size: 13px;
  }
}

/* ==================== 单人闯关简化版（2026-11-12）：听词 ➔ 点卡 ➔ 掉心 ==================== */
.hearts-line {
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: 1px;
  word-break: break-all;
}

.boss-hearts {
  margin-top: 2px;
}

.fighter-row.boss-hit {
  animation: hitShake 0.35s ease;
  background: #FEE2E2;
}

.my-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.my-status-line .hand-label {
  margin-bottom: 0;
}

.my-hearts {
  font-size: 15px;
  font-weight: 900;
  color: #475569;
  white-space: nowrap;
}

.pick-cards-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.pick-card {
  appearance: none;
  font-family: inherit;
  color: var(--ink);
  min-width: 0;
  border: 3px solid #93C5FD;
  background: #FFFFFF;
  border-radius: 16px;
  padding: 8px 6px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.12);
  transition: transform 0.15s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.pick-card:active {
  transform: scale(0.94);
}

.pick-art {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(34px, 11vw, 54px);
  background: #F1F5F9;
}

.pick-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pick-art.art-el-fire {
  background: radial-gradient(circle at 50% 35%, #FFF7ED 0%, #FED7AA 60%, #FB923C 100%);
}
.pick-art.art-el-water {
  background: radial-gradient(circle at 50% 35%, #F0F9FF 0%, #BAE6FD 60%, #38BDF8 100%);
}
.pick-art.art-el-nature {
  background: radial-gradient(circle at 50% 35%, #F0FDF4 0%, #BBF7D0 60%, #4ADE80 100%);
}
.pick-art.art-el-tech {
  background: radial-gradient(circle at 50% 35%, #FAF5FF 0%, #E9D5FF 60%, #A78BFA 100%);
}

.pick-art.pick-art-hidden {
  aspect-ratio: 2 / 1;
  font-size: 22px;
  color: #6366F1;
  background: repeating-linear-gradient(45deg, #EEF2FF, #EEF2FF 8px, #E0E7FF 8px, #E0E7FF 16px);
}

.pick-en {
  font-size: clamp(14px, 4.2vw, 18px);
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  word-break: break-word;
  max-width: 100%;
}

.pick-card.word-only .pick-en {
  font-size: clamp(17px, 5.2vw, 23px);
  padding: 6px 0;
}

.pick-phonics {
  font-size: 10.5px;
  font-weight: 700;
  color: #6366F1;
}

.pick-zh {
  font-size: 12px;
  font-weight: 800;
  color: #475569;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pick-card.is-answer {
  border-color: #F59E0B;
  background: #FFFBEB;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.35);
  transform: translateY(-6px) scale(1.04);
}

.pick-card.is-wrong {
  border-color: #EF4444;
  background: #FEF2F2;
}

.pick-card.is-dim {
  opacity: 0.4;
}

.pve-intro-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.pve-rule-list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
}

.pve-rule-list li {
  background: #FFFFFF;
  border: 2px solid #DBEAFE;
  border-radius: 12px;
  padding: 6px 10px;
}

.pve-rule-extra {
  font-size: 12.5px;
  font-weight: 800;
  color: #B45309;
}

.pve-rule-tier {
  font-size: 12.5px;
  font-weight: 800;
  color: #2563EB;
}

.pve-start-btn {
  min-width: 170px;
  font-size: 18px;
  margin-top: 2px;
}

.pve-speaker-btn {
  appearance: none;
  font-family: inherit;
  border: 3px solid #F59E0B;
  background: #FEF3C7;
  color: #92400E;
  border-radius: 999px;
  padding: 8px 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.pve-speaker-ico {
  font-size: 34px;
  line-height: 1;
}

.pve-speaker-btn.speaking {
  animation: speakerRipple 0.85s ease-in-out 3;
}

.pve-hit-pop {
  font-size: 46px;
  animation: hitPop 0.5s ease;
}

@keyframes hitPop {
  0% { transform: scale(0.4); opacity: 0; }
  60% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(1); }
}

.pve-finish-stats {
  font-size: 13px;
  font-weight: 800;
  color: #475569;
  margin: 4px 0 6px;
}

.stage-btn.next-up {
  border-color: #10B981;
  background: #ECFDF5;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.stage-hearts-mini {
  font-size: 10.5px;
  margin: 1px 0;
}

@media (max-width: 639px) {
  .pick-cards-row {
    gap: 6px;
  }
  .pick-card {
    padding: 6px 4px 8px;
    border-radius: 14px;
  }
  .pve-rule-list {
    font-size: 13px;
  }
}

/* ==================== 开局选年龄 + 卡包难度（2026-11-12） ==================== */
.age-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.age-btn {
  appearance: none;
  font-family: inherit;
  border: 3px solid #86EFAC;
  background: #F0FDF4;
  color: #166534;
  border-radius: 14px;
  padding: 12px 0;
  font-size: 17px;
  font-weight: 900;
  cursor: pointer;
}

.age-btn.explorer-age {
  border-color: #C4B5FD;
  background: #F5F3FF;
  color: #5B21B6;
}

.age-btn.active {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.45);
}

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

.age-legend {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
}

.age-note {
  margin: 0;
  font-size: 12px;
  color: #64748B;
  line-height: 1.5;
}

.pack-tab-level {
  font-size: 11px;
  font-weight: 800;
  color: #B45309;
  margin-top: 4px;
}

.pack-level-line {
  margin: 8px 0 4px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #FFFBEB;
  border: 2px solid #FDE68A;
  font-size: 12.5px;
  font-weight: 700;
  color: #92400E;
  line-height: 1.5;
  text-align: center;
}

.pack-level-line span {
  font-size: 11.5px;
  color: #B45309;
}

.level-up-banner {
  background: #FEF3C7;
  border-color: #F59E0B;
  color: #92400E;
}
