/* ==========================================================================
   槟城九皇大帝诞辰庆典 · 3D数位全景地图 - 移动专用原生级样式系统 (Mobile Edition)
   ========================================================================== */

:root {
  --primary-gold: #f59e0b;
  --gold-glow: #fde047;
  --gold-metallic: linear-gradient(135deg, #fffbeb 0%, #fde047 30%, #f59e0b 60%, #b45309 100%);
  --gold-border: rgba(245, 158, 11, 0.45);
  --gold-border-bright: #fbbf24;
  --primary-crimson: #dc2626;
  --bg-dark: #050811;
  --bg-panel: rgba(8, 13, 26, 0.95);
  --bg-card: rgba(15, 23, 42, 0.92);
  --bg-card-hover: rgba(30, 45, 74, 0.96);
  --text-primary: #ffffff;
  --text-secondary: #e2e8f0;
  --text-muted: #94a3b8;
  --text-gold: #fef08a;
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", sans-serif;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-sans);
  user-select: none;
  -webkit-user-select: none;
}

/* ==========================================================================
   1. 顶部状态栏
   ========================================================================== */
.m-navbar {
  position: absolute;
  top: max(8px, var(--safe-top));
  left: 8px;
  right: 8px;
  height: 48px;
  background: var(--bg-panel);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid var(--gold-border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  z-index: 20;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.85);
}

.m-nav-left {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.m-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle, #fde047 0%, #f59e0b 45%, #991b1b 90%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  border: 1.5px solid var(--gold-border-bright);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
  flex-shrink: 0;
}

.m-title-wrap {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.m-title-wrap h1 {
  font-family: var(--font-serif);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.5px;
}

.m-subtitle {
  font-size: 9.5px;
  color: var(--text-muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.m-badge {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  color: #fff;
  font-size: 8.5px;
  padding: 1px 5px;
  border-radius: 6px;
  font-weight: 700;
}

.m-nav-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.m-btn-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid var(--gold-border);
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.m-btn-icon:active,
.m-btn-icon.active {
  background: var(--primary-gold);
  color: #000;
}

/* ==========================================================================
   2. 搜索框与筛选芯片
   ========================================================================== */
.m-search-container {
  position: absolute;
  top: calc(max(8px, var(--safe-top)) + 54px);
  left: 8px;
  right: 8px;
  z-index: 15;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}

.m-search-bar {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-panel);
  border: 1.5px solid var(--gold-border);
  border-radius: 12px;
  height: 40px;
  padding: 0 12px 0 36px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.m-search-icon {
  position: absolute;
  left: 12px;
  font-size: 14px;
  color: var(--primary-gold);
  pointer-events: none;
}

.m-search-bar input {
  width: 100%;
  height: 100%;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 12.5px;
}

.m-search-bar input::placeholder {
  color: var(--text-muted);
}

.m-search-clear {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  padding: 4px;
  cursor: pointer;
}

.m-filter-scroll {
  pointer-events: auto;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.m-filter-scroll::-webkit-scrollbar {
  display: none;
}

.m-filter-chip {
  flex-shrink: 0;
  padding: 5px 11px;
  border-radius: 16px;
  background: var(--bg-panel);
  border: 1px solid var(--gold-border);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  white-space: nowrap;
}

.m-filter-chip.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.9), rgba(220, 38, 38, 0.8));
  border-color: #fef08a;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}

/* ==========================================================================
   3. 地图视口
   ========================================================================== */
#m-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* 地图标记 */
.custom-temple-marker {
  cursor: pointer;
  pointer-events: auto;
  transition: none !important;
}

.custom-temple-marker .marker-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: bottom center;
}

.custom-temple-marker .marker-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fef08a 0%, #f59e0b 45%, #991b1b 90%);
  border: 2px solid #fef08a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.9), 0 4px 8px rgba(0, 0, 0, 0.8);
}

.custom-temple-marker .marker-label {
  margin-top: 3px;
  background: rgba(8, 13, 26, 0.95);
  border: 1px solid var(--primary-gold);
  color: #fef08a;
  font-family: var(--font-serif);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

.custom-temple-marker .marker-pulse {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #f59e0b;
  animation: pulse-ring 2.5s infinite;
  pointer-events: none;
}

@keyframes pulse-ring {
  0% { width: 36px; height: 36px; opacity: 1; }
  100% { width: 75px; height: 75px; opacity: 0; border-color: #dc2626; }
}

.sea-site-marker .marker-icon {
  background: radial-gradient(circle at 35% 35%, #e0f2fe 0%, #0284c7 50%, #082f49 90%);
  border-color: #bae6fd;
}
.sea-site-marker .marker-label {
  border-color: #38bdf8;
  color: #e0f2fe;
}

.veg-site-marker .marker-icon {
  background: radial-gradient(circle at 35% 35%, #dcfce7 0%, #16a34a 50%, #052e16 90%);
  border-color: #86efac;
}
.veg-site-marker .marker-label {
  border-color: #22c55e;
  color: #bbf7d0;
}

/* ==========================================================================
   4. 右侧浮动微型地图控制按钮
   ========================================================================== */
.m-map-tools {
  position: absolute;
  right: 8px;
  bottom: calc(66px + var(--safe-bottom));
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.m-tool-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-panel);
  border: 1.5px solid var(--gold-border);
  color: var(--gold-glow);
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.m-tool-btn:active,
.m-tool-btn.active {
  background: var(--primary-gold);
  color: #000;
}

/* 俯冲提示 Toast */
.m-dive-toast {
  position: absolute;
  top: calc(max(8px, var(--safe-top)) + 104px);
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: rgba(8, 13, 26, 0.96);
  border: 1.5px solid var(--primary-gold);
  border-radius: 20px;
  padding: 6px 14px;
  color: #fef08a;
  font-size: 11.5px;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(0,0,0,0.9);
  z-index: 25;
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.m-dive-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   5. 底部可交互抽屉 (Bottom Sheet)
   ========================================================================== */
.m-bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(56px + var(--safe-bottom));
  height: 70vh;
  max-height: calc(100dvh - 120px);
  background: var(--bg-panel);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 2px solid var(--gold-border-bright);
  border-radius: 20px 20px 0 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.95);
  transform: translateY(calc(100% + 20px)); /* 默认完全收起，只显示地图 */
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.m-bottom-sheet.open {
  transform: translateY(0); /* 展开模式 */
}

/* 抽屉拖拽把手与标题栏 */
.m-sheet-handle-wrap {
  padding: 8px 14px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  cursor: pointer;
}

.m-sheet-handle {
  width: 38px;
  height: 4.5px;
  border-radius: 3px;
  background: rgba(245, 158, 11, 0.6);
  margin-bottom: 8px;
}

.m-sheet-title-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.m-sheet-title {
  font-family: var(--font-serif);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-gold);
}

.m-sheet-toggle-btn {
  background: rgba(220, 38, 38, 0.25);
  border: 1px solid rgba(220, 38, 38, 0.6);
  color: #fca5a5;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  cursor: pointer;
}

/* 抽屉导航 Tab */
.m-sheet-tabs {
  display: flex;
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1.5px solid rgba(245, 158, 11, 0.25);
  flex-shrink: 0;
}

.m-sheet-tab {
  flex: 1;
  padding: 8px 2px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.m-sheet-tab span {
  font-size: 13px;
}

.m-sheet-tab.active {
  color: var(--text-gold);
  border-bottom: 2.5px solid var(--primary-gold);
  background: rgba(245, 158, 11, 0.14);
  font-weight: 800;
}

/* 抽屉内容滚动容器 */
.m-sheet-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 8px;
}

.m-tab-pane {
  display: none;
}

.m-tab-pane.active {
  display: block;
}

.m-cards-list,
.m-timeline-container,
.m-guide-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ==========================================================================
   6. 移动端卡片样式 (宫庙、素食、仪轨)
   ========================================================================== */
.m-temple-card {
  background: var(--bg-card);
  border: 1.5px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  padding: 12px 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.m-temple-card:active {
  background: var(--bg-card-hover);
  border-color: var(--gold-border-bright);
}

.m-temple-card.selected {
  border-color: var(--gold-border-bright);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
}

.m-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.m-temple-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 800;
  color: var(--text-gold);
}

.m-region-tag {
  font-size: 9.5px;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 700;
}

.m-region-tag.island {
  background: rgba(220, 38, 38, 0.3);
  border: 1px solid rgba(220, 38, 38, 0.7);
  color: #fca5a5;
}

.m-region-tag.mainland {
  background: rgba(37, 99, 235, 0.3);
  border: 1px solid rgba(37, 99, 235, 0.7);
  color: #93c5fd;
}

.m-temple-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.m-temple-pill {
  font-size: 10px;
  color: #fef08a;
  background: rgba(245, 158, 11, 0.16);
  border-left: 3px solid var(--primary-gold);
  padding: 3px 6px;
  border-radius: 3px;
  margin-bottom: 8px;
  display: inline-block;
  line-height: 1.4;
}

.m-temple-info {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 8px;
}

.m-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.m-card-btn {
  flex: 1;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  background: rgba(15, 23, 42, 0.85);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}

.m-card-btn.fly {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(220, 38, 38, 0.35));
  border-color: var(--primary-gold);
  color: #fef08a;
}

/* 素食卡片 */
.m-veg-card {
  background: var(--bg-card);
  border: 1.5px solid rgba(34, 197, 94, 0.35);
  border-radius: 12px;
  padding: 12px 10px;
  cursor: pointer;
}

.m-veg-title {
  font-family: var(--font-serif);
  font-size: 14.5px;
  color: #86efac;
  font-weight: 800;
  margin-bottom: 4px;
}

.m-veg-highlight {
  font-size: 11px;
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.4);
  padding: 3px 6px;
  border-radius: 4px;
  margin-bottom: 6px;
  display: inline-block;
  line-height: 1.4;
}

/* 日程卡片 */
.m-timeline-day {
  background: var(--bg-card);
  border: 1.5px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  padding: 12px 10px;
}

.m-timeline-head {
  font-family: var(--font-serif);
  font-size: 14.5px;
  color: var(--text-gold);
  font-weight: 800;
  margin-bottom: 6px;
}

.m-timeline-highlight {
  font-size: 11.5px;
  color: #fef08a;
  background: rgba(245, 158, 11, 0.15);
  border-left: 3px solid var(--primary-gold);
  padding: 6px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.m-timeline-event {
  background: rgba(15, 23, 42, 0.7);
  padding: 6px 8px;
  border-radius: 6px;
  margin-bottom: 5px;
  font-size: 11px;
  line-height: 1.4;
}

/* 参拜戒规 */
.m-guide-card {
  background: var(--bg-card);
  border: 1.5px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  padding: 12px 10px;
}

.m-guide-title {
  font-family: var(--font-serif);
  font-size: 14.5px;
  color: var(--text-gold);
  font-weight: 800;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  padding-bottom: 4px;
}

.m-guide-rule {
  margin-bottom: 8px;
  font-size: 11.5px;
  line-height: 1.5;
}

.m-guide-rule strong {
  color: #fef08a;
}

/* ==========================================================================
   7. 底部常驻原生级导航栏 (Bottom App Bar)
   ========================================================================== */
.m-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(56px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(8, 13, 26, 0.98);
  border-top: 1.5px solid var(--gold-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.9);
}

.m-nav-item {
  flex: 1;
  height: 100%;
  background: none;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
}

.m-nav-item .m-nav-icon {
  font-size: 18px;
}

.m-nav-item .m-nav-text {
  font-size: 10px;
  font-weight: 600;
}

.m-nav-item.active {
  color: var(--text-gold);
}

.m-nav-item.active .m-nav-icon {
  transform: scale(1.15);
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.8));
}

.m-nav-item.active .m-nav-text {
  font-weight: 800;
}

/* ==========================================================================
   8. 详尽弹窗 (Modal)
   ========================================================================== */
.m-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.m-modal.open {
  display: flex;
}

.m-modal-card {
  width: 100%;
  max-width: 500px;
  max-height: 85dvh;
  background: #090f1d;
  border: 2px solid var(--gold-border-bright);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.95);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.m-modal-header {
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(220, 38, 38, 0.25));
  border-bottom: 1.5px solid var(--gold-border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.m-modal-header h2 {
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--text-gold);
}

.m-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 2px 6px;
}

