/* ============================================
   姊妹的侍奉 — Elegant Maid Theme
   Soft lavender, rose gold, lace-like borders,
   warm candlelight tones, light cream background
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  --bg: #fefaf6;
  --bg-cream: #fdf7f0;
  --bg-card: #ffffff;
  --bg-header: rgba(255, 255, 255, 0.96);
  --bg-hero: linear-gradient(135deg, #fdf2e0 0%, #fefaf6 30%, #f0e8f6 70%, #fdf2e0 100%);
  --bg-section-alt: #fdf7f0;

  --accent: #b8a0c8;
  --accent-hover: #9b7eb8;
  --accent-light: #f0e8f6;
  --accent-glow: rgba(184, 160, 200, 0.15);

  --rose: #b8877b;
  --rose-hover: #a07066;
  --rose-light: #e8d0c8;
  --rose-glow: rgba(184, 135, 123, 0.12);

  --candle: #f5d6a8;
  --candle-light: #fdf2e0;
  --candle-glow: rgba(245, 214, 168, 0.2);

  --text: #4a3f4a;
  --text-secondary: #6a5f6a;
  --text-muted: #8a7f8a;
  --text-light: #b0a5b0;

  --border: #e8dde8;
  --border-lace: #d8c8d8;
  --border-accent: #d0bcd8;

  --shadow-sm: 0 1px 4px rgba(138, 120, 140, 0.08);
  --shadow: 0 2px 12px rgba(138, 120, 140, 0.10);
  --shadow-md: 0 4px 20px rgba(138, 120, 140, 0.12);
  --shadow-hover: 0 6px 28px rgba(138, 120, 140, 0.16);

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --font-heading: 'Georgia', 'Noto Serif SC', 'STSong', serif;
  --font-body: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;

  --max-width: 1100px;
  --header-height: 68px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* --- Lace body decoration --- */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse at 15% 10%, var(--candle-glow) 0%, transparent 60%),
    radial-gradient(ellipse at 85% 90%, var(--accent-glow) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 20%, var(--rose-glow) 0%, transparent 50%);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text);
  line-height: 1.3;
}

h1 { font-size: 2.4rem; letter-spacing: 0.02em; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.3rem; }

/* --- Skip to content --- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  z-index: 1000;
}
.skip-link:focus { top: 8px; }

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.03em;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 2px solid var(--border-lace);
}

.logo:hover { color: var(--accent); }

/* Nav */
.main-nav { display: flex; align-items: center; gap: 6px; }

.main-nav a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--accent);
  background: var(--accent-light);
}

.nav-cta {
  background: linear-gradient(135deg, var(--rose), var(--accent)) !important;
  color: #fff !important;
  font-weight: 600 !important;
  padding: 8px 20px !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: 0 2px 8px rgba(184, 135, 123, 0.25);
  transition: all 0.25s !important;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(184, 135, 123, 0.35) !important;
  background: linear-gradient(135deg, var(--rose-hover), var(--accent-hover)) !important;
}

/* Hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
  transition: all 0.3s;
}

.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* --- Main --- */
main { position: relative; z-index: 1; }

/* --- Hero --- */
.page-hero {
  background: var(--bg-hero);
  padding: 80px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Lace border decoration on hero */
.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 14px,
    var(--border-lace) 14px,
    var(--border-lace) 16px
  );
  opacity: 0.5;
}

.page-hero .hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.page-hero h1 {
  font-size: 2.8rem;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--rose), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-hero .hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-visual {
  max-width: 600px;
  margin: 24px auto 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 3px solid var(--border-lace);
}

.hero-visual img {
  width: 100%;
  height: auto;
}

/* Hero with image on index */
.hero-index {
  padding: 64px 24px 48px;
}

.hero-index .hero-visual {
  margin-top: 32px;
}

/* --- Content Sections --- */
.content-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 24px;
}

.content-section.alt {
  background: var(--bg-section-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-header h2 {
  position: relative;
  display: inline-block;
  margin-bottom: 12px;
}

/* Decorative lace divider under h2 */
.section-header h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  margin: 14px auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--rose-light), var(--accent), var(--rose-light));
}

.section-header p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* --- Info Cards Grid --- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
  position: relative;
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: linear-gradient(90deg, var(--rose-light), var(--accent), var(--rose-light));
  opacity: 0.6;
}

.info-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.info-card .card-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.info-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.info-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* --- Feature Cards --- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}

.feature-card:hover {
  box-shadow: var(--shadow-hover);
  border-left-color: var(--rose);
}

.feature-card .feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-light);
  font-size: 1.4rem;
  margin-bottom: 14px;
}

.feature-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.feature-card p { color: var(--text-muted); font-size: 0.94rem; }

/* --- Screenshot Gallery --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.gallery-grid a {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 2px solid var(--border);
  transition: all 0.3s;
  box-shadow: var(--shadow-sm);
}

.gallery-grid a:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.gallery-grid img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* --- Guide Steps --- */
.guide-steps { counter-reset: step; }

.guide-step {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
  align-items: flex-start;
}

.guide-step .step-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 2px 8px rgba(184, 135, 123, 0.2);
}

.guide-step .step-content h3 {
  margin-bottom: 6px;
}

