/* v=20260708 */
/* ============================================
   Nemoria Online ??锟斤拷锟斤拷展示锟斤拷站
   锟斤拷锟斤拷童锟斤拷锟斤拷锟?锟斤拷 夜锟解花园锟斤拷锟斤拷
   ============================================ */

/* --- Fonts --- */
/* 锟斤拷锟斤拷锟斤拷锟斤拷: Noto Serif SC (锟斤拷锟斤拷) 锟斤拷 英锟侥伙拷锟斤拷: Tangerine (calligraphy) 锟斤拷 锟斤拷锟斤拷: Noto Serif JP */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700&family=Noto+Sans+SC:wght@300;400;500&family=Noto+Serif+JP:wght@500;600;700&family=Tangerine:wght@400;700&display=swap');

:root {
  /* Primary palette ??锟斤拷锟斤拷锟阶碉拷??*/
  --deep-blue: #faf7fc;
  --night-blue: #f3eef8;
  --ocean-blue: #ebe3f2;
  --twilight-blue: #ddd4e8;
  --soft-purple: #6b5b95;
  --lavender: #9b8ec4;
  --light-lilac: #c4b8e0;
  --pale-lavender: #d5cbe4;
  
  /* Accents */
  --gold-star: #d4a853;
  --soft-gold: #d4a853;
  --klein-blue: #1a2b4a;
  --klein-deep: #0f1d33;
  --moon-glow: rgba(107, 91, 149, 0.08);
  
  /* Neutrals - 锟斤拷色锟斤拷锟街憋拷证锟缴讹拷 */
  --text-primary: #2d1f3d;
  --text-secondary: #5c4d70;
  --text-muted: #8c7da0;
  --card-bg: rgba(250, 247, 252, 0.75);
  --card-border: rgba(107, 91, 149, 0.15);
  
  /* Glass */
  --glass-bg: rgba(250, 247, 252, 0.55);
  --glass-border: rgba(155, 142, 196, 0.2);
  --glass-blur: 12px; /* iOS Safari性能优化: 20px→12px */
  
  /* Spacing */
  --section-gap: 120px;
  --content-width: 1200px;
  
  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Nemo 页锟芥覆写锟斤拷锟斤拷????锟斤拷锟斤拷 --- */
body.starry-mode.nemo-page {
  --soft-gold: #005a8c;
}

body.starry-mode.nemo-page .nemo-module {
  color: var(--soft-gold);
}

body.starry-mode.nemo-page .nemo-collapse-toggle {
  color: #5a8caa;
}

/* Footer 锟斤拷锟斤拷锟斤拷色 */
body.starry-mode.nemo-page .site-footer { color: #5a8caa;
}

/* Nemo 锟洁辑锟斤拷锟斤拷锟斤拷锟街憋拷浅 */
body.starry-mode.nemo-page .nemo-editor-panel {
  color: #b8d8ea;
}
body.starry-mode.nemo-page .nemo-editor-panel input,
body.starry-mode.nemo-page .nemo-editor-panel textarea,
body.starry-mode.nemo-page .nemo-editor-panel select {
  color: #b8d8ea;
  background: rgba(10, 22, 40, 0.5);
}
body.starry-mode.nemo-page .nemo-editor-panel label {
  color: #b8d8ea;
}
body.starry-mode.nemo-page .nemo-editor-panel .nemo-admin-btn,
body.starry-mode.nemo-page .nemo-editor-panel button,
body.starry-mode.nemo-page .nemo-editor-panel .nemo-format-row button,
body.starry-mode.nemo-page .nemo-editor-panel .nemo-module-edit-head button,
body.starry-mode.nemo-page .nemo-editor-panel .nemo-editor-actions button,
body.starry-mode.nemo-page .nemo-editor-panel .nemo-gallery-edit-row button,
body.starry-mode.nemo-page .nemo-editor-panel .nemo-module-edit button {
  color: #b8d8ea !important;
  border-color: #b8d8ea !important;
}
body.starry-mode.nemo-page .nemo-editor-panel .nemo-format-row select {
  color: #b8d8ea;
  border-color: #b8d8ea;
}
body.starry-mode.nemo-page .nemo-editor-panel .nemo-module-edit-head {
  color: #b8d8ea;
}

body.starry-mode.nemo-page .nemo-editor-panel .nemo-editor-actions button {
  color: #b8d8ea;
  border-color: #b8d8ea;
}
body.starry-mode.nemo-page .nemo-editor-panel .nemo-gallery-edit-row,
body.starry-mode.nemo-page .nemo-editor-panel .nemo-module-edit {
  color: #b8d8ea;
}
.nemo-gallery-row-head {
  width: 100%;
}
.nemo-gallery-edit-row .nemo-gallery-row-head label {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nemo-gallery-remove {
  background: transparent;
  border: 1px solid #b8d8ea;
  color: #b8d8ea;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Noto Serif SC', serif;
  margin-left: auto;
}
.nemo-gallery-remove:hover {
  background: rgba(232, 201, 106, 0.08);
  border-color: #f0d060;
  color: #f0d060;
}
.nemo-gallery-add-row {
  text-align: center;
  margin-top: 0.4rem;
}
.nemo-gallery-add {
  background: transparent;
  border: 1.5px solid #b8d8ea;
  color: #b8d8ea;
  font-size: 0.75rem;
  padding: 0.25rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Noto Serif SC', serif;
}
.nemo-editor-empty {
  text-align: center;
  color: #b8d8ea;
  font-size: 0.85rem;
  padding: 1rem 0;
}

.nemo-gallery-add:hover {
  background: rgba(232, 201, 106, 0.08);
  border-color: #f0d060;
  color: #f0d060;
}
body.starry-mode.nemo-page .nemo-editor-panel label {
  color: #b8d8ea;
}
/* Nemo 页锟斤拷锟街伙拷锟剿碉拷锟斤拷锟斤拷锟斤拷??*/
/* 顶栏导航蓝色背景只在手机端显示 */
@media (max-width: 768px) {
body.starry-mode.nemo-page.ocean-mode .nav-links {
  background: linear-gradient(180deg, #2d6a8f 0%, #1a5276 60%, #0d3b5e 100%);
}
body.starry-mode.nemo-page.ocean-mode #navStarryBg .shooting-star {
  display: none;
}
body.starry-mode.nemo-page.ocean-mode .nav-links a {
  color: #9ac0d8;
  border-color: #9ac0d8;
}
body.starry-mode.nemo-page.ocean-mode .nav-menu-title {
  color: #9ac0d8;
}
body.starry-mode.nemo-page.ocean-mode .nav-close {
  color: #9ac0d8;
  border-color: #9ac0d8;
}
}

/* ============================================
   STARRY MODE (main page dark theme)
   锟斤拷锟斤拷为墨锟斤拷色锟角匡拷??
   ============================================ */
body.starry-mode {
  --deep-blue: #0a1628;
  --night-blue: #0f1f3d;
  --ocean-blue: #1a3366;
  --twilight-blue: #234780;
  --soft-purple: #6b5b95;
  --lavender: #9b8ec4;
  --light-lilac: #c4b8e0;
  --pale-lavender: #e8e0f0;
  --gold-star: #d4a853;
  --soft-gold: #e8c96a;
  --klein-blue: #0f2a6b;
  --klein-deep: #08163a;
  --moon-glow: rgba(212, 168, 83, 0.15);
  --text-primary: #e8e0f0;
  --text-secondary: #a898c0;
  --text-muted: #6b6080;
  --card-bg: rgba(15, 31, 61, 0.6);
  --card-border: rgba(107, 91, 149, 0.2);
  --glass-bg: rgba(15, 31, 61, 0.4);
  --glass-border: rgba(155, 142, 196, 0.15);
}

/* Transition overlay in starry mode ??锟斤拷诎锟缴拷锟斤拷强锟?*/
/* body.starry-mode .transition-overlay ??base overlay now uses #0a1628 */

/* ============================================
   STARRY MODE 锟斤拷色锟斤拷锟解覆锟斤拷
   ============================================ */

/* Nav logo ??锟斤拷色锟斤拷色 */
/* Nav logo ??同锟斤拷锟斤拷锟斤拷钮锟斤拷??锟斤拷色锟斤拷锟?*/
body.starry-mode .nav-logo {
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
  color: var(--soft-gold);
  -webkit-text-stroke: 1.2px #3a5b80;
  text-stroke: 1.2px #3a5b80;
  paint-order: stroke fill;
  text-shadow: 0 0 6px rgba(232, 201, 106, 0.25);
}

/* Hero ??锟斤拷锟斤拷 + 锟斤拷色锟斤拷锟斤拷 */
body.starry-mode .hero-content {
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.starry-mode .hero-greeting {
  color: var(--soft-gold);
  font-family: 'Noto Serif SC', serif;
  text-shadow:
    0 0 8px rgba(232, 201, 106, 0.35),
    0 0 20px rgba(232, 201, 106, 0.15);
}

body.starry-mode .hero-title {
  color: var(--soft-gold);
  font-size: clamp(2.6rem, 5.5vw, 4.5rem);
  line-height: 1.8;
  text-align: center;
  text-shadow:
    0 0 10px rgba(232, 201, 106, 0.4),
    0 0 30px rgba(232, 201, 106, 0.25),
    0 0 80px rgba(232, 201, 106, 0.12);
}

body.starry-mode .hero-title .highlight {
  display: block;
  margin-top: 0.8rem;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
  color: var(--soft-gold);
  text-shadow:
    0 0 12px rgba(232, 201, 106, 0.5),
    0 0 40px rgba(232, 201, 106, 0.3),
    0 0 100px rgba(232, 201, 106, 0.15);
}

body.starry-mode .hero-desc {
  color: var(--soft-gold);
  font-family: 'Noto Serif SC', serif;
  font-size: 1.1rem;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  text-shadow:
    0 0 8px rgba(232, 201, 106, 0.3),
    0 0 25px rgba(232, 201, 106, 0.15);
}

body.starry-mode .hero-cta {
  justify-content: center;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

/* 锟斤拷锟较碉拷锟斤拷 ??锟斤拷色 + ????锟斤拷投影锟斤拷锟斤拷色锟斤拷锟?*/
body.starry-mode .nav-links a {
  color: var(--soft-gold);
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  text-shadow:
    0 0 6px rgba(232, 201, 106, 0.25);
  -webkit-text-stroke: 1.5px #3a5b80;
  text-stroke: 1.5px #3a5b80;
  paint-order: stroke fill;
}
body.starry-mode .nav-links a:hover {
  color: #fff;
}
body.starry-mode .nav-links a::after {
  background: var(--soft-gold);
}

/* 锟斤拷魔女锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟接诧拷锟斤拷锟斤拷锟斤拷模锟酵骋伙拷锟斤拷戏锟斤拷锟斤拷锟斤拷锟绞斤拷锟??*/

/* Hamburger menu 锟斤拷锟斤拷 ??锟斤拷色 */
body.starry-mode .nav-toggle span {
  background: var(--soft-gold);
}

/* 锟斤拷钮 ??魔女锟斤拷展??& 锟斤拷之预锟斤拷魔女锟斤拷锟斤拷??统一锟斤拷色锟轿匡拷 */
body.starry-mode .btn-primary,
body.starry-mode .btn-outline {
  background: transparent;
  border: 1.5px solid var(--soft-gold);
  color: var(--soft-gold);
  font-family: 'Noto Serif SC', serif;
  font-size: 1.05rem;
  box-shadow: 0 0 12px rgba(232, 201, 106, 0.15);
}
body.starry-mode .btn-primary:hover,
body.starry-mode .btn-outline:hover {
  background: rgba(232, 201, 106, 0.1);
  box-shadow: 0 0 20px rgba(232, 201, 106, 0.25);
  transform: translateY(-2px);
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Serif SC', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Microsoft YaHei', sans-serif;
  background: var(--deep-blue);
  color: var(--text-primary);
  line-height: 1.8;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100svh;
}

/* --- Starry Background --- */
.starry-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  animation: twinkle var(--duration) ease-in-out infinite alternate;
}

@keyframes twinkle {
  0% { opacity: var(--opacity-min, 0.2); transform: scale(0.8); }
  100% { opacity: var(--opacity-max, 1); transform: scale(1.2); }
}

/* Shooting star */
.shooting-star {
  position: absolute;
  width: 120px;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--soft-gold), transparent);
  animation: shoot var(--shoot-duration, 4s) linear infinite;
  opacity: 0;
  filter: blur(0.5px);
}

@keyframes shoot {
  0% { transform: translateX(0) translateY(0) rotate(-35deg); opacity: 0; }
  5% { opacity: 1; }
  15% { opacity: 1; }
  20% { opacity: 0; }
  100% { transform: translateX(-800px) translateY(500px) rotate(-35deg); opacity: 0; }
}

/* Nebula glow */
.nebula {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  pointer-events: none;
}

.nebula-1 {
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(107, 91, 149, 0.2), transparent);
  animation: nebulaFloat 20s ease-in-out infinite alternate;
}

.nebula-2 {
  bottom: -10%;
  left: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(155, 142, 196, 0.15), transparent);
  animation: nebulaFloat 25s ease-in-out infinite alternate-reverse;
}

.nebula-3 {
  top: 40%;
  right: 30%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(107, 91, 149, 0.12), transparent);
  animation: nebulaFloat 30s ease-in-out infinite alternate;
}

@keyframes nebulaFloat {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(80px, -60px) scale(1.2); }
}

/* --- Content Wrapper --- */
.content-wrapper {
  position: relative;
  z-index: 1;
}

/* ============================================
   SPLASH PAGE (index.html)
   ============================================ */

.splash-container {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 1;
  padding: 2rem;
}

/* Splash decorative ring */
.splash-ring {
  position: absolute;
  width: clamp(300px, 50vw, 600px);
  height: clamp(300px, 50vw, 600px);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  animation: ringPulse 6s ease-in-out infinite;
  pointer-events: none;
}

.splash-ring-2 {
  width: clamp(350px, 55vw, 700px);
  height: clamp(350px, 55vw, 700px);
  animation-delay: 2s;
  border-color: rgba(155, 142, 196, 0.08);
}

.splash-ring-3 {
  width: clamp(400px, 60vw, 800px);
  height: clamp(400px, 60vw, 800px);
  animation-delay: 4s;
  border-color: rgba(155, 142, 196, 0.05);
}

@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.05); opacity: 0.6; }
}

.splash-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: 0.35em;
  margin-bottom: 1rem;
  animation: fadeInUp 1.5s ease-out;
  position: relative;
  writing-mode: horizontal-tb;
}

.splash-subtitle {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  color: var(--gold-star);
  letter-spacing: 0.4em;
  margin-bottom: 0.8rem;
  animation: fadeInUp 1.5s ease-out 0.3s both;
  font-weight: 500;
}

.splash-jp-text {
  font-family: 'Noto Serif JP', 'Noto Serif SC', serif;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 500;
  letter-spacing: 0.3em;
  margin-bottom: 1.5rem;
  animation: fadeInUp 1.5s ease-out 0.4s both;
  line-height: 1.8;
  color: var(--gold-star);
}

.splash-english {
  font-family: 'Tangerine', cursive;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--gold-star);
  letter-spacing: 0.05em;
  margin-bottom: 2.5rem;
  animation: fadeInUp 1.5s ease-out 0.6s both;
}

.splash-divider {
  width: 300px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--soft-gold), transparent);
  margin: 1.5rem auto;
  animation: fadeInUp 1.5s ease-out 0.5s both;
  box-shadow: 0 0 6px rgba(232, 201, 106, 0.2), 0 0 20px rgba(232, 201, 106, 0.08);
}

.splash-enter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2.8rem;
  background: transparent;
  border: 1.5px solid var(--soft-gold);
  color: transparent;
  font-family: 'Noto Serif SC', serif;
  font-size: 1.1rem;
  letter-spacing: 0.3em;
  cursor: pointer;
  transition: var(--transition-smooth);
  animation: fadeInUp 1.5s ease-out 0.7s both;
  text-decoration: none;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  background-image: linear-gradient(135deg, var(--light-lilac), var(--soft-gold));
  -webkit-background-clip: text;
  background-clip: text;
  box-shadow: none;
}

.splash-enter-btn:hover {
  transform: translateY(-2px) scale(1.02);
  border-color: var(--soft-gold);
  box-shadow: 0 0 20px rgba(232, 201, 106, 0.2);
  background-image: linear-gradient(135deg, #ffffff, var(--soft-gold));
  -webkit-background-clip: text;
  background-clip: text;
}

.splash-enter-btn .arrow {
  display: inline-block;
  transition: transform 0.3s ease;
}

.splash-enter-btn:hover .arrow {
  animation: starGlow 0.6s ease-in-out infinite alternate;
}

.splash-footer {
  position: absolute;
  bottom: 2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  animation: fadeInUp 1.5s ease-out 1.2s both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   MAIN PAGE (main.html)
   ============================================ */

/* --- Navigation --- */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
}

.main-nav.scrolled {
  background: rgba(250, 247, 252, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.8rem 2rem;
}

.nav-logo {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.3rem;
  font-weight: 400;
  background: linear-gradient(135deg, var(--soft-purple), var(--gold-star));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.2em;
  text-decoration: none;
}

.nav-links {
  list-style: none;
}

/* 锟斤拷锟斤拷耍锟斤拷潭锟斤拷诘锟斤拷锟斤拷锟斤拷也锟?*/
@media (min-width: 769px) {
  .nav-links {
    position: fixed;
    top: 1.2rem;
    right: 2rem;
    z-index: 101;
    background: transparent;
    display: flex;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links .nav-menu-title,
  .nav-links .nav-close {
    display: none;
  }

  .nav-links > ul {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .nav-links a {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
  }

  body.copelia-page .copelia-menu-stars { display: none !important; }
}

/* Hide copelia menu stars on desktop */
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  transition: var(--transition-smooth);
  position: relative;
  font-weight: 400;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--soft-gold);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--pale-lavender);
}

.nav-links a:hover::after {
  width: 100%;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 5px;
}

.nav-toggle span {
  width: 24px;
  height: 1.5px;
  background: var(--text-secondary);
  transition: var(--transition-smooth);
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8rem 2rem 4rem;
  position: relative;
}

.hero-content {
  max-width: var(--content-width);
  margin: 0 auto;
  width: 100%;
}

.hero-greeting {
  font-size: 0.85rem;
  color: var(--soft-gold);
  letter-spacing: 0.3em;
  margin-bottom: 1.5rem;
  font-weight: 300;
  animation: fadeInUp 1s ease-out;
}

.hero-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.3;
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--soft-purple), var(--lavender));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  max-width: 600px;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 2;
  margin-bottom: 2.5rem;
  font-weight: 300;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-cta {
  display: flex;
  gap: 1.5rem;
  animation: fadeInUp 1s ease-out 0.6s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 2rem;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
  font-weight: 400;
  border-radius: 8px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--soft-purple), var(--twilight-blue));
  color: var(--pale-lavender);
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(107, 91, 149, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}

.btn-outline:hover {
  border-color: var(--soft-purple);
  color: var(--pale-lavender);
  transform: translateY(-2px);
}

/* Hero scroll indicator */
.scroll-indicator {
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--soft-gold);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  animation: fadeInUp 1s ease-out 1s both;
}

