/* ==========================================================================
   申鹤 · 孤辰茕怀 | Genshin Impact Shenhe Official Shrine
   Liyue Adeptus Aesthetic Theme (Oriental Ink, Jade Frost & Red Silk)
   Fully Optimized for Desktop, Tablet & Mobile (No horizontal overflow)
   ========================================================================== */

/* High-Performance Genshin UI Native Typography (Zero network font blocking) */
:root {
  --ink-black: #080d16;
  --mountain-navy: #0d1726;
  --mist-blue: #132236;
  --jade-frost: #a5f3fc;
  --ice-cyan: #38bdf8;
  --adeptus-gold: #d3bc8e;
  --adeptus-gold-bright: #fef08a;
  --gold-glow: rgba(211, 188, 142, 0.35);
  --cinnabar-red: #d9263e;
  --red-rope: #e11d48;
  --rope-glow: rgba(225, 29, 72, 0.4);
  --paper-cream: #ece5d8;
  --text-primary: #ece5d8;
  --text-secondary: #94a3b8;
  --font-calligraphy: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  background-color: var(--ink-black);
  color: var(--text-primary);
  font-family: var(--font-serif);
  line-height: 1.7;
  background-image: 
    radial-gradient(ellipse at 50% 0%, rgba(14, 46, 75, 0.4) 0%, transparent 60%),
    radial-gradient(circle at 10% 40%, rgba(15, 23, 42, 0.8) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(225, 29, 72, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, #070d18 0%, #05080f 100%);
  background-attachment: fixed;
}

/* Background Snow Canvas */
#snow-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #060a12;
}
::-webkit-scrollbar-thumb {
  background: #1e3a5f;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--adeptus-gold);
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.25rem;
  position: relative;
  z-index: 2;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: rgba(6, 10, 18, 0.9);
  border-bottom: 1px solid rgba(226, 179, 87, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  z-index: 100;
  transition: all 0.3s ease;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-icon-wrapper {
  position: relative;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--adeptus-gold);
  object-fit: cover;
  box-shadow: 0 0 10px var(--gold-glow);
}

.brand-text-col {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-calligraphy);
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #ffffff 20%, #e2b357 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

.brand-sub {
  font-size: 0.65rem;
  font-family: var(--font-sans);
  color: var(--jade-frost);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.25s ease;
  position: relative;
  padding: 0.35rem 0;
  letter-spacing: 0.06em;
}

.nav-link:hover, .nav-link.active {
  color: #fff;
  text-shadow: 0 0 10px rgba(165, 243, 252, 0.6);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0%;
  height: 2px;
  background: var(--cinnabar-red);
  box-shadow: 0 0 8px var(--rope-glow);
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Nav Audio Player (Liyue Adeptus Disc) */
.nav-music {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(14, 27, 44, 0.85);
  border: 1px solid rgba(226, 179, 87, 0.3);
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  flex-shrink: 0;
}

.disc-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: radial-gradient(circle, #d9263e 25%, #0a1322 75%);
  border: 2px solid var(--adeptus-gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-calligraphy);
  font-size: 0.8rem;
  color: #fff;
  transition: transform 0.3s;
}

.disc-btn.playing {
  animation: disc-spin 4s linear infinite;
  box-shadow: 0 0 12px var(--rope-glow);
}

@keyframes disc-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.music-info {
  display: flex;
  flex-direction: column;
}

.music-title {
  font-size: 0.75rem;
  color: #fff;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-status {
  font-size: 0.62rem;
  color: var(--adeptus-gold);
}

.music-toggle {
  background: none;
  border: none;
  color: var(--jade-frost);
  cursor: pointer;
  font-size: 0.85rem;
  transition: transform 0.2s;
}
.music-toggle:hover {
  transform: scale(1.15);
  color: #fff;
}

/* Mobile Bottom Navigation Dock (Genshin Quick Bar) */
.mobile-bottom-dock {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: rgba(6, 10, 18, 0.95);
  border-top: 1px solid rgba(226, 179, 87, 0.25);
  z-index: 100;
  justify-content: space-around;
  align-items: center;
  padding: 0 0.5rem;
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.72rem;
  font-family: var(--font-serif);
  gap: 2px;
  flex: 1;
  padding: 4px 0;
  transition: color 0.2s;
}

.dock-item.active, .dock-item:hover {
  color: var(--adeptus-gold);
}

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

/* ==========================================================================
   SECTION COMMON HEADERS & SEALS
   ========================================================================== */
.section {
  padding: 5.5rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 2.75rem;
  position: relative;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--adeptus-gold);
  border: 1px solid rgba(226, 179, 87, 0.4);
  padding: 0.2rem 0.8rem;
  border-radius: 9999px;
  background: rgba(226, 179, 87, 0.08);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-calligraphy);
  font-size: 2.5rem;
  letter-spacing: 0.06em;
  background: linear-gradient(180deg, #ffffff 40%, #bae6fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 0.92rem;
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Traditional Chinese Vermilion Seal Stamp */
.seal-stamp {
  display: inline-block;
  font-family: var(--font-calligraphy);
  font-size: 0.8rem;
  color: #fff;
  background-color: var(--cinnabar-red);
  border: 1.5px solid #ff7b91;
  border-radius: 3px;
  padding: 0.1rem 0.4rem;
  line-height: 1.2;
  box-shadow: 0 0 10px rgba(217, 38, 62, 0.5);
  letter-spacing: 0.1em;
  vertical-align: middle;
}

/* ==========================================================================
   HERO STAGE (绝云仙姿)
   ========================================================================== */
.hero-section {
  min-height: 100vh;
  padding-top: 85px;
  padding-bottom: 3rem;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 70% 45%, rgba(14, 116, 144, 0.18) 0%, transparent 60%),
    radial-gradient(circle at 30% 60%, rgba(225, 29, 72, 0.08) 0%, transparent 50%);
  pointer-events: none;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  grid-template-areas:
    "header stage"
    "details stage";
  align-items: center;
  gap: 2.5rem;
  width: 100%;
  position: relative;
  z-index: 2;
}

.hero-header-area {
  grid-area: header;
}

.hero-details-area {
  grid-area: details;
}

.adeptus-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(14, 27, 44, 0.7);
  border: 1px solid rgba(165, 243, 252, 0.25);
  border-radius: 9999px;
  padding: 0.3rem 0.85rem;
  font-size: 0.8rem;
  color: var(--jade-frost);
  width: fit-content;
  margin-bottom: 1.25rem;
}

.time-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ice-cyan);
  box-shadow: 0 0 8px var(--ice-cyan);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.hero-main-title {
  font-family: var(--font-calligraphy);
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.hero-main-title .char-name {
  background: linear-gradient(180deg, #ffffff 30%, #a5f3fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 35px rgba(165, 243, 252, 0.3);
}

.hero-main-title .epithet {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  letter-spacing: 0.2em;
  color: var(--adeptus-gold);
  margin-top: 0.35rem;
  font-weight: 600;
}

/* Dialogue Box (Genshin Style) */
.genshin-dialog-box {
  background: linear-gradient(135deg, rgba(14, 23, 38, 0.94), rgba(6, 10, 18, 0.94));
  border: 1px solid rgba(226, 179, 87, 0.35);
  border-radius: 6px;
  padding: 1.2rem 1.4rem;
  position: relative;
  margin-bottom: 1.75rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.genshin-dialog-box::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 15px;
  width: 35px;
  height: 2px;
  background: var(--cinnabar-red);
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.dialog-speaker {
  font-family: var(--font-calligraphy);
  font-size: 1.1rem;
  color: var(--adeptus-gold);
}

.dialog-cv-tag {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-family: var(--font-sans);
}

.dialog-text {
  font-size: 0.95rem;
  color: #e2e8f0;
  line-height: 1.7;
  font-style: italic;
  min-height: 48px;
}

.hero-btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Genshin Styled Buttons */
.genshin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: 4px;
  font-family: var(--font-serif);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
}

.btn-frost {
  background: linear-gradient(135deg, #0e7490, #0284c7);
  color: #fff;
  border: 1px solid rgba(165, 243, 252, 0.4);
  box-shadow: 0 4px 15px rgba(14, 116, 144, 0.35);
}
.btn-frost:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 116, 144, 0.55);
}

.btn-redrope {
  background: linear-gradient(135deg, #be123c, #9f1239);
  color: #fff;
  border: 1px solid rgba(244, 63, 94, 0.4);
  box-shadow: 0 4px 15px rgba(190, 18, 60, 0.35);
}
.btn-redrope:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.55);
}