.m-modal-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 14px;
  color: #e2e8f0;
  font-size: 12.5px;
  line-height: 1.7;
}

.m-modal-body h3 {
  font-family: var(--font-serif);
  font-size: 14.5px;
  color: var(--text-gold);
  margin: 14px 0 6px;
  border-left: 3px solid var(--primary-gold);
  padding-left: 8px;
}

.m-modal-body ul, .m-modal-body ol {
  padding-left: 18px;
  margin-bottom: 10px;
}

.m-modal-body li {
  margin-bottom: 5px;
}

/* ==========================================================================
   开场天庭法相与入轨动画 (Prologue & 9 Emperor Gods Animation)
   ========================================================================== */
.prologue-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(circle at 50% 30%, #0f1c3f 0%, #070d1e 65%, #020408 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  transition: opacity 1.0s cubic-bezier(0.16, 1, 0.3, 1), transform 1.0s cubic-bezier(0.16, 1, 0.3, 1);
}

.prologue-overlay.hidden {
  opacity: 0;
  transform: scale(1.06);
  pointer-events: none;
}

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

.lantern-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.prologue-scene {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 16px;
  min-height: 100dvh;
  justify-content: center;
}

/* ==========================================================================
   九皇至尊金龙圣船 · 破浪正面驶向观众 (Sacred Imperial Dragon Ship & Animated Waves)
   ========================================================================== */
