/* ==========================================================
   祈福积德 —— 朝拜系统（前后端分离版）
   ========================================================== */

/* ---------- 色彩体系 ---------- */
:root {
  --c-bg: #1a0e08;
  --c-bg-2: #2b1a10;
  --c-gold-1: #f4d58a;
  --c-gold-2: #d9a441;
  --c-gold-3: #8f6a24;
  --c-red: #9b2a1f;
  --c-text: #f0e6d3;
  --c-text-dim: #a08b6d;
  --c-border: rgba(244, 213, 138, 0.25);
  --c-shadow: rgba(0, 0, 0, 0.55);
  --c-overlay: rgba(26, 14, 8, 0.92);
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #0d0704;
  font-family: 'Noto Serif SC', 'STSong', 'SimSun', serif;
  color: var(--c-text);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* ---------- 应用容器 ---------- */
.app {
  position: relative;
  width: 100%; height: 100%;
  max-width: 420px;
  margin: 0 auto;
  background: linear-gradient(180deg, #1a0e08 0%, #2b1a10 50%, #1a0e08 100%);
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0,0,0,0.8);
}

/* ---------- 屏幕 ---------- */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.screen.active { display: flex; }

/* ==========================================================
   启动界面
   ========================================================== */
.start-screen {
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.start-inner {
  position: relative;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px 16px;
  z-index: 1;
}

/* 标题 */
.title-wrap {
  text-align: center;
  margin-bottom: 8px;
}
.title-main {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: 8px;
  color: var(--c-gold-1);
  text-shadow: 0 0 20px rgba(244, 213, 138, 0.3);
  line-height: 1.2;
}
.title-main .brush {
  display: inline-block;
  animation: brushIn 0.8s ease both;
}
.title-main .brush:nth-child(1) { animation-delay: 0.1s; }
.title-main .brush:nth-child(2) { animation-delay: 0.2s; }
.title-main .brush:nth-child(3) { animation-delay: 0.3s; }
.title-main .brush:nth-child(4) { animation-delay: 0.4s; }

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

.title-sub {
  font-size: 13px;
  color: var(--c-text-dim);
  letter-spacing: 4px;
  margin-top: 6px;
}

/* 印章 */
.seal {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, #9b2a1f, #5a1710);
  border: 3px solid var(--c-gold-2);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  color: var(--c-gold-1);
  transform: rotate(-8deg);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  margin: 8px 0;
}

/* 描述文字 */
.start-desc {
  font-size: 14px;
  color: var(--c-text-dim);
  text-align: center;
  line-height: 1.8;
  letter-spacing: 1px;
}

/* 类别标签 */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 0 10px;
}
.tab-btn {
  padding: 8px 16px;
  background: rgba(90, 23, 16, 0.6);
  border: 1px solid var(--c-gold-3);
  border-radius: 20px;
  color: var(--c-text-dim);
  font-size: 13px;
  font-family: inherit;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}
.tab-btn:hover, .tab-btn.active {
  background: linear-gradient(180deg, var(--c-gold-2), var(--c-gold-3));
  color: #2a1a10;
  border-color: var(--c-gold-1);
  box-shadow: 0 0 12px rgba(244, 213, 138, 0.3);
}

/* 神像列表容器 */
.deity-list-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* 折叠按钮 */
.deity-list-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 20px;
  background: linear-gradient(180deg, rgba(74, 36, 24, 0.8), rgba(42, 26, 16, 0.9));
  border: 1.5px solid var(--c-gold-3);
  border-radius: 20px;
  color: var(--c-gold-1);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}
.deity-list-toggle:hover {
  border-color: var(--c-gold-1);
  background: linear-gradient(180deg, rgba(90, 45, 30, 0.9), rgba(52, 32, 20, 0.95));
  box-shadow: 0 0 12px rgba(244, 213, 138, 0.2);
}
.deity-list-toggle .toggle-icon {
  font-size: 10px;
  transition: transform 0.3s ease;
}
.deity-list-toggle.expanded .toggle-icon {
  transform: rotate(180deg);
}

/* 神像列表 */
.deity-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  width: 100%;
  padding: 0 4px;
  max-height: 200px;
  overflow-y: auto;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
  opacity: 1;
}
.deity-list.collapsed {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  pointer-events: none;
}
.deity-item {
  cursor: pointer;
  transition: transform 0.2s ease;
}
.deity-item:hover { transform: scale(1.03); }
.deity-item:active { transform: scale(0.97); }

.deity-card {
  position: relative;
  background: linear-gradient(180deg, rgba(74, 36, 24, 0.6), rgba(42, 26, 16, 0.8));
  border: 1.5px solid var(--c-gold-3);
  border-radius: 6px;
  padding: 4px 3px;
  text-align: center;
  transition: all 0.25s ease;
  overflow: hidden;
}
.deity-card:hover {
  border-color: var(--c-gold-1);
  box-shadow: 0 0 12px rgba(244, 213, 138, 0.2);
}