.btn-adeptus {
  background: rgba(14, 27, 44, 0.8);
  color: var(--adeptus-gold);
  border: 1px solid rgba(226, 179, 87, 0.4);
}
.btn-adeptus:hover {
  transform: translateY(-2px);
  border-color: var(--adeptus-gold);
  color: #fff;
}

/* Character Visual Stage Anchor (Pinpoint Precision) */
.hero-stage-wrapper {
  grid-area: stage;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.char-anchor {
  position: relative;
  display: inline-block;
  max-width: 100%;
  margin: 0 auto;
}

.adeptus-halo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 440px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 1px dashed rgba(226, 179, 87, 0.2);
  background: radial-gradient(circle, rgba(14, 116, 144, 0.15) 0%, rgba(226, 179, 87, 0.05) 50%, transparent 75%);
  animation: halo-rotate 30s linear infinite;
  pointer-events: none;
  z-index: 1;
}

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

.shenhe-splash-img {
  position: relative;
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  z-index: 2;
  filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.9)) drop-shadow(0 0 20px rgba(56, 189, 248, 0.25));
  user-select: none;
  mask-image: linear-gradient(180deg, #000 82%, transparent 98%);
  -webkit-mask-image: linear-gradient(180deg, #000 82%, transparent 98%);
}

/* Sigils Toggle Button (allows 100% clean wallpaper view) */
.sigils-toggle-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  z-index: 15;
  background: rgba(14, 27, 44, 0.65);
  border: 1px solid rgba(165, 243, 252, 0.35);
  border-radius: 20px;
  color: #bae6fd;
  font-family: var(--font-serif);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  padding: 4px 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.25s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.sigils-toggle-btn:hover {
  background: rgba(14, 165, 233, 0.25);
  border-color: #38bdf8;
  color: #fff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.sigils-toggle-btn.off {
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.5);
}

.sigils-toggle-btn.off .toggle-icon {
  opacity: 0.5;
}

/* Hide Sigils State */
.hero-stage-wrapper.hide-sigils .talisman-spot {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: scale(0.6) !important;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Talisman Hotspots (Zero Occlusion Genshin Cryo Sigils) */
.talisman-spot {
  position: absolute;
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid rgba(165, 243, 252, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.35), inset 0 0 6px rgba(165, 243, 252, 0.18);
  animation: cryo-pulse 2.6s ease-in-out infinite alternate;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}

.spot-core {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a5f3fc;
  box-shadow: 0 0 8px #38bdf8, 0 0 14px rgba(165, 243, 252, 0.85);
  pointer-events: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.spot-wrist {
  border-color: rgba(255, 100, 130, 0.5);
  box-shadow: 0 0 8px rgba(255, 77, 109, 0.35), inset 0 0 6px rgba(255, 100, 130, 0.2);
}

.spot-wrist .rope-core {
  background: #ff4d6d;
  box-shadow: 0 0 8px #ff1744, 0 0 14px rgba(255, 77, 109, 0.9);
}

.talisman-spot:hover, .talisman-spot:focus {
  transform: scale(1.18) !important;
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.8), inset 0 0 10px rgba(165, 243, 252, 0.4);
}

.talisman-spot.spot-wrist:hover {
  border-color: #fff;
  box-shadow: 0 0 18px rgba(255, 77, 109, 0.8), inset 0 0 10px rgba(255, 100, 130, 0.4);
}

.talisman-spot:hover .spot-core {
  transform: scale(1.4);
}

.talisman-spot::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 115%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 19, 32, 0.94);
  color: #e0f2fe;
  font-family: var(--font-serif);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 0.22rem 0.55rem;
  border-radius: 4px;
  border: 1px solid rgba(165, 243, 252, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 8px rgba(56, 189, 248, 0.3);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.talisman-spot:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

@keyframes cryo-pulse {
  0% {
    transform: scale(0.96);
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.25), inset 0 0 4px rgba(165, 243, 252, 0.15);
    border-color: rgba(165, 243, 252, 0.35);
  }
  100% {
    transform: scale(1.08);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.6), inset 0 0 8px rgba(165, 243, 252, 0.35);
    border-color: rgba(165, 243, 252, 0.75);
  }
}

/* Hotspots on Shenhe (1895x1642 exact coordinates) */
.spot-head { top: 19%; left: 54%; }
.spot-wrist { top: 48%; left: 60%; }
.spot-spear { top: 26%; left: 74%; }
.spot-heart { top: 36%; left: 51%; }

/* Speech Bubble */
.character-speech-bubble {
  position: absolute;
  top: 15%;
  right: -25px;
  background: rgba(10, 19, 32, 0.96);
  border: 1px solid var(--adeptus-gold);
  border-radius: 8px;
  padding: 0.9rem 1.2rem;
  max-width: 270px;
  color: #fff;
  font-size: 0.88rem;
  line-height: 1.6;
  z-index: 25;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.3s ease;
}

.character-speech-bubble.active {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   VOICE ARCHIVES (仙音听雪阁)
   ========================================================================== */
.voice-deck-container {
  background: linear-gradient(135deg, rgba(14, 24, 38, 0.75), rgba(8, 14, 24, 0.75));
  border: 1px solid rgba(226, 179, 87, 0.25);
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.voice-deck-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid rgba(226, 179, 87, 0.15);
  padding-bottom: 1rem;
}

.lang-toggle-box {
  display: flex;
  background: rgba(6, 10, 18, 0.85);
  border: 1px solid rgba(226, 179, 87, 0.3);
  border-radius: 6px;
  overflow: hidden;
}

.lang-switch-btn {
  padding: 0.5rem 1.1rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-serif);
}

.lang-switch-btn.active {
  background: var(--adeptus-gold);
  color: #060a12;
  font-weight: 700;
}

.cat-filter-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cat-pill {
  padding: 0.35rem 0.85rem;
  background: rgba(14, 27, 44, 0.6);
  border: 1px solid rgba(165, 243, 252, 0.15);
  color: var(--text-secondary);
  font-size: 0.8rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-serif);
  white-space: nowrap;
}

.cat-pill:hover, .cat-pill.active {
  background: rgba(226, 179, 87, 0.15);
  border-color: var(--adeptus-gold);
  color: #fff;
}

/* Jade Slip Voice Grid */
.voice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
}

.jade-voice-card {
  background: rgba(10, 19, 32, 0.85);
  border: 1px solid rgba(165, 243, 252, 0.15);
  border-radius: 8px;
  padding: 1.15rem;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.jade-voice-card:hover {
  border-color: var(--adeptus-gold);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(226, 179, 87, 0.15);
}

.jade-voice-card.playing {
  border-color: var(--cinnabar-red);
  box-shadow: 0 0 16px var(--rope-glow);
}

.card-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.voice-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  background: rgba(14, 116, 144, 0.25);
  border: 1px solid rgba(165, 243, 252, 0.3);
  border-radius: 4px;
  color: var(--jade-frost);
}

