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

@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&family=Noto+Serif+SC:wght@400;600;700;900&family=Plus+Jakarta+Sans:wght@400;600;700&display=swap');

:root {
  --ink-black: #060a12;
  --mountain-navy: #0a1322;
  --mist-blue: #0f2035;
  --jade-frost: #a5f3fc;
  --ice-cyan: #38bdf8;
  --adeptus-gold: #e2b357;
  --gold-glow: rgba(226, 179, 87, 0.35);
  --cinnabar-red: #d9263e;
  --red-rope: #e11d48;
  --rope-glow: rgba(225, 29, 72, 0.4);
  --paper-cream: #f4eedb;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --font-calligraphy: 'Ma Shan Zheng', cursive, 'Noto Serif SC', serif;
  --font-serif: 'Noto Serif SC', 'Songti SC', serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, 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);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  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;
  backdrop-filter: blur(8px);
  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);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  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%);
}

/* Talisman Hotspots (Relative to image itself) */
.talisman-spot {
  position: absolute;
  z-index: 10;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(14, 27, 44, 0.85);
  border: 2px solid var(--adeptus-gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--adeptus-gold);
  font-family: var(--font-calligraphy);
  font-size: 0.9rem;
  box-shadow: 0 0 12px var(--gold-glow);
  animation: spot-float 3s ease-in-out infinite alternate;
  transition: all 0.25s ease;
}

.talisman-spot:hover {
  transform: scale(1.2) !important;
  background: var(--cinnabar-red);
  border-color: #fff;
  color: #fff;
  box-shadow: 0 0 18px var(--rope-glow);
}

.talisman-spot::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(6, 10, 18, 0.95);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--adeptus-gold);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.talisman-spot:hover::after {
  opacity: 1;
}

@keyframes spot-float {
  from { transform: translateY(-3px); }
  to { transform: translateY(3px); }
}

/* Hotspots on Shenhe (1895x1642 exact coordinates) */
.spot-head { top: 23%; left: 54%; }
.spot-wrist { top: 46%; left: 57%; }
.spot-spear { top: 28%; left: 72%; }
.spot-heart { top: 35%; left: 53%; }

/* 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 */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 13, 0.94);
  backdrop-filter: blur(14px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

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

.lightbox-img {
  max-width: 92vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--adeptus-gold);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.9);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 2.2rem;
  color: var(--adeptus-gold);
  cursor: pointer;
}

/* ==========================================================================
   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 */
  .talisman-spot {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
  }
  .talisman-spot:active {
    transform: scale(0.9) !important;
    background: var(--cinnabar-red);
    border-color: #fff;
    color: #fff;
    box-shadow: 0 0 16px var(--rope-glow);
  }

  /* 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;
  }
  /* Horizontal swipeable category pills */
  .cat-filter-row {
    overflow-x: auto;
    white-space: nowrap;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.3rem;
  }
  .cat-filter-row::-webkit-scrollbar {
    display: none;
  }
  .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;
  }
}