.deity-quality {
  position: absolute;
  top: 2px; right: 2px;
  padding: 1px 3px;
  border-radius: 4px;
  font-size: 7px;
  font-weight: 700;
}
.quality-normal { background: rgba(128,128,128,0.3); color: #aaa; }
.quality-rare { background: rgba(100,149,237,0.3); color: #6495ed; }
.quality-epic { background: rgba(148,0,211,0.3); color: #da70d6; }
.quality-legendary { background: rgba(255,215,0,0.3); color: #ffd700; }

.deity-image {
  width: 100%;
  height: 38px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 2px;
}
.deity-name {
  font-size: 9px;
  font-weight: 700;
  color: var(--c-gold-1);
  margin-bottom: 1px;
  line-height: 1.2;
}
.deity-blessing {
  font-size: 7px;
  color: var(--c-text-dim);
  line-height: 1.2;
}

/* 快速进入按钮 */
.btn-quick-enter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  background: linear-gradient(180deg, var(--c-gold-2), var(--c-gold-3));
  border: none;
  border-radius: 24px;
  color: #2a1a10;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(244, 213, 138, 0.3);
  transition: all 0.2s ease;
  margin-top: 8px;
}
.btn-quick-enter:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244, 213, 138, 0.4);
}

/* 装饰 */
.deco-cloud {
  position: absolute;
  width: 120px; height: 60px;
  background: radial-gradient(ellipse, rgba(244,213,138,0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.deco-cloud.top-left { top: 10%; left: -20px; }
.deco-cloud.bottom-right { bottom: 15%; right: -30px; }

.lantern {
  position: absolute;
  width: 24px; height: 36px;
  background: linear-gradient(180deg, #9b2a1f, #5a1710);
  border: 1px solid var(--c-gold-2);
  border-radius: 4px 4px 12px 12px;
  animation: lanternSwing 3s ease-in-out infinite;
}
.lantern::before {
  content: '';
  position: absolute;
  top: -8px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 8px;
  background: var(--c-gold-3);
}
.lantern.left { left: 20px; top: 30%; }
.lantern.right { right: 20px; top: 40%; animation-delay: 1.5s; }

@keyframes lanternSwing {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

/* ==========================================================
   游戏主界面
   ========================================================== */
.game-screen {
  background: linear-gradient(180deg, #1a0e08 0%, #2b1a10 40%, #1a0e08 100%);
}

/* 顶部栏 */
.top-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 6px 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  z-index: 5;
  pointer-events: auto;
  flex-wrap: nowrap;
  gap: 4px;
}

.btn-back {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: rgba(90, 23, 16, 0.7);
  border: 1px solid var(--c-gold-3);
  border-radius: 16px;
  color: var(--c-gold-1);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-back:hover {
  background: rgba(90, 23, 16, 0.9);
  border-color: var(--c-gold-1);
}

.back-icon { font-size: 14px; }
.back-text { font-size: 11px; }

.level-box {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--c-gold-3);
  border-radius: 14px;
  font-size: 12px;
  flex-shrink: 0;
}
.level-label { color: var(--c-text-dim); font-size: 10px; }
.level-value { color: var(--c-gold-1); font-weight: 700; font-size: 14px; }
.level-name { color: var(--c-gold-2); font-size: 10px; }

.merit-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 12px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--c-gold-3);
  border-radius: 14px;
  min-width: 70px;
  position: relative;
}
.merit-label {
  font-size: 9px;
  color: var(--c-text-dim);
  letter-spacing: 2px;
}
.merit-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--c-gold-1);
  transition: transform 0.15s ease;
}
.merit-box.pop .merit-value {
  animation: meritPop 0.3s ease;
}
@keyframes meritPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.rmb-box {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--c-gold-3);
  border-radius: 14px;
  flex-shrink: 0;
}
.rmb-icon { font-size: 12px; }
.rmb-label { font-size: 9px; color: var(--c-text-dim); }
.rmb-value { font-size: 14px; font-weight: 700; color: #ffd700; }

.btn-audio {
  width: 32px; height: 32px;
  background: rgba(90, 23, 16, 0.7);
  border: 1px solid var(--c-gold-3);
  border-radius: 50%;
  color: var(--c-gold-1);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.btn-audio:hover {
  background: rgba(90, 23, 16, 0.9);
  border-color: var(--c-gold-1);
}

.btn-tutorial {
  width: 32px; height: 32px;
  background: rgba(90, 23, 16, 0.7);
  border: 1px solid var(--c-gold-3);
  border-radius: 50%;
  color: var(--c-gold-1);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.btn-tutorial:hover {
  background: rgba(90, 23, 16, 0.9);
  border-color: var(--c-gold-1);
}

/* 首页教程按钮 */
.btn-tutorial-start {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 8px 14px;
  background: rgba(90, 23, 16, 0.7);
  border: 1.5px solid var(--c-gold-3);
  border-radius: 20px;
  color: var(--c-gold-1);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
  letter-spacing: 1px;
}
.btn-tutorial-start:hover {
  background: rgba(90, 23, 16, 0.95);
  border-color: var(--c-gold-1);
  transform: scale(1.05);
}

/* 经济变化指示器 */
.change-indicator {
  position: absolute;
  right: -8px;
  top: -4px;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 6px;
  animation: changeFloat 1s ease forwards;
  pointer-events: none;
  white-space: nowrap;
}
.change-indicator.increase {
  color: #4caf50;
  background: rgba(76, 175, 80, 0.2);
}
.change-indicator.decrease {
  color: #ff6a6a;
  background: rgba(255, 106, 106, 0.2);
}
.change-indicator.fade-out {
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.5s ease;
}
@keyframes changeFloat {
  0% { opacity: 0; transform: translateY(0); }
  20% { opacity: 1; transform: translateY(-4px); }
  80% { opacity: 1; transform: translateY(-4px); }
  100% { opacity: 0; transform: translateY(-20px); }
}

/* 舞台中央 */
.stage {
  position: relative;
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 44px;
  padding-bottom: 70px;
  gap: 4px;
  overflow: hidden;
  z-index: 1;
}

/* 祭坛 */
.altar {
  position: relative;
  width: min(420px, 72vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 16px 8px;
  animation: altarIn 0.9s cubic-bezier(0.2, 0.9, 0.2, 1) both;
}
@keyframes altarIn {
  0% { opacity: 0; transform: translateY(30px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* 耐久度条 */
.durability-bar {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: min(200px, 55vw);
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--c-gold-3);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  z-index: 3;
  backdrop-filter: blur(4px);
}
.durability-info {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--c-text-dim);
}
.durability-icon { font-size: 12px; }
.durability-label { font-size: 9px; letter-spacing: 1px; }
.durability-count { color: var(--c-gold-1); font-weight: 700; }
.durability-sep { color: var(--c-text-dim); }
.durability-max { color: var(--c-text-dim); }
.durability-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}
.durability-fill {
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #8bc34a);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.durability-fill.low {
  background: linear-gradient(90deg, #f44336, #ff9800);
  animation: lowPulse 1s ease-in-out infinite;
}
@keyframes lowPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* 背景光环 */
.altar-back {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 300px;
  max-width: 60vw;
  max-height: 38vh;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
}
.back-circle {
  position: absolute;
  width: 100%; height: 100%;
  border: 1px solid rgba(244, 213, 138, 0.15);
  border-radius: 50%;
  animation: circlePulse 3s ease-in-out infinite;
}
.back-rays {
  position: absolute;
  width: 120%; height: 120%;
  background: radial-gradient(circle, rgba(244, 213, 138, 0.08) 0%, transparent 60%);
  animation: rayRotate 20s linear infinite;
}
@keyframes circlePulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.05); opacity: 0.8; }
}
@keyframes rayRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 画像框 */
.portrait-frame {
  position: relative;
  width: min(240px, 48vw);
  height: min(280px, 36vh);
  background: linear-gradient(180deg, #5a3a1a, #2a1a0c);
  border: 4px solid #8f6a24;
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px #d9a441, inset 0 0 24px rgba(0,0,0,0.6), 0 16px 32px rgba(0,0,0,0.7);
  z-index: 2;
  overflow: hidden;
  transition: transform 0.3s ease;
}
.portrait-frame.pray-shake {
  animation: portraitShake 0.5s ease;
}
@keyframes portraitShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-3px) rotate(-1deg); }
  40% { transform: translateX(3px) rotate(1deg); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}

.portrait {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.portrait.loaded { opacity: 1; }

.portrait-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.fallback-circle {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--c-gold-3), var(--c-gold-2));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fallback-char {
  font-size: 36px;
  font-weight: 900;
  color: #2a1a10;
}
.fallback-text {
  font-size: 12px;
  color: var(--c-text-dim);
}

/* 牌位 */
.tablet {
  margin-top: 8px;
  padding: 6px 20px;
  background: linear-gradient(180deg, #8a2a1f, #5a1710);
  border: 2px solid #d9a441;
  border-radius: 6px;
  color: #f4d58a;
  font-size: 15px;
  letter-spacing: 4px;
}

/* 香炉 */
.incense-wrap {
  position: relative;
  margin-top: 6px;
  width: 140px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 14px;
  z-index: 2;
}
.incense-wrap::before {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 140px; height: 24px;
  background: linear-gradient(180deg, #8f6a24, #3a2413);
  border-radius: 4px 4px 8px 8px;
  box-shadow: inset 0 2px 0 #d9a441, 0 6px 14px rgba(0,0,0,0.5);
}
.incense {
  position: relative;
  width: 4px;
  height: 30px;
  background: linear-gradient(180deg, #d9a441, #8f6a24);
  border-radius: 2px;
  z-index: 1;
}
.smoke {
  position: absolute;
  top: -8px; left: 50%;
  transform: translateX(-50%);
  width: 8px; height: 16px;
  background: radial-gradient(ellipse, rgba(255,255,255,0.3) 0%, transparent 70%);
  border-radius: 50%;
  animation: smokeRise 2s ease-in-out infinite;
}
@keyframes smokeRise {
  0% { opacity: 0.6; transform: translateX(-50%) translateY(0) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-30px) scale(1.5); }
}

/* 损坏提示 */
.broken-toast {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  padding: 14px 24px;
  background: linear-gradient(180deg, rgba(155,42,31,0.95), rgba(90,23,16,0.95));
  border: 2px solid #ff6a6a;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.broken-toast.show { opacity: 1; pointer-events: auto; }
.broken-icon { font-size: 28px; }
.broken-text { font-size: 16px; font-weight: 700; color: #ff6a6a; }
.broken-hint { font-size: 12px; color: var(--c-text-dim); }

/* 拜佛按钮 */
.btn-pray {
  position: relative;
  border: none;
  padding: 10px 32px;
  background: linear-gradient(180deg, #ffe7a8 0%, #f4d58a 45%, #d9a441 100%);
  color: #3a2113;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 3px;
  border-radius: 40px;
  cursor: pointer;
  box-shadow: 0 0 0 2px rgba(90,23,16,0.9), 0 0 0 4px rgba(244,213,138,0.8), 0 10px 24px rgba(0,0,0,0.55), inset 0 -3px 0 rgba(143,106,36,0.4), inset 0 2px 0 rgba(255,255,255,0.5);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  z-index: 110;
  margin-top: 4px;
  margin-bottom: 70px;
  animation: btnPulse 3s ease-in-out infinite;
}
.btn-pray:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 2px rgba(90,23,16,0.9), 0 0 0 4px rgba(244,213,138,0.8), 0 14px 32px rgba(0,0,0,0.6), inset 0 -3px 0 rgba(143,106,36,0.4), inset 0 2px 0 rgba(255,255,255,0.5);
}
.btn-pray.pressing {
  transform: scale(0.95);
  box-shadow: 0 0 0 2px rgba(90,23,16,0.9), 0 0 0 4px rgba(244,213,138,0.8), 0 4px 12px rgba(0,0,0,0.4), inset 0 -1px 0 rgba(143,106,36,0.4), inset 0 2px 0 rgba(255,255,255,0.5);
}
@keyframes btnPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(90,23,16,0.9), 0 0 0 4px rgba(244,213,138,0.8), 0 10px 24px rgba(0,0,0,0.55), inset 0 -3px 0 rgba(143,106,36,0.4), inset 0 2px 0 rgba(255,255,255,0.5); }
  50% { box-shadow: 0 0 0 2px rgba(90,23,16,0.9), 0 0 0 6px rgba(244,213,138,0.6), 0 12px 30px rgba(0,0,0,0.5), inset 0 -3px 0 rgba(143,106,36,0.4), inset 0 2px 0 rgba(255,255,255,0.5); }
}

.pray-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.pray-icon { font-size: 20px; }
.pray-text { font-size: 16px; }
.pray-hint {
  font-size: 10px;
  color: rgba(58,33,19,0.7);
  font-weight: 400;
  letter-spacing: 1px;
}

/* 跪拜小人 */
.pray-character {
  position: absolute;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 154px;
  z-index: 105;
  transition: transform 0.3s ease;
  opacity: 0.9;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}
.pray-character.kneeling {
  animation: kneelAnim 0.3s ease forwards;
}
.pray-character.bowing {
  animation: bowAnim 0.6s ease forwards;
}
.pray-character.rising {
  animation: riseAnim 0.5s ease forwards;
}
.pray-character.kowtowing {
  animation: kowtowAnim 1.2s ease-in-out forwards;
}
@keyframes kneelAnim {
  0% { transform: translateX(-50%) scaleY(1); }
  100% { transform: translateX(-50%) scaleY(0.7) translateY(10px); }
}
@keyframes bowAnim {
  0% { transform: translateX(-50%) scaleY(0.7) translateY(10px); }
  50% { transform: translateX(-50%) scaleY(0.5) translateY(20px) rotate(-5deg); }
  100% { transform: translateX(-50%) scaleY(0.5) translateY(20px); }
}
@keyframes riseAnim {
  0% { transform: translateX(-50%) scaleY(0.5) translateY(20px); }
  100% { transform: translateX(-50%) scaleY(1) translateY(0); }
}
@keyframes kowtowAnim {
  0% { transform: translateX(-50%) scaleY(1) translateY(0); }
  15% { transform: translateX(-50%) scaleY(0.85) translateY(8px); }
  30% { transform: translateX(-50%) scaleY(0.6) translateY(20px) rotate(-3deg); }
  45% { transform: translateX(-50%) scaleY(0.5) translateY(25px) rotate(0deg); }
  50% { transform: translateX(-50%) scaleY(0.5) translateY(25px); }
  65% { transform: translateX(-50%) scaleY(0.6) translateY(20px) rotate(2deg); }
  80% { transform: translateX(-50%) scaleY(0.8) translateY(10px); }
  100% { transform: translateX(-50%) scaleY(1) translateY(0); }
}

.character-body {
  position: relative;
  width: 100%; height: 100%;
}
.character-head {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 42px; height: 42px;
  background: linear-gradient(180deg, #ffe7a8, #f4d58a);
  border-radius: 50%;
  box-shadow: 0 3px 6px rgba(0,0,0,0.4), inset 0 -2px 4px rgba(0,0,0,0.15);
}
.character-face {
  position: absolute;
  inset: 5px;
}
.face-eyes::before, .face-eyes::after {
  content: '';
  position: absolute;
  top: 11px;
  width: 5px; height: 5px;
  background: #2a1a10;
  border-radius: 50%;
}
.face-eyes::before { left: 8px; }
.face-eyes::after { right: 8px; }
.face-mouth {
  position: absolute;
  bottom: 8px; left: 50%;
  transform: translateX(-50%);
  width: 10px; height: 5px;
  background: #2a1a10;
  border-radius: 0 0 5px 5px;
}
.character-hair {
  position: absolute;
  top: -5px; left: 50%;
  transform: translateX(-50%);
  width: 52px; height: 16px;
  background: linear-gradient(180deg, #2a1a10, #1a0a05);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.character-body-main {
  position: absolute;
  top: 42px; left: 50%;
  transform: translateX(-50%);
  width: 54px; height: 64px;
  background: linear-gradient(180deg, #a8321f, #6a1f10, #5a1710);
  border-radius: 10px 10px 0 0;
  box-shadow: inset 0 -6px 0 rgba(0,0,0,0.35), 0 2px 4px rgba(0,0,0,0.3);
}
.character-robes {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(244,213,138,0.3) 0%, rgba(244,213,138,0.1) 50%, transparent 100%);
  border-radius: 10px 10px 0 0;
}
.character-hands {
  position: absolute;
  bottom: 6px; left: 50%;
  transform: translateX(-50%);
  width: 32px; height: 16px;
  background: linear-gradient(180deg, #ffe7a8, #f4d58a);
  border-radius: 8px;
  box-shadow: 0 2px 3px rgba(0,0,0,0.25), inset 0 -2px 0 rgba(0,0,0,0.15);
}
.character-legs {
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 44px; height: 48px;
  background: linear-gradient(180deg, #5a1710, #3a2413);
  border-radius: 0 0 10px 10px;
  box-shadow: inset 0 3px 0 rgba(244,213,138,0.2), 0 2px 4px rgba(0,0,0,0.3);
}
.character-shadow {
  position: absolute;
  bottom: -10px; left: 50%;
  transform: translateX(-50%);
  width: 64px; height: 10px;
  background: rgba(0,0,0,0.5);
  border-radius: 50%;
  filter: blur(3px);
}

/* 右侧虔诚一拜滑块 - 纵向 */
.devout-slider-wrap {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: min(200px, 35vh);
  z-index: 110;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.devout-slider-track {
  position: absolute;
  inset: 0;
  background: rgba(42, 26, 16, 0.85);
  border: 1px solid rgba(244, 213, 138, 0.3);
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.devout-slider-fill {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 0%;
  background: linear-gradient(to top, rgba(244,213,138,0.15), rgba(217,164,65,0.3));
  border-radius: 0 0 22px 22px;
  transition: height 0.05s linear;
}
.devout-slider-label {
  font-size: 10px;
  color: var(--c-text-dim);
  letter-spacing: 2px;
  z-index: 1;
  pointer-events: none;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}
.devout-slider-wrap.dragging .devout-slider-label,
.devout-slider-wrap.completed .devout-slider-label {
  opacity: 0;
}
.devout-slider-thumb {
  position: absolute;
  left: 2px; bottom: 2px;
  width: 40px; height: 40px;
  background: linear-gradient(180deg, var(--c-gold-1), var(--c-gold-2));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4), 0 0 0 2px rgba(244,213,138,0.3);
  transition: bottom 0.1s linear, transform 0.15s ease, box-shadow 0.2s ease;
  z-index: 2;
}
.devout-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.08);
  box-shadow: 0 4px 16px rgba(244,213,138,0.4), 0 0 0 3px rgba(244,213,138,0.5);
}
.devout-slider-icon {
  font-size: 18px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
  pointer-events: none;
}
.devout-slider-wrap.completed .devout-slider-thumb {
  bottom: calc(100% - 42px) !important;
  background: linear-gradient(180deg, #4caf50, #388e3c);
  box-shadow: 0 0 16px rgba(76,175,80,0.6), 0 0 0 2px rgba(76,175,80,0.4);
}
.devout-slider-wrap.snap-back .devout-slider-thumb {
  transition: bottom 0.3s cubic-bezier(0.2, 0.9, 0.2, 1);
}

/* 奖励提示 */
.reward-toast {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  background: linear-gradient(180deg, rgba(74,36,24,0.95), rgba(42,26,16,0.95));
  border: 1px solid var(--c-gold-3);
  border-radius: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  white-space: nowrap;
}
.reward-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.reward-icon { font-size: 16px; color: var(--c-gold-1); }
.reward-text { font-size: 13px; color: var(--c-text); }
.reward-amount { font-size: 15px; font-weight: 700; color: var(--c-gold-1); }

/* 浮动数字 */
.float-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 15;
}
.float-num {
  position: absolute;
  font-size: 20px;
  font-weight: 700;
  color: var(--c-gold-1);
  text-shadow: 0 0 10px rgba(244, 213, 138, 0.5);
  animation: floatUp 1.4s ease forwards;
  pointer-events: none;
}
@keyframes floatUp {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-80px) scale(1.2); }
}

/* 成就提示 - 顶部显示，避免遮挡神像 */
.achievement-toast {
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  padding: 14px 22px;
  background: linear-gradient(180deg, rgba(74,36,24,0.95), rgba(42,26,16,0.95));
  border: 2px solid var(--c-gold-2);
  border-radius: 16px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.achievement-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.achievement-toast-icon { font-size: 32px; }
.achievement-toast-title { font-size: 12px; color: var(--c-text-dim); }
.achievement-toast-name { font-size: 16px; font-weight: 700; color: var(--c-gold-1); }

/* ==========================================================
   底部导航
   ========================================================== */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  padding-bottom: max(8px, env(safe-area-inset-bottom, 8px));
  background: linear-gradient(to top, rgba(26, 14, 8, 0.98), transparent);
  z-index: 100;
  pointer-events: auto;
}
.btn-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 14px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--c-text-dim);
  font-size: 10px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 60px;
}
.btn-nav:hover, .btn-nav.active {
  color: var(--c-gold-1);
  background: rgba(244, 213, 138, 0.1);
}
.btn-nav.has-new {
  animation: navPulse 1s ease-in-out infinite;
}
@keyframes navPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244, 213, 138, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(244, 213, 138, 0); }
}
.btn-nav-icon { font-size: 18px; }
.btn-nav-label { font-size: 10px; letter-spacing: 1px; }
.btn-nav-main {
  background: linear-gradient(180deg, rgba(244,213,138,0.15), rgba(217,164,65,0.1));
  border: 1px solid var(--c-gold-3);
}

/* ==========================================================
   成就页面
   ========================================================== */
.achievement-screen { background: linear-gradient(180deg, #1a0e08, #2b1a10); }

.screen-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 5;
  background: linear-gradient(to bottom, rgba(26,14,8,0.9), transparent);
}
.screen-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--c-gold-1);
  letter-spacing: 4px;
}