.voice-play-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(14, 27, 44, 0.8);
  border: 1px solid var(--adeptus-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--adeptus-gold);
  font-size: 0.8rem;
  transition: all 0.2s;
}

.jade-voice-card:hover .voice-play-circle {
  background: var(--adeptus-gold);
  color: #060a12;
}

.jade-voice-card.playing .voice-play-circle {
  background: var(--cinnabar-red);
  color: #fff;
  border-color: #fff;
}

.voice-card-title {
  font-family: var(--font-calligraphy);
  font-size: 1.18rem;
  letter-spacing: 0.05em;
  color: #fff;
  margin-bottom: 0.45rem;
}

.voice-card-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Floating Subtitle Bar */
.genshin-floating-subtitle {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(6, 10, 18, 0.95);
  border: 1px solid var(--adeptus-gold);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  padding: 0.8rem 1.4rem;
  z-index: 99;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 800px;
  width: 90%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.genshin-floating-subtitle.active {
  opacity: 1;
  pointer-events: auto;
}

.sub-chibi-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--adeptus-gold);
  object-fit: cover;
  flex-shrink: 0;
}

.sub-text-col {
  flex: 1;
  overflow: hidden;
}

.sub-speaker-info {
  font-size: 0.72rem;
  color: var(--adeptus-gold);
  font-family: var(--font-calligraphy);
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.sub-dialogue-body {
  font-size: 0.88rem;
  color: #fff;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   RED ROPE FORTUNE
   ========================================================================== */
.fortune-divination-arena {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.bamboo-cylinder {
  position: relative;
  width: 130px;
  height: 210px;
  background: linear-gradient(180deg, #26190e 0%, #160e08 100%);
  border: 2px solid var(--adeptus-gold);
  border-radius: 14px 14px 26px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8), 0 0 25px var(--gold-glow);
  cursor: pointer;
  transition: transform 0.3s;
}

.bamboo-cylinder:hover {
  transform: scale(1.05);
}

.bamboo-cylinder.shaking {
  animation: cylinder-shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both infinite;
}

@keyframes cylinder-shake {
  10%, 90% { transform: translate3d(-3px, 0, 0) rotate(-3deg); }
  20%, 80% { transform: translate3d(4px, 0, 0) rotate(4deg); }
  30%, 50%, 70% { transform: translate3d(-5px, 0, 0) rotate(-4deg); }
  40%, 60% { transform: translate3d(5px, 0, 0) rotate(3deg); }
}

.cylinder-rope-ring {
  position: absolute;
  top: 48%;
  left: -8px;
  right: -8px;
  height: 18px;
  background: var(--cinnabar-red);
  box-shadow: 0 0 12px var(--rope-glow);
  border-radius: 4px;
}

.cylinder-inscription {
  font-family: var(--font-calligraphy);
  font-size: 1.25rem;
  letter-spacing: 0.2em;
  writing-mode: vertical-rl;
  color: var(--adeptus-gold);
  z-index: 2;
}

.adeptus-talisman-scroll {
  background: linear-gradient(135deg, rgba(20, 14, 9, 0.96), rgba(10, 8, 5, 0.96));
  border: 2px solid var(--adeptus-gold);
  border-radius: 10px;
  max-width: 600px;
  width: 100%;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px var(--gold-glow);
  display: none;
  animation: talisman-rise 0.4s ease;
  position: relative;
}

.adeptus-talisman-scroll.active {
  display: block;
}

@keyframes talisman-rise {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

.talisman-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed rgba(226, 179, 87, 0.3);
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
}

.talisman-level-text {
  font-family: var(--font-calligraphy);
  font-size: 1.7rem;
  letter-spacing: 0.06em;
}

.talisman-four-verses {
  text-align: center;
  margin: 1.5rem 0;
  font-family: var(--font-calligraphy);
  font-size: 1.35rem;
  letter-spacing: 0.18em;
  color: #fff;
  line-height: 2.1;
}

.talisman-shenhe-insight {
  background: rgba(226, 179, 87, 0.08);
  border-left: 3px solid var(--adeptus-gold);
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  color: #f1f5f9;
  line-height: 1.6;
}

.insight-speaker {
  color: var(--adeptus-gold);
  font-family: var(--font-calligraphy);
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.talisman-yi-ji-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.yiji-box {
  background: rgba(6, 10, 18, 0.6);
  border: 1px solid rgba(226, 179, 87, 0.2);
  padding: 0.75rem;
  border-radius: 6px;
}

.yiji-title {
  font-family: var(--font-calligraphy);
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}
.yiji-title.yi { color: #34d399; }
.yiji-title.ji { color: #f87171; }

.yiji-tags-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.yiji-tag {
  font-size: 0.75rem;
  padding: 0.12rem 0.5rem;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
}

/* ==========================================================================
   WISH WALL
   ========================================================================== */
.wish-hall-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 2rem;
}

.wish-submit-box {
  background: linear-gradient(135deg, rgba(14, 24, 38, 0.8), rgba(8, 14, 24, 0.8));
  border: 1px solid rgba(226, 179, 87, 0.25);
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  height: fit-content;
}

.wish-box-title {
  font-family: var(--font-calligraphy);
  font-size: 1.35rem;
  color: var(--adeptus-gold);
  margin-bottom: 1.25rem;
  border-bottom: 1px dashed rgba(226, 179, 87, 0.25);
  padding-bottom: 0.65rem;
}

.form-field {
  margin-bottom: 1.25rem;
}

.field-label {
  display: block;
  font-size: 0.82rem;
  color: var(--jade-frost);
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.genshin-input, .genshin-textarea {
  width: 100%;
  background: rgba(6, 10, 18, 0.85);
  border: 1px solid rgba(165, 243, 252, 0.2);
  border-radius: 4px;
  padding: 0.65rem 0.85rem;
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.genshin-input:focus, .genshin-textarea:focus {
  border-color: var(--adeptus-gold);
  box-shadow: 0 0 10px var(--gold-glow);
}

.genshin-textarea {
  min-height: 95px;
  resize: vertical;
}

.rope-color-selector, .avatar-selector {
  display: flex;
  gap: 0.75rem;
}

.color-dot-label {
  cursor: pointer;
}
.color-dot-label input { display: none; }
.color-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: transform 0.2s;
}
.color-dot-label input:checked + .color-swatch {
  transform: scale(1.2);
  border-color: #fff;
}

.swatch-red { background: #d9263e; }
.swatch-cyan { background: #06b6d4; }
.swatch-gold { background: #eab308; }
.swatch-frost { background: #93c5fd; }

.avatar-radio-label {
  cursor: pointer;
}
.avatar-radio-label input { display: none; }
.avatar-chibi-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: rgba(6, 10, 18, 0.8);
  padding: 2px;
  transition: all 0.2s;
}
.avatar-radio-label input:checked + .avatar-chibi-img {
  border-color: var(--adeptus-gold);
  transform: scale(1.15);
}

.wish-placard-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  max-height: 600px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.wooden-wish-tablet {
  background: linear-gradient(135deg, rgba(26, 18, 12, 0.92), rgba(14, 10, 6, 0.92));
  border: 1px solid rgba(226, 179, 87, 0.3);
  border-radius: 6px;
  padding: 1.15rem;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s;
}

.wooden-wish-tablet:hover {
  transform: translateY(-3px);
  border-color: var(--adeptus-gold);
}

.tassel-ribbon {
  position: absolute;
  top: -8px;
  right: 18px;
  width: 14px;
  height: 22px;
  border-radius: 2px;
}
.tassel-ribbon.red { background: #d9263e; box-shadow: 0 0 10px rgba(217, 38, 62, 0.6); }
.tassel-ribbon.cyan { background: #06b6d4; box-shadow: 0 0 10px rgba(6, 182, 212, 0.6); }
.tassel-ribbon.gold { background: #eab308; box-shadow: 0 0 10px rgba(234, 179, 8, 0.6); }
.tassel-ribbon.frost { background: #93c5fd; box-shadow: 0 0 10px rgba(147, 197, 253, 0.6); }

.tablet-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.tablet-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--adeptus-gold);
  background: rgba(0, 0, 0, 0.4);
}

.tablet-author {
  font-family: var(--font-calligraphy);
  font-size: 1.1rem;
  color: var(--adeptus-gold);
}

.tablet-time {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-family: var(--font-sans);
}

.tablet-message {
  font-size: 0.88rem;
  color: #f1f5f9;
  line-height: 1.6;
}

/* ==========================================================================
   WALLPAPER GALLERY
   ========================================================================== */
.gallery-shelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.art-frame-card {
  background: rgba(14, 24, 38, 0.75);
  border: 1px solid rgba(226, 179, 87, 0.2);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.art-frame-card:hover {
  transform: translateY(-4px);
  border-color: var(--adeptus-gold);
  box-shadow: 0 10px 30px rgba(226, 179, 87, 0.2);
}

.art-preview-box {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #060a12;
  position: relative;
  cursor: pointer;
}

.art-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.art-frame-card:hover .art-preview-img {
  transform: scale(1.06);
}

.art-info-footer {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.art-caption {
  font-family: var(--font-calligraphy);
  font-size: 1.1rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.art-download-link {
  padding: 0.35rem 0.85rem;
  background: rgba(226, 179, 87, 0.15);
  border: 1px solid var(--adeptus-gold);
  color: var(--adeptus-gold);
  border-radius: 4px;
  font-size: 0.75rem;
  text-decoration: none;
  transition: all 0.2s;
  font-family: var(--font-serif);
  flex-shrink: 0;
}

.art-download-link:hover {
  background: var(--adeptus-gold);
  color: #060a12;
}

/* Lightbox Modal (High-Priority Overlay) */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 6, 12, 0.96);
  z-index: 1000000 !important;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-sizing: border-box;
  cursor: zoom-out;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-img {
  max-width: 94vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
  border: 1.5px solid var(--adeptus-gold);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 35px rgba(212, 175, 55, 0.35);
  cursor: default;
  transition: transform 0.2s ease;
  background: rgba(10, 16, 26, 0.95);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 1.8rem;
  color: var(--adeptus-gold);
  cursor: pointer;
  background: rgba(14, 23, 38, 0.9);
  border: 1.5px solid var(--adeptus-gold);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
  transition: all 0.2s ease;
  z-index: 1000001;
}

.lightbox-close:hover {
  background: var(--adeptus-gold);
  color: #060a12;
  transform: scale(1.1);
}

.lightbox-hint {
  position: absolute;
  bottom: 22px;
  color: var(--gold-light);
  font-size: 0.85rem;
  background: rgba(10, 16, 26, 0.88);
  border: 1px solid rgba(212, 175, 55, 0.4);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  pointer-events: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

/* ==========================================================================
   LORE & CODEX
   ========================================================================== */
.codex-scroll-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.codex-scroll-card {
  background: linear-gradient(135deg, rgba(14, 24, 38, 0.75), rgba(8, 14, 24, 0.75));
  border: 1px solid rgba(226, 179, 87, 0.25);
  border-radius: 8px;
  padding: 1.5rem;
}

.scroll-title-bar {
  font-family: var(--font-calligraphy);
  font-size: 1.35rem;
  color: var(--adeptus-gold);
  border-bottom: 1px solid rgba(226, 179, 87, 0.2);
  padding-bottom: 0.65rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.scroll-body-text {
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.8;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer-banner {
  background: #04070c;
  border-top: 1px solid rgba(226, 179, 87, 0.2);
  padding: 3rem 0;
  text-align: center;
  margin-top: 5rem;
}

.footer-domain-stamp {
  font-family: var(--font-calligraphy);
  font-size: 1.6rem;
  color: var(--adeptus-gold);
  letter-spacing: 0.12em;
  margin-bottom: 0.5rem;
}

.footer-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MOBILE PHONE & TABLET OPTIMIZATION)
   ========================================================================== */
@media (max-width: 980px) {
  /* Navbar */
  .navbar {
    padding: 0 0.85rem;
    height: 58px;
  }
  .nav-links {
    display: none;
  }
  .brand-title {
    font-size: 1.08rem;
  }
  .brand-sub {
    display: none;
  }
  .disc-btn {
    width: 28px;
    height: 28px;
    font-size: 0.72rem;
  }
  .music-title {
    max-width: 75px;
    font-size: 0.68rem;
  }
  .music-status {
    font-size: 0.58rem;
  }
  .music-toggle {
    font-size: 0.78rem;
  }

  /* Show Bottom Dock on Mobile */
  .mobile-bottom-dock {
    display: flex;
  }

  /* Adjust bottom padding of body to avoid dock overlap */
  body {
    padding-bottom: 72px;
  }

  /* Hero Section Mobile Structure */
  .hero-section {
    padding-top: 62px;
    padding-bottom: 1.5rem;
    min-height: auto;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "stage"
      "details";
    gap: 0.85rem;
  }
  .hero-header-area {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .hero-header-area .adeptus-time-badge {
    margin: 0 auto 0.45rem auto;
    font-size: 0.72rem;
    padding: 0.2rem 0.7rem;
  }
  .hero-main-title {
    font-size: 2.2rem;
    line-height: 1.1;
    margin-bottom: 0.25rem;
  }
  .hero-main-title .epithet {
    font-size: 0.82rem;
    letter-spacing: 0.1em;
  }

  .hero-stage-wrapper {
    margin: 0.25rem 0 0.5rem 0;
    width: 100%;
  }
  .char-anchor {
    position: relative;
    display: inline-block;
    max-width: 100%;
    margin: 0 auto;
  }
  .shenhe-splash-img {
    max-height: 220px;
    max-width: 250px;
    width: auto;
    height: auto;
    margin: 0 auto;
  }
  .adeptus-halo {
    max-width: 230px;
  }

  /* Touch-friendly Hotspots (Zero Occlusion) */
  .talisman-spot {
    width: 32px;
    height: 32px;
  }
  .spot-core {
    width: 5px;
    height: 5px;
  }
  .sigils-toggle-btn {
    top: 4px;
    right: 8px;
    font-size: 0.68rem;
    padding: 3px 8px;
  }
  .talisman-spot:active {
    transform: scale(1.18) !important;
    border-color: #fff;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.85);
  }

  /* Speech bubble in mobile (centered right under Shenhe) */
  .character-speech-bubble {
    top: auto;
    bottom: -10px;
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(8px);
    width: 90%;
    max-width: 290px;
    font-size: 0.78rem;
    padding: 0.6rem 0.85rem;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.9);
  }
  .character-speech-bubble.active {
    transform: translateX(-50%) translateY(0);
  }
  .character-speech-bubble::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 6px 6px 6px;
    border-style: solid;
    border-color: transparent transparent var(--adeptus-gold) transparent;
  }

  /* Dialogue Box */
  .genshin-dialog-box {
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
  }
  .dialog-header {
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.35rem;
  }
  .dialog-speaker {
    font-size: 0.95rem;
  }
  .dialog-cv-tag {
    font-size: 0.65rem;
  }
  .dialog-text {
    font-size: 0.82rem;
    line-height: 1.5;
    min-height: auto;
  }

  /* 3 Compact Action Buttons in One Row */
  .hero-btn-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    width: 100%;
  }
  .hero-btn-group .genshin-btn {
    width: 100%;
    padding: 0.55rem 0.25rem;
    font-size: 0.78rem;
    justify-content: center;
    gap: 0.25rem;
    white-space: nowrap;
  }

  /* Sections */
  .section {
    padding: 3.5rem 0;
  }
  .section-title {
    font-size: 1.85rem;
  }
  .section-subtitle {
    font-size: 0.82rem;
    line-height: 1.6;
    margin-top: 0.4rem;
  }
  .section-header {
    margin-bottom: 1.8rem;
  }

  /* Voice Soundboard Mobile */
  .voice-deck-container {
    padding: 1.15rem 0.75rem;
  }
  .voice-deck-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }
  .lang-toggle-box {
    width: 100%;
  }
  .lang-switch-btn {
    flex: 1;
    text-align: center;
    padding: 0.5rem 0;
    font-size: 0.82rem;
  }
  /* Responsive wrapped category pills */
  .cat-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    max-width: 100%;
    padding-bottom: 0.3rem;
  }
  .voice-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .jade-voice-card {
    padding: 1rem;
  }

  /* Subtitle bar on mobile (above bottom dock) */
  .genshin-floating-subtitle {
    bottom: 68px;
    width: calc(100% - 24px);
    left: 12px;
    transform: none;
    padding: 0.6rem 0.85rem;
    gap: 0.65rem;
  }
  .sub-chibi-avatar {
    width: 32px;
    height: 32px;
  }
  .sub-speaker-info {
    font-size: 0.72rem;
  }
  .sub-dialogue-body {
    font-size: 0.8rem;
    line-height: 1.4;
  }

  /* Divination Mobile */
  .bamboo-cylinder {
    width: 110px;
    height: 175px;
  }
  .adeptus-talisman-scroll {
    padding: 1.35rem 1rem;
  }
  .talisman-four-verses {
    font-size: 1.15rem;
    letter-spacing: 0.1em;
    line-height: 1.9;
  }
  .talisman-yi-ji-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  /* Wish Wall Mobile */
  .wish-hall-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .wish-submit-box {
    padding: 1.25rem 1rem;
  }
  .wish-placard-wall {
    max-height: 480px;
    padding-right: 0;
  }

  /* Wallpaper Gallery Mobile */
  .gallery-shelf-grid {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }
  .art-preview-box {
    height: 200px;
  }

  /* Codex Mobile */
  .codex-scroll-grid {
    grid-template-columns: 1fr;
    gap: 1.15rem;
  }
  .codex-scroll-card {
    padding: 1.2rem;
  }
}

/* Extra small screens (iPhone SE, 360px Android) */
@media (max-width: 400px) {
  .hero-main-title {
    font-size: 2.3rem;
  }
  .brand-title {
    font-size: 0.98rem;
  }
  .music-title {
    max-width: 58px;
    font-size: 0.62rem;
  }
  .section-title {
    font-size: 1.65rem;
  }
  .hero-btn-group .genshin-btn {
    font-size: 0.82rem;
  }
  .talisman-four-verses {
    font-size: 1.05rem;
    letter-spacing: 0.06em;
  }
}


/* ==========================================================================
   DYNAMIC THEME & TRIO SYSTEM
   ========================================================================== */
body.theme-shenhe {
  --theme-color: #67e8f9;
  --theme-glow: rgba(103, 232, 249, 0.4);
}
body.theme-ganyu {
  --theme-color: #93c5fd;
  --theme-glow: rgba(147, 197, 253, 0.4);
}
body.theme-xianyun {
  --theme-color: #6ee7b7;
  --theme-glow: rgba(110, 231, 183, 0.4);
}

/* Nav Actions & Webmail Portal */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-shrink: 0;
}

.nav-mail-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  background: rgba(226, 179, 87, 0.12);
  border: 1px solid rgba(226, 179, 87, 0.45);
  border-radius: 9999px;
  color: var(--adeptus-gold);
  font-size: 0.82rem;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.25s ease;
}

.nav-mail-btn:hover {
  background: rgba(226, 179, 87, 0.25);
  border-color: #facc15;
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.35);
  transform: translateY(-1px);
}

.mail-icon {
  font-size: 0.95rem;
}

/* Tab Structure (Eliminates Endless Vertical Scroll) */
.tab-content-wrapper {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 70px);
  padding-top: 70px;
}

.tab-pane {
  display: none;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 2.5rem 0 3.5rem 0;
  min-height: calc(100vh - 180px);
}

.tab-pane.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

#stage.tab-pane {
  padding-top: 1.25rem;
  padding-bottom: 2.5rem;
}

/* Trio Switcher Bar */
.trio-selector-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  width: 100%;
  position: relative;
  z-index: 10;
}

.trio-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1.25rem;
  background: rgba(14, 27, 44, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-primary);
  text-align: left;
}

.trio-btn:hover {
  background: rgba(22, 40, 64, 0.9);
  border-color: rgba(103, 232, 249, 0.4);
  transform: translateY(-2px);
}

.trio-btn.active {
  background: linear-gradient(135deg, rgba(14, 116, 144, 0.45), rgba(8, 51, 68, 0.75));
  border-color: var(--theme-color, #67e8f9);
  box-shadow: 0 0 16px var(--theme-glow, rgba(103, 232, 249, 0.35));
}

.trio-btn-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: visible;
  flex-shrink: 0;
}

.trio-btn-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.element-mini-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  font-size: 0.75rem;
  background: rgba(11, 22, 34, 0.95);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  overflow: hidden;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
}

.element-mini-badge img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  display: block;
}

.trio-btn-info {
  display: flex;
  flex-direction: column;
}

.trio-btn-name {
  font-family: var(--font-calligraphy);
  font-size: 1.2rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  color: #fff;
}

.trio-btn-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

/* Trio Bonds Card */
.trio-bonds-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(103, 232, 249, 0.2);
  border-radius: 12px;
  padding: 1.1rem 1.35rem;
  margin-top: 1.25rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.bonds-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bonds-title {
  font-family: var(--font-calligraphy);
  font-size: 1.05rem;
  color: var(--theme-color, #67e8f9);
}

.bonds-sub {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.trio-bonds-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bond-item-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  transition: all 0.2s ease;
}

.bond-item-card:hover {
  background: rgba(30, 41, 59, 0.75);
  border-color: rgba(103, 232, 249, 0.3);
}

.bond-target-tag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  background: rgba(14, 116, 144, 0.3);
  border: 1px solid rgba(103, 232, 249, 0.3);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--theme-color, #67e8f9);
}

.bond-text {
  flex: 1;
  font-size: 0.86rem;
  color: #cbd5e1;
  line-height: 1.55;
}

.bond-play-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(14, 116, 144, 0.4);
  border: 1px solid rgba(103, 232, 249, 0.4);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all 0.2s;
}

.bond-play-btn:hover {
  background: var(--theme-color, #67e8f9);
  color: #0b1622;
  transform: scale(1.1);
}

/* Voice Character Selector */
.voice-char-selector {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(11, 22, 34, 0.7);
  padding: 0.25rem 0.35rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.voice-char-btn {
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.voice-char-btn:hover {
  color: #fff;
}

.voice-char-btn.active {
  background: var(--theme-color, #67e8f9);
  color: #0b1622;
  font-weight: bold;
}

.full-width-scroll {
  grid-column: 1 / -1;
}

/* ==========================================================================
   MULTI-TIER RESPONSIVE ADAPTATION: MOBILE FIRST -> TABLET -> DESKTOP
   ========================================================================== */
.btn-text-short {
  display: none;
}
.btn-text-full {
  display: inline;
}

.bond-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 0.35rem;
}

.bond-item-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: rgba(30, 41, 59, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  transition: all 0.2s ease;
}

.bond-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  height: 26px;
  border-radius: 9999px;
  background: rgba(14, 116, 144, 0.35);
  border: 1px solid rgba(103, 232, 249, 0.4);
  color: #fff;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.bond-play-btn:hover {
  background: var(--theme-color, #67e8f9);
  color: #0b1622;
  transform: scale(1.05);
}

.play-label {
  display: inline-block;
}

/* Tier 1: Mobile Phones (max-width: 640px) */
@media (max-width: 640px) {
  .btn-text-short {
    display: inline;
  }
  .btn-text-full {
    display: none;
  }
  .play-label {
    display: none;
  }
  .bond-play-btn {
    width: 26px;
    height: 26px;
    padding: 0;
    justify-content: center;
  }

  .trio-selector-bar {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0.85rem;
    width: 100%;
  }
  .trio-btn {
    flex: 1;
    min-width: 0;
    padding: 0.35rem 0.25rem;
    gap: 0.35rem;
    justify-content: center;
  }
  .trio-btn-avatar {
    width: 32px;
    height: 32px;
  }
  .trio-btn-name {
    font-size: 0.95rem;
  }
  .trio-btn-role {
    display: none !important;
  }
  
  .hero-btn-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
    width: 100%;
  }
  .hero-btn-group .genshin-btn {
    padding: 0.5rem 0.15rem;
    font-size: 0.74rem;
    justify-content: center;
  }

  .nav-mail-btn .mail-text {
    display: none;
  }
  .nav-mail-btn {
    padding: 0.35rem 0.55rem;
  }

  .mobile-bottom-dock {
    padding-bottom: max(6px, env(safe-area-inset-bottom, 0px));
  }
}

/* Tier 2: Tablets (641px to 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
  .shenhe-splash-img {
    max-height: 380px !important;
    max-width: 440px !important;
  }
  .adeptus-halo {
    max-width: 380px !important;
    max-height: 380px !important;
  }
  .hero-main-title {
    font-size: 2.8rem;
  }
  .trio-btn {
    padding: 0.5rem 1rem;
    gap: 0.65rem;
  }
  .trio-btn-avatar {
    width: 40px;
    height: 40px;
  }
  .trio-btn-name {
    font-size: 1.15rem;
  }
  .trio-btn-role {
    display: block !important;
    font-size: 0.72rem;
  }
  .gallery-shelf-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .codex-scroll-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .voice-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Tier 3: Desktop & Large Screens (1025px+) */
@media (min-width: 1025px) {
  .gallery-shelf-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .codex-scroll-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .voice-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   Heroines Archive & Dynamic Dossier Styling
   ========================================================================== */
.archive-controls-box {
  background: rgba(10, 16, 26, 0.75);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 2rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.archive-search-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.search-input-wrap {
  flex: 1;
  position: relative;
  min-width: 260px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  opacity: 0.7;
}

#heroine-search {
  width: 100%;
  background: rgba(4, 8, 15, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 8px;
  padding: 0.65rem 1rem 0.65rem 2.4rem;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: all 0.3s ease;
}

#heroine-search:focus {
  border-color: #67e8f9;
  box-shadow: 0 0 12px rgba(103, 232, 249, 0.3);
}

.archive-count-badge {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: #d4af37;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.archive-filters-row {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-label {
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 600;
  min-width: 45px;
}

.filter-btns {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.filter-btn .filter-el-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  vertical-align: middle;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.6));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.filter-btn:hover .filter-el-icon,
.filter-btn.active .filter-el-icon {
  transform: scale(1.18);
}

.filter-btn:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: #d4af37;
  color: #fff;
}

.filter-btn.active {
  background: rgba(212, 175, 55, 0.3);
  border-color: #d4af37;
  color: #fef08a;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* Elemental colors & dynamic glow */
.filter-btn.el-cryo.active, .theme-cryo { border-color: #38bdf8 !important; color: #7dd3fc !important; box-shadow: 0 0 12px rgba(56, 189, 248, 0.4) !important; background: rgba(56, 189, 248, 0.18) !important; }
.filter-btn.el-pyro.active, .theme-pyro { border-color: #f87171 !important; color: #fca5a5 !important; box-shadow: 0 0 12px rgba(248, 113, 113, 0.4) !important; background: rgba(248, 113, 113, 0.18) !important; }
.filter-btn.el-hydro.active, .theme-hydro { border-color: #0ea5e9 !important; color: #38bdf8 !important; box-shadow: 0 0 12px rgba(14, 165, 233, 0.4) !important; background: rgba(14, 165, 233, 0.18) !important; }
.filter-btn.el-electro.active, .theme-electro { border-color: #c084fc !important; color: #d8b4fe !important; box-shadow: 0 0 12px rgba(192, 132, 252, 0.4) !important; background: rgba(192, 132, 252, 0.18) !important; }
.filter-btn.el-anemo.active, .theme-anemo { border-color: #34d399 !important; color: #6ee7b7 !important; box-shadow: 0 0 12px rgba(52, 211, 153, 0.4) !important; background: rgba(52, 211, 153, 0.18) !important; }
.filter-btn.el-geo.active, .theme-geo { border-color: #fbbf24 !important; color: #fde047 !important; box-shadow: 0 0 12px rgba(251, 191, 36, 0.4) !important; background: rgba(251, 191, 36, 0.18) !important; }
.filter-btn.el-dendro.active, .theme-dendro { border-color: #a3e635 !important; color: #bef264 !important; box-shadow: 0 0 12px rgba(163, 230, 53, 0.4) !important; background: rgba(163, 230, 53, 0.18) !important; }
.filter-btn.el-lumine.active, .theme-lumine { border-color: #fef08a !important; color: #fef08a !important; box-shadow: 0 0 12px rgba(254, 240, 138, 0.4) !important; background: rgba(254, 240, 138, 0.18) !important; }

/* Tag element badge inside character cards and modals */
.heroine-tag-el {
  display: inline-flex !important;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.5rem !important;
}

.heroine-tag-el .tag-el-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  vertical-align: middle;
}

.featured-trio-wrap {
  margin-bottom: 2.5rem;
}

.featured-trio-title, .heroines-title-bar {
  font-size: 1.15rem;
  color: #f1f5f9;
  margin-bottom: 1.2rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.heroines-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.heroine-card {
  background: rgba(11, 18, 30, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  gap: 0.9rem;
  position: relative;
  overflow: hidden;
}

.heroine-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--card-accent, #67e8f9);
}

.heroine-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px var(--card-glow, rgba(103, 232, 249, 0.2));
  border-color: var(--card-accent, #67e8f9);
}

.heroine-card-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid var(--card-accent, #67e8f9);
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.4);
}

.heroine-card-info {
  flex: 1;
  overflow: hidden;
}

.heroine-card-name-row {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}

.heroine-card-name {
  font-size: 1.05rem;
  font-weight: bold;
  color: #fff;
}

.heroine-card-title {
  font-size: 0.75rem;
  color: #94a3b8;
}

.heroine-card-meta {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.heroine-tag {
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}

.heroine-card-quote {
  font-size: 0.75rem;
  color: #a0aec0;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-style: italic;
}

/* Modal Styling (Root-Level Fixed Precision) */
.genshin-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.88);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-sizing: border-box;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.genshin-modal-overlay.active {
  display: flex;
  opacity: 1;
}

.genshin-modal-container {
  background: #090e17;
  border: 1px solid var(--adeptus-gold);
  border-radius: 14px;
  max-width: 840px;
  width: 94vw;
  max-height: 88vh;
  overflow-y: auto;
  padding: 1.8rem;
  position: relative;
  box-sizing: border-box;
  margin: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.95), 0 0 35px rgba(212, 175, 55, 0.3);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(244, 63, 94, 0.3);
  border-color: #f43f5e;
  transform: rotate(90deg);
}

.modal-header-flex {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid #d4af37;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.5);
}

.modal-title-col h3 {
  font-size: 1.35rem;
  color: #fff;
  margin-bottom: 0.2rem;
}

.modal-title-sub {
  color: #94a3b8;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.modal-tags-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.modal-quote-box {
  background: rgba(212, 175, 55, 0.08);
  border-left: 3px solid #d4af37;
  padding: 0.8rem 1rem;
  border-radius: 0 8px 8px 0;
  margin-bottom: 1.2rem;
  font-size: 0.88rem;
  color: #fef08a;
  line-height: 1.5;
  font-style: italic;
}

.modal-lore-text {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.65;
}

@media (max-width: 640px) {
  .heroines-card-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .archive-controls-box {
    padding: 0.85rem;
  }
  .search-input-wrap {
    min-width: 100%;
  }
  .archive-count-badge {
    width: 100%;
    text-align: center;
  }
  .genshin-modal-container {
    padding: 1.2rem;
  }
}

/* ==========================================================================
   Hotspot Active Playing & Soundwave Ripple
   ========================================================================== */
.talisman-spot.playing {
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.9), 0 0 24px rgba(212, 175, 55, 0.85) !important;
  animation: spot-soundwave 1.4s infinite ease-out !important;
}

@keyframes spot-soundwave {
  0% {
    box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.85), 0 0 10px rgba(212, 175, 55, 0.6);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(212, 175, 55, 0.2), 0 0 25px rgba(212, 175, 55, 0.5);
    transform: scale(1.15);
  }
  100% {
    box-shadow: 0 0 0 18px rgba(212, 175, 55, 0), 0 0 10px rgba(212, 175, 55, 0);
    transform: scale(1);
  }
}

.sub-lore-tag, .bubble-lore-tag {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: #fef08a;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 4px;
  padding: 0.25rem 0.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  line-height: 1.4;
  font-style: normal;
}

.modal-splash-banner {
  width: 100%;
  height: 230px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.8) 0%, rgba(10, 16, 26, 0.95) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-splash-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  transition: transform 0.4s ease;
  cursor: pointer;
}

.modal-splash-banner:hover img {
  transform: scale(1.05);
}

.modal-splash-badge {
  position: absolute;
  bottom: 10px;
  right: 12px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(212, 175, 55, 0.5);
  color: #fef08a;
  font-size: 0.72rem;
  padding: 0.25rem 0.65rem;
  border-radius: 12px;
  pointer-events: none;
}

/* ==========================================================================
   Enriched Heroine Dossier & Multi-View Gallery Components
   ========================================================================== */
.modal-gallery-box {
  margin-bottom: 1.4rem;
}

.gallery-tabs-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.gallery-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: #94a3b8;
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.gallery-tab-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  color: #fef08a;
  border-color: rgba(212, 175, 55, 0.6);
}

.gallery-tab-btn.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(180, 83, 9, 0.2));
  border-color: var(--adeptus-gold);
  color: #fef08a;
  font-weight: 600;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
}

.modal-gallery-display {
  width: 100%;
  height: 290px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: radial-gradient(circle at center, rgba(25, 36, 52, 0.85) 0%, rgba(10, 16, 26, 0.98) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-gallery-display img {
  max-width: 100%;
  max-height: 100%;
  transition: opacity 0.25s ease, transform 0.3s ease;
  cursor: zoom-in;
}

.modal-gallery-display img.mode-splash {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

.modal-gallery-display img.mode-card {
  width: auto;
  height: 100%;
  max-height: 275px;
  object-fit: contain;
  padding: 0.5rem;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.7));
}

.modal-gallery-display img.mode-namecard {
  width: 90%;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.modal-gallery-display img.mode-birthday {
  width: auto;
  height: 100%;
  max-height: 275px;
  object-fit: contain;
  padding: 0.4rem;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.modal-gallery-display img.mode-motif {
  width: 170px !important;
  height: 170px !important;
  max-width: 170px !important;
  max-height: 170px !important;
  object-fit: contain !important;
  margin: auto;
  border-radius: 50%;
  padding: 12px;
  background: radial-gradient(circle at center, rgba(30, 48, 75, 0.75) 0%, rgba(10, 16, 26, 0.95) 100%);
  border: 2px solid rgba(212, 175, 55, 0.6);
  box-shadow: 0 0 25px rgba(212, 175, 55, 0.35), inset 0 0 15px rgba(212, 175, 55, 0.2);
  filter: drop-shadow(0 0 16px rgba(212, 175, 55, 0.5));
}

.modal-gallery-display img.mode-scroll {
  width: auto !important;
  height: 100% !important;
  max-height: 280px !important;
  object-fit: contain !important;
  border-radius: 6px;
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.8);
  filter: drop-shadow(0 0 12px rgba(0, 0, 0, 0.8));
}

.modal-gallery-display img.mode-cardicon {
  width: 180px !important;
  height: 180px !important;
  max-width: 180px !important;
  max-height: 180px !important;
  object-fit: contain !important;
  border-radius: 12px;
  border: 1.5px solid rgba(212, 175, 55, 0.5);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7);
  margin: auto;
}

.modal-gallery-display img.mode-emoji {
  width: auto;
  height: auto;
  object-fit: contain;
  padding: 1.25rem;
  max-width: 220px;
  max-height: 220px;
  filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.5));
}

.modal-gallery-display:hover img.mode-splash,
.modal-gallery-display:hover img.mode-birthday,
.modal-gallery-display:hover img.mode-scroll {
  transform: scale(1.02);
}

.gallery-zoom-badge {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(10, 16, 26, 0.88);
  border: 1px solid var(--adeptus-gold);
  color: #fef08a;
  font-size: 0.75rem;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  transition: all 0.2s ease;
  z-index: 5;
}

.gallery-zoom-badge:hover {
  background: var(--adeptus-gold);
  color: #060a12;
  transform: scale(1.05);
}

.modal-gallery-badge {
  position: absolute;
  bottom: 10px;
  right: 12px;
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(212, 175, 55, 0.5);
  color: #fef08a;
  font-size: 0.72rem;
  padding: 0.25rem 0.65rem;
  border-radius: 12px;
  pointer-events: none;
}

/* Voice Player Card */
.modal-voice-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 10px;
  padding: 0.9rem 1.15rem;
  margin-bottom: 1.35rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.voice-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.7rem;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.voice-play-btn {
  background: linear-gradient(135deg, #fef08a 0%, #d4af37 50%, #b45309 100%);
  border: none;
  border-radius: 20px;
  padding: 0.45rem 1.15rem;
  color: #0b0f19;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.25s ease;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

.voice-play-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.5);
}

.voice-play-btn.playing {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  color: #fff;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.6);
}

.voice-soundwave-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 14px;
}

.voice-soundwave-bars span {
  width: 3px;
  height: 4px;
  background: #0b0f19;
  border-radius: 2px;
  transition: height 0.2s ease;
}

.voice-play-btn.playing .voice-soundwave-bars span {
  background: #fff;
  animation: voice-bar-dance 0.75s infinite ease-in-out alternate;
}

.voice-play-btn.playing .voice-soundwave-bars span:nth-child(2) { animation-delay: 0.15s; }
.voice-play-btn.playing .voice-soundwave-bars span:nth-child(3) { animation-delay: 0.3s; }
.voice-play-btn.playing .voice-soundwave-bars span:nth-child(4) { animation-delay: 0.45s; }

@keyframes voice-bar-dance {
  0% { height: 3px; }
  100% { height: 14px; }
}

.voice-cv-badge {
  font-size: 0.76rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

.voice-quote-text {
  font-size: 0.88rem;
  color: #fef08a;
  line-height: 1.6;
  font-style: italic;
  padding: 0.6rem 0.8rem;
  background: rgba(212, 175, 55, 0.08);
  border-left: 3px solid #d4af37;
  border-radius: 0 6px 6px 0;
}

/* Archival 6-Dimensions Grid */
.modal-archival-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.4rem;
}

.archival-tile {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  transition: border-color 0.2s ease;
}

.archival-tile:hover {
  border-color: rgba(212, 175, 55, 0.5);
}

.archival-label {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.archival-value {
  font-size: 0.84rem;
  color: #f1f5f9;
  font-weight: 600;
  word-break: break-word;
}

/* Character Bonds Grid */
.modal-bonds-section {
  margin-bottom: 1.4rem;
}

.section-title-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}

.modal-bonds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
}