.sacred-ship-stage {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 20;
}

.ship-ocean-viewport {
  position: relative;
  width: 100%;
  max-width: 920px;
  height: 420px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.95));
}

.sacred-ship-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: sacredShipSailing 6s ease-in-out infinite;
  transform-origin: 50% 85%;
  will-change: transform;
}

.sacred-dragon-ship-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}

/* 船体破浪起伏动画 (Ship Pitch, Heave & Roll with ocean swells) */
@keyframes sacredShipSailing {
  0% {
    transform: translateY(0px) rotate(0deg) scale(1);
  }
  25% {
    transform: translateY(-16px) rotate(-1.5deg) scale(1.02);
  }
  50% {
    transform: translateY(8px) rotate(1.2deg) scale(0.985);
  }
  75% {
    transform: translateY(-12px) rotate(1.4deg) scale(1.015);
  }
  100% {
    transform: translateY(0px) rotate(0deg) scale(1);
  }
}

/* 左侧劈波卷雪浪花 (Left Bow Breaking Wave) */
.bow-wave-left {
  animation: waveSurgeLeft 3.5s ease-in-out infinite;
  transform-origin: 480px 450px;
}

@keyframes waveSurgeLeft {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.88;
  }
  50% {
    transform: translate(-18px, -12px) scale(1.12);
    opacity: 1;
  }
}