.screen-content {
  width: 100%;
  height: 100%;
  padding: 70px 20px 180px;
  overflow-y: auto;
}

.screen-footer {
  position: absolute;
  bottom: 60px;
  left: 0; right: 0;
  padding: 12px;
  text-align: center;
  background: linear-gradient(to top, rgba(26,14,8,0.95), transparent);
  z-index: 1;
}

.achievement-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.achievement-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(180deg, rgba(74,36,24,0.5), rgba(42,26,16,0.7));
  border: 1px solid var(--c-gold-3);
  border-radius: 10px;
  transition: all 0.25s ease;
}
.achievement-item.locked {
  opacity: 0.5;
  filter: grayscale(0.6);
}
.achievement-item.unlocked {
  border-color: var(--c-gold-1);
  box-shadow: 0 0 12px rgba(244, 213, 138, 0.15);
}
.achievement-icon { font-size: 28px; }
.achievement-main { flex: 1; }
.achievement-name { font-size: 14px; font-weight: 700; color: var(--c-gold-1); margin-bottom: 2px; }
.achievement-desc { font-size: 11px; color: var(--c-text-dim); }
.unlocked-count { font-size: 12px; color: var(--c-text-dim); }

/* ==========================================================
   市场页面
   ========================================================== */
.shop-screen { background: linear-gradient(180deg, #1a0e08, #2b1a10); }

.rmb-mini {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--c-gold-3);
  border-radius: 14px;
}

.shop-tabs {
  position: absolute;
  top: 50px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  background: linear-gradient(to bottom, rgba(26,14,8,0.9), transparent);
  z-index: 5;
}
.shop-tab {
  padding: 8px 16px;
  background: rgba(90, 23, 16, 0.5);
  border: 1px solid var(--c-gold-3);
  border-radius: 20px;
  color: var(--c-text-dim);
  font-size: 12px;
  font-family: inherit;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.shop-tab:hover, .shop-tab.active {
  background: linear-gradient(180deg, var(--c-gold-2), var(--c-gold-3));
  color: #2a1a10;
  border-color: var(--c-gold-1);
}

.shop-content { padding-top: 100px; }

.shop-panel {
  display: none;
  animation: panelIn 0.3s ease;
  padding-bottom: 80px;
}
.shop-panel.active { display: block; }
@keyframes panelIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-gold-1);
  margin-bottom: 12px;
  text-align: center;
  letter-spacing: 2px;
}