.scroll-line {
  width: 2.5px;
  height: 150px;
  background: linear-gradient(to bottom, var(--soft-gold), #3a5b80, transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.8; }
}

/* ??锟斤拷锟斤拷SCROLL指示????*/
.section-scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--soft-gold);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  margin: 1.5rem auto;
  animation: fadeInUp 1s ease-out forwards;
}

.section-scroll-line {
  width: 2px;
  height: 150px;
  background: linear-gradient(to bottom, var(--soft-gold), #3a5b80, transparent);
}

/* --- Section Styles --- */
section {
  padding: var(--section-gap) 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-label {
  font-size: 0.75rem;
  color: var(--soft-gold);
  letter-spacing: 0.4em;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

/* Works & Dynamics section-label ??同魔女锟斤拷锟斤拷锟斤拷锟斤拷锟?*/
#works .section-label,
#dynamics .section-label {
  font-size: 1.1rem;
  color: #264366;
  font-weight: 600;
  -webkit-text-stroke: 2px var(--soft-gold);
  text-stroke: 2px var(--soft-gold);
  paint-order: stroke fill;
  text-shadow:
    0 0 8px rgba(232, 201, 106, 0.3);
}

/* Works & Dynamics section-desc 锟斤拷色 */
#works .section-desc,
#dynamics .section-desc {
  color: var(--soft-gold);
}

.section-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  color: var(--pale-lavender);
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 500px;
  margin: 0 auto;
  font-weight: 300;
}

/* --- 4锟斤拷锟??(Works Blocks) --- */
.works-blocks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 1100px) {
  .works-blocks {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .works-blocks {
    grid-template-columns: 1fr;
  }
}

.work-block-link {
  text-decoration: none;
  display: block;
  color: inherit;
  height: 100%;
}

.work-block-link .work-block {
  height: 100%;
}

.work-block {
  position: relative;
  aspect-ratio: 5 / 6;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  overflow: hidden;
  transition: var(--transition-smooth);
  cursor: pointer;
}

.work-block:hover {
  transform: translateY(-6px);
  border-color: var(--soft-gold);
  box-shadow: 0 12px 40px rgba(232, 201, 106, 0.12);
}

.work-block-image {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(232, 201, 106, 0.08), rgba(38, 67, 102, 0.15));
}

.work-block-image .placeholder-icon {
  font-size: 3rem;
  color: var(--soft-gold);
  opacity: 0.3;
  z-index: 0;
}

/* 图片覆盖整个卡片 */
.work-block-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* 底部渐变遮罩，让文字可读 */
.work-block-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 55%;
  background: linear-gradient(transparent, rgba(10, 22, 40, 0.85));
  z-index: 2;
  pointer-events: none;
}

.work-block-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.9rem 1rem 1rem;
  text-align: center;
  z-index: 3;
}

.work-block-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  color: var(--soft-gold);
  letter-spacing: 0.15em;
  text-shadow: 0 0 8px rgba(0,0,0,0.5);
}

.work-block-desc {
  font-size: 0.78rem;
  color: var(--soft-gold);
  line-height: 1.5;
  font-weight: 300;
  opacity: 0.85;
  text-shadow: 0 0 6px rgba(0,0,0,0.4);
}

/* Filter buttons */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 0.5rem 1.5rem;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: var(--transition-smooth);
  border-radius: 10px;
}

.filter-btn:hover {
  border-color: var(--soft-purple);
  color: var(--text-secondary);
}

.filter-btn.active {
  border-color: var(--soft-gold);
  color: var(--soft-gold);
  background: rgba(212, 168, 83, 0.05);
}

/* --- Dynamics / Timeline --- */
.dynamics-timeline {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.dynamics-timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--soft-purple), transparent);
  opacity: 0.3;
}

.dynamic-item {
  position: relative;
  padding-left: 60px;
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.8s ease-out both;
}

.dynamic-dot {
  position: absolute;
  left: 17px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--soft-gold);
  border: 2px solid #ffffff;
  box-shadow: 0 0 10px rgba(232, 201, 106, 0.3);
}

.dynamic-date {
  font-size: 0.75rem;
  color: #c8b060;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}

.dynamic-content {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 1.2rem 1.5rem;
  transition: var(--transition-smooth);
}

.dynamic-content:hover {
  border-color: rgba(155, 142, 196, 0.3);
}

.dynamic-text {
  font-size: 0.9rem;
  line-height: 1.8;
  color: #c8b060;
  font-weight: 300;
}

.dynamic-image {
  margin-top: 0.8rem;
  border-radius: 10px;
  max-width: 100%;
  max-height: 300px;
  object-fit: cover;
}

/* ??锟介看锟斤拷锟洁动态锟斤拷????*/
.dynamics-more-btn {
  display: block;
  margin: 2rem auto 0;
  background: transparent;
  border: 1.5px solid var(--soft-gold);
  color: var(--soft-gold);
  font-family: 'Noto Serif SC', serif;
  font-size: 0.9rem;
  padding: 0.6rem 2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-shadow: 0 0 6px rgba(232, 201, 106, 0.2);
}

.dynamics-more-btn:hover {
  background: rgba(232, 201, 106, 0.1);
  box-shadow: 0 0 12px rgba(232, 201, 106, 0.25);
}

/* --- About Section --- */
.about-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.about-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--soft-purple), var(--twilight-blue));
  margin: 0 auto 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  border: 2px solid var(--glass-border);
}

/* About section label 魔女锟斤拷锟斤拷??锟斤拷色+锟斤拷色锟斤拷锟?*/
#about .section-label.about-label {
  color: #264366;
  font-weight: 600;
  -webkit-text-stroke: 2px var(--soft-gold);
  text-stroke: 2px var(--soft-gold);
  paint-order: stroke fill;
  text-shadow:
    0 0 8px rgba(232, 201, 106, 0.3);
  font-size: 1.1rem;
}

/* Section title 去锟斤拷锟斤拷锟?*/
#about .section-title {
  -webkit-text-stroke: none;
  text-stroke: none;
}

/* Dynamics section-title 锟斤拷小锟斤拷同锟斤拷锟揭斤拷锟斤拷锟斤拷锟?*/
#dynamics .section-title {
  color: #264366;
  font-size: 1.1rem;
  font-weight: 600;
  -webkit-text-stroke: 1.5px var(--soft-gold);
  text-stroke: 1.5px var(--soft-gold);
  paint-order: stroke fill;
  text-shadow:
    0 0 6px rgba(232, 201, 106, 0.2);
}

/* Dynamics section-title ??同魔女锟斤拷锟揭斤拷锟斤拷锟斤拷??*/
#dynamics .section-title {
  color: #264366;
  font-size: 1.1rem;
  font-weight: 600;
  -webkit-text-stroke: 1.5px var(--soft-gold);
  text-stroke: 1.5px var(--soft-gold);
  paint-order: stroke fill;
  text-shadow:
    0 0 6px rgba(232, 201, 106, 0.2);
}

.about-subtitle {
  color: #264366;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.8;
  margin-bottom: 0.8rem;
  -webkit-text-stroke: 1.5px var(--soft-gold);
  text-stroke: 1.5px var(--soft-gold);
  paint-order: stroke fill;
  text-shadow:
    0 0 6px rgba(232, 201, 106, 0.2);
}

.about-name {
  font-family: 'Noto Serif SC', serif;
  color: #264366;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  -webkit-text-stroke: 1.5px var(--soft-gold);
  text-stroke: 1.5px var(--soft-gold);
  paint-order: stroke fill;
  text-shadow:
    0 0 6px rgba(232, 201, 106, 0.2);
}

.about-intro {
  color: #264366;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 2rem;
  line-height: 1.6;
  -webkit-text-stroke: 1.5px var(--soft-gold);
  text-stroke: 1.5px var(--soft-gold);
  paint-order: stroke fill;
  text-shadow:
    0 0 6px rgba(232, 201, 106, 0.2);
}

.about-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 2;
  font-weight: 300;
  margin-bottom: 2rem;
}

.about-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  margin: 0 auto 0.8rem !important;
}

.about-choice {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.about-btn {
  width: 100%;
  background: transparent;
  border: 1.5px solid var(--soft-gold);
  color: var(--soft-gold);
  font-family: 'Noto Serif SC', serif;
  font-size: 1rem;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-shadow: 0 0 6px rgba(232, 201, 106, 0.2);
}

.about-btn:hover {
  background: rgba(232, 201, 106, 0.1);
  box-shadow: 0 0 12px rgba(232, 201, 106, 0.25);
}

.about-btn.active {
  background: rgba(232, 201, 106, 0.15);
}

.about-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, padding 0.5s ease, opacity 0.5s ease, border 0.3s ease, margin 0.3s ease;
  opacity: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 0 solid transparent;
  border-radius: 10px;
  text-align: center;
  margin: 0;
}

.about-panel.open {
  max-height: 9999px;
  min-height: 18rem;
  flex: 1 1 auto;
  opacity: 1;
  padding: 0.8rem 1rem 0.2rem;
  border-color: rgba(232, 201, 106, 0.15);
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.about-panel p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 0.3rem;
}

.about-panel p:last-child {
  margin-bottom: 0;
}

ruby rt {
  font-size: 0.7rem;
  color: #fff;
}

/* ??About 锟斤拷锟斤拷锟缴拷陌锟???*/
.about-extra-gold {
  color: var(--soft-gold);
  font-size: 0.9rem;
  text-align: center;
  margin: 0.1rem 0;
  text-shadow: 0 0 8px rgba(232, 201, 106, 0.25);
}

/* ??锟斤拷锟斤拷丝锟斤拷锟斤拷锟斤拷 ??*/
.about-alice-section {
  margin-top: 0.3rem;
  text-align: center;
}

.about-alice-btn {
  background: transparent;
  border: 1.5px solid var(--soft-gold);
  color: var(--soft-gold);
  font-family: 'Noto Serif SC', serif;
  font-size: 1rem;
  padding: 0.7rem 2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-shadow: 0 0 6px rgba(232, 201, 106, 0.2);
}

.about-alice-btn:hover,
.about-alice-btn.active {
  background: rgba(232, 201, 106, 0.1);
  box-shadow: 0 0 12px rgba(232, 201, 106, 0.25);
}

.about-alice-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s ease, padding 0.4s ease, opacity 0.4s ease;
  opacity: 0;
  padding: 0;
  text-align: left;
}

.about-alice-content.open {
  max-height: 9999px;
  opacity: 1;
  padding: 1.5rem 0 0;
}

/* ??Alice 锟斤拷锟斤拷选锟斤拷????*/
/* ??Alice 锟斤拷锟斤拷锟斤拷锟介（锟斤拷锟斤拷锟斤拷锟叫ｏ拷 ??*/
.alice-block {
  margin-bottom: 1rem;
  text-align: center;
}

.alice-block-btn {
  background: transparent;
  border: 1px solid rgba(232, 201, 106, 0.3);
  color: var(--soft-gold);
  font-family: 'Noto Serif SC', serif;
  font-size: 0.85rem;
  padding: 0.4rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 0.5rem;
  min-width: 200px;
}

.alice-block-btn:hover,
.alice-block-btn.active {
  border-color: var(--soft-gold);
  background: rgba(232, 201, 106, 0.08);
}

.alice-block-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, padding 0.4s ease, opacity 0.3s ease;
  opacity: 0;
  padding: 0 1rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  text-align: center;
}

.alice-block-content.open {
  max-height: 9999px;
  opacity: 1;
  padding: 1rem;
}

.alice-block-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.9;
  margin-bottom: 0.5rem;
}

/* ??锟斤拷色锟斤拷锟斤拷指锟????*/
.gold-divider {
  width: 60%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--soft-gold), transparent);
  margin: 1.2rem auto;
}

/* ??锟酵ワ拷 锟斤拷锟斤拷锟斤拷锟???*/
.alice-nemo {
  font-size: 2.2rem;
  font-weight: 700;
  text-align: center;
  margin: 0.8rem 0;
  color: var(--soft-gold);
  text-shadow: 0 0 12px rgba(232, 201, 106, 0.4);
}

/* ??小锟斤拷锟解（锟皆达拷????*/
.alice-subtitle {
  font-size: 1rem;
  font-weight: 600;
  color: var(--soft-gold);
}

/* ??展锟斤拷锟斤拷锟接帮拷钮 ??*/
.alice-sub-btns {
  display: flex;
  gap: 0.8rem;
  margin: 0.8rem 0;
  justify-content: center;
  flex-wrap: wrap;
}

.alice-sub-btn {
  background: transparent;
  border: 1px solid rgba(232, 201, 106, 0.3);
  color: var(--soft-gold);
  font-family: 'Noto Serif SC', serif;
  font-size: 0.8rem;
  padding: 0.4rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.alice-sub-btn:hover,
.alice-sub-btn.active {
  border-color: var(--soft-gold);
  background: rgba(232, 201, 106, 0.08);
}

/* ??锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟???*/
.alice-sub-panels {
  display: flex;
  gap: 1rem;
  width: 100%;
  text-align: center;
}

.alice-sub-panel {
  flex: 1;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  padding: 0 0.5rem;
  text-align: center;
}

.alice-sub-panel.open {
  max-height: 9999px;
  opacity: 1;
  padding: 0.5rem;
}

.alice-sub-panel p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.8;
  margin-bottom: 0.4rem;
  text-align: center;
}

/* ??锟剿碉拷锟斤拷锟斤拷锟角憋拷????*/
.nav-starry-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  font-weight: 300;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #faf7fc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.8rem;
    z-index: 999;
    padding: 2rem;
    margin: 0;
    display: none;
    transition: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links.closing {
    display: none;
  }

  body.starry-mode .nav-links {
    background: #0a1628;
  }

  /* 锟剿碉拷锟斤拷锟斤拷 */
  .nav-menu-title {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.4rem;
    color: var(--soft-gold);
    margin-bottom: 0.5rem;
    letter-spacing: 0.15em;
    text-align: center;
    width: 100%;
  }

  body:not(.starry-mode) .nav-menu-title {
    color: #d4a853;
  }

  .nav-links > ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    padding: 0;
    margin: 0;
    list-style: none;
  }

  .nav-links a {
    font-size: 1.2rem;
    font-weight: 600;
    border: 1.5px solid var(--soft-gold);
    border-radius: 8px;
    padding: 0.8rem 2.5rem;
    display: inline-block;
    text-align: center;
    min-width: 220px;
    color: var(--soft-gold);
  }

  body:not(.starry-mode) .nav-links a {
    color: #d4a853;
    border-color: #d4a853;
  }

  .nav-links a:hover {
    background: rgba(232, 201, 106, 0.1);
  }

  /* 锟截闭帮拷钮 */
  .nav-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: transparent;
    border: 1.5px solid var(--soft-gold);
    color: var(--soft-gold);
    width: 44px;
    height: 44px;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
  }

  body:not(.starry-mode) .nav-close {
    border-color: #d4a853;
    color: #d4a853;
  }

  .nav-close:hover {
    background: rgba(232, 201, 106, 0.15);
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 5px);
  }
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -5px);
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .filter-btn {
    padding: 0.4rem 1rem;
    font-size: 0.75rem;
  }

  /* 锟斤拷锟斤拷页锟狡讹拷锟斤拷锟斤拷锟斤拷 */
  .splash-container {
    padding: 1.5rem 1.2rem;
  }

  .splash-title {
    font-size: clamp(2rem, 10vw, 2.8rem);
    letter-spacing: 0.25em;
  }

  .splash-jp-text {
    font-size: clamp(0.85rem, 3.5vw, 1rem);
  }

  .splash-enter-btn {
    padding: 0.8rem 2rem;
    font-size: 1rem;
  }

  .splash-footer {
    font-size: 0.65rem;
  }

  /* 锟斤拷页锟狡讹拷锟斤拷锟斤拷锟斤拷 */
  section {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }

  .hero {
    padding: 5rem 1.5rem 2rem;
  }

  .hero-title {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
  }

  .hero-desc {
    font-size: 0.9rem;
    line-height: 1.8;
  }

  .btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.8rem;
  }

  .section-label {
    font-size: 0.75rem;
  }

  .about-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.8rem !important;
  }

  .about-panel.open {
    max-height: 9999px;
  }

  .about-btn {
    width: 100%;
    max-width: none;
    padding: 0.7rem 0.45rem;
    font-size: 1rem;
  }

  .about-alice-btn {
    width: 100%;
    max-width: 280px;
    font-size: 1rem !important;
    padding: 0.7rem 1.5rem !important;
  }

  .section-scroll {
    margin: 1rem auto;
    transform: scale(0.6);
    transform-origin: center center;
  }

  .about-panel p {
    font-size: 0.78rem;
    line-height: 1.6;
  }
  .works-grid,
  .dynamics-grid {
    grid-template-columns: 1fr !important;
  }

  .nav-links a {
    min-width: 180px;
    padding: 0.7rem 1.8rem;
    font-size: 1.1rem;
  }

  /* -- Copelia mobile nav: purple theme -- */
  body.starry-mode.copelia-page .nav-links {
    background: linear-gradient(180deg, #e8ddf5 0%, #f5f0fa 40%, #ffffff 100%) !important;
  }
}

/* Mobile optimization: keep visual effects, add GPU compositing */
html.mobile .nebula {
  animation: none;
  filter: blur(60px);
  opacity: 0.12;
}

html.mobile .main-nav.scrolled {
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  background: rgba(10, 22, 40, 0.96);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

html.mobile .fade-section {
  transition-duration: 0.5s;
  will-change: opacity, transform;
}

html.mobile .starry-bg,
html.mobile .constellation-rings,
html.mobile .splash-ring {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

@media (max-width: 768px) {
  html.mobile .nav-links {
    height: 100vh;
    height: 100svh;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
  }

  html.mobile .nav-starry-bg {
    opacity: 0.45;
    contain: layout paint size;
  }

  html.mobile .hero,
  html.mobile .splash-container {
    min-height: 100vh;
    min-height: 100svh;
  }

  /* Chrome Mobile text flickering fix: promote text-stroke elements to GPU layer */
  html.mobile .hero-title,
  html.mobile .section-title,
  html.mobile .about-subtitle,
  html.mobile .about-name,
  html.mobile .about-intro,
  html.mobile .section-label,
  html.mobile .work-block-title,
  html.mobile .protagonist-name-jp,
  /* Splash page (index.html) text: same flickering fix */
  html.mobile .splash-title,
  html.mobile .splash-subtitle,
  html.mobile .splash-jp-text,
  html.mobile .splash-english,
  html.mobile .splash-divider,
  html.mobile .splash-footer,
  html.mobile .splash-enter-btn {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }

  /* Via/WebView: gradient-clipped text on button flickers → solid gold text */
  html.mobile .splash-enter-btn {
    color: var(--soft-gold);
    -webkit-background-clip: initial;
    background-clip: initial;
    background-image: none;
    text-shadow: 0 0 12px rgba(232, 201, 106, 0.35);
  }
}

@media (max-width: 480px) {
  .splash-title {
    font-size: 1.6rem;
    letter-spacing: 0.15em;
  }

  .hero {
    padding: 4rem 1rem 1.5rem;
  }

  .nav-logo {
    font-size: 0.85rem;
  }

  .nav-close {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    top: 1rem;
    right: 1rem;
  }

  .nav-menu-title {
    font-size: 1.2rem;
  }

  .nav-links a {
    min-width: 150px;
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
  }
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #f0ebf4;
}

::-webkit-scrollbar-thumb {
  background: var(--soft-purple);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--lavender);
}

/* --- Selection --- */
::selection {
  background: var(--soft-purple);
  color: var(--pale-lavender);
}

/* --- Fade in animation for sections --- */
.fade-section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   PAGE TRANSITION OVERLAY
   ============================================ */

.transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0a1628;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s ease;
}