.bond-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-left: 3px solid #d4af37;
  border-radius: 0 8px 8px 0;
  padding: 0.75rem 0.95rem;
}

.bond-target-tag {
  font-size: 0.82rem;
  font-weight: bold;
  color: #fef08a;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.bond-quote-text {
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.55;
}

/* Categorized Lore Sections */
.modal-lore-sections {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.lore-section-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

.lore-section-card h4 {
  font-size: 0.88rem;
  color: #fef08a;
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lore-section-card p {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.65;
  margin: 0;
}

/* ==========================================================================
   Global Screen Overflow Guard & Zero-Bleed Precision
   ========================================================================== */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
  box-sizing: border-box;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* ==========================================================================
   Heroines Direct Golden Portal Banner & 4th Trio Button
   ========================================================================== */
.trio-all-btn {
  border-color: rgba(212, 175, 55, 0.45) !important;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(14, 27, 44, 0.7)) !important;
}

.trio-all-btn:hover {
  border-color: #fef08a !important;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(18, 35, 58, 0.9)) !important;
  transform: translateY(-2px);
}

.heroines-portal-banner {
  margin-top: 1.25rem;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.16) 0%, rgba(14, 27, 44, 0.92) 100%);
  border: 1px solid rgba(212, 175, 55, 0.6);
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px rgba(212, 175, 55, 0.15);
}