/* 购买功德 */
.buy-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.buy-item {
  padding: 14px 10px;
  background: linear-gradient(180deg, rgba(74,36,24,0.6), rgba(42,26,16,0.8));
  border: 2px solid var(--c-gold-3);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}
.buy-item:hover {
  border-color: var(--c-gold-1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(244, 213, 138, 0.15);
}
.buy-amount {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-gold-1);
  margin-bottom: 6px;
}
.buy-price {
  font-size: 12px;
  color: var(--c-text-dim);
}
.buy-price .discount {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 5px;
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
  border-radius: 6px;
  font-size: 10px;
}

.buy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  font-size: 12px;
  color: var(--c-text-dim);
}

/* 宝箱商店 */
.treasure-section { margin-bottom: 20px; }

.treasure-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 500px;
  margin: 0 auto;
  padding-bottom: 20px;
}
@media (min-width: 600px) {
  .treasure-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-width: 700px;
  }
}
@media (min-width: 900px) {
  .treasure-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.treasure-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(74,36,24,0.7), rgba(42,26,16,0.9));
  border: 2px solid var(--c-gold-3);
  border-radius: 12px;
  text-align: left;
  transition: all 0.25s ease;
}
@media (min-width: 600px) {
  .treasure-item {
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding: 14px 10px;
  }
}