.transition-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* 页锟斤拷锟斤拷锟斤拷锟斤拷郑锟斤拷锟斤拷锟斤拷锟缴ｏ拷 */
.page-transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: #0a1628;
  opacity: 1;
  pointer-events: all;
  transition: opacity 1.2s ease;
}

.page-transition-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* ============================================
   PETAL CLICK EFFECT
   ============================================ */

.petal {
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  width: 8px;
  height: 12px;
  border-radius: 50% 0 50% 50%;
  opacity: 1;
  animation: petalFloat 2s ease-out forwards;
}

.petal.white {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
}

.petal.lilac {
  background: rgba(170, 140, 210, 0.9);
  box-shadow: 0 0 8px rgba(170, 140, 210, 0.5);
}

@keyframes petalFloat {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--drift-x), calc(var(--float-y) * -1)) rotate(var(--spin)) scale(0.3);
  }
}

/* ============================================
   CONSTELLATION RINGS (锟斤拷锟斤拷)
   ============================================ */

.constellation-rings {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

@keyframes starFlicker {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

@keyframes ringSpin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes starGlow {
  0% { opacity: 0.4; transform: scale(1); text-shadow: 0 0 3px rgba(232,201,106,0.3); }
  100% { opacity: 1; transform: scale(1.3); text-shadow: 0 0 12px rgba(232,201,106,0.8), 0 0 30px rgba(232,201,106,0.4); }
}

/*  */

/* dep-1896606229 */
/* dp-927970973 */

/* ============================================
   MAP MODAL (overlay modal for mobile / small screen)
   ============================================ */

.map-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10, 15, 35, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  visibility: hidden;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.map-modal-overlay.map-modal-open {
  opacity: 1;
  pointer-events: all;
  visibility: visible;
}

.map-modal {
  position: relative;
  max-width: 520px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  background: linear-gradient(145deg, rgba(10, 22, 40, 0.98), rgba(15, 31, 61, 0.96));
  border: 1.5px solid var(--soft-gold);
  border-radius: 16px;
  padding: 2rem 1.8rem 1.8rem;
  box-shadow:
    0 0 40px rgba(232, 201, 106, 0.1),
    0 0 80px rgba(10, 15, 35, 0.6),
    inset 0 0 60px rgba(232, 201, 106, 0.03);
  animation: mapModalFadeIn 0.35s ease-out;
}

@keyframes mapModalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.map-modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1.5px solid var(--soft-gold);
  border-radius: 8px;
  color: var(--soft-gold);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1;
}

.map-modal-close:hover {
  background: rgba(232, 201, 106, 0.12);
  box-shadow: 0 0 12px rgba(232, 201, 106, 0.2);
}

.map-modal-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.map-modal-label {
  font-size: 0.78rem;
  color: var(--soft-gold);
  letter-spacing: 0.35em;
  margin-bottom: 0.5rem;
  opacity: 0.7;
}

.map-modal-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.5rem;
  color: var(--soft-gold);
  letter-spacing: 0.2em;
  text-shadow: 0 0 12px rgba(232, 201, 106, 0.25);
}

.map-modal-body {
  padding: 0 0.5rem;
}

/* Map tree inside modal — reuse .map-tree classes but with modal context */
.map-modal .map-tree {
  max-width: 100%;
  margin: 0;
}

.map-modal .map-node-link {
  font-size: 1rem;
  padding: 0.4rem 0.9rem;
}

.map-modal .map-node.map-root > .map-node-link {
  font-size: 1.2rem;
}

.map-modal .map-node.map-inner > .map-node-link {
  font-size: 1.05rem;
}

.map-modal .map-node.map-leaf > .map-node-link {
  font-size: 0.9rem;
}

.map-modal .map-branch {
  margin-left: 1.5rem;
  padding-left: 1rem;
}

.map-modal .map-pending-badge {
  font-size: 0.65rem;
}

/* Map modal scrollbar */
.map-modal::-webkit-scrollbar {
  width: 4px;
}

.map-modal::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

.map-modal::-webkit-scrollbar-thumb {
  background: rgba(232, 201, 106, 0.2);
  border-radius: 4px;
}

.map-modal::-webkit-scrollbar-thumb:hover {
  background: rgba(232, 201, 106, 0.35);
}

@media (max-width: 768px) {
  .map-modal {
    padding: 1.5rem 1.2rem 1.2rem;
    max-width: 94%;
  }
  .map-modal-title {
    font-size: 1.3rem;
  }
  .map-modal .map-branch {
    margin-left: 1rem;
    padding-left: 0.8rem;
  }
  .map-modal .map-node-link {
    font-size: 0.9rem;
    padding: 0.3rem 0.7rem;
  }
  .map-modal .map-node.map-root > .map-node-link {
    font-size: 1.05rem;
  }
}

/* ============================================
   ADMIN MODAL
   ============================================ */
.admin-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.admin-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.admin-modal {
  background: rgba(10, 22, 40, 0.96);
  border: 1px solid rgba(232, 201, 106, 0.25);
  border-radius: 16px;
  padding: 2.5rem 2rem 2rem;
  max-width: 380px;
  width: 90%;
  position: relative;
  box-shadow: 0 0 40px rgba(232, 201, 106, 0.08);
}

.admin-modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.admin-modal-close:hover {
  border-color: var(--soft-gold);
  color: var(--soft-gold);
}

.admin-modal-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.2rem;
  color: var(--soft-gold);
  text-align: center;
  margin-bottom: 0.4rem;
  letter-spacing: 0.1em;
}

.admin-modal-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 1.5rem;
}

.admin-form-group {
  margin-bottom: 1rem;
}

.admin-form-group label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
  letter-spacing: 0.1em;
}

.admin-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

.admin-input:focus {
  outline: none;
  border-color: var(--soft-gold);
}

.admin-input::placeholder {
  color: rgba(255, 255, 255, 0.25);
}

.admin-submit-btn {
  width: 100%;
  padding: 0.7rem;
  background: transparent;
  border: 1.5px solid var(--soft-gold);
  color: var(--soft-gold);
  font-family: 'Noto Serif SC', serif;
  font-size: 0.95rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 0.3rem;
}

.admin-submit-btn:hover {
  background: rgba(232, 201, 106, 0.1);
  box-shadow: 0 0 12px rgba(232, 201, 106, 0.2);
}

.admin-form-msg {
  text-align: center;
  font-size: 0.78rem;
  margin-top: 0.8rem;
  min-height: 1.2rem;
}

.admin-form-msg.error {
  color: #e74c3c;
}

.admin-form-msg.success {
  color: #27ae60;
}

.admin-form-toggle {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255,255,255,0.15);
  transition: color 0.2s;
}

.admin-form-toggle:hover {
  color: var(--soft-gold);
}

/* ============================================
   ADMIN EDIT BUTTONS (on content blocks)
   ============================================ */
.admin-edit-btn {
  display: none;
  position: absolute;
  top: -8px;
  right: -8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(232, 201, 106, 0.15);
  border: 1px solid rgba(42, 90, 154, 0.5);
  color: var(--soft-gold);
  font-size: 0.75rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 10;
  padding: 0;
  line-height: 1;
}

.admin-edit-btn:hover {
  background: rgba(232, 201, 106, 0.3);
  box-shadow: 0 0 10px rgba(232, 201, 106, 0.3);
}

body.admin-mode .admin-edit-btn {
  display: flex;
}

/* ============================================
   HALL: 锟斤拷锟斤拷??
   ============================================ */
.hall-hero {
  min-height: 50vh;
  min-height: 50svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 1rem;
  text-align: center;
  position: relative;
}

.hall-hero-content {
  max-width: var(--content-width);
  width: 100%;
}

.hall-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(2.8rem, 8vw, 4.5rem);
  color: var(--soft-gold);
  letter-spacing: 0.25em;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 20px rgba(232, 201, 106, 0.3);
}

.hall-desc-line {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  line-height: 2;
  letter-spacing: 0.1em;
  margin: 0;
}

.hall-desc-gold {
  color: var(--soft-gold);
  text-shadow: 0 0 6px rgba(232, 201, 106, 0.15);
}

.hall-protagonists {
  padding: 0.5rem 2rem 4rem;
  max-width: var(--content-width);
  margin: 0 auto;
  width: 100%;
}

.protagonists-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.protagonists-title {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--soft-gold);
  letter-spacing: 0.2em;
  text-shadow: 0 0 12px rgba(232, 201, 106, 0.2);
}

.protagonists-cards {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  justify-content: center;
  align-items: stretch;
}

.protagonist-card {
  flex: 1;
  max-width: 360px;
  min-width: 160px;
}

.protagonist-media {
  width: 100%;
  aspect-ratio: 2 / 3;
  border: 1.5px solid rgba(232, 201, 106, 0.2);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, rgba(232, 201, 106, 0.08), rgba(38, 67, 102, 0.15));
  transition: all 0.4s ease;
}

.protagonist-media:hover {
  border-color: var(--soft-gold);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(232, 201, 106, 0.12);
}

.protagonist-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.protagonist-star {
  font-size: 2.2rem;
  color: rgba(232, 201, 106, 0.3);
  margin-bottom: 0.5rem;
}

.protagonist-hint {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.15);
  letter-spacing: 0.1em;
}

.protagonist-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
}

.protagonist-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  text-align: center;
}

.protagonist-name-jp {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.2rem;
  color: var(--soft-gold);
  letter-spacing: 0.15em;
  margin-bottom: 0.15rem;
  line-height: 1.5;
  text-shadow: 0 0 8px rgba(0,0,0,0.5);
}

.protagonist-name-cn {
  font-size: 0.82rem;
  color: var(--soft-gold);
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
  line-height: 1.5;
  text-shadow: 0 0 6px rgba(0,0,0,0.5);
}

.protagonist-tagline {
  font-size: 0.78rem;
  color: var(--soft-gold);
  letter-spacing: 0.1em;
  font-style: italic;
  line-height: 1.5;
  opacity: 0.85;
  text-shadow: 0 0 6px rgba(0,0,0,0.5);
}

.hall-desc-line {
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  line-height: 2;
  letter-spacing: 0.1em;
  margin: 0;
}

..protagonists-back {
  text-align: right;
  margin-top: 1.5rem;
  padding-right: 1rem;
}
.protagonists-back .hall-back-link {
  color: #d4a853;
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  display: inline-block;
  padding: 0.35rem 1rem;
  border: 1.5px solid #d4a853;
  border-radius: 8px;
  background: transparent;
  transition: all 0.3s ease;
}
.protagonists-back .hall-back-link:hover {
  color: #f0d060;
  border-color: #f0d060;
  background: rgba(212, 168, 83, 0.08);
}

.nemo-back-row .hall-back-link {
  color: #5a8caa;
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  display: inline-block;
  padding: 0.35rem 1rem;
  border: 1.5px solid #5a8caa;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}
.nemo-back-row .hall-back-link:hover {
  color: #7aabca;
  border-color: #7aabca;
  background: rgba(255, 255, 255, 0.5);
}

@media (max-width: 640px) {
  .protagonists-back {
    text-align: left;
    margin-top: 1rem;
  }
  .protagonists-cards {
    gap: 0.8rem;
  }
  .protagonist-card {
    max-width: none;
    min-width: 0;
    flex: 1 1 50%;
  }
  .protagonist-media {
    aspect-ratio: 2 / 3;
  }
  .protagonist-overlay {
    padding: 1rem 0.6rem;
  }
  .protagonist-name-jp {
    font-size: 1rem;
  }
  .protagonist-name-cn {
    font-size: 0.7rem;
  }
  .protagonist-tagline {
    font-size: 0.65rem;
  }
  .hall-hero {
    padding: 6rem 1.5rem 1rem;
    min-height: 40vh;
    min-height: 40svh;
  }
  .hall-title {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }
}

/* ============================================
   HALL: 锟酵ワ拷 detail page
   ============================================ */
.protagonist-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.nemo-back-row .hall-back-link {
  color: #5a8caa;
  text-shadow: 0 0 6px rgba(30, 74, 112, 0.18);
}

.nemo-hero {
  padding: 8rem 1.5rem 2rem;
  text-align: center;
}

.nemo-title {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: var(--soft-gold);
  font-family: 'Noto Serif SC', serif;
  font-size: clamp(2rem, 7vw, 3.6rem);
  letter-spacing: 0.12em;
  line-height: 1.35;
  margin-bottom: 2rem;
  text-shadow: 0 0 18px rgba(42, 90, 154, 0.3);
}

.nemo-gallery {
  width: min(520px, 74vw);
  aspect-ratio: 520 / 725;
  margin: 0 auto;
  position: relative;
}

.nemo-gallery-viewport {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1.5px solid rgba(42, 90, 154, 0.35);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(30, 74, 112, 0.08), rgba(38, 67, 102, 0.16));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.nemo-gallery-track {
  height: 100%;
  display: flex;
  transition: transform 0.45s ease;
}

.nemo-slide {
  flex: 0 0 100%;
  height: 100%;
}

.nemo-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nemo-slide-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(30, 74, 112, 0.5);
}

.nemo-slide-placeholder span {
  font-size: 3rem;
  opacity: 0.55;
}

.nemo-slide-placeholder p {
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  opacity: 0.6;
}

.nemo-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(42, 90, 154, 0.4);
  background: rgba(255, 255, 255, 0.3);
  color: var(--soft-gold);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
}

.nemo-prev { left: -52px; }
.nemo-next { right: -52px; }

.nemo-gallery-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem auto 0.5rem;
}

.nemo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid rgba(42, 90, 154, 0.5);
  background: transparent;
  opacity: 0.45;
  cursor: pointer;
}

.nemo-dot.active {
  background: var(--soft-gold);
  opacity: 1;
}

.nemo-gallery-caption {
  min-height: 1.8em;
  color: var(--soft-gold);
  font-size: 0.85rem;
  text-align: center;
  letter-spacing: 0.08em;
  margin: 0.4rem auto 0;
  max-width: 520px;
  font-weight: 600;
}

.nemo-editable-section {
  width: min(860px, calc(100% - 2rem));
  margin: 1.5rem auto 2rem;
}

.nemo-admin-bar {
  text-align: right;
  margin-bottom: 1rem;
}

.nemo-editor-panel {
  position: relative;
  width: 100%;
  margin: 0 auto 1.5rem;
  padding: 1.3rem;
  background: rgba(10, 22, 40, 0.72);
  border: 1px solid rgba(42, 90, 154, 0.3);
  border-radius: 14px;
  color: var(--text-secondary);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
}

.nemo-editor-panel[hidden] {
  display: none;
}

.nemo-admin-btn,
.nemo-editor-actions button {
  background: transparent;
  color: var(--soft-gold);
  border: 1px solid rgba(42, 90, 154, 0.5);
  border-radius: 8px;
  padding: 0.55rem 1rem;
  cursor: pointer;
  font-family: inherit;
}

.nemo-empty-note {
  color: rgba(30, 74, 112, 0.65);
  text-align: center;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
}

.nemo-module {
  border: 1px solid rgba(42, 90, 154, 0.35);
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  margin-bottom: 1rem;
  padding: 1rem;
  color: var(--text-secondary);
}

.nemo-module h3,
.nemo-collapse-toggle {
  font-size: 1.05rem;
  letter-spacing: 0.12em;
}

.nemo-module h3 {
  color: var(--soft-gold);
  text-align: center;
  margin-bottom: 0.8rem;
}

.nemo-collapse-toggle {
  width: 100%;
  background: transparent;
  color: var(--soft-gold);
  border: 0;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  align-items: center;
  line-height: 1.4;
}

.nemo-collapse-body {
  display: none;
  padding-top: 0.9rem;
}

.nemo-module.open > .nemo-collapse-body {
  display: block;
}

.nemo-module-text {
  font-size: 0.88rem;
  color: var(--soft-gold);
}

.nemo-para {
  line-height: 1.9;
  margin-bottom: 0.5rem;
}

.nemo-para:last-child {
  margin-bottom: 0;
}

.nemo-inline-img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 0.2rem auto;
  box-shadow: 0 0 20px rgba(30, 74, 112, 0.12);
}

.align-left { text-align: left; }
.align-center { text-align: center; }
.align-right { text-align: right; }
.is-bold { font-weight: 700; }
.is-underline { text-decoration: underline; }

.spoiler-text {
  color: transparent;
  background: rgba(42, 90, 154, 0.3);
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease;
}

.spoiler-text:hover,
.spoiler-text.revealed {
  color: var(--text-secondary);
  background: rgba(30, 74, 112, 0.08);
}

.nemo-module-children {
  margin: 1rem 0 0 1rem;
  padding-left: 1rem;
  border-left: 1px solid rgba(30, 74, 112, 0.18);
}

.nemo-back-row {
  width: min(860px, calc(100% - 2rem));
  margin: 0 auto 1.5rem;
}

/* ============================================
   Nemo 页锟斤拷 ??锟斤拷锟襟背撅拷
   ============================================ */
.nemo-ocean-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* 锟斤拷战锟斤拷洌拷锟?锟斤拷锟斤拷-锟斤拷锟斤拷锟结富色锟斤拷??*/
.nemo-sky {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    #5a8eb0 0%,
    #6d9cc0 15%,
    #83b0d0 30%,
    #99c4df 48%,
    #aed4ea 65%,
    #c4e2f3 78%,
    #ffffff 84%,
    #ffffff 85%,
    #4d7fa0 88%,
    #2d6a8f 94%,
    #1e5a80 100%
  );
}

/* 锟狡诧拷 ??锟斤拷锟斤拷烁锟斤拷锟斤拷锟斤拷??+ 锟斤拷锟斤拷??*/
.nemo-cloud {
  position: absolute;
  border-radius: 50%;
  z-index: 1;
  animation: cloudScroll ease-in-out infinite;
}
.nemo-cloud::before {
  content: '';
  position: absolute;
  border-radius: 50%;
  width: 100%;
  height: 100%;
}

.nemo-cloud-1 { width: 480px; height: 135px; top: 3%; animation-duration: 75s; }
.nemo-cloud-1::before { background: radial-gradient(ellipse at 35% 30%, rgba(255,255,255,0.60), rgba(235,245,255,0.10)); filter: blur(12px); }

.nemo-cloud-2 { width: 580px; height: 105px; top: 14%; animation-duration: 85s; animation-delay: -22s; }
.nemo-cloud-2::before { background: radial-gradient(ellipse at 55% 40%, rgba(255,255,255,0.50), rgba(230,242,255,0.06)); filter: blur(18px); }

.nemo-cloud-3 { width: 380px; height: 80px; top: 1%; animation-duration: 65s; animation-delay: -38s; border-radius: 60% 40% 50% 50%; }
.nemo-cloud-3::before { background: radial-gradient(ellipse at 30% 60%, rgba(255,255,255,0.55), rgba(240,248,255,0.08)); filter: blur(10px); }

