﻿/* 《恋爱终曲》交互小说网站样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f5f2ed;
  --text: #2c2825;
  --text-dim: #8a7e72;
  --border: #e0dbd3;
  --card-bg: #fff;
  --card-hover: #fdf8f6;
  --title: #1a1a1a;
  --accent: #c0392b;
  --font-size: 18px;
}

body {
  font-family: 'Georgia', 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 24px 60px;
}
.topnav {
  display: flex;
  gap: 20px;
  padding: 12px 0 20px;
  border-bottom: 1px solid #e0dbd3;
  font-size: 14px;
}
.topnav a {
  color: #8a7e72;
  text-decoration: none;
  transition: color .2s;
}
.topnav a:hover { color: #c0392b; }
.char-banner {
  margin: 20px -24px;
  overflow: hidden;
}
.char-banner img {
  width: 100%;
  display: block;
  max-height: 320px;
  object-fit: cover;
}
.meta-bar {
  font-size: 12.5px;
  color: #9a8f82;
  line-height: 1.8;
  padding: 10px 0;
  border-bottom: 1px dashed #ddd6cc;
  margin-bottom: 20px;
}
.chapter-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin: 16px 0 28px;
  color: #1a1a1a;
  letter-spacing: 1px;
}
.content p {
  font-size: var(--font-size);
  margin-bottom: 18px;
  text-indent: 2em;
}
.content .quote {
  color: #5a4a3a;
}
.choices {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #e0dbd3;
}
.choices-label {
  text-align: center;
  color: #b0a598;
  font-size: 13px;
  margin-bottom: 16px;
  letter-spacing: 3px;
}
.option-btn {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.6;
  transition: all .25s;
}
.option-btn:hover {
  border-color: var(--accent);
  background: var(--card-hover);
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(192,57,43,.08);
}
.option-btn.disabled {
  opacity: .5;
  cursor: not-allowed;
}
.opt-letter {
  display: inline-block;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  background: #c0392b;
  color: #fff;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  margin-right: 6px;
}
.opt-arrow {
  float: right;
  color: #c0392b;
  font-weight: 700;
}
.opt-note {
  font-size: 13px;
  color: #9a8f82;
  padding: 8px 0;
  font-style: italic;
}
.footer {
  margin-top: 40px;
  text-align: center;
  font-size: 13px;
  color: #b0a598;
}
.footer a { color: #8a7e72; text-decoration: none; }
.footer a:hover { color: #c0392b; }

/* 首页 */
.hero {
  text-align: center;
  padding: 60px 0 40px;
}
.hero img.cover {
  max-width: 280px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,.12);
  margin-bottom: 30px;
}
.hero h1 {
  font-size: 42px;
  letter-spacing: 8px;
  color: #1a1a1a;
  margin-bottom: 12px;
}
.hero .subtitle {
  font-size: 15px;
  color: #8a7e72;
  letter-spacing: 2px;
  margin-bottom: 36px;
}
.hero .desc {
  font-size: 15px;
  color: #5a4a3a;
  max-width: 480px;
  margin: 0 auto 40px;
  line-height: 2;
}
.start-btn {
  display: inline-block;
  padding: 16px 60px;
  background: #c0392b;
  color: #fff;
  text-decoration: none;
  border-radius: 50px;
  font-size: 18px;
  letter-spacing: 4px;
  transition: all .3s;
}
.start-btn:hover {
  background: #a93226;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(192,57,43,.3);
}
.home-links {
  margin-top: 50px;
  display: flex;
  justify-content: center;
  gap: 30px;
  font-size: 14px;
}
.home-links a { color: #8a7e72; text-decoration: none; }
.home-links a:hover { color: #c0392b; }

/* 角色图鉴 */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.char-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e8e2d9;
  transition: transform .2s;
}
.char-card:hover { transform: translateY(-3px); }
.char-card img { width: 100%; display: block; }
.char-card .info { padding: 14px; }
.char-card .name { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.char-card .role { font-size: 13px; color: #8a7e72; }
.char-card .trait { font-size: 12.5px; color: #6b5d4f; margin-top: 6px; line-height: 1.6; }
.char-card.text-only { display: flex; align-items: center; justify-content: center; min-height: 200px; text-align: center; }
.char-card.text-only .info { text-align: center; }

/* 网站地图 */
.toc-section { margin-bottom: 32px; }
.toc-section h2 {
  font-size: 17px;
  color: #c0392b;
  border-bottom: 2px solid #e8e2d9;
  padding-bottom: 8px;
  margin-bottom: 14px;
}
.toc-list { list-style: none; }
.toc-list li {
  padding: 7px 0;
  border-bottom: 1px dotted #e0dbd3;
  font-size: 14.5px;
}
.toc-list a {
  color: #2c2825;
  text-decoration: none;
  transition: color .2s;
}
.toc-list a:hover { color: #c0392b; }
.toc-list .tag {
  display: inline-block;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 10px;
  margin-right: 8px;
  background: #f0ebe3;
  color: #8a7e72;
}
.toc-list .tag.ending { background: #fde8e8; color: #c0392b; }
.toc-list .tag.hidden { background: #f0e6f6; color: #7d3c98; }

@media (max-width: 480px) {
  .page { padding: 12px 16px 40px; }
  .content p { font-size: var(--font-size); }
  .hero h1 { font-size: 32px; letter-spacing: 4px; }
  .char-banner { margin: 16px -16px; }
}

.beian { text-align: center; padding: 20px 16px 10px; font-size: 12px; color: #999; }
.beian a { color: #999; text-decoration: none; }
.beian a:hover { color: #666; }

/* ===== 阅读设置面板 ===== */
.settings-fab {
  position: fixed;
  right: 18px;
  bottom: 80px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.settings-panel {
  position: fixed;
  right: 18px;
  bottom: 140px;
  width: 240px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 4px 24px rgba(0,0,0,.12);
  z-index: 998;
  display: none;
}
.settings-panel.open { display: block; }
.settings-panel h4 {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 8px;
  letter-spacing: 1px;
}
.settings-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.opt-chip {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  background: transparent;
  color: var(--text);
  transition: all .2s;
}
.opt-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
}
.swatch.active { border-color: var(--accent); }