.treasure-icon {
  font-size: 32px;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
}
.treasure-icon.bronze { filter: sepia(0.5) saturate(1.2); }
.treasure-icon.silver { filter: grayscale(0.3) brightness(1.2); }
.treasure-icon.gold { filter: sepia(0.6) saturate(1.5) brightness(1.1); }
.treasure-icon.legendary { filter: hue-rotate(-20deg) saturate(1.8) brightness(1.2); animation: legendaryGlow 1.5s ease-in-out infinite; }
@keyframes legendaryGlow {
  0%, 100% { filter: hue-rotate(-20deg) saturate(1.8) brightness(1.2); }
  50% { filter: hue-rotate(20deg) saturate(2) brightness(1.4); }
}

.treasure-info {
  flex: 1;
  min-width: 0;
}
.treasure-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-gold-1);
  margin-bottom: 2px;
}
.treasure-desc {
  font-size: 11px;
  color: var(--c-text-dim);
  margin-bottom: 3px;
}
.treasure-odds {
  font-size: 10px;
  color: #7a9fff;
  margin-bottom: 3px;
}
.treasure-price {
  font-size: 12px;
  color: #ffd700;
  margin-bottom: 0;
}

.treasure-actions {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
  max-width: 120px;
}
@media (min-width: 600px) {
  .treasure-icon {
    font-size: 36px;
    margin-bottom: 6px;
    width: auto;
    height: auto;
  }
  .treasure-info { text-align: center; }
  .treasure-name { margin-bottom: 4px; }
  .treasure-desc { margin-bottom: 4px; }
  .treasure-odds { margin-bottom: 4px; }
  .treasure-price { margin-bottom: 8px; }
  .treasure-actions {
    justify-content: center;
    max-width: none;
  }
}