.nemo-cloud-4 { width: 660px; height: 95px; top: 9%; animation-duration: 90s; animation-delay: -50s; border-radius: 45% 55% 50% 50%; }
.nemo-cloud-4::before { background: radial-gradient(ellipse at 60% 30%, rgba(255,255,255,0.40), rgba(225,238,250,0.05)); filter: blur(22px); }

.nemo-cloud-5 { width: 360px; height: 70px; top: 19%; animation-duration: 60s; animation-delay: -15s; }
.nemo-cloud-5::before { background: radial-gradient(ellipse at 40% 50%, rgba(255,255,255,0.48), rgba(240,250,255,0.08)); filter: blur(9px); }

.nemo-cloud-6 { width: 300px; height: 55px; top: 24%; animation-duration: 50s; animation-delay: -5s; opacity: 0.35; }
.nemo-cloud-6::before { background: radial-gradient(ellipse at 50% 50%, rgba(255,255,255,0.40), rgba(235,245,255,0.05)); filter: blur(8px); }

/* 锟斤拷锟斤拷锟斤拷锟斤拷锟诫、锟揭诧拷锟斤拷锟剿筹拷锟斤拷锟斤拷锟斤拷时锟斤拷锟缴硷拷 */
@keyframes cloudScroll {
  0% { transform: translateX(-70vw); opacity: 0; }
  3% { opacity: 0.6; }
  10% { opacity: 1; }
  85% { opacity: 1; }
  97% { opacity: 0.3; }
  100% { transform: translateX(120vw); opacity: 0; }
}

/* 锟斤拷鸥 ??锟斤拷锟斤拷锟叫ｏ拷原锟斤拷锟斤拷锟斤拷+锟斤拷锟斤拷+摇锟斤拷?? 锟斤拷锟轿筹拷锟?*/
.nemo-seagull {
  position: absolute;
  z-index: 2;
  animation: gullBreathe ease-in-out infinite;
}
.nemo-seagull::before,
.nemo-seagull::after {
  content: '';
  position: absolute;
  background: rgba(255,255,255,0.50);
  border-radius: 80% 20% 60% 40%;
}

.nemo-seagull-1 { width: 32px; height: 14px; top: 45%; left: 18%; animation-duration: 5.2s; opacity: 1; }
.nemo-seagull-1::before { width: 22px; height: 4px; left: 0; top: 5px; transform: rotate(30deg); transform-origin: 100% 50%; }
.nemo-seagull-1::after { width: 22px; height: 4px; right: 0; top: 5px; transform: rotate(-30deg); transform-origin: 0% 50%; }

.nemo-seagull-2 { width: 17px; height: 7px; top: 49%; left: 35%; animation-duration: 4.5s; animation-delay: -1.3s; opacity: 1; }
.nemo-seagull-2::before { width: 11px; height: 2.5px; left: 0; top: 2.5px; transform: rotate(26deg); transform-origin: 100% 50%; }
.nemo-seagull-2::after { width: 11px; height: 2.5px; right: 0; top: 2.5px; transform: rotate(-26deg); transform-origin: 0% 50%; }

.nemo-seagull-3 { width: 26px; height: 11px; top: 48%; left: 52%; animation-duration: 6s; animation-delay: -2.8s; opacity: 1; }
.nemo-seagull-3::before { width: 17px; height: 3.5px; left: 0; top: 4px; transform: rotate(28deg); transform-origin: 100% 50%; }
.nemo-seagull-3::after { width: 17px; height: 3.5px; right: 0; top: 4px; transform: rotate(-28deg); transform-origin: 0% 50%; }

.nemo-seagull-4 { width: 12px; height: 5px; top: 54%; left: 68%; animation-duration: 3.8s; animation-delay: -4.2s; opacity: 1; }
.nemo-seagull-4::before { width: 8px; height: 1.8px; left: 0; top: 1.8px; transform: rotate(22deg); transform-origin: 100% 50%; }
.nemo-seagull-4::after { width: 8px; height: 1.8px; right: 0; top: 1.8px; transform: rotate(-22deg); transform-origin: 0% 50%; }

.nemo-seagull-5 { width: 38px; height: 16px; top: 43%; left: 78%; animation-duration: 5.5s; animation-delay: -0.8s; opacity: 1; }
.nemo-seagull-5::before { width: 26px; height: 4.5px; left: 0; top: 5.5px; transform: rotate(32deg); transform-origin: 100% 50%; }
.nemo-seagull-5::after { width: 26px; height: 4.5px; right: 0; top: 5.5px; transform: rotate(-32deg); transform-origin: 0% 50%; }

.nemo-seagull-6 { width: 9px; height: 4px; top: 55%; left: 55%; animation-duration: 3.2s; animation-delay: -1.8s; opacity: 1; }
.nemo-seagull-6::before { width: 6px; height: 1.5px; left: 0; top: 1.5px; transform: rotate(20deg); transform-origin: 100% 50%; }
.nemo-seagull-6::after { width: 6px; height: 1.5px; right: 0; top: 1.5px; transform: rotate(-20deg); transform-origin: 0% 50%; }

.nemo-seagull-7 { width: 21px; height: 9px; top: 51%; left: 8%; animation-duration: 4.8s; animation-delay: -3.5s; opacity: 1; }
.nemo-seagull-7::before { width: 14px; height: 3px; left: 0; top: 3px; transform: rotate(27deg); transform-origin: 100% 50%; }
.nemo-seagull-7::after { width: 14px; height: 3px; right: 0; top: 3px; transform: rotate(-27deg); transform-origin: 0% 50%; }

/* 锟斤拷锟斤拷锟斤拷锟斤拷锟铰革拷??+ 锟斤拷锟斤拷 + 锟斤拷锟斤拷微锟斤拷 */
@keyframes gullBreathe {
  0%   { transform: translateY(0) translateX(0) scale(1) rotate(0deg); }
  20%  { transform: translateY(-4px) translateX(1.5px) scale(1.04) rotate(-1.2deg); }
  40%  { transform: translateY(0) translateX(0) scale(1) rotate(0deg); }
  60%  { transform: translateY(3px) translateX(-1px) scale(0.97) rotate(0.8deg); }
  80%  { transform: translateY(-2px) translateX(1px) scale(1.02) rotate(-0.6deg); }
  100% { transform: translateY(0) translateX(0) scale(1) rotate(0deg); }
}

/* 锟斤拷锟剿ｏ拷SVG 锟斤拷锟斤拷锟斤拷锟斤拷锟竭ｏ拷??锟接革拷 + 锟斤拷??+ 锟斤拷锟斤拷锟斤拷锟?*/
.nemo-wave-svg {
  position: absolute;
  bottom: 0;
  left: -30%;
  width: 260%;
  height: 55%;
  z-index: 1;
  pointer-events: none;
  animation: waveSlide ease-in-out infinite alternate;
}
.nemo-wave-svg-1 { animation-duration: 5s; }
.nemo-wave-svg-2 { animation-duration: 7s; animation-delay: -2s; }
.nemo-wave-svg-3 { animation-duration: 9s; animation-delay: -4.5s; }
.nemo-wave-svg-4 { animation-duration: 11s; animation-delay: -7s; }
.nemo-wave-svg-deep { animation-duration: 14s; animation-delay: -10s; height: 62%; left: -40%; width: 280%; }

@keyframes waveSlide {
  0% { transform: translateX(0); }
  100% { transform: translateX(8%); }
}

/* 锟斤拷沫????实锟斤拷散锟斤拷巍锟斤拷夭锟斤拷嘶锟斤拷取锟斤拷锟斤拷锟斤拷??*/
.nemo-foam {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  animation: waveSlide ease-in-out infinite alternate;
}

/* 锟阶诧拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷片锟斤拷锟阶斤拷锟斤拷 */
.nemo-vignette {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, rgba(8, 25, 60, 0.15) 30%, rgba(8, 25, 60, 0.35) 60%, rgba(8, 25, 60, 0.50) 100%),
              radial-gradient(ellipse 140% 100% at 20% 100%, rgba(4, 18, 50, 0.55), transparent 70%),
              radial-gradient(ellipse 140% 100% at 80% 100%, rgba(4, 18, 50, 0.55), transparent 70%);
  mix-blend-mode: multiply;
}

/* 锟斤拷锟斤拷锟斤拷锟斤拷??*/
body.ocean-mode .constellation-rings {
  display: none;
}

/* ============================================
   Nemo Tab 锟叫伙拷锟斤拷钮
   ============================================ */