/* 右侧劈波卷雪浪花 (Right Bow Breaking Wave) */
.bow-wave-right {
  animation: waveSurgeRight 3.5s ease-in-out infinite;
  transform-origin: 480px 450px;
}

@keyframes waveSurgeRight {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.88;
  }
  50% {
    transform: translate(18px, -12px) scale(1.12);
    opacity: 1;
  }
}

/* 船首激射飞溅浪花与水珠 (Central Upward Wave Spray & Splash Droplets) */
.central-spray-burst {
  animation: sprayBurst 2.8s ease-in-out infinite alternate;
  transform-origin: 480px 420px;
}

@keyframes sprayBurst {
  0% {
    transform: translateY(0px) scale(0.85);
    opacity: 0.45;
  }
  50% {
    transform: translateY(-24px) scale(1.22);
    opacity: 1;
  }
  100% {
    transform: translateY(-8px) scale(1.05);
    opacity: 0.75;
  }
}

/* 龙须随海风狂舞 (Dragon Whiskers Swaying in the Wind) */
.dragon-whisker-left {
  animation: whiskerLeftSway 3s ease-in-out infinite;
  transform-origin: 440px 350px;
}

@keyframes whiskerLeftSway {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-6deg) translateY(-5px); }
}

.dragon-whisker-right {
  animation: whiskerRightSway 3s ease-in-out infinite;
  transform-origin: 520px 350px;
}