/* 爆率显示 */
.treasure-odds {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-start;
}
@media (min-width: 600px) {
  .treasure-odds { justify-content: center; }
}
.treasure-odds span {
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 11px;
}
.odds-normal { background: rgba(128,128,128,0.2); color: #888; }
.odds-rare { background: rgba(100,149,237,0.2); color: #6495ed; }
.odds-epic { background: rgba(148,0,211,0.2); color: #da70d6; }
.odds-legendary { background: rgba(255,215,0,0.2); color: #ffd700; }

/* 批量按钮 */
.btn-batch {
  padding: 6px 10px;
  background: linear-gradient(180deg, #ffe7a8, #f4d58a);
  border: none;
  border-radius: 14px;
  color: #5a1710;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-batch:hover {
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(244, 213, 138, 0.5);
}
.btn-batch:active {
  transform: scale(0.95);
}

/* 出售区域 */
.sell-section { margin-bottom: 20px; padding-bottom: 80px; }
.sell-section-hint {
  text-align: center;
  font-size: 12px;
  color: var(--c-text-dim);
  margin-top: 10px;
}

/* ==========================================================
   全服市场商品列表
   ========================================================== */
.market-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.market-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(74, 36, 24, 0.5), rgba(42, 26, 16, 0.7));
  border: 1px solid var(--c-gold-3);
  border-radius: 10px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}
.market-item:hover {
  border-color: var(--c-gold-1);
  background: linear-gradient(180deg, rgba(74, 36, 24, 0.7), rgba(42, 26, 16, 0.9));
}
.market-item-icon {
  font-size: 28px;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
}
.market-item-info {
  flex: 1;
  min-width: 0;
}
.market-item-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-gold-1);
  margin-bottom: 2px;
}
.market-item-quality {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 2px;
}
.market-item-seller {
  font-size: 10px;
  color: var(--c-text-dim);
}
.market-item-price {
  font-size: 14px;
  font-weight: 700;
  color: #ffd700;
  flex-shrink: 0;
  min-width: 60px;
  text-align: right;
}
.btn-buy {
  padding: 6px 12px;
  background: linear-gradient(180deg, #2e7d32, #1b5e20);
  border: 1px solid #4caf50;
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.btn-buy:hover {
  background: linear-gradient(180deg, #388e3c, #2e7d32);
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
}
.btn-buy:active {
  transform: scale(0.95);
}

/* ==========================================================
   背包页面
   ========================================================== */
.inventory-screen { background: linear-gradient(180deg, #1a0e08, #2b1a10); }

.inventory-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--c-text-dim);
  font-size: 14px;
}
.inventory-empty-large {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 60px 20px;
  text-align: center;
}
.empty-icon { font-size: 48px; }
.empty-title { font-size: 16px; font-weight: 700; color: var(--c-gold-1); }
.empty-hint { font-size: 12px; color: var(--c-text-dim); }

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px 0;
}

.inventory-item {
  aspect-ratio: 1;
  background: linear-gradient(180deg, rgba(74,36,24,0.6), rgba(42,26,16,0.8));
  border: 2px solid var(--c-gold-3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
  padding: 4px;
}
.inventory-item:hover {
  border-color: var(--c-gold-1);
  transform: scale(1.05);
}
.inventory-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 6px;
}
.inventory-item .inventory-quality {
  position: absolute;
  top: 2px; right: 2px;
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  background: rgba(0,0,0,0.6);
}
.inventory-item {
  position: relative;
}

/* 批量操作栏 */
.batch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(0,0,0,0.4);
  border-radius: 8px;
  margin-bottom: 10px;
  gap: 8px;
}
.batch-select-all {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--c-text);
  cursor: pointer;
}
.batch-select-all input { accent-color: var(--c-gold-2); }
.selected-count { font-size: 12px; color: var(--c-text-dim); }
.btn-sell-all {
  padding: 6px 12px;
  background: linear-gradient(180deg, #9b2a1f, #5a1710);
  border: 1px solid var(--c-red);
  border-radius: 6px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-sell-all:hover:not(:disabled) {
  background: linear-gradient(180deg, #b33a2f, #7a2710);
}
.btn-sell-all:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 背包详情卡片 */
.inventory-detail-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.deity-card-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(180deg, rgba(74,36,24,0.5), rgba(42,26,16,0.7));
  border: 1px solid var(--c-gold-3);
  border-radius: 10px;
  transition: all 0.2s ease;
  cursor: pointer;
}
.deity-card-item.selected {
  border-color: var(--c-gold-1);
  background: linear-gradient(180deg, rgba(74,36,24,0.7), rgba(42,26,16,0.9));
}
.deity-card-item:hover {
  border-color: var(--c-gold-2);
}
.card-checkbox {
  accent-color: var(--c-gold-2);
  cursor: pointer;
}
.deity-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.deity-card-image {
  width: 50px; height: 50px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(0,0,0,0.3);
}
.deity-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.deity-card-info { flex: 1; min-width: 0; }
.deity-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--c-gold-1);
  margin-bottom: 2px;
}
.deity-card-blessing { font-size: 11px; color: var(--c-text-dim); }
.deity-card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.btn-card-action {
  padding: 5px 10px;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-equip {
  background: linear-gradient(180deg, #2e7d32, #1b5e20);
  color: #fff;
}
.btn-equip:hover {
  background: linear-gradient(180deg, #388e3c, #2e7d32);
}
.btn-sell {
  background: linear-gradient(180deg, #d9a441, #8f6a24);
  color: #2a1a10;
}
.btn-sell:hover {
  background: linear-gradient(180deg, #f4d58a, #d9a441);
}

.inventory-count { font-size: 12px; color: var(--c-text-dim); }

/* ==========================================================
   弹窗
   ========================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 10px;
}
.modal-overlay.active { display: flex; }
.modal-content {
  background: linear-gradient(180deg, #2b1a10, #1a0e08);
  border: 2px solid var(--c-gold-2);
  border-radius: 16px;
  width: 90%;
  max-width: 340px;
  max-height: 85vh;
  overflow-y: auto;
  animation: modalIn 0.3s ease;
}
@keyframes modalIn {
  0% { opacity: 0; transform: scale(0.9) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(244, 213, 138, 0.2);
}
.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-gold-1);
  letter-spacing: 2px;
}
.btn-close {
  width: 32px; height: 32px;
  background: rgba(90, 23, 16, 0.6);
  border: 1px solid var(--c-gold-3);
  border-radius: 50%;
  color: var(--c-gold-1);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-close:hover { background: rgba(90, 23, 16, 0.9); }

.modal-body { padding: 16px; }
.modal-footer {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid rgba(244, 213, 138, 0.2);
}

.sell-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: rgba(0,0,0,0.3);
  border-radius: 10px;
  margin-bottom: 14px;
}
.preview-icon { font-size: 40px; }
.preview-name { font-size: 15px; font-weight: 700; color: var(--c-gold-1); }

.price-input-group { margin-bottom: 12px; }
.price-input-group label {
  display: block;
  font-size: 12px;
  color: var(--c-text-dim);
  margin-bottom: 6px;
}
.price-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--c-gold-3);
  border-radius: 8px;
}
.price-input input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--c-gold-1);
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  outline: none;
  text-align: center;
}
.price-unit { font-size: 14px; }
.price-label { font-size: 12px; color: var(--c-text-dim); }

.sell-note {
  text-align: center;
  font-size: 11px;
  color: var(--c-text-dim);
  padding: 8px;
  background: rgba(0,0,0,0.2);
  border-radius: 6px;
}

.buy-modal-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.buy-modal-desc {
  font-size: 16px;
  font-weight: 700;
  color: var(--c-gold-1);
  text-align: center;
}
.qr-code-placeholder {
  width: 160px; height: 160px;
  background: rgba(255,255,255,0.9);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.qr-icon { font-size: 40px; }
.qr-text { font-size: 13px; color: #333; }
.qr-note { font-size: 11px; color: #999; }

.btn-modal-confirm {
  flex: 1;
  padding: 10px;
  background: linear-gradient(180deg, var(--c-gold-2), var(--c-gold-3));
  border: none;
  border-radius: 8px;
  color: #2a1a10;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-modal-confirm:hover {
  background: linear-gradient(180deg, var(--c-gold-1), var(--c-gold-2));
}
.btn-modal-cancel {
  flex: 1;
  padding: 10px;
  background: rgba(90, 23, 16, 0.6);
  border: 1px solid var(--c-gold-3);
  border-radius: 8px;
  color: var(--c-gold-1);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-modal-cancel:hover {
  background: rgba(90, 23, 16, 0.9);
}

/* ==========================================================
   开箱动画
   ========================================================== */
.box-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 150;
}
.box-overlay.active { display: flex; }

.box-animation {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.box-chest {
  font-size: 80px;
  z-index: 2;
  transition: transform 0.3s ease;
}
.box-chest.opening {
  animation: chestShake 0.5s ease;
}
@keyframes chestShake {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-10deg); }
  75% { transform: rotate(10deg); }
}

.box-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.particle {
  position: absolute;
  font-size: 20px;
  animation: particleBurst 1s ease forwards;
}
@keyframes particleBurst {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(0); }
  50% { opacity: 1; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty) - 50px)) scale(0.5); }
}