.guide-step .step-content p {
  color: var(--text-secondary);
}

/* --- Story Blocks --- */
.story-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--rose);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.story-block .chapter-label {
  display: inline-block;
  background: var(--rose-light);
  color: var(--rose);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.story-block h3 { margin-bottom: 10px; }
.story-block p { color: var(--text-secondary); }

/* --- Character Cards --- */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.char-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s;
}

.char-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.char-card .char-avatar {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  background: linear-gradient(135deg, var(--accent-light), var(--candle-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--accent);
}

.char-card .char-info {
  padding: 20px;
}

.char-card .char-info h3 {
  margin-bottom: 6px;
}

.char-card .char-info .char-role {
  font-size: 0.88rem;
  color: var(--rose);
  font-weight: 600;
  margin-bottom: 10px;
}

.char-card .char-info p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 12px;
}

.char-card .char-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.char-card .char-tags span {
  background: var(--accent-light);
  color: var(--accent);
  padding: 3px 12px;
  border-radius: 14px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* --- FAQ Accordion --- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
  background: var(--bg-card);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background 0.2s;
}

.faq-question:hover {
  background: var(--accent-light);
}

.faq-question .faq-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  font-size: 1.2rem;
  color: var(--accent);
  transition: transform 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  color: var(--rose);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.active .faq-answer {
  max-height: 300px;
}

.faq-answer-inner {
  padding: 0 24px 18px;
  color: var(--text-secondary);
  font-size: 0.94rem;
  line-height: 1.7;
}

/* --- CTA Banner --- */
.cta-banner {
  background: linear-gradient(135deg, var(--rose-light), var(--accent-light));
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  border: 2px solid var(--border-lace);
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 50%, rgba(255,255,255,0.3) 0%, transparent 50%),
    radial-gradient(circle at 70% 50%, var(--candle-glow) 0%, transparent 50%);
}

.cta-banner h2 {
  position: relative;
  margin-bottom: 12px;
}

.cta-banner p {
  position: relative;
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.25s;
  position: relative;
}

.btn-primary {
  background: linear-gradient(135deg, var(--rose), var(--accent));
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(184, 135, 123, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(184, 135, 123, 0.4);
  color: #fff !important;
}

.btn-outline {
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
}

.btn-outline:hover {
  background: var(--accent);
  color: #fff;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px 0;
  display: flex;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.breadcrumbs a { color: var(--accent); }
.breadcrumbs span { color: var(--text-muted); }

/* --- Tags --- */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
}

.tag {
  background: var(--accent-light);
  color: var(--accent);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 500;
}

.tag-rose {
  background: var(--rose-light);
  color: var(--rose);
}

.tag-candle {
  background: var(--candle-light);
  color: #b8956e;
}

/* --- Tip Box --- */
.tip-box {
  background: var(--candle-light);
  border: 1px solid var(--candle);
  border-left: 4px solid var(--rose);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 0.94rem;
  color: var(--text-secondary);
}

.tip-box strong {
  color: var(--rose);
}

/* --- Stats Row --- */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  margin: 24px 0;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Blockquote --- */
blockquote {
  border-left: 4px solid var(--rose-light);
  padding: 12px 20px;
  margin: 20px 0;
  background: var(--bg-cream);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-style: italic;
}

blockquote cite {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* --- Lace Divider --- */
.lace-divider {
  text-align: center;
  color: var(--border-lace);
  font-size: 1.5rem;
  letter-spacing: 8px;
  margin: 32px 0;
  user-select: none;
}

/* --- Story timeline --- */
.timeline {
  position: relative;
  padding-left: 28px;
  margin: 24px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-light), var(--rose-light));
}

.timeline-item {
  position: relative;
  margin-bottom: 24px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--accent-light);
}

.timeline-item h3 { margin-bottom: 4px; }
.timeline-item p { color: var(--text-secondary); font-size: 0.94rem; }

/* --- Ending Cards --- */
.ending-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.ending-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
}

.ending-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.ending-card .ending-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
}

.ending-card h3 { margin-bottom: 8px; }
.ending-card p { color: var(--text-muted); font-size: 0.9rem; }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  background: var(--bg-card);
}

.site-footer::before {
  content: '';
  display: block;
  width: 120px;
  height: 2px;
  margin: 0 auto 20px;
  background: linear-gradient(90deg, transparent, var(--border-lace), transparent);
}

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 25, 30, 0.92);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 92vw;
  max-height: 90vh;
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: none;
  transition: background 0.2s;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.2);
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-800 { max-width: 800px; }
.max-w-900 { max-width: 900px; }

/* --- Responsive --- */
@media (max-width: 768px) {
  :root { --header-height: 60px; }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }

  .menu-toggle { display: block; }

  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-card);
    flex-direction: column;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    gap: 2px;
  }

  .main-nav.active { display: flex; }

  .main-nav a {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    width: 100%;
  }

  .page-hero { padding: 48px 16px 40px; }
  .page-hero h1 { font-size: 2rem; }
  .content-section { padding: 40px 16px; }

  .guide-step { flex-direction: column; gap: 12px; }
  .stats-row { gap: 20px; }
  .stat-value { font-size: 1.5rem; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .char-grid { grid-template-columns: 1fr; }
}