.heroines-portal-banner:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.26) 0%, rgba(18, 35, 58, 0.96) 100%);
  border-color: #fef08a;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.3);
}

.portal-banner-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.portal-sparkle {
  color: #fef08a;
  font-size: 1.5rem;
  animation: pulse-glow 2s infinite ease-in-out;
}

.portal-badge {
  display: inline-block;
  font-size: 0.72rem;
  color: #fef08a;
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  margin-bottom: 0.25rem;
}

.portal-title {
  margin: 0;
  font-size: 0.92rem;
  color: #fff;
  font-weight: 600;
  font-family: var(--font-serif);
}

.portal-jump-btn {
  background: linear-gradient(135deg, var(--adeptus-gold), #b38f2a);
  color: #0b1622;
  border: none;
  border-radius: 6px;
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  transition: all 0.2s;
}

.portal-jump-btn:hover {
  transform: scale(1.05);
  background: #fef08a;
}

/* ==========================================================================
   Multi-Device Responsive Precision & Mobile Zero-Overflow Overrides
   ========================================================================== */
@media (max-width: 768px) {
  .heroines-portal-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 0.85rem;
    gap: 0.65rem;
  }
  .portal-jump-btn {
    width: 100%;
    justify-content: center;
  }
  .portal-title {
    font-size: 0.84rem;
    line-height: 1.45;
  }
  .navbar .music-info {
    display: none !important;
  }
  .nav-actions {
    gap: 0.45rem !important;
    flex-shrink: 1 !important;
  }
  .nav-brand .brand-sub {
    display: none !important;
  }
  .cat-filter-row {
    max-width: 100% !important;
    box-sizing: border-box !important;
    flex-wrap: wrap !important;
    white-space: normal !important;
  }
  .voice-char-selector {
    max-width: 100% !important;
    box-sizing: border-box !important;
    flex-wrap: wrap !important;
  }
  .archive-filters-row {
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
  }
  .filter-btns {
    flex-wrap: wrap !important;
  }
  .genshin-modal-overlay {
    padding: 0.4rem !important;
  }
  .genshin-modal-container {
    width: 98vw !important;
    padding: 1rem 0.8rem !important;
    max-height: 94vh !important;
  }
  .gallery-tabs-row {
    gap: 0.35rem !important;
  }
  .gallery-tab-btn {
    font-size: 0.72rem !important;
    padding: 0.3rem 0.5rem !important;
  }
  .modal-gallery-display {
    min-height: 200px !important;
    max-height: 320px !important;
  }
  .modal-gallery-display img.mode-splash {
    max-height: 300px !important;
  }
  .modal-gallery-display img.mode-namecard {
    max-height: 160px !important;
  }
  .modal-gallery-display img.mode-birthday {
    max-height: 280px !important;
  }
  .modal-gallery-display img.mode-scroll {
    max-height: 280px !important;
    width: auto !important;
  }
  .modal-gallery-display img.mode-cardicon {
    max-width: 150px !important;
    max-height: 150px !important;
  }
  .modal-gallery-display img.mode-motif {
    width: 140px !important;
    height: 140px !important;
    max-width: 140px !important;
    max-height: 140px !important;
    padding: 8px !important;
  }
}