.box-result {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 3;
}
.box-result.show { opacity: 1; }
.result-icon { font-size: 48px; margin-bottom: 8px; }
.result-name { font-size: 18px; font-weight: 700; color: var(--c-gold-1); margin-bottom: 4px; }
.result-quality { font-size: 14px; }

.btn-close-box {
  position: absolute;
  top: 20px; right: 20px;
  width: 50px; height: 50px;
  background: rgba(90, 23, 16, 0.8);
  border: 2px solid var(--c-gold-2);
  border-radius: 50%;
  color: var(--c-gold-1);
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-close-box:hover { background: rgba(244, 213, 138, 0.2); }

.batch-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.batch-summary span {
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 14px;
}

/* ==========================================================
   开发者模式
   ========================================================== */
.dev-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.dev-overlay.active { display: flex; }

.dev-login {
  background: linear-gradient(180deg, #2b1a10, #1a0e08);
  border: 2px solid var(--c-gold-2);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  width: 280px;
}
.dev-lock-icon { font-size: 40px; margin-bottom: 12px; }
.dev-login-title { font-size: 16px; font-weight: 700; color: var(--c-gold-1); margin-bottom: 16px; }
.dev-password {
  width: 100%;
  padding: 10px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--c-gold-3);
  border-radius: 8px;
  color: var(--c-gold-1);
  font-size: 18px;
  font-family: inherit;
  text-align: center;
  letter-spacing: 8px;
  outline: none;
}
.dev-password:focus { border-color: var(--c-gold-1); }
.dev-login-btns {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}
.dev-btn {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  border: none;
}
.dev-btn-confirm {
  background: linear-gradient(180deg, var(--c-gold-1), var(--c-gold-2));
  color: #3a1a0a;
  font-weight: 700;
}
.dev-btn-cancel {
  background: rgba(90, 23, 16, 0.8);
  color: var(--c-gold-1);
  border: 1px solid var(--c-gold-3);
}
.dev-error { color: #ff4444; font-size: 13px; margin-top: 10px; }

.dev-panel {
  background: linear-gradient(180deg, #2b1a10, #1a0e08);
  border: 2px solid var(--c-gold-2);
  border-radius: 16px;
  width: 90%;
  max-width: 420px;
  max-height: 85vh;
  overflow-y: auto;
}
.dev-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(244, 213, 138, 0.2);
}
.dev-title { font-size: 16px; color: var(--c-gold-1); letter-spacing: 2px; }
.dev-close-btn {
  width: 32px; height: 32px;
  background: rgba(155, 42, 31, 0.8);
  border: 1px solid var(--c-red);
  border-radius: 50%;
  color: var(--c-gold-1);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dev-close-btn:hover { background: rgba(155, 42, 31, 1); }
.dev-content { padding: 14px 18px; }
.dev-section { margin-bottom: 16px; }
.dev-section-title {
  font-size: 13px;
  color: var(--c-gold-1);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(244, 213, 138, 0.2);
}
.dev-field {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.dev-field label { width: 65px; font-size: 12px; color: var(--c-text-dim); flex-shrink: 0; }
.dev-input {
  flex: 1;
  padding: 8px 10px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--c-gold-3);
  border-radius: 6px;
  color: var(--c-text);
  font-size: 14px;
  outline: none;
}
.dev-input:focus { border-color: var(--c-gold-1); }
.dev-set-btn {
  padding: 8px 12px;
  background: linear-gradient(180deg, #d9a441, #8f6a24);
  border: none;
  border-radius: 6px;
  color: #2a1a10;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}
.dev-set-btn:hover { background: linear-gradient(180deg, #f4d58a, #d9a441); }
.dev-quick-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dev-quick-btn {
  padding: 8px 12px;
  background: rgba(90, 23, 16, 0.6);
  border: 1px solid var(--c-gold-3);
  border-radius: 8px;
  color: var(--c-gold-1);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.dev-quick-btn:hover {
  background: rgba(90, 23, 16, 0.9);
  border-color: var(--c-gold-1);
}
.dev-btn-danger {
  background: rgba(155, 42, 31, 0.3) !important;
  border-color: var(--c-red) !important;
  color: #ff6a6a !important;
}
.dev-btn-danger:hover {
  background: rgba(155, 42, 31, 0.6) !important;
  border-color: var(--c-red) !important;
}

/* ==========================================================
   虔诚一拜效果
   ========================================================== */
.devout-effect {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 12;
  animation: devoutFloat 2s ease-out forwards;
}
@keyframes devoutFloat {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
  35% { transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -120px) scale(1); }
}
.effect-star { font-size: 36px; animation: starGlow 0.6s ease-in-out infinite; }
@keyframes starGlow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8)); }
  50% { filter: drop-shadow(0 0 20px rgba(255, 215, 0, 1)); }
}
.effect-text {
  font-size: 18px;
  font-weight: 700;
  color: #ffd700;
  letter-spacing: 4px;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

/* ==========================================================
   响应式
   ========================================================== */
@media (max-width: 480px) {
  .merit-box { padding: 5px 10px; min-width: 90px; }
  .merit-value { font-size: 16px; }
  .merit-label { font-size: 9px; letter-spacing: 1px; }
  .btn-pray { padding: 10px 32px; font-size: 16px; letter-spacing: 3px; }
  .tablet { font-size: 14px; letter-spacing: 3px; padding: 5px 16px; }
  .reward-toast { font-size: 14px; padding: 10px 20px; }
  .level-box { padding: 4px 10px; }
  .level-value { font-size: 14px; }
  .level-name { font-size: 9px; }
  .start-inner { padding: 20px 12px; }
  .category-tabs { gap: 6px; padding: 0 8px; }
  .tab-btn { padding: 8px 14px; font-size: 12px; letter-spacing: 1px; }
  .deity-list { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .deity-name { font-size: 10px; }
  .durability-bar { width: 160px; padding: 3px 6px; }
  .bottom-nav { gap: 4px; padding: 8px 10px; }
  .btn-nav { padding: 6px 10px; font-size: 12px; min-width: 60px; }
  .buy-options { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .treasure-grid { gap: 8px; }
  .pray-character { width: 80px; height: 130px; bottom: 60px; opacity: 0.85; }
  .gesture-area { bottom: 12px; padding: 3px 6px; width: min(200px, 65vw); }
  .gesture-hint { font-size: 9px; }
  .portrait-frame { border-width: 3px; width: min(220px, 46vw); height: min(260px, 34vh); }
  .altar-back { width: 260px; height: 260px; }
  .rmb-box { padding: 3px 8px; }
  .rmb-value { font-size: 12px; }
  .screen-content { padding: 60px 14px 110px; }
  .achievement-list { grid-template-columns: 1fr; gap: 10px; }
  .treasure-icon { font-size: 28px; width: 38px; height: 38px; }
  .treasure-item { padding: 8px 10px; gap: 8px; }
  .treasure-odds span { font-size: 9px; padding: 1px 4px; }
  .btn-batch { padding: 5px 8px; font-size: 10px; }
  .treasure-actions { max-width: 100px; gap: 3px; }
  .treasure-name { font-size: 12px; }
  .treasure-desc { font-size: 10px; }
  .treasure-price { font-size: 11px; }
  .incense-wrap { width: 120px; height: 44px; }
  .incense-wrap::before { width: 120px; height: 20px; }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .deity-list {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    max-width: 720px;
  }
  .pray-character { bottom: 200px; }
  .gesture-area { bottom: 150px; }
}

/* ==========================================================
   新手教程
   ========================================================== */
.tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  pointer-events: none;
}
.tutorial-overlay.active { display: flex; }

.tutorial-chat-container,
.tutorial-skip,
.tutorial-prev,
.tutorial-next,
.tutorial-progress {
  pointer-events: auto;
}

.tutorial-spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* 对话式教程容器 */
.tutorial-chat-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 140px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  gap: 12px;
  z-index: 2;
  pointer-events: none;
  overflow-y: auto;
}

.tutorial-chat-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--c-text);
  position: relative;
  animation: chatBubbleIn 0.35s cubic-bezier(0.2, 0.9, 0.2, 1);
  pointer-events: auto;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.tutorial-chat-bubble.deity-bubble {
  align-self: flex-start;
  background: linear-gradient(135deg, rgba(74,36,24,0.95), rgba(42,26,16,0.95));
  border: 1.5px solid var(--c-gold-3);
  border-bottom-left-radius: 4px;
  color: var(--c-text);
  margin-left: 36px;
}

.tutorial-chat-bubble.deity-bubble::before {
  content: '';
  position: absolute;
  left: -10px;
  top: 14px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 12px solid var(--c-gold-3);
}

.tutorial-chat-bubble.deity-bubble::after {
  content: '';
  position: absolute;
  left: -7px;
  top: 15px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 10px solid rgba(42,26,16,0.95);
}

.tutorial-chat-bubble.player-bubble {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--c-gold-1), var(--c-gold-2));
  border: none;
  border-bottom-right-radius: 4px;
  color: #2a1a10;
  font-weight: 500;
  margin-right: 10px;
}

.tutorial-chat-bubble.player-bubble::after {
  content: '';
  position: absolute;
  right: -8px;
  bottom: 8px;
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 10px solid var(--c-gold-2);
}

.tutorial-chat-avatar {
  position: absolute;
  left: -44px;
  top: 6px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-gold-1), var(--c-gold-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border: 2px solid var(--c-gold-3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.tutorial-chat-title {
  font-weight: 700;
  color: var(--c-gold-1);
  font-size: 14px;
  margin-bottom: 6px;
  letter-spacing: 1px;
}

.tutorial-chat-tip {
  font-size: 11px;
  color: var(--c-gold-3);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(244, 213, 138, 0.2);
}

@keyframes chatBubbleIn {
  0% {
    opacity: 0;
    transform: translateY(15px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 进度点 */
.tutorial-progress {
  position: absolute;
  bottom: max(110px, env(safe-area-inset-bottom, 110px));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 4;
  pointer-events: auto;
}
.tutorial-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(244, 213, 138, 0.3);
  border: 1px solid var(--c-gold-3);
  transition: all 0.3s ease;
}
.tutorial-progress-dot.active {
  width: 24px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--c-gold-1), var(--c-gold-2));
  box-shadow: 0 0 8px rgba(244, 213, 138, 0.6);
}
.tutorial-progress-dot.completed {
  background: var(--c-gold-2);
  border-color: var(--c-gold-1);
}

.tutorial-skip {
  position: absolute;
  top: 20px;
  right: 20px;
  padding: 8px 18px;
  background: rgba(90, 23, 16, 0.7);
  border: 1px solid var(--c-gold-3);
  border-radius: 20px;
  color: var(--c-text-dim);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 5;
  pointer-events: auto;
  backdrop-filter: blur(4px);
}
.tutorial-skip:hover {
  background: rgba(90, 23, 16, 0.95);
  color: var(--c-gold-1);
  border-color: var(--c-gold-1);
}

.tutorial-prev {
  position: absolute;
  bottom: max(30px, env(safe-area-inset-bottom, 30px));
  left: max(20px, env(safe-area-inset-left, 20px));
  padding: 12px 20px;
  background: rgba(90, 23, 16, 0.8);
  border: 1px solid var(--c-gold-3);
  border-radius: 24px;
  color: var(--c-gold-2);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: all 0.2s ease;
  z-index: 5;
  pointer-events: auto;
  backdrop-filter: blur(4px);
}
.tutorial-prev:hover {
  background: rgba(90, 23, 16, 0.95);
  border-color: var(--c-gold-2);
  color: var(--c-gold-1);
  transform: scale(1.05);
}
.tutorial-prev:active {
  transform: scale(0.95);
}

.tutorial-next {
  position: absolute;
  bottom: max(30px, env(safe-area-inset-bottom, 30px));
  right: max(20px, env(safe-area-inset-right, 20px));
  left: auto;
  transform: none;
  padding: 14px 32px;
  background: linear-gradient(180deg, var(--c-gold-1), var(--c-gold-2));
  border: none;
  border-radius: 30px;
  color: #2a1a10;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 1.5px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(244, 213, 138, 0.4), 0 0 0 2px rgba(90,23,16,0.6);
  transition: all 0.2s ease;
  z-index: 5;
  pointer-events: auto;
  min-width: 140px;
}
.tutorial-next:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(244, 213, 138, 0.5), 0 0 0 2px rgba(90,23,16,0.6);
}
.tutorial-next:active {
  transform: scale(0.95);
}

/* 教程高亮目标元素 */
.tutorial-target-highlight {
  position: relative;
  z-index: 4 !important;
  pointer-events: auto;
  cursor: pointer;
}

/* 可点击的脉冲光圈 */
.tutorial-target-highlight::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 3px solid var(--c-gold-1);
  background: transparent;
  pointer-events: none;
  animation: tutorialRingPulse 1.5s ease-in-out infinite;
  z-index: 5;
}

@keyframes tutorialRingPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(244, 213, 138, 0.6), 0 0 20px rgba(244, 213, 138, 0.3);
  }
  50% {
    transform: scale(1.15);
    opacity: 0.7;
    box-shadow: 0 0 0 8px rgba(244, 213, 138, 0), 0 0 30px rgba(244, 213, 138, 0.5);
  }
}

/* 点击提示文字 */
.tutorial-target-highlight::before {
  content: '👆 点击这里';
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, var(--c-gold-1), var(--c-gold-2));
  color: #2a1a10;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 12px;
  white-space: nowrap;
  pointer-events: none;
  animation: tutorialTipBounce 1.2s ease-in-out infinite;
  z-index: 6;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

@keyframes tutorialTipBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}