@keyframes whiskerRightSway {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(6deg) translateY(-5px); }
}

/* 神幡旗帜迎风展动 (Sacred Banners Fluttering) */
.flutter-banner-main {
  animation: bannerMainFlutter 3.2s ease-in-out infinite;
  transform-origin: 484px 15px;
}

@keyframes bannerMainFlutter {
  0%, 100% { transform: skewX(0deg) rotate(0deg); }
  50% { transform: skewX(6deg) rotate(2.5deg); }
}

.flutter-banner-left {
  animation: bannerLeftFlutter 3.8s ease-in-out infinite;
  transform-origin: 320px 55px;
}

@keyframes bannerLeftFlutter {
  0%, 100% { transform: skewX(0deg); }
  50% { transform: skewX(-5deg); }
}

.flutter-banner-right {
  animation: bannerRightFlutter 3.5s ease-in-out infinite;
  transform-origin: 640px 55px;
}

@keyframes bannerRightFlutter {
  0%, 100% { transform: skewX(0deg); }
  50% { transform: skewX(5deg); }
}

/* 船舷神灯轻摇 (Nine Emperor Lanterns Swinging) */
.ship-lantern {
  animation: lanternSwing 3.6s ease-in-out infinite alternate;
  transform-origin: 0 0;
}

@keyframes lanternSwing {
  0% { transform: rotate(-5deg); }
  100% { transform: rotate(6deg); }
}

/* 神明登舟交互效果 (Interactive Deity on Ship) */
.ship-god-unit {
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.ship-god-unit:hover {
  filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.95)) !important;
  transform: scale(1.14) translateY(-14px) !important;
}

.ship-god-unit.chief-god:hover {
  filter: drop-shadow(0 0 32px rgba(239, 68, 68, 0.95)) drop-shadow(0 0 16px rgba(245, 158, 11, 0.9)) !important;
  transform: scale(1.20) translateY(-18px) !important;
}

.ship-god-unit.highlighted {
  filter: drop-shadow(0 0 26px rgba(245, 158, 11, 1)) !important;
  transform: scale(1.15) translateY(-15px) !important;
}

.ship-god-unit.chief-god.highlighted {
  filter: drop-shadow(0 0 35px rgba(239, 68, 68, 1)) drop-shadow(0 0 20px rgba(245, 158, 11, 1)) !important;
  transform: scale(1.22) translateY(-20px) !important;
}

/* 船下九皇神位巡礼导引条 (Interactive Deity Badges Bar) */
.ship-deities-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
  width: 100%;
  max-width: 940px;
  overflow-x: auto;
  padding: 4px 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.ship-deities-nav::-webkit-scrollbar {
  display: none;
}

.deity-nav-pill {
  flex-shrink: 0;
  padding: 5px 11px;
  border-radius: 14px;
  background: rgba(18, 12, 8, 0.94);
  border: 1.2px solid rgba(245, 158, 11, 0.4);
  color: #fef08a;
  font-family: var(--font-serif);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.7);
}

.deity-nav-pill:hover, .deity-nav-pill.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.4), rgba(220, 38, 38, 0.4));
  border-color: #fef08a;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.85);
}

.deity-nav-pill.chief {
  border-color: #ef4444;
  background: rgba(50, 10, 10, 0.95);
  color: #fca5a5;
  font-weight: 900;
}

.deity-nav-pill.chief:hover, .deity-nav-pill.chief.active {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: #fff;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.95);
}

/* 移动端响应式船体优化 */
@media (max-width: 768px) {
  .ship-ocean-viewport {
    height: 270px !important;
    max-width: 100vw !important;
  }
  .sacred-ship-stage {
    margin-bottom: 2px !important;
  }
  .ship-deities-nav {
    justify-content: flex-start !important;
    gap: 5px !important;
  }
  .deity-nav-pill {
    padding: 3px 8px !important;
    font-size: 10px !important;
  }
}