/* Modal Voice Album Section (Raiden Ei / Multi-Track Heroines) */
.modal-voice-album-section {
  margin-top: 1.5rem;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(192, 132, 252, 0.3);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.voice-lang-switch {
  display: flex;
  gap: 0.4rem;
}

.voice-lang-switch .lang-pill {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #94a3b8;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.voice-lang-switch .lang-pill:hover,
.voice-lang-switch .lang-pill.active {
  background: rgba(192, 132, 252, 0.25);
  border-color: #c084fc;
  color: #f3e8ff;
  font-weight: bold;
}

.voice-tracks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.voice-track-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.voice-track-card:hover {
  background: rgba(192, 132, 252, 0.15);
  border-color: rgba(192, 132, 252, 0.4);
  transform: translateY(-2px);
}

.voice-track-card.playing {
  background: rgba(192, 132, 252, 0.25);
  border-color: #c084fc;
  box-shadow: 0 0 15px rgba(192, 132, 252, 0.35);
}

.voice-track-play-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  background: rgba(192, 132, 252, 0.2);
  border: 1px solid #c084fc;
  color: #e9d5ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  transition: all 0.2s ease;
}

.voice-track-card.playing .voice-track-play-icon {
  background: #c084fc;
  color: #000;
}

.voice-track-info {
  flex: 1;
  min-width: 0;
}

.voice-track-title-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.voice-track-title-row .track-num {
  font-size: 0.7rem;
  font-family: monospace;
  color: #a855f7;
  font-weight: bold;
}

.voice-track-title-row .track-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.voice-track-title-row .track-cat {
  font-size: 0.65rem;
  background: rgba(192, 132, 252, 0.15);
  color: #d8b4fe;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  margin-left: auto;
  white-space: nowrap;
}

.voice-track-card .track-text {
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-style: italic;
}

.voice-track-wave {
  display: none;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
}

.voice-track-card.playing .voice-track-wave {
  display: flex;
}

.voice-track-wave span {
  width: 2px;
  height: 100%;
  background: #c084fc;
  animation: track-soundwave 1s ease-in-out infinite;
}

.voice-track-wave span:nth-child(2) { animation-delay: 0.2s; }
.voice-track-wave span:nth-child(3) { animation-delay: 0.4s; }
.voice-track-wave span:nth-child(4) { animation-delay: 0.1s; }

@keyframes track-soundwave {
  0%, 100% { height: 3px; }
  50% { height: 14px; }
}