.nemo-tabs {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.nemo-tab {
  background: transparent;
  border: 1.5px solid var(--soft-gold);
  color: var(--soft-gold);
  font-family: 'Noto Serif SC', serif;
  font-size: 0.78rem;
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nemo-tab:hover {
  background: rgba(42, 90, 154, 0.12);
}

.nemo-tab.active {
  background: rgba(42, 90, 154, 0.18);
  box-shadow: 0 0 10px rgba(42, 90, 154, 0.3);
}

/* 锟斤拷锟斤拷模式 ??锟斤拷锟斤拷锟角空憋拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷锟姐级 */
body.ocean-mode .starry-bg {
  display: none;
}
body.ocean-mode .nemo-ocean-bg {
  display: block !important;
}
body.ocean-mode .content-wrapper {
  position: relative;
  z-index: 1;
}

@media (max-width: 640px) {
  .nemo-tab {
    font-size: 0.72rem;
    padding: 0.3rem 0.55rem;
  }
  .nemo-tabs {
    gap: 0.4rem;
    margin-bottom: 0.8rem;
  }
}

.nemo-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 11000;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.nemo-editor-overlay[hidden] { display: none; }

.nemo-editor-modal {
  width: min(920px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: rgba(10, 22, 40, 0.98);
  border: 1px solid rgba(42, 90, 154, 0.3);
  border-radius: 14px;
  padding: 1.5rem;
  color: var(--text-secondary);
  position: relative;
}

.nemo-editor-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  background: transparent;
  color: var(--soft-gold);
  border: 0;
  font-size: 1.2rem;
  cursor: pointer;
}

.nemo-editor-title,
.nemo-editor-subtitle {
  color: var(--soft-gold);
  text-align: center;
  letter-spacing: 0.12em;
}
/* Nemo 锟洁辑锟斤拷锟斤拷锟斤拷锟角?*/
body.starry-mode.nemo-page .nemo-editor-title,
body.starry-mode.nemo-page .nemo-editor-subtitle {
  color: #b8d8ea !important;
}

.nemo-editor-desc,
.nemo-editor-msg {
  text-align: center;
  color: #b8d8ea;
  font-size: 0.85rem;
}

.nemo-gallery-edit-row,
.nemo-module-edit {
  border: 1px solid rgba(42, 90, 154, 0.2);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
  background: rgba(255,255,255,0.025);
}

.nemo-gallery-edit-row label,
.nemo-module-edit label {
  display: block;
  color: var(--soft-gold);
  font-size: 0.8rem;
  margin: 0.35rem 0;
}

.nemo-gallery-edit-row input,
.nemo-gallery-edit-row textarea,
.nemo-module-edit input,
.nemo-module-edit textarea,
.nemo-module-edit select {
  width: 100%;
  background: rgba(10,22,40,0.85);
  border: 1px solid rgba(30, 74, 112, 0.22);
  color: #fff;
  border-radius: 8px;
  padding: 0.55rem;
  font-family: inherit;
}

.nemo-module-edit select option {
  background: #0a1628;
  color: #fff;
}

.nemo-module-edit-head,
.nemo-format-row,
.nemo-editor-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
  margin: 0.7rem 0;
}

.nemo-module-edit-head {
  justify-content: space-between;
  color: var(--soft-gold);
}

.nemo-module-edit-head button {
  background: transparent;
  border: 1.5px solid rgba(42, 90, 154, 0.4);
  color: var(--soft-gold);
  border-radius: 6px;
  padding: 0.25rem 0.55rem;
}

.nemo-editor-actions {
  justify-content: center;
}

.nemo-editor-actions.mini button {
  font-size: 0.78rem;
  padding: 0.35rem 0.65rem;
}

@media (max-width: 640px) {
  .nemo-gallery { width: min(520px, 78vw); }
  .nemo-prev { left: -34px; }
  .nemo-next { right: -34px; }
  .nemo-gallery-nav { width: 28px; height: 28px; font-size: 1.5rem; }
  .nemo-title { font-size: clamp(1.8rem, 8vw, 2.5rem); }
  .nemo-module-children { margin-left: 0.4rem; padding-left: 0.6rem; }
}

/* 锟斤拷锟斤拷锟缴??*/
.nemo-module-title-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.nemo-module-title-row input { flex: 1; }
.nemo-module-title-row button {
  background: transparent;
  border: 0;
  color: rgba(42, 90, 154, 0.5);
  cursor: pointer;
  font-size: 0.9rem;
  white-space: nowrap;
}
.nemo-module-title-row button:hover { color: var(--soft-gold); }

/* 选锟斤拷锟斤拷锟街加达拷/锟铰伙拷??锟斤拷锟斤拷透锟斤拷??*/
.nemo-format-bar {
  display: flex;
  gap: 0.35rem;
  margin: 0.2rem 0;
}
.nemo-format-bar button {
  width: 30px; height: 30px;
  border-radius: 6px;
  border: 1px solid rgba(42, 90, 154, 0.3);
  background: transparent;
  color: var(--soft-gold);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
}
.nemo-format-bar button:hover {
  background: rgba(42, 90, 154, 0.12);
}

/* 平锟斤拷模锟斤拷锟斤拷锟斤拷锟?*/
.nemo-module-row {
  display: flex;
  gap: 1rem;
  flex-wrap: nowrap;
}
.nemo-module-row > .nemo-module { flex: 1; min-width: 0; }
@media (max-width: 640px) {
  .nemo-module-row { flex-direction: column; }
  .nemo-module-row > .nemo-module { flex: none; }
}
/* 锟斤拷沫锟竭讹拷锟斤拷锟斤拷锟斤拷锟斤拷锟斤拷同锟节诧拷锟剿碉拷waveSlide??*/
.nemo-foam-line {
  animation: foamBob ease-in-out infinite;
}
.nemo-wave-svg-1 .nemo-foam-line { animation-duration: 2.5s; animation-delay: 0s; }
.nemo-wave-svg-2 .nemo-foam-line { animation-duration: 3.8s; animation-delay: -0.6s; }
.nemo-wave-svg-3 .nemo-foam-line { animation-duration: 3.2s; animation-delay: -1.2s; }

@keyframes foamBob {
  0%   { transform: translateY(0) scaleY(1); }
  30%  { transform: translateY(-1.5px) scaleY(1.03); }
  60%  { transform: translateY(1px) scaleY(0.98); }
  100% { transform: translateY(0) scaleY(1); }
}

/* ??锟斤拷锟斤拷十锟斤拷锟角ｏ拷锟斤拷锟斤拷锟斤拷锟????*/
.cross-star {
  position: absolute;
  pointer-events: none;
  z-index: 2;
}
.cross-star-dot {
  position: absolute;
  width: 100%;
  height: 100%;
  background: #fff;
  border-radius: 50%;
  z-index: 1;
  box-shadow: 0 0 3px rgba(255, 255, 255, 0.25);
}
.cross-star-arm-h,
.cross-star-arm-v {
  position: absolute;
  background: #fff;
  border-radius: 1px;
}

/* Copelia menu stars - deep purple */
.copelia-menu-stars .cross-star-dot {
  background: #6b3fa0;
  box-shadow: 0 0 3px 1px rgba(107,63,160,0.4);
}
.copelia-menu-stars .cross-star-arm-h,
.copelia-menu-stars .cross-star-arm-v {
  background: #6b3fa0;
}
.cross-star-arm-h {
  width: 380%;
  height: 1px;
  left: -140%;
  top: calc(50% - 0.5px);
}
.cross-star-arm-v {
  width: 1px;
  height: 380%;
  top: -140%;
  left: calc(50% - 0.5px);
}

@keyframes crossTwinkle {
  0%, 100% { opacity: 0.08; transform: rotate(0deg); }
  50% { opacity: 0.5; transform: rotate(2deg); }
}

/* ============================================
   COPELIA PAGE THEME
   ============================================ */
body.starry-mode
html.mobile .starry-bg,
html.mobile .constellation-rings {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  contain: layout paint size;
}

.copelia-page {
  --soft-gold: #4a1a6a;
}

body.starry-mode.copelia-page .nemo-module {
  color: var(--soft-gold);
  background: rgba(255, 255, 255, 0.2);
}

body.starry-mode.copelia-page .nemo-collapse-toggle {
  color: var(--soft-gold);
}

body.starry-mode.copelia-page .site-footer {
  color: #7a5a9a;
}

/* Copelia editor colors - deep purple theme */
body.starry-mode.copelia-page .nemo-editor-panel input,
body.starry-mode.copelia-page .nemo-editor-panel textarea,
body.starry-mode.copelia-page .nemo-editor-panel select {
  color: #4a1a6a;
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(74, 26, 106, 0.3);
}
body.starry-mode.copelia-page .nemo-editor-panel label {
  color: #5c2d82;
}
body.starry-mode.copelia-page .nemo-editor-panel .nemo-admin-btn,
body.starry-mode.copelia-page .nemo-editor-panel button,
body.starry-mode.copelia-page .nemo-editor-panel .nemo-format-row button,
body.starry-mode.copelia-page .nemo-editor-panel .nemo-module-edit-head button,
body.starry-mode.copelia-page .nemo-editor-panel .nemo-editor-actions button,
body.starry-mode.copelia-page .nemo-editor-panel .nemo-gallery-edit-row button,
body.starry-mode.copelia-page .nemo-editor-panel .nemo-module-edit button {
  color: #4a1a6a !important;
  border-color: #4a1a6a !important;
}
body.starry-mode.copelia-page .nemo-editor-panel .nemo-format-row select {
  color: #4a1a6a;
  border-color: #4a1a6a;
}
body.starry-mode.copelia-page .nemo-editor-panel .nemo-module-edit-head {
  color: #5c2d82;
}
body.starry-mode.copelia-page .nemo-editor-panel .nemo-editor-actions button {
  color: #4a1a6a;
  border-color: #4a1a6a;
}
body.starry-mode.copelia-page .nemo-editor-panel .nemo-gallery-edit-row,
body.starry-mode.copelia-page .nemo-editor-panel .nemo-module-edit {
  color: #5c2d82;
}
body.starry-mode.copelia-page .nemo-editor-panel .nemo-gallery-add,
body.starry-mode.copelia-page .nemo-editor-panel .nemo-gallery-remove {
  color: #5c2d82 !important;
  border-color: #5c2d82 !important;
}
body.starry-mode.copelia-page .nemo-editor-panel .nemo-gallery-remove:hover,
body.starry-mode.copelia-page .nemo-editor-panel .nemo-gallery-add:hover {
  background: rgba(74, 26, 106, 0.08);
  border-color: #8b5fc7;
  color: #8b5fc7;
}
body.starry-mode.copelia-page .nemo-editor-panel .nemo-editor-empty {
  color: #5c2d82;
}

/* Copelia tab colors */
body.starry-mode.copelia-page .nemo-tab {
  color: #5c2d82;
  border-color: rgba(74, 26, 106, 0.3);
}
body.starry-mode.copelia-page .nemo-tab.active {
  background: rgba(74, 26, 106, 0.12);
  border-color: #4a1a6a;
  color: #4a1a6a;
}

/* Copelia title colors */
body.starry-mode.copelia-page .nemo-title-line1 {
  color: #4a1a6a;
}
body.starry-mode.copelia-page .nemo-title-line2 {
  color: #5c2d82;
}

/* Copelia gallery nav */
body.starry-mode.copelia-page .nemo-gallery-nav {
  color: #4a1a6a;
  border-color: rgba(74, 26, 106, 0.3);
}
body.starry-mode.copelia-page .nemo-gallery-dots .nemo-dot {
  background: rgba(74, 26, 106, 0.3);
}
body.starry-mode.copelia-page .nemo-gallery-dots .nemo-dot.active {
  background: #4a1a6a;
}
body.starry-mode.copelia-page .nemo-gallery-caption {
  color: #5c2d82;
}

/* Copelia placeholder */
body.starry-mode.copelia-page .nemo-slide-placeholder {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(74, 26, 106, 0.2);
}
body.starry-mode.copelia-page .nemo-slide-placeholder span {
  color: #4a1a6a;
}
body.starry-mode.copelia-page .nemo-slide-placeholder p {
  color: #5c2d82;
}

/* Copelia module h3 */
body.starry-mode.copelia-page .nemo-module h3 {
  color: #4a1a6a;
}
body.starry-mode.copelia-page .nemo-module-text {
  color: #5c2d82;
}
body.starry-mode.copelia-page .nemo-collapse-toggle span {
  color: #5c2d82;
}

/* Copelia back link */
body.starry-mode.copelia-page .nemo-back-row .hall-back-link {
  color: #4a1a6a;
  border-color: #4a1a6a;
}
body.starry-mode.copelia-page .nemo-back-row .hall-back-link:hover {
  background: rgba(74, 26, 106, 0.08);
}

/* Copelia empty note */
body.starry-mode.copelia-page .nemo-empty-note {
  color: #5c2d82;
}

/* ============================================
   COPELIA FLOWER BACKGROUND
   ============================================ */

/* ======= Copelia Theme v4 ======= */

/* -- Variable override -- */
body.starry-mode.copelia-page {
  --soft-gold: #c0a0e0;
}

/* -- Editor panel: purple/white theme -- */
body.starry-mode.copelia-page .nemo-editor-panel {
  background: rgba(220,210,250,0.95);
  border-color: rgba(192,160,224,0.3);
  color: #4a1a6a;
}
body.starry-mode.copelia-page .nemo-editor-panel input,
body.starry-mode.copelia-page .nemo-editor-panel textarea,
body.starry-mode.copelia-page .nemo-editor-panel select {
  color: #4a1a6a;
  background: rgba(255,255,255,0.6);
  border-color: rgba(192,160,224,0.4);
}
body.starry-mode.copelia-page .nemo-editor-panel label {
  color: #4a1a6a;
}
body.starry-mode.copelia-page .nemo-editor-panel .nemo-admin-btn,
body.starry-mode.copelia-page .nemo-editor-panel button,
body.starry-mode.copelia-page .nemo-editor-panel .nemo-format-row button,
body.starry-mode.copelia-page .nemo-editor-panel .nemo-module-edit-head button,
body.starry-mode.copelia-page .nemo-editor-panel .nemo-editor-actions button,
body.starry-mode.copelia-page .nemo-editor-panel .nemo-gallery-edit-row button,
body.starry-mode.copelia-page .nemo-editor-panel .nemo-module-edit button {
  color: #4a1a6a !important;
  border-color: rgba(192,160,224,0.5) !important;
}
body.starry-mode.copelia-page .nemo-editor-panel .nemo-format-row select {
  color: #4a1a6a;
  border-color: rgba(192,160,224,0.5);
}
body.starry-mode.copelia-page .nemo-editor-panel .nemo-module-edit-head {
  color: #4a1a6a;
  border-color: rgba(192,160,224,0.25);
}
body.starry-mode.copelia-page .nemo-editor-panel .nemo-module-edit,
body.starry-mode.copelia-page .nemo-editor-panel .nemo-gallery-edit-row {
  color: #4a1a6a;
  border-color: rgba(192,160,224,0.25);
}
body.starry-mode.copelia-page .nemo-editor-panel .nemo-editor-actions button {
  color: #4a1a6a;
  border-color: rgba(192,160,224,0.5);
}
body.starry-mode.copelia-page .nemo-editor-panel .nemo-editor-title,
body.starry-mode.copelia-page .nemo-editor-panel .nemo-editor-subtitle {
  color: #4a1a6a;
}
body.starry-mode.copelia-page .nemo-editor-close {
  background: rgba(220,210,250,0.9);
  color: #4a1a6a;
  border-color: rgba(192,160,224,0.4);
}
body.starry-mode.copelia-page .nemo-editor-close:hover {
  background: rgba(200,180,240,0.95);
  color: #3a1050;
}
body.starry-mode.copelia-page .nemo-gallery-remove {
  background: transparent;
  border: 1px solid rgba(192,160,224,0.5);
  color: #4a1a6a;
}
body.starry-mode.copelia-page .nemo-gallery-remove:hover {
  border-color: #c0a0e0;
  color: #c0a0e0;
}
body.starry-mode.copelia-page .nemo-gallery-add {
  background: transparent;
  border: 1.5px solid rgba(192,160,224,0.5);
  color: #4a1a6a;
}
body.starry-mode.copelia-page .nemo-gallery-add:hover {
  border-color: #c0a0e0;
  color: #c0a0e0;
}
body.starry-mode.copelia-page .nemo-empty-note { color: rgba(74,26,112,0.5); }
body.starry-mode.copelia-page .nemo-editor-empty { color: #4a1a6a; }

/* -- Module & content -- */
body.starry-mode.copelia-page .nemo-module { border-color: rgba(192,160,224,0.35); }
body.starry-mode.copelia-page .nemo-module h3 { color: #c0a0e0; }
body.starry-mode.copelia-page .nemo-module-text { color: #c0a0e0; }
body.starry-mode.copelia-page .nemo-collapse-toggle { color: #c0a0e0; font-weight: 700; }
body.starry-mode.copelia-page .nemo-collapse-toggle span { color: #c0a0e0; }
body.starry-mode.copelia-page .nemo-module-children { border-left-color: rgba(192,160,224,0.2); }
body.starry-mode.copelia-page .spoiler-text { background: rgba(192,160,224,0.3); }
body.starry-mode.copelia-page .spoiler-text:hover,
body.starry-mode.copelia-page .spoiler-text.revealed { background: rgba(192,160,224,0.08); }
body.starry-mode.copelia-page .nemo-inline-img { box-shadow: 0 0 20px rgba(192,160,224,0.12); }
body.starry-mode.copelia-page .nemo-gallery-viewport { border-color: rgba(192,160,224,0.35); }
body.starry-mode.copelia-page .nemo-dot { border-color: rgba(192,160,224,0.5); }

/* -- Mobile menu: purple theme -- */
/* Copelia nav: mobile only (see @media max-width: 768px below) */

/* -- Menu falling petals -- */
.copelia-petals-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.copelia-petal {
  position: absolute;
  top: -30px;
  pointer-events: none;
  animation-name: petalDrift;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  opacity: 0;
}

.copelia-flower-rain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
@keyframes petalDrift {
  0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
  8% { opacity: 0.7; }
  50% { opacity: 0.5; }
  92% { opacity: 0.3; }
  100% { transform: translateY(calc(100vh + 40px)) translateX(var(--drift)) rotate(calc(var(--rotate-dir) * 360deg)); opacity: 0; }
}

/* -- Flower sea: overflow + full coverage -- */
/* -- Flower background container -- */

/* Desktop: flowers taller coverage */

/* -- Flower mode: hide starry-bg, show flower-bg -- */

/* -- Copelia desktop nav logo color -- */
body.starry-mode.copelia-page .nav-logo {
  color: #c9b8e0;
  -webkit-text-stroke: 1.2px rgba(107,63,160,0.4);
}
body.starry-mode.copelia-page .nav-toggle span {
  background: #6b3fa0;
}

/* -- Copelia: make nav-toggle visible -- */

/* -- Copelia Page Theme (rebuilt v7) -- */

/* Page color override */

/* Background: purple-white gradient on the body itself */

/* Flower container: only bottom 55% of viewport */

/* Desktop: flowers shorter */

/* Flower sea: fills the flower container */

/* Individual flower positioning */

/* Content above flowers */
.content-wrapper {
  position: relative;
  z-index: 1;
}

/* Nav above everything */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0.8rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Desktop nav-links */
@media (min-width: 769px) {
  .nav-links {
    position: fixed;
    top: 1.2rem;
    right: 2rem;
    z-index: 101;
    background: transparent;
    display: flex;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links .nav-menu-title,
  .nav-links .nav-close {
    display: none;
  }
  .nav-links > ul {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .nav-links a {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
  }
}



@media (min-width: 769px) {
  .copelia-menu-flower {
    display: none !important;
  }
}

@media (min-width: 769px) {
  body.copelia-page .main-nav > ul {
    list-style: none;
    display: flex;
    gap: 1.8rem;
    margin: 0;
    padding: 0;
    align-items: center;
  }
  body.copelia-page .main-nav > ul a {
    color: #6b3fa0;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    border: none;
    background: transparent;
    padding: 0;
  }
  body.copelia-page .main-nav > ul a:hover {
    color: #8a5ec0;
  }
  body.copelia-page .main-nav .nav-toggle {
    display: none !important;
  }
  body.copelia-page .nav-links {
    display: none !important;
  }
}

@media (max-width: 768px) {
  body.copelia-page .main-nav > ul {
    display: none !important;
  }
  body.copelia-page .main-nav .nav-toggle {
    display: flex !important;
  }
}





/* Copelia desktop: nav-links visible + positioning */
@media (min-width: 769px) {
  body.copelia-page .nav-links {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    position: fixed !important;
    top: 1.2rem !important;
    right: 2rem !important;
    z-index: 101 !important;
    background: transparent !important;
  }
}
/* Copelia desktop: transparent nav bg + light purple text */
@media (min-width: 769px) {
  body.starry-mode.copelia-page .nav-links {
    background: transparent !important;
  }
  body.starry-mode.copelia-page .nav-links a {
    color: #c9b8e0 !important;
    -webkit-text-stroke: 0.3px rgba(201,184,224,0.4);
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    font-size: inherit !important;
  }
  body.starry-mode.copelia-page .nav-links a:hover {
    color: #dcc8f0 !important;
    background: transparent !important;
  }
  body.starry-mode.copelia-page .nav-close {
    display: none !important;
  }
  body.starry-mode.copelia-page .nav-menu-title {
    display: none !important;
  }
}



/* Copelia menu purple stars */
.copelia-menu-stars {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.copelia-menu-stars .menu-star {
  position: absolute;
  background: #c9b8e0;
  border-radius: 50%;
  box-shadow: 0 0 3px rgba(201,184,224,0.5);
  animation: menuStarTwinkle 3s ease-in-out infinite alternate;
}
@keyframes menuStarTwinkle {
  0% { opacity: var(--star-min, 0.2); }
  100% { opacity: var(--star-max, 0.9); }
}

/* Copelia nav colors */

/* Mobile menu: purple theme */

/* Module styling */
body.copelia-page .nemo-module h3,
body.copelia-page .nemo-module-text,
body.copelia-page .nemo-collapse-toggle,

/* Editor panel */
body.copelia-page .nemo-editor-panel label,
body.copelia-page .nemo-editor-panel h3,
body.copelia-page .nemo-editor-panel input,
body.copelia-page .nemo-editor-panel textarea,

/* Gallery dots & nav */

/* Tab buttons */

/* Back link */

/* Editor buttons */
body.copelia-page .nemo-editor-panel button,

/* Gallery edit rows */

/* Module edit */

/* Page title */

/* Subtitle */


/* ============================================
   Copelia Page Theme (rebuilt v7)
   ============================================ */

/* Page color override */
body.copelia-page {
  --soft-gold: #c9b8e0;
  --gold-star: #9b6fd0;
  --deep-blue: #f5f0fa;
  --text-primary: #4a1a6a;
  --text-secondary: #5a2d7a;
  --text-muted: #7a5a9a;
}

/* Background: purple-white gradient on body */
body.copelia-flower-mode {
  background: linear-gradient(180deg, #f5f0fa 0%, #e8ddf5 50%, #f0e6fa 100%) !important;
}

/* Hide starry-bg on flower mode */
body.copelia-flower-mode .starry-bg {
  display: none;
}

/* Hide constellation rings on flower mode */
body.copelia-flower-mode .constellation-rings {
  display: none;
}

/* Flower container: bottom 55% only, not covering nav */
.copelia-flower-bg {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 55%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

@media (min-width: 769px) {
  .copelia-flower-bg {
    height: 45%;
  }
}

/* Flower sea inside container */
.copelia-flower-sea {
  position: absolute;
  bottom: 0;
  left: -5%;
  width: 110%;
  height: 100%;
  pointer-events: none;
}

/* Individual flowers */
.copelia-flower {
  position: absolute;
  opacity: 1 !important;
  pointer-events: none;
}
.copelia-flower svg {
  opacity: 1 !important;
}
.copelia-flower.layer-0 { z-index: 1; }
.copelia-flower.layer-1 { z-index: 2; }
.copelia-flower.layer-2 { z-index: 3; }

/* Copelia nav colors */
body.copelia-page .nav-toggle span {
  background: #c9b8e0 !important;
}
body.copelia-page .nav-logo {
  color: #c9b8e0;
}

/* Mobile menu: purple theme */
@media (max-width: 768px) {
  body.copelia-page .nav-links {
    background: linear-gradient(180deg, #f5f0fa 0%, #e8ddf5 100%) !important;
  }
  body.copelia-page .nav-links.open {
    z-index: 999;
  }
  body.copelia-page .nav-links a {
    -webkit-text-stroke: 0.3px rgba(201,184,224,0.4);
    color: #c9b8e0 !important;
    border-color: #c9b8e0 !important;
  }
  body.copelia-page .nav-menu-title {
    color: #c9b8e0 !important;
  }
  body.copelia-page .nav-close {
    color: #c9b8e0 !important;
    border-color: #c9b8e0 !important;
  }
}

/* Module styling */
body.copelia-page .nemo-module {
  background: rgba(255, 255, 255, 0.3) !important;
  border-color: rgba(107, 63, 160, 0.2) !important;
}
body.copelia-page .nemo-module h3,
body.copelia-page .nemo-module-text,
body.copelia-page .nemo-collapse-toggle,
body.copelia-page .nemo-module p {
  color: #4a1a6a !important;
}

/* Editor panel */
body.copelia-page .nemo-editor-panel {
  background: rgba(240, 230, 255, 0.95) !important;
  color: #4a1a6a !important;
}
body.copelia-page .nemo-editor-panel label,
body.copelia-page .nemo-editor-panel h3,
body.copelia-page .nemo-editor-panel p {
  color: #4a1a6a !important;
}
body.copelia-page .nemo-editor-panel input,
body.copelia-page .nemo-editor-panel textarea,
body.copelia-page .nemo-editor-panel select {
  background: rgba(200, 180, 230, 0.3) !important;
  color: #4a1a6a !important;
  border-color: rgba(107, 63, 160, 0.3) !important;
}

/* Gallery & tabs */
body.copelia-page .nemo-dot {
  background: rgba(107, 63, 160, 0.3) !important;
}
body.copelia-page .nemo-dot.active {
  background: #c9b8e0 !important;
}
body.copelia-page .nemo-tab {
  color: #6b3fa0 !important;
  border-color: rgba(107, 63, 160, 0.3) !important;
}
body.copelia-page .nemo-tab.active {
  background: rgba(107, 63, 160, 0.15) !important;
  border-color: #6b3fa0 !important;
}

/* Back link */
body.copelia-page .hall-back-link {
  color: #6b3fa0 !important;
}

/* Editor buttons & admin */
body.copelia-page .nemo-editor-panel button,
body.copelia-page .nemo-admin-btn {
  background: rgba(107, 63, 160, 0.1) !important;
  color: #6b3fa0 !important;
  border-color: rgba(107, 63, 160, 0.3) !important;
}

/* Gallery edit & module edit borders */
body.copelia-page .nemo-gallery-edit-row,
body.copelia-page .nemo-module-edit {
  border-color: rgba(107, 63, 160, 0.2) !important;
}

/* Titles */
body.copelia-page .nemo-page-title {
  color: #4a1a6a !important;
}
body.copelia-page .nemo-editor-title {
  color: #6b3fa0 !important;
}
body.copelia-page .nemo-editor-subtitle {
  color: #8a6aaa !important;
}
/* v3: hide menu stars desktop 1783522340804 */

/* force-upload */
/* force-upload-v2 */
/* ---- Santa winter forest background ---- */
body.santa-mode .nemo-santa-bg {
  display: block !important;
}
body.santa-mode .content-wrapper {
  position: relative;
  z-index: 1;
}
.nemo-santa-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
  display: none;
  overflow: hidden;
  background: linear-gradient(180deg, #0a1628 0%, #1a2a4a 25%, #2a4060 40%, #3a5a7a 55%, #6a8aaa 70%, #aac8dd 85%, #d8eaf5 100%);
}
.santa-sky {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100%;
  pointer-events: none;
}
.santa-forest-1 {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80%;
  pointer-events: none;
}
.santa-tree {
  position: absolute;
  pointer-events: none;
}
.santa-ground {
  position: absolute;
  bottom: 0;
  left: -5%;
  width: 110%;
  height: 10%;
  background: linear-gradient(180deg, #d0e4f5 0%, #e8f0fa 30%, #f0f5ff 60%, #f5f8ff 100%);
  border-radius: 50% 50% 0 0/40% 40% 0 0;
  pointer-events: none;
}
.santa-snowfall {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}
.santa-snowflake {
  position: absolute;
  top: -10px;
  width: 6px;
  height: 6px;
  background: radial-gradient(circle at center, #fff 0%, rgba(255,255,255,0.6) 100%);
  border-radius: 50%;
  animation: snowFall linear infinite;
}

@keyframes snowFall {
  0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
  5% { opacity: 0.8; }
  90% { opacity: 0.5; }
  100% { transform: translateY(100vh) translateX(var(--snow-drift, 30px)) rotate(360deg); opacity: 0.1; }
}


/* ---- Santa mode nav readability ---- */
body.santa-mode .main-nav {
  background: linear-gradient(180deg, rgba(10,22,40,0.7) 0%, transparent 100%);
}
body.santa-mode .nav-logo { color: #d8eaf5; text-shadow: 0 0 12px rgba(100,150,220,0.5); }
body.santa-mode .nav-toggle span { background: #d8eaf5; }

body.santa-mode .nav-links a { color: #b8d8f0; }
body.santa-mode .nav-menu-title { color: #8ab8dd; }
body.santa-mode .starry-bg { display: none !important; }
body.adult-mode .starry-bg,
body.adult-mode .constellation-rings { z-index: -1 !important; opacity: 0 !important; pointer-events: none !important; }


/* ---- Santa mode: hide every other tree on mobile ---- */
@media (max-width: 768px) {
  .santa-tree-mobile-hide { display: none; }
}


/* ---- Santa tab: display text colors (NOT editor) ---- */
body.santa-mode .nemo-tab { color: #c0d8ee; border-color: rgba(180,210,240,0.3); }
body.santa-mode .nemo-tab:hover { color: #d8eaff; }
body.santa-mode .nemo-tab.active { color: #e4f0ff; border-color: rgba(180,210,240,0.5); background: rgba(180,210,240,0.12); }
body.santa-mode .nemo-title-line1,
body.santa-mode .nemo-title-line2 { color: #dceeff; text-shadow: 0 0 24px rgba(80,160,255,0.25); }
body.santa-mode .nemo-gallery-nav { color: #b8d0e8; border-color: rgba(180,210,240,0.25); }
body.santa-mode .nemo-gallery-nav:hover { border-color: rgba(180,210,240,0.6); }
body.santa-mode .nemo-gallery-caption { color: #a8c4dc; }
body.santa-mode .nemo-admin-btn { color: #b8d0e8; border-color: rgba(180,210,240,0.3); }
body.santa-mode .nemo-admin-btn:hover { background: rgba(180,210,240,0.08); }
body.santa-mode .nemo-dot { border-color: rgba(180,210,240,0.4); }
body.santa-mode .nemo-dot.active { background: #b8d0e8; }
body.santa-mode.nemo-page .nemo-module h3,
body.santa-mode.nemo-page .nemo-collapse-toggle,
body.santa-mode.nemo-page .nemo-collapse-toggle span { color: #dceeff; }
body.santa-mode .nemo-module-text { color: #b8cce0; }

/* ---- Santa tab: module backgrounds (NOT editor panel) ---- */
body.santa-mode .nemo-module { background: rgba(10,22,50,0.4); }
body.santa-mode .nemo-editor-panel .nemo-module { background: none; }

/* ---- Santa mobile menu snow ---- */
@media (max-width: 768px) {
body.santa-mode #navLinks {
  background: rgba(8,18,40,0.95);
}
/* Hide stars/shooting stars in nav menu for santa mode */
body.santa-mode #navStarryBg .dot,
body.santa-mode #navStarryBg .cross-star,
body.santa-mode #navStarryBg .shooting-star { display: none !important; }
body.adult-mode #navStarryBg .dot,
body.adult-mode #navStarryBg .cross-star,
body.adult-mode #navStarryBg .shooting-star { display: none !important; }
}

@keyframes santaNavSnow {
  0% { transform: translateY(0) translateX(0); opacity: 0.5; }
  100% { transform: translateY(10px) translateX(4px); opacity: 0.9; }
}


/* ---- Santa nav snowflakes (individual falling) ---- */
.santa-nav-snowflake {
  display: none;
}
body.santa-mode .santa-nav-snowflake {
  display: block;
  position: absolute;
  top: -10px;
  background: radial-gradient(circle at center, #fff 0%, rgba(255,255,255,0.7) 100%);
  border-radius: 50%;
  animation: santaNavSnowFall linear infinite;
}

@keyframes santaNavSnowFall {
  0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.5; }
  100% { transform: translateY(100vh) translateX(var(--snow-drift, 20px)) rotate(360deg); opacity: 0.1; }
}


/* ---- Adult mode storm background ---- */
body.adult-mode .nemo-adult-bg {
  display: block !important;
}
body.adult-mode .content-wrapper { position: relative; z-index: 1; }
body.adult-mode .nemo-title-line1,
body.adult-mode .nemo-title-line2 {
  color: #b0c4d8; text-shadow: 0 0 16px rgba(60,120,180,0.2);
}
body.adult-mode .nemo-tab { color: #8eaabc; border-color: rgba(140,170,190,0.3); }
body.adult-mode .nemo-tab:hover { color: #b0cce0; }
body.adult-mode .nemo-tab.active { color: #c0d8ec; border-color: rgba(160,200,230,0.4); background: rgba(160,200,230,0.1); }
body.adult-mode .nemo-gallery-nav { color: #8eaabc; border-color: rgba(140,170,190,0.25); }
body.adult-mode .nemo-gallery-caption { color: #7a96ac; }
body.adult-mode .nemo-admin-btn { color: #8eaabc; border-color: rgba(140,170,190,0.3); }
body.adult-mode .nemo-module { background: rgba(6,18,40,0.35); }
body.adult-mode.nemo-page .nemo-module h3,
body.adult-mode.nemo-page .nemo-collapse-toggle,
body.adult-mode.nemo-page .nemo-collapse-toggle span { color: #b8cce0; }
body.adult-mode.nemo-page .nemo-module-text { color: #90aabc; }
body.adult-mode .nemo-dot { border-color: rgba(140,170,190,0.4); }
body.adult-mode .nemo-dot.active { background: #90aabc; }
body.adult-mode .nemo-editor-panel .nemo-module { background: none; }
body.adult-mode .nav-links { background: rgba(6,14,30,0.95); }
@media (min-width: 769px) {
  body.adult-mode .nav-links { background: transparent !important; }
}
body.adult-mode .nav-links a { color: #8eaabc; }
body.adult-mode .nav-menu-title { color: #708aa0; }
body.adult-mode .nav-logo { color: #b0cce0; text-shadow: 0 0 12px rgba(60,120,180,0.4); }
body.adult-mode .nav-toggle span { background: #b0cce0; }

.nemo-adult-bg {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
  display: none;
  overflow: hidden;
  /* Storm sky: dark clouds at top -> deep ocean blue middle -> dark sea bottom */
  background: linear-gradient(180deg, #050810 0%, #0a1428 10%, #14203a 18%, #1a2c4a 28%, #1e3a5c 38%, #1a3550 50%, #16304a 62%, #142840 75%, #102038 88%, #0c1828 100%);
}
.adult-sky {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  /* Ocean glow in the middle */
  background:
    radial-gradient(ellipse at 50% 35%, rgba(10,80,140,0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 30% 50%, rgba(8,60,120,0.08) 0%, transparent 40%),
    radial-gradient(ellipse at 70% 50%, rgba(8,60,120,0.08) 0%, transparent 40%);
}

/* Storm clouds */
.adult-clouds {
  position: absolute;
  top: 0; left: 0; right: 0; height: 28%;
  pointer-events: none;
  overflow: hidden;
}
.adult-cloud {
  position: absolute;
  border-radius: 50%;
  opacity: 0.5;
}
.adult-cloud-1 {
  width: 55%; height: 60%; top: -15%; left: -5%;
  background: radial-gradient(ellipse at 50% 80%, rgba(15,25,45,0.7) 0%, rgba(12,20,38,0.3) 50%, transparent 70%);
}
.adult-cloud-2 {
  width: 60%; height: 70%; top: -20%; left: 40%;
  background: radial-gradient(ellipse at 50% 80%, rgba(18,30,50,0.65) 0%, rgba(14,24,42,0.25) 50%, transparent 70%);
  animation: adultCloudDrift 12s ease-in-out infinite alternate;
}
.adult-cloud-3 {
  width: 40%; height: 50%; top: -8%; left: 15%;
  background: radial-gradient(ellipse at 50% 80%, rgba(20,35,55,0.5) 0%, rgba(16,28,45,0.2) 50%, transparent 70%);
  animation: adultCloudDrift2 15s ease-in-out infinite alternate;
}
.adult-cloud-4 {
  width: 35%; height: 40%; top: -5%; left: 65%;
  background: radial-gradient(ellipse at 50% 80%, rgba(22,38,58,0.45) 0%, rgba(16,28,45,0.15) 50%, transparent 65%);
  animation: adultCloudDrift 10s ease-in-out infinite alternate;
}
.adult-cloud-5 {
  width: 45%; height: 55%; top: -10%; left: -10%;
  background: radial-gradient(ellipse at 50% 80%, rgba(25,42,65,0.4) 0%, rgba(18,30,50,0.15) 50%, transparent 65%);
  animation: adultCloudDrift2 18s ease-in-out infinite alternate;
}
.adult-cloud-6 {
  width: 50%; height: 50%; top: -12%; left: 55%;
  background: radial-gradient(ellipse at 50% 80%, rgba(12,22,40,0.55) 0%, rgba(10,18,35,0.2) 50%, transparent 65%);
}

@keyframes adultCloudDrift {
  0% { transform: translateX(0); }
  100% { transform: translateX(15px); }
}
@keyframes adultCloudDrift2 {
  0% { transform: translateX(0); }
  100% { transform: translateX(-12px); }
}
.adult-lightning {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  animation: adultLightning 6s ease-in-out infinite;
}

@keyframes adultLightning {
  0%, 94%, 100% { background: transparent; }
  94.4% { background: rgba(200,220,255,0.08); }
  94.7% { background: transparent; }
  95.1% { background: rgba(200,220,255,0.14); }
  95.4% { background: transparent; }
  97% { background: rgba(200,220,255,0.04); }
  97.3% { background: transparent; }
}

.adult-rain {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  overflow: hidden;
}
.adult-raindrop {
  position: absolute;
  top: -30px;
  width: 1.5px;
  background: linear-gradient(160deg, transparent 0%, rgba(150,190,230,0.2) 20%, rgba(170,210,245,0.4) 60%, rgba(180,220,250,0.55) 100%);
  border-radius: 0;
  animation: adultRainFall linear infinite;
}

@keyframes adultRainFall {
  0% { transform: translateY(-20px) translateX(0) rotate(30deg); opacity: 0; }
  5% { opacity: 0.7; }
  90% { opacity: 0.4; }
  100% { transform: translateY(110vh) translateX(var(--rain-drift, -150px)) rotate(30deg); opacity: 0; }
}

/* Pigeons - realistic side view, mirror symmetrical */
.adult-pigeon {
  font-size: 320px;
  line-height: 1;
  pointer-events: none;
  animation: adultPigeonBreathe 4s ease-in-out infinite;
}
.adult-pigeon-wrap {
  position: fixed;
  bottom: 22%;
  z-index: 8;
  pointer-events: none;
}
.adult-pigeon-left-wrap {
  left: 2%;
}
.adult-pigeon-right-wrap {
  right: 2%;
  transform: scaleX(-1);
}
.adult-pigeon-right {
  display: block;
}

@keyframes adultPigeonBreathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

body.adult-mode .adult-pigeon {
  filter: drop-shadow(0 0 12px rgba(80,160,220,0.15));
}

/* Adult mode waves - SVG wave with foam */
.adult-waves {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 22%;
  z-index: 5;
  pointer-events: none;
  overflow: visible;
}
.adult-wave-svg {
  width: 160%;
  height: 100%;
  display: block;
  margin-left: -30%;
}
.adult-wave-path {
  animation: adultWaveSlide ease-in-out infinite alternate;
}
.adult-wave-p1 { animation-duration: 3.5s; }
.adult-wave-p2 { animation-duration: 5s; animation-delay: -1.5s; }
.adult-wave-p3 { animation-duration: 6.5s; animation-delay: -3s; }
.adult-wave-f1 { animation-duration: 3.5s; }
.adult-wave-f2 { animation-duration: 5s; animation-delay: -1.5s; }

@keyframes adultWaveSlide {
  0% { transform: translateX(0); }
  100% { transform: translateX(12%); }
}

/* Adult mode hide ALL star elements */
body.adult-mode #starryBg {
  display: none !important;
}
body.adult-mode #navStarryBg .dot,
body.adult-mode #navStarryBg .cross-star,
body.adult-mode #navStarryBg .shooting-star {
  display: none !important;
}
/* ============================================
   NYX TAB - rotating day/night split background
   ============================================ */

/* Nyx split container */
.nyx-split-bg {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

body[data-copelia-tab="nyx"] .nyx-split-bg {
  display: block;
}

/* Spin wrapper - rotates continuously around page center */
.nyx-split-spin {
  position: absolute;
  inset: 0;
  animation: nyxSpin 20s linear infinite;
}

/* Day/night conic gradient - split at vertical line through center */
.nyx-day-half {
  position: absolute;
  inset: -100%;
  width: 300%;
  height: 300%;
  /* from 90deg = start from bottom, so 0-180deg = left half, 180-360deg = right half */
    /* from 270deg: right half = day, left half = night. Boundary = vertical line = golden line */
  background: conic-gradient(from 270deg at 50% 50%,
    rgba(255, 248, 235, 0.20) 0deg 180deg,
    rgba(10, 15, 45, 0.75) 180deg 360deg
  );
  pointer-events: none;
}

/* Golden line through page center */
.nyx-golden-line {
  position: absolute;
  top: 0;
  left: 50%;
  width: 2px;
  height: 100%;
  transform: translateX(-50%);
  background: linear-gradient(to bottom,
    transparent 0%,
    rgba(212, 168, 83, 0.15) 5%,
    rgba(212, 168, 83, 0.5) 20%,
    rgba(212, 168, 83, 0.7) 50%,
    rgba(212, 168, 83, 0.5) 80%,
    rgba(212, 168, 83, 0.15) 95%,
    transparent 100%
  );
  box-shadow: 0 0 8px rgba(212, 168, 83, 0.3), 0 0 20px rgba(212, 168, 83, 0.1);
  pointer-events: none;
}

@keyframes nyxSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Golden star chain top bar - stays fixed, does NOT rotate */
.nyx-star-chain {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 30px;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
}

body[data-copelia-tab="nyx"] .nyx-star-chain {
  display: block;
}

.nyx-chain-svg {
  width: 100%;
  height: 30px;
  overflow: visible;
}

.nyx-chain-star {
  position: absolute;
  width: 10px;
  height: 10px;
  top: 8px;
  animation: nyxChainTwinkle 2s ease-in-out infinite alternate;
}

.nyx-chain-star svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 3px rgba(212, 168, 83, 0.6));
}

@keyframes nyxChainTwinkle {
  0% { opacity: 0.5; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1.1); }
}

/* Hide starry background (night half) replaced by conic gradient */
/* Show starry background as the night side behind the conic gradient */

/* Show constellation rings above Nyx gradient */
body[data-copelia-tab="nyx"] .constellation-rings {
  display: block !important;
  z-index: 5 !important;
  pointer-events: none !important;
  opacity: 1 !important;
}

body[data-copelia-tab="nyx"] .constellation-rings svg circle {
  stroke: rgba(200, 180, 230, 1) !important;
}

body[data-copelia-tab="nyx"] .constellation-rings svg polygon {
  fill: rgba(200, 180, 230, 1) !important;
  opacity: 1 !important;
}

body[data-copelia-tab="nyx"] .constellation-rings svg {
  opacity: 1 !important;
}

body[data-copelia-tab="nyx"] .starry-bg {
  opacity: 1;
}
/* Show starry-bg behind Nyx conic gradient (night side) */
body[data-copelia-tab="nyx"] .starry-bg,
body[data-copelia-tab="nyx"].copelia-flower-mode .starry-bg {
  display: block !important;
  z-index: -1;
}

/* Hide flower background in Nyx tab */
body[data-copelia-tab="nyx"] .copelia-flower-bg {
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* Constellation rings turn light purple */


/* Hide ring stars (polygons) */




/* ---- Nyx tab: all text & borders gold ---- */
/* Tabs */
body[data-copelia-tab="nyx"] .nemo-tab,
body[data-copelia-tab="nyx"] .nemo-tab.active {
  color: #d4a853 !important;
  border-color: #d4a853 !important;
}

/* Title */
body[data-copelia-tab="nyx"] #copeliaTitle,
body[data-copelia-tab="nyx"] #copeliaTitle * {
  color: #d4a853 !important;
}

/* Gallery */
body[data-copelia-tab="nyx"] .nemo-gallery-viewport {
  border-color: rgba(212, 168, 83, 0.5) !important;
}
body[data-copelia-tab="nyx"] .nemo-gallery-nav {
  color: #d4a853 !important;
  border-color: rgba(212, 168, 83, 0.4) !important;
}
body[data-copelia-tab="nyx"] .nemo-gallery-nav:hover {
  color: #e8c96a !important;
  border-color: rgba(232, 201, 106, 0.7) !important;
}
body[data-copelia-tab="nyx"] .nemo-gallery-caption {
  color: #d4a853 !important;
}
body[data-copelia-tab="nyx"] .nemo-dot {
  background: rgba(212, 168, 83, 0.3) !important;
}
body[data-copelia-tab="nyx"] .nemo-dot.active {
  background: #d4a853 !important;
}

/* Modules */
body[data-copelia-tab="nyx"] .nemo-module {
  border-color: rgba(212, 168, 83, 0.35) !important;
}
body[data-copelia-tab="nyx"] .nemo-module h3,
body[data-copelia-tab="nyx"] .nemo-module-text,
body[data-copelia-tab="nyx"] .nemo-module p,
body[data-copelia-tab="nyx"] .nemo-module-content {
  color: #d4a853 !important;
}
body[data-copelia-tab="nyx"] .nemo-collapse-toggle,
body[data-copelia-tab="nyx"] .nemo-collapse-toggle span {
  color: #d4a853 !important;
}
body[data-copelia-tab="nyx"] .nemo-module-children {
  border-left-color: rgba(212, 168, 83, 0.2) !important;
}

/* Back link & footer */
body[data-copelia-tab="nyx"] .nemo-back-row .hall-back-link,
body[data-copelia-tab="nyx"] .site-footer * {
  color: #d4a853 !important;
  border-color: #d4a853 !important;
}

/* Flower bg transition back */
.copelia-flower-bg {
  transition: opacity 0.6s ease;
}

/* Nyx tab content semi-transparent backgrounds */
body[data-copelia-tab="nyx"] .nemo-hero {
  background: transparent;
}

body[data-copelia-tab="nyx"] .nemo-tabs {
  background: transparent;
}

body[data-copelia-tab="nyx"] .nemo-modules {
  background: transparent;
}

/* ============================================
   MAP PAGE (map.html)
   ============================================ */

.map-hero {
  min-height: 50vh;
  min-height: 50svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 1rem;
  text-align: center;
  position: relative;
}

.map-hero-content {
  max-width: var(--content-width);
  width: 100%;
}

.map-tree-section {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
}

/* Map tree */
.map-tree {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.map-node {
  position: relative;
  margin: 0.6rem 0;
}

.map-node-link {
  display: inline-block;
  font-family: 'Noto Serif SC', serif;
  font-size: 1.05rem;
  color: var(--soft-gold);
  text-decoration: none;
  letter-spacing: 0.12em;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(232, 201, 106, 0.25);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.map-node-link:hover {
  border-color: var(--soft-gold);
  background: rgba(232, 201, 106, 0.08);
  box-shadow: 0 0 12px rgba(232, 201, 106, 0.15);
  transform: translateX(4px);
}

.map-node.map-root > .map-node-link {
  font-size: 1.3rem;
  border-width: 2px;
  border-color: var(--soft-gold);
  text-shadow: 0 0 8px rgba(232, 201, 106, 0.3);
  margin-bottom: 0.5rem;
}

.map-node.map-inner > .map-node-link {
  font-size: 1.1rem;
}

.map-node.map-leaf > .map-node-link {
  font-size: 0.95rem;
}

.map-branch {
  position: relative;
  margin-left: 2rem;
  padding-left: 1.5rem;
  border-left: 1px solid rgba(232, 201, 106, 0.2);
}

.map-branch::before {
  content: '';
  position: absolute;
  top: 0;
  left: -1px;
  width: 12px;
  height: 1px;
  background: var(--soft-gold);
  opacity: 0.3;
}

.map-pending {
  opacity: 0.4;
  cursor: default;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: var(--text-muted) !important;
}

.map-pending:hover {
  transform: none !important;
  box-shadow: none !important;
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

.map-pending-badge {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-left: 0.5rem;
  padding: 0.15rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  vertical-align: middle;
}

@media (max-width: 768px) {
  .map-hero {
    padding: 6rem 1.5rem 1rem;
    min-height: 40vh;
    min-height: 40svh;
  }
  .map-tree-section {
    padding: 1.5rem;
  }
  .map-branch {
    margin-left: 1rem;
    padding-left: 1rem;
  }
  .map-node-link {
    font-size: 0.95rem;
    padding: 0.3rem 0.8rem;
  }
  .map-node.map-root > .map-node-link {
    font-size: 1.1rem;
  }
}

/* Map tree collapsible nodes */
.map-node-inner {
  position: relative;
}

.map-node-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  padding: 0.3rem 0;
  user-select: none;
}

.map-node-header:hover .map-toggle-icon {
  opacity: 1;
}

.map-toggle-icon {
  font-size: 0.5rem;
  color: var(--soft-gold);
  opacity: 0.4;
  transition: transform 0.3s ease, opacity 0.3s ease;
  display: inline-block;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.map-node-inner.collapsed > .map-node-header .map-toggle-icon {
  transform: rotate(-90deg);
}

.map-node-inner > .map-branch {
  transition: max-height 0.4s ease, opacity 0.3s ease;
  max-height: 500px;
  opacity: 1;
  overflow: hidden;
}

.map-node-inner.collapsed > .map-branch {
  max-height: 0;
  opacity: 0;
}

/* ============================================
   LIBRARY HALL - 图书室
   ============================================ */

.library-hero {
  min-height: 30vh;
  min-height: 30svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 2rem;
  text-align: center;
}

.library-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 2.8rem;
  color: var(--soft-gold);
  letter-spacing: 0.25em;
  margin-bottom: 1rem;
  text-shadow: 0 0 20px rgba(232, 201, 106, 0.3);
}

.library-title-star {
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
}
.library-title-star:hover {
  text-shadow: 0 0 25px rgba(232, 201, 106, 0.8), 0 0 50px rgba(100, 150, 255, 0.3);
  transform: scale(1.15);
  color: #e8d080;
}

.library-subtitle {
  font-size: 1.1rem;
  color: var(--soft-gold);
  opacity: 0.8;
  letter-spacing: 0.2em;
  margin-bottom: 0.5rem;
}

.library-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
}

.library-desc.gold-desc {
  color: var(--soft-gold);
  opacity: 0.85;
}

/* Novel list */
.library-list-section {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem;
}

.library-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.library-novel-card {
  border: 1px solid rgba(232, 201, 106, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.02);
}

.library-novel-card:hover {
  border-color: var(--soft-gold);
  background: rgba(232, 201, 106, 0.06);
  box-shadow: 0 0 16px rgba(232, 201, 106, 0.1);
  transform: translateY(-3px);
}

.library-novel-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.2rem;
  color: var(--soft-gold);
  margin: 0 0 0.5rem;
  letter-spacing: 0.15em;
}

.library-novel-author {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.1em;
}

.library-novel-desc {
  font-size: 0.9rem;
  color: var(--soft-gold);
  opacity: 0.75;
  line-height: 1.6;
}

.library-empty {
  color: var(--text-muted);
  text-align: center;
  padding: 3rem;
  font-size: 0.95rem;
}

/* Reader */
.library-reader-section {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem;
}

.library-reader-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(232, 201, 106, 0.15);
}

.library-back-btn {
  background: transparent;
  border: 1px solid rgba(232, 201, 106, 0.3);
  color: var(--soft-gold);
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
  font-family: 'Noto Serif SC', serif;
  flex-shrink: 0;
}

.library-back-btn:hover {
  border-color: var(--soft-gold);
  background: rgba(232, 201, 106, 0.1);
}

.library-reader-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.3rem;
  color: var(--soft-gold);
  margin: 0;
  letter-spacing: 0.15em;
}

.library-reader-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 2.5rem;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 16px;
  border: 1px solid rgba(232, 201, 106, 0.1);
}

.library-paragraph {
  font-size: 1rem;
  line-height: 2;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  text-indent: 2em;
  margin-bottom: 1.2rem;
}

.library-loading {
  color: var(--text-muted);
  text-align: center;
  padding: 3rem;
  font-size: 0.9rem;
}

/* Footer row */
.library-footer-row {
  max-width: var(--content-width);
  margin: 2rem auto;
  padding: 0 2rem;
  text-align: left;
}

.library-footer-row .hall-back-link {
  display: inline-block;
  color: #d4a853;
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  padding: 0.35rem 1rem;
  border: 1.5px solid #d4a853;
  border-radius: 8px;
  background: transparent;
  transition: all 0.3s ease;
}

.library-footer-row .hall-back-link:hover {
  background: rgba(212, 168, 83, 0.1);
}

/* Mobile */
@media (max-width: 768px) {
  .library-title {
    font-size: 2rem;
  }
  .library-list-section {
    padding: 1.5rem;
  }
  .library-list {
    grid-template-columns: 1fr;
  }
  .library-novel-card {
    padding: 1.2rem;
  }
  .library-reader-section {
    padding: 1.5rem;
  }
  .library-reader-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }
  .library-paragraph {
    font-size: 0.95rem;
  }
}

/* ============================================
   LIBRARY GROUP - 系列分组
   ============================================ */

.library-list-header {
  position: relative;
  margin-bottom: 1rem;
}

.library-group-banner {
  text-align: center;
  padding: 2rem 1rem 0.5rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(232, 201, 106, 0.15);
}

.library-group-banner-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 2rem;
  color: var(--soft-gold);
  letter-spacing: 0.2em;
  margin: 0 0 0.5rem;
  text-shadow: 0 0 16px rgba(232, 201, 106, 0.25);
}

.library-group-banner-desc {
  font-size: 0.9rem;
  color: var(--soft-gold);
  letter-spacing: 0.12em;
  opacity: 0.75;
}

.library-group-back-btn {
  background: transparent;
  border: 1px solid rgba(232, 201, 106, 0.3);
  color: var(--soft-gold);
  padding: 0.4rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
  font-family: 'Noto Serif SC', serif;
  margin: 0 0 0.5rem 0;
  display: none;
}

.library-group-back-btn:hover {
  border-color: var(--soft-gold);
  background: rgba(232, 201, 106, 0.1);
}

/* Group cards */
.library-group-card {
  border: 1px solid rgba(232, 201, 106, 0.25);
  border-radius: 16px;
  padding: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.03);
  text-align: center;
}

.library-group-card:hover {
  border-color: var(--soft-gold);
  background: rgba(232, 201, 106, 0.08);
  box-shadow: 0 0 20px rgba(232, 201, 106, 0.12);
  transform: translateY(-4px);
}

.library-group-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.5rem;
  color: var(--soft-gold);
  margin: 0 0 1rem;
  letter-spacing: 0.2em;
  text-shadow: 0 0 10px rgba(232, 201, 106, 0.15);
}

.library-group-desc {
  font-size: 0.9rem;
  color: var(--soft-gold);
  line-height: 1.6;
  opacity: 0.75;
}

@media (max-width: 768px) {
  .library-group-banner-title {
    font-size: 1.5rem;
  }
  .library-group-title {
    font-size: 1.2rem;
  }
  .library-group-card {
    padding: 1.5rem;
  }
}

/* ============================================
   LIBRARY READER - IMAGE SUPPORT
   ============================================ */

.library-reader-img-wrapper {
  text-align: center;
  margin: 1.5rem 0;
}

.library-reader-img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
  .library-reader-content {
    padding: 1.2rem 1rem;
  }
  .library-reader-img {
    border-radius: 8px;
  }
}

/* --- Secret Library (Password Overlay) --- */
.secret-password-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 10, 25, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.secret-password-modal {
  text-align: center;
  padding: 3rem 2.5rem;
  border: 1px solid rgba(232, 201, 106, 0.25);
  border-radius: 16px;
  background: rgba(10, 18, 35, 0.85);
  max-width: 400px;
  width: 90%;
  animation: secretFadeIn 0.6s ease;
}

@keyframes secretFadeIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.secret-password-icon {
  font-size: 2.5rem;
  color: var(--soft-gold);
  margin-bottom: 0.5rem;
  text-shadow: 0 0 30px rgba(232, 201, 106, 0.4);
}

.secret-password-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.5rem;
  color: var(--soft-gold);
  margin-bottom: 1rem;
  letter-spacing: 0.2em;
}

.secret-password-hint {
  font-size: 0.85rem;
  color: var(--soft-gold);
  opacity: 0.6;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.secret-password-input-group {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.secret-password-input {
  padding: 0.7rem 1rem;
  background: rgba(232, 201, 106, 0.06);
  border: 1px solid rgba(232, 201, 106, 0.3);
  border-radius: 8px;
  color: var(--soft-gold);
  font-size: 1.1rem;
  text-align: center;
  letter-spacing: 0.3em;
  width: 160px;
  outline: none;
  transition: border-color 0.3s;
}
.secret-password-input:focus {
  border-color: var(--soft-gold);
  box-shadow: 0 0 15px rgba(232, 201, 106, 0.15);
}
.secret-password-input::placeholder {
  color: rgba(232, 201, 106, 0.25);
  letter-spacing: 0.1em;
}

.secret-password-submit {
  padding: 0.7rem 1.5rem;
  background: linear-gradient(135deg, rgba(212, 168, 83, 0.2), rgba(232, 201, 106, 0.15));
  border: 1px solid var(--soft-gold);
  border-radius: 8px;
  color: var(--soft-gold);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}
.secret-password-submit:hover {
  background: linear-gradient(135deg, rgba(212, 168, 83, 0.35), rgba(232, 201, 106, 0.25));
  box-shadow: 0 0 20px rgba(232, 201, 106, 0.15);
}

.secret-password-error {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #e8846b;
  min-height: 1.5rem;
}

.secret-subtitle {
  opacity: 0.75;
}

.vault-empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.vault-novel-card {
  cursor: pointer;
  border: 1px solid rgba(232, 201, 106, 0.15) !important;
  background: rgba(232, 201, 106, 0.03) !important;
}
.vault-novel-card:hover {
  border-color: rgba(232, 201, 106, 0.4) !important;
  background: rgba(232, 201, 106, 0.08) !important;
}

/* Per-novel lock overlay */
.secret-novel-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 10, 25, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.secret-novel-lock-modal {
  position: relative;
  text-align: center;
  padding: 2.5rem 2rem;
  border: 1px solid rgba(232, 201, 106, 0.25);
  border-radius: 16px;
  background: rgba(10, 18, 35, 0.85);
  max-width: 400px;
  width: 90%;
  animation: secretFadeIn 0.4s ease;
}

.secret-novel-lock-close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--soft-gold);
  opacity: 0.5;
  font-size: 1.2rem;
  cursor: pointer;
  transition: opacity 0.3s;
}
.secret-novel-lock-close:hover {
  opacity: 1;
}

/* Mobile: secret password */
@media (max-width: 768px) {
  .secret-password-modal {
    padding: 2rem 1.5rem;
  }
  .secret-password-title {
    font-size: 1.3rem;
  }
  .secret-password-input-group {
    flex-direction: column;
    align-items: center;
  }
  .secret-password-input {
    width: 100%;
    max-width: 200px;
  }
}

/* ═══════════════════════════════════════
   美术馆
   ═══════════════════════════════════════ */

/* ── Main page: year buttons ── */
.gallery-years {
  max-width: var(--content-width);
  margin: 2rem auto;
  padding: 2rem;
}

.gallery-years-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 600px;
  margin: 0 auto;
}

.gallery-year-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  border: 1px solid rgba(232, 201, 106, 0.25);
  border-radius: 12px;
  background: rgba(232, 201, 106, 0.03);
  color: var(--soft-gold);
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
}

.gallery-year-btn:hover {
  background: rgba(232, 201, 106, 0.1);
  border-color: var(--soft-gold);
  box-shadow: 0 0 16px rgba(232, 201, 106, 0.15);
  transform: translateY(-2px);
}

.gallery-year-pending {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
}

@media (max-width: 600px) {
  .gallery-years-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .gallery-year-btn {
    padding: 1rem;
    font-size: 1.1rem;
  }
}

/* ── Year page: banner ── */
.gallery-banner-section {
  position: relative;
  width: 100%;
  max-width: var(--content-width);
  margin: 1rem auto;
  padding: 0 2rem;
  box-sizing: border-box;
}

.gallery-banner-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  border: 1px solid rgba(232, 201, 106, 0.15);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 18, 40, 0.45);
  position: relative;
}

.gallery-banner-placeholder {
  text-align: center;
  color: var(--soft-gold, #e8c96a);
  opacity: 0.5;
}

.gallery-banner-star {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.gallery-banner-overlay {
  position: absolute;
  bottom: 0.5rem;
  left: 2.5rem;
  z-index: 1;
}

.gallery-year-title {
  font-size: 3rem;
  color: var(--soft-gold, #e8c96a);
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  margin: 0;
}

@media (max-width: 600px) {
  .gallery-year-title { font-size: 2rem; }
  .gallery-banner-section { padding: 0 1rem; }
}
/* ── Year intro ── */
.gallery-intro-section {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 2rem 2rem;
}

.gallery-intro-content {
  padding: 1.5rem 2rem;
  border: 1px solid rgba(232, 201, 106, 0.12);
  border-radius: 12px;
  background: rgba(10, 18, 40, 0.45);
  backdrop-filter: blur(3px);
  line-height: 1.8;
  color: var(--soft-gold, #e8c96a);
}

.gallery-intro-placeholder {
  text-align: center;
  opacity: 0.4;
  color: var(--soft-gold, #e8c96a);
}

@media (max-width: 600px) {
  .gallery-intro-section { padding: 0 1rem 1.5rem; }
  .gallery-intro-content { padding: 1rem; }
}
/* ── Timeline folds ── */
.gallery-timeline-section {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 2rem 2rem;
}

.gallery-fold {
  border: 1px solid rgba(232, 201, 106, 0.15);
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
  background: rgba(10, 18, 40, 0.5);
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
}

.gallery-fold.open {
  border-color: rgba(232, 201, 106, 0.3);
}

.gallery-fold-hd {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1.2rem;
  cursor: pointer;
  transition: background 0.2s;
  user-select: none;
}

.gallery-fold-hd:hover {
  background: rgba(232, 201, 106, 0.04);
}

.gallery-fold-arrow {
  font-size: 0.75rem;
  color: var(--soft-gold, #e8c96a);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.gallery-fold.open .gallery-fold-arrow {
  transform: rotate(90deg);
}

.gallery-fold-labels {
  flex: 1;
  min-width: 0;
}

.gallery-fold-labels h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--soft-gold, #e8c96a);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.gallery-fold-labels p {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  opacity: 0.7;
  color: var(--soft-gold, #e8c96a);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.gallery-fold-bd {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  padding: 0 1.2rem;
}

.gallery-fold.open .gallery-fold-bd {
  max-height: 999999px;
  padding: 0 1.2rem 1.2rem;
}

@media (max-width: 600px) {
  .gallery-timeline-section { padding: 0 1rem 1.5rem; }
  .gallery-fold-hd { padding: 0.8rem 1rem; }
  .gallery-fold-bd { padding: 0 1rem; }
  .gallery-fold.open .gallery-fold-bd { padding: 0 1rem 1rem; }
}
/* ── Lightbox ── */
.gallery-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.gallery-lightbox[hidden] {
  display: none;
}

.gallery-lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  z-index: 10001;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.gallery-lightbox-close:hover {
  opacity: 1;
}

.gallery-lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}

/* ── Admin: editor panel ── */
.gallery-admin-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0,10,30,0.9);
  padding: 0.5rem 2rem;
  text-align: center;
  border-bottom: 1px solid rgba(232,201,106,0.2);
}

.gallery-edit-btn {
  background: rgba(232,201,106,0.1);
  border: 1px solid var(--soft-gold);
  color: var(--soft-gold);
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.gallery-edit-btn:hover {
  background: rgba(232,201,106,0.2);
}

.gallery-editor-panel {
  max-width: var(--content-width);
  margin: 1rem auto;
  padding: 0 2rem;
}

.gallery-editor-panel[hidden] {
  display: none;
}

.gallery-editor-inner {
  border: 1px solid rgba(232,201,106,0.25);
  border-radius: 12px;
  padding: 1.5rem;
  background: rgba(0,10,30,0.85);
}

.gallery-editor-title {
  margin: 0 0 1.5rem;
  color: var(--soft-gold);
  font-size: 1.2rem;
  text-align: center;
}

.gallery-edit-section {
  margin-bottom: 1.5rem;
}

.gallery-edit-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  color: var(--soft-gold);
  opacity: 0.8;
}

.gallery-input-wide {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid rgba(232,201,106,0.2);
  border-radius: 6px;
  background: rgba(0,0,0,0.3);
  color: #e0e8f0;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.gallery-input-wide:focus {
  outline: none;
  border-color: var(--soft-gold);
}

textarea.gallery-input-wide {
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
}

/* Fold editor blocks */
.gallery-fold-edit-block {
  border: 1px solid rgba(232,201,106,0.12);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  background: rgba(232,201,106,0.02);
}

.gallery-fold-edit-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.gallery-fold-edit-title {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid rgba(232,201,106,0.2);
  border-radius: 4px;
  background: rgba(0,0,0,0.3);
  color: #e0e8f0;
  font-size: 0.95rem;
}

.gallery-fold-edit-desc {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid rgba(232,201,106,0.2);
  border-radius: 4px;
  background: rgba(0,0,0,0.3);
  color: #e0e8f0;
  font-size: 0.85rem;
  margin-bottom: 0.8rem;
  box-sizing: border-box;
  font-family: inherit;
  resize: vertical;
}

.gallery-fold-edit-items {
  margin-top: 0.5rem;
}

.gallery-fold-edit-item {
  border: 1px solid rgba(232,201,106,0.08);
  border-radius: 6px;
  padding: 0.8rem;
  margin-bottom: 0.5rem;
  background: rgba(232,201,106,0.01);
}

.gallery-fold-edit-item-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.4rem;
}

.gallery-fold-edit-img {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid rgba(232,201,106,0.2);
  border-radius: 4px;
  background: rgba(0,0,0,0.3);
  color: #e0e8f0;
  font-size: 0.85rem;
}

.gallery-fold-edit-text {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid rgba(232,201,106,0.2);
  border-radius: 4px;
  background: rgba(0,0,0,0.3);
  color: #e0e8f0;
  font-size: 0.85rem;
  box-sizing: border-box;
  font-family: inherit;
  resize: vertical;
}

.gallery-fold-edit-remove-item,
.gallery-fold-edit-remove-fold {
  background: rgba(200,50,50,0.1);
  border: 1px solid rgba(200,50,50,0.3);
  color: #e07070;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  white-space: nowrap;
  transition: all 0.2s;
}

.gallery-fold-edit-remove-item:hover,
.gallery-fold-edit-remove-fold:hover {
  background: rgba(200,50,50,0.2);
}

.gallery-fold-edit-add-item,
.gallery-add-fold-btn {
  background: rgba(232,201,106,0.05);
  border: 1px dashed rgba(232,201,106,0.3);
  color: var(--soft-gold);
  padding: 0.4rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  transition: all 0.2s;
}

.gallery-fold-edit-add-item:hover,
.gallery-add-fold-btn:hover {
  background: rgba(232,201,106,0.1);
}

.gallery-fold-edit-empty {
  text-align: center;
  padding: 0.5rem;
  opacity: 0.3;
  font-size: 0.85rem;
  color: var(--soft-gold);
}

.gallery-editor-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.gallery-editor-save {
  background: rgba(232,201,106,0.15);
  border: 1px solid var(--soft-gold);
  color: var(--soft-gold);
  padding: 0.6rem 2rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s;
}

.gallery-editor-save:hover {
  background: rgba(232,201,106,0.25);
}

.gallery-editor-cancel {
  background: rgba(200,200,200,0.05);
  border: 1px solid rgba(200,200,200,0.2);
  color: #aaa;
  padding: 0.6rem 2rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s;
}

.gallery-editor-cancel:hover {
  background: rgba(200,200,200,0.1);
}

.gallery-editor-msg {
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--soft-gold);
  opacity: 0.7;
}
/* ── Gallery year page spacing ── */
.gallery-year-wrapper {
  padding-top: 3rem;
}

@media (max-width: 600px) {
  .gallery-year-wrapper {
    padding-top: 1.5rem;
  }
}

/* ── Gallery admin edit controls ── */

.gallery-edit-overlay-btn {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0,0,0,0.65);
  color: var(--soft-gold, #e8c96a);
  padding: 0.3rem 0.7rem;
  border-radius: 5px;
  font-size: 0.78rem;
  cursor: pointer;
  z-index: 2;
  border: 1px solid rgba(232,201,106,0.3);
  transition: all 0.2s;
  font-family: inherit;
}
.gallery-edit-overlay-btn:hover {
  background: rgba(0,0,0,0.8);
  border-color: var(--soft-gold, #e8c96a);
}

.gallery-inline-edit {
  cursor: pointer;
  opacity: 0.45;
  margin-left: 0.5rem;
  font-size: 0.8rem;
  color: var(--soft-gold, #e8c96a);
  transition: opacity 0.2s;
}
.gallery-inline-edit:hover { opacity: 0.85; }

.gallery-title-edit,
.gallery-desc-edit {
  cursor: pointer;
  opacity: 0.35;
  font-size: 0.7rem;
  color: var(--soft-gold, #e8c96a);
  transition: opacity 0.2s;
  margin-left: 0.2rem;
}
.gallery-title-edit:hover,
.gallery-desc-edit:hover { opacity: 0.85; }

.gallery-ctrl-row {
  display: flex;
  gap: 0.3rem;
  margin-top: 0.4rem;
  flex-wrap: wrap;
}

.gallery-btn {
  background: rgba(232,201,106,0.1);
  border: 1px solid rgba(232,201,106,0.25);
  color: var(--soft-gold, #e8c96a);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  line-height: 1.4;
}
.gallery-btn:hover {
  background: rgba(232,201,106,0.2);
  border-color: var(--soft-gold, #e8c96a);
}

.gallery-btn-del {
  background: rgba(180,40,40,0.18);
  border-color: rgba(200,60,60,0.3);
  color: #e08080;
}
.gallery-btn-del:hover {
  background: rgba(180,40,40,0.3);
}

.gallery-add-btn {
  display: block;
  width: 100%;
  margin-top: 0.8rem;
  padding: 0.4rem;
  background: rgba(232,201,106,0.04);
  border: 1px dashed rgba(232,201,106,0.2);
  border-radius: 6px;
  color: var(--soft-gold, #e8c96a);
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.gallery-add-btn:hover {
  background: rgba(232,201,106,0.08);
  border-color: rgba(232,201,106,0.35);
}

.gallery-del-fold-btn {
  background: rgba(180,40,40,0.12);
  border: 1px solid rgba(180,40,40,0.2);
  color: #d07070;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.68rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
  transition: all 0.2s;
}
.gallery-del-fold-btn:hover {
  background: rgba(180,40,40,0.22);
}

.gallery-add-fold-btn {
  padding: 0.5rem 1.2rem;
  background: rgba(232,201,106,0.06);
  border: 1px dashed rgba(232,201,106,0.3);
  border-radius: 8px;
  color: var(--soft-gold, #e8c96a);
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.gallery-add-fold-btn:hover {
  background: rgba(232,201,106,0.1);
}

/* ── Inline textarea editor ── */
.gallery-txt-editor {
  flex: 1;
  min-width: 0;
}
.gallery-ta {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid rgba(232,201,106,0.25);
  border-radius: 5px;
  background: rgba(0,0,0,0.4);
  color: var(--soft-gold, #e8c96a);
  font-size: 0.88rem;
  line-height: 1.6;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}
.gallery-ta:focus {
  outline: none;
  border-color: var(--soft-gold, #e8c96a);
}
.gallery-ta-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.35rem;
}
.gallery-btn-save {
  background: rgba(232,201,106,0.2);
  border-color: var(--soft-gold, #e8c96a);
}
.gallery-btn-cancel {
  background: rgba(200,200,200,0.06);
  border-color: rgba(200,200,200,0.15);
  color: #999;
}
/* ── Gallery item: left image + right text ── */
.gallery-item {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(232, 201, 106, 0.1);
  background: rgba(10, 18, 40, 0.45);
  backdrop-filter: blur(3px);
}

.gallery-item-media {
  flex: 0 0 auto;
  width: auto;
  max-width: 50%;
  min-width: 0;
  position: relative;
}

.gallery-img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.2s;
  display: block;
}
.gallery-img:hover { opacity: 0.85; }

.gallery-img-empty {
  width: 240px;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(232, 201, 106, 0.2);
  border-radius: 10px;
  color: var(--soft-gold, #e8c96a);
  opacity: 0.25;
  font-size: 1.3rem;
}

.gallery-fold-txt {
  flex: 1;
  min-width: 0;
  line-height: 1.7;
  color: var(--soft-gold, #e8c96a);
  font-size: 0.88rem;
  opacity: 0.92;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.gallery-ctrl-row {
  display: flex;
  gap: 0.3rem;
  margin-top: 0.4rem;
  flex-wrap: wrap;
}

.gallery-fold-empty {
  text-align: center;
  padding: 0.8rem;
  opacity: 0.25;
  color: var(--soft-gold, #e8c96a);
}

@media (max-width: 700px) {
  .gallery-item {
    flex-direction: column;
    align-items: stretch;
  }
  .gallery-item-media {
    max-width: 100%;
  }
  .gallery-img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
  }
}
/* ── Inline textarea editor for fold items ── */
.gallery-text-editor-wrap {
  flex: 1;
  min-width: 0;
}

.gallery-text-editor-ta {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid rgba(232,201,106,0.25);
  border-radius: 6px;
  background: rgba(0,0,0,0.35);
  color: #e0e8f0;
  font-size: 0.9rem;
  line-height: 1.6;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}

.gallery-text-editor-ta:focus {
  outline: none;
  border-color: var(--soft-gold);
}
/* ── Inline textarea editor (通用) ── */
.gallery-inline-editor {
  flex: 1;
  min-width: 0;
  margin-top: 0.5rem;
}
.gallery-inline-ta {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid rgba(232,201,106,0.25);
  border-radius: 5px;
  background: rgba(0,0,0,0.4);
  color: var(--soft-gold, #e8c96a);
  font-size: 0.9rem;
  line-height: 1.6;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}
.gallery-inline-ta:focus {
  outline: none;
  border-color: var(--soft-gold, #e8c96a);
}
.gallery-inline-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.gallery-inline-icon {
  cursor: pointer;
  opacity: 0.35;
  margin-left: 0.3rem;
  font-size: 0.72rem;
  color: var(--soft-gold, #e8c96a);
  transition: opacity 0.2s;
}
.gallery-inline-icon:hover { opacity: 0.85; }

/* ── Management hall protagonist cover upload ── */
.protagonist-media {
  position: relative;
}

.protagonist-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.protagonist-cover-overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.4);
  cursor: pointer;
  z-index: 3;
  transition: opacity 0.3s;
  opacity: 0;
  pointer-events: none;
}

body.admin-mode .protagonist-media:hover .protagonist-cover-overlay {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.protagonist-cover-overlay span {
  color: var(--soft-gold, #e8c96a);
  font-size: 1.4rem;
  text-shadow: 0 0 12px rgba(0,0,0,0.6);
  pointer-events: none;
}

.protagonist-cover-upload {
  display: none;
}
/* ── Force gallery item layout (override ANY other rule) ── */
.gallery-year-page .gallery-item {
  display: flex !important;
  flex-direction: row !important;
}

.gallery-year-page .gallery-fold-txt {
  color: var(--soft-gold, #e8c96a) !important;
  opacity: 0.92 !important;
  white-space: pre-wrap !important;
}


/* ── Back button: align with content blocks ── */
.protagonists-back {
  text-align: left;
  margin-top: 1.5rem;
  padding-left: 1rem;
}

/* ============================================
   MAIN PAGE - COVER UPLOAD (admin mode)
   ============================================ */

.work-block-cover-overlay {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(0,0,0,0.55);
  cursor: pointer;
  z-index: 5;
  transition: opacity 0.3s;
  opacity: 0;
}

body.admin-mode .work-block:hover .work-block-cover-overlay {
  display: flex;
  opacity: 1;
}

/* URL 输入行（位于 overlay 上方） */
.cover-overlay-url {
  width: 85%;
  pointer-events: none;
}

.cover-overlay-url input {
  width: 100%;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--soft-gold, #e8c96a);
  border-radius: 6px;
  background: rgba(0,0,0,0.6);
  color: #e8c96a;
  font-size: 0.7rem;
  text-align: center;
  outline: none;
  box-sizing: border-box;
  pointer-events: auto;
}

.cover-overlay-url input::placeholder {
  color: rgba(232, 201, 106, 0.4);
}

/* URL 确认按钮 */
.cover-url-btn {
  flex-shrink: 0;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--soft-gold, #e8c96a);
  border-radius: 4px;
  background: rgba(232,201,106,0.15);
  color: var(--soft-gold, #e8c96a);
  font-size: 0.75rem;
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.2s;
  line-height: 1;
}

.cover-url-btn:hover {
  background: rgba(232,201,106,0.3);
}

/* 本地文件上传按钮行 */
.cover-overlay-upload {
  cursor: pointer;
  padding: 0.3rem 0;
}

.cover-overlay-upload span {
  color: var(--soft-gold, #e8c96a);
  font-size: 1rem;
  text-shadow: 0 0 12px rgba(0,0,0,0.5);
  pointer-events: none;
}

.work-block-cover-upload {
  display: none;
}

/* ── Protagonist cover overlays (same structure) ── */
.protagonist-cover-overlay {
  flex-direction: column;
  gap: 0.5rem;
}

.protagonist-cover-overlay .cover-overlay-url {
  width: 85%;
}

.protagonist-cover-overlay .cover-overlay-upload span {
  font-size: 1rem;
}

/* ── Avatar upload overlay (admin mode) ── */
.about-avatar {
  position: relative;
  cursor: default;
  overflow: hidden;
}

body.admin-mode .about-avatar {
  cursor: pointer;
}

.about-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.about-avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  z-index: 2;
  transition: opacity 0.3s;
  opacity: 0;
}

body.admin-mode .about-avatar:hover .about-avatar-overlay {
  display: flex;
  opacity: 1;
}

.about-avatar-overlay .cover-overlay-upload span {
  color: var(--soft-gold, #e8c96a);
  font-size: 0.9rem;
  pointer-events: none;
}

.about-avatar-upload {
  display: none;
}

/* ── Avatar URL 输入（位于头像下方，仅 admin 显示）── */
.avatar-url-admin {
  display: none;
  margin-top: 0.8rem;
  justify-content: center;
  gap: 0.4rem;
}

body.admin-mode .avatar-url-admin {
  display: flex;
}

.avatar-url-admin input {
  width: 220px;
  max-width: 70%;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--soft-gold, #e8c96a);
  border-radius: 6px;
  background: rgba(0,0,0,0.4);
  color: #e8c96a;
  font-size: 0.75rem;
  text-align: center;
  outline: none;
}

.avatar-url-admin input::placeholder {
  color: rgba(232, 201, 106, 0.35);
}

.avatar-url-admin button {
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--soft-gold, #e8c96a);
  border-radius: 4px;
  background: rgba(232,201,106,0.15);
  color: var(--soft-gold, #e8c96a);
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.2s;
  line-height: 1;
}

.avatar-url-admin button:hover {
  background: rgba(232,201,106,0.3);
}

/* ============================================
   MAIN PAGE - DYNAMICS EDITOR (admin mode)
   ============================================ */

.dynamics-editor-panel {
  display: none;
  max-width: 700px;
  margin: 2rem auto;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.8rem;
}

body.admin-mode .dynamics-editor-panel.dyn-editor-open {
  display: block;
}

.dynamics-editor-panel h3 {
  text-align: center;
  color: var(--soft-gold, #e8c96a);
  font-family: 'Noto Serif SC', serif;
  font-size: 1.15rem;
  margin-bottom: 1.2rem;
  letter-spacing: 0.1em;
}

.dyn-form-group {
  margin-bottom: 1rem;
}

.dyn-form-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
  letter-spacing: 0.08em;
}

.dyn-form-input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  background: rgba(232,201,106,0.04);
  border: 1px solid rgba(232,201,106,0.12);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s;
}

.dyn-form-input:focus {
  border-color: rgba(232,201,106,0.35);
}

.dyn-form-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: flex-end;
  margin-top: 1.2rem;
}

.dyn-form-btn {
  padding: 0.5rem 1.5rem;
  background: transparent;
  border: 1.5px solid var(--soft-gold, #e8c96a);
  color: var(--soft-gold, #e8c96a);
  font-family: 'Noto Serif SC', serif;
  font-size: 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.dyn-form-btn:hover {
  background: rgba(232,201,106,0.1);
  box-shadow: 0 0 12px rgba(232,201,106,0.2);
}

.dyn-form-btn-primary {
  background: rgba(232,201,106,0.12);
  border-color: rgba(232,201,106,0.3);
}

.dyn-form-btn-primary:hover {
  background: rgba(232,201,106,0.2);
}

.dyn-publish-btn {
  display: none;
  margin: 1.5rem auto 0;
  background: transparent;
  border: 1.5px solid var(--soft-gold, #e8c96a);
  color: var(--soft-gold, #e8c96a);
  font-family: 'Noto Serif SC', serif;
  font-size: 0.9rem;
  padding: 0.6rem 2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  text-shadow: 0 0 6px rgba(232,201,106,0.2);
}

body.admin-mode .dyn-publish-btn {
  display: inline-block;
}

.dyn-publish-btn:hover {
  background: rgba(232,201,106,0.1);
  box-shadow: 0 0 12px rgba(232,201,106,0.25);
}

/* ── Dynamics thumbnail images (4:1 aspect ratio) ── */
.dynamic-thumb-wrap {
  width: 100%;
  aspect-ratio: 4 / 1;
  overflow: hidden;
  border-radius: 8px;
  margin-top: 0.6rem;
  background: rgba(232,201,106,0.04);
  border: 1px solid rgba(232,201,106,0.08);
}

.dynamic-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dynamic-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 1.05rem;
  color: var(--soft-gold, #e8c96a);
  margin-bottom: 0.5rem;
  text-align: left;
  letter-spacing: 0.08em;
}

.dynamic-link {
  color: #7aa8d0;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(122,168,208,0.3);
  transition: color 0.2s, text-decoration-color 0.2s;
}

.dynamic-link:hover {
  color: #9ac8f0;
  text-decoration-color: rgba(154,200,240,0.5);
}

.dynamic-edit-btn {
  margin-top: 0.6rem;
  padding: 0.25rem 0.8rem;
  display: none;
  border: 1px solid rgba(232,201,106,0.3);
  border-radius: 6px;
  color: var(--soft-gold, #e8c96a);
  font-size: 0.7rem;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.2s;
  user-select: none;
}

body.admin-mode .dynamic-edit-btn {
  display: inline-block;
}

.dynamic-edit-btn:hover {
  opacity: 1;
}

/* 编辑/删除按钮容器 */
.dynamic-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.dynamic-del-btn {
  padding: 0.25rem 0.6rem;
  display: none;
  border: 1px solid rgba(200,80,80,0.3);
  border-radius: 6px;
  color: #d68a8a;
  font-size: 0.7rem;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.2s;
  user-select: none;
}

body.admin-mode .dynamic-del-btn {
  display: inline-block;
}

.dynamic-del-btn:hover {
  opacity: 1;
}

/* ── Editor link button special ── */
.dyn-link-btn {
  position: relative;
}

/* ── Link dialog ── */
.dyn-link-dialog {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  background: rgba(10,22,40,0.96);
  border: 1px solid rgba(232,201,106,0.2);
  border-radius: 10px;
  padding: 1rem;
  min-width: 280px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.dyn-link-dialog.open {
  display: block;
}

.dyn-link-dialog label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.dyn-link-dialog input,
.dyn-link-dialog select {
  width: 100%;
  padding: 0.45rem 0.6rem;
  margin-bottom: 0.5rem;
  background: rgba(232,201,106,0.04);
  border: 1px solid rgba(232,201,106,0.12);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.82rem;
  box-sizing: border-box;
  outline: none;
}

.dyn-link-dialog input:focus,
.dyn-link-dialog select:focus {
  border-color: rgba(232,201,106,0.35);
}

.dyn-link-dialog .dyn-link-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.3rem;
}

/* ── Dynamics image upload thumbnail preview ── */
.dyn-thumbnail-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.dyn-thumbnail-item {
  position: relative;
  width: 120px;
  aspect-ratio: 4 / 1;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(232,201,106,0.15);
}

.dyn-thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dyn-thumbnail-remove {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(200,60,60,0.85);
  color: #fff;
  border: none;
  font-size: 0.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.dyn-editor-wrapper .rest-editor-preview-content .dynamic-link {
  color: #7aa8d0;
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════
   iOS Safari 性能优化 (2026-08-12)
   1) 移动端毛玻璃模糊进一步降低
   2) 页面切到后台时暂停所有动画(降低后台CPU/GPU占用)
   3) 系统开启"减弱动态效果"时停用无限动画
   ═══════════════════════════════════════════════════════════ */

/* 移动端毛玻璃降级: 12px → 8px */
@media (max-width: 640px) {
  :root {
    --glass-blur: 8px;
  }
}

/* 页面在后台(标签页被切走/屏幕锁定)时暂停所有动画 */
body.bg-paused *,
body.bg-paused *::before,
body.bg-paused *::after {
  animation-play-state: paused !important;
  transition: none !important;
}

/* 系统开启"减弱动态效果"时: 停用无限动画, 一次性动画瞬间完成 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}