/* ============== 全局变量 ============== */
:root {
  --primary: #1a5a8a;
  --primary-dark: #0e3d62;
  --primary-light: #2a7ab2;
  --accent: #c8a460;
  --danger: #a83232;
  --bg: #f5f7fa;
  --bg-card: #ffffff;
  --text: #2a2a2a;
  --text-light: #6a6a6a;
  --text-muted: #9a9a9a;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius: 6px;
  --header-h: 140px;
  --nav-h: 44px;
  --max-width: 1200px;
}

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

html, body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

button { font-family: inherit; cursor: pointer; border: none; background: none; }

img { max-width: 100%; display: block; }

/* ============== 加载遮罩 ============== */
.loading-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s;
}
.loading-screen.hidden { opacity: 0; visibility: hidden; }
.loading-svg { width: 80px; height: 80px; animation: rotate 2.5s linear infinite; }
.loading-text { margin-top: 24px; font-size: 22px; font-weight: 700; color: var(--primary); letter-spacing: 4px; }
.loading-sub { margin-top: 6px; font-size: 12px; color: var(--text-muted); letter-spacing: 2px; }
@keyframes rotate { from { transform: rotate(0); } to { transform: rotate(360deg); } }

/* ============== 头部 ============== */
.site-header { position: relative; background: #fff; box-shadow: var(--shadow-sm); z-index: 50; }
.header-top { background: var(--primary-dark); color: rgba(255,255,255,0.85); font-size: 12px; padding: 6px 0; }
.header-top .header-container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.header-contact span { margin-right: 18px; }
.header-links a { color: rgba(255,255,255,0.85); }
.header-links a:hover { color: #fff; }
.header-links .sep { color: rgba(255,255,255,0.3); margin: 0 8px; }
.archive-count { background: var(--accent); color: #fff; padding: 0 6px; border-radius: 10px; font-size: 11px; margin-left: 4px; }

.header-main { padding: 18px 0; border-bottom: 1px solid var(--border); }
.header-container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.header-main .header-container { flex-wrap: wrap; }

.logo-link { display: flex; align-items: center; }
.logo { display: flex; align-items: center; gap: 14px; }
.logo-svg { width: 56px; height: 56px; }
.logo-cn { font-size: 24px; font-weight: 700; color: var(--primary-dark); letter-spacing: 3px; }
.logo-en { font-size: 11px; color: var(--text-muted); letter-spacing: 2px; margin-top: 2px; }

.header-search { display: flex; align-items: stretch; border: 2px solid var(--primary); border-radius: var(--radius); overflow: hidden; }
.header-search input { width: 280px; padding: 9px 14px; border: none; outline: none; font-size: 14px; }
.header-search .search-btn { background: var(--primary); color: #fff; padding: 0 18px; font-size: 14px; }

.main-nav { background: var(--primary); }
.nav-list { list-style: none; display: flex; max-width: var(--max-width); margin: 0 auto; padding: 0 10px; }
.nav-list li { flex: 1; text-align: center; min-width: 0; }
.nav-list a {
  display: block;
  color: #fff;
  padding: 14px 10px;
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  letter-spacing: 1px;
  transition: background 0.2s;
}
.nav-list a:hover, .nav-list a.active { background: var(--primary-dark); }

/* ============== 主区 ============== */
.site-main { min-height: calc(100vh - var(--header-h) - 200px); padding: 30px 0 50px; }
.page-container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ============== 面包屑 ============== */
.breadcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 6px; }

/* ============== 通用页面标题 ============== */
.page-title { font-size: 24px; color: var(--primary-dark); border-bottom: 2px solid var(--primary); padding-bottom: 10px; margin-bottom: 24px; display: flex; justify-content: space-between; align-items: center; }
.page-title .title-en { font-size: 12px; color: var(--text-muted); font-weight: normal; letter-spacing: 2px; }

/* ============== 首页 ============== */
.home-banner { position: relative; height: 360px; border-radius: var(--radius); overflow: hidden; margin-bottom: 28px; box-shadow: var(--shadow-md); }
.home-banner img { width: 100%; height: 100%; object-fit: cover; }
.home-banner .banner-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(14,61,98,0.7) 0%, rgba(26,90,138,0.4) 50%, transparent 100%); display: flex; flex-direction: column; justify-content: center; padding: 0 50px; color: #fff; }
.home-banner .banner-title { font-size: 32px; font-weight: 700; letter-spacing: 2px; margin-bottom: 8px; }
.home-banner .banner-sub { font-size: 16px; opacity: 0.9; max-width: 480px; }
.home-banner .banner-meta { margin-top: 20px; font-size: 12px; opacity: 0.75; }

.home-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; margin-bottom: 28px; }
.home-card { background: var(--bg-card); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.home-card h3 { font-size: 18px; color: var(--primary-dark); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.home-card h3 .more { font-size: 12px; color: var(--text-muted); font-weight: normal; }

.news-list { list-style: none; }
.news-list li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--border); }
.news-list li:last-child { border-bottom: none; }
.news-list li a { color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 12px; }
.news-list li a:hover { color: var(--primary); }
.news-list .news-date { color: var(--text-muted); font-size: 13px; white-space: nowrap; }
.news-list li.puzzle-news a { color: var(--danger); }
.news-list li.puzzle-news a:hover { text-decoration: underline; }

.quick-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick-link { display: flex; align-items: center; gap: 10px; padding: 14px; background: var(--bg); border-radius: var(--radius); border-left: 3px solid var(--primary); transition: all 0.2s; }
.quick-link:hover { background: #eaf2f8; transform: translateX(2px); }
.quick-link .ql-icon { font-size: 22px; }
.quick-link .ql-text { font-size: 14px; color: var(--primary-dark); font-weight: 600; }

.home-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px; }
.stat-card { background: linear-gradient(135deg, #fff 0%, #f8fafd 100%); padding: 22px; border-radius: var(--radius); text-align: center; border: 1px solid var(--border); }
.stat-num { font-size: 32px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 13px; color: var(--text-light); margin-top: 6px; }

.home-section { background: var(--bg-card); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; box-shadow: var(--shadow-sm); }
.home-section h3 { font-size: 18px; color: var(--primary-dark); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--primary); display: inline-block; }

/* ============== 新闻页 ============== */
.news-page-layout { display: grid; grid-template-columns: 1fr 280px; gap: 24px; }
.news-sidebar { background: var(--bg-card); padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow-sm); height: fit-content; position: sticky; top: 20px; }
.news-sidebar h4 { color: var(--primary-dark); margin-bottom: 12px; font-size: 15px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.news-sidebar ul { list-style: none; }
.news-sidebar li { padding: 8px 0; border-bottom: 1px dashed var(--border); }
.news-sidebar li:last-child { border: none; }
.news-sidebar a { color: var(--text-light); font-size: 13px; }

.news-article { background: var(--bg-card); padding: 30px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.news-article .article-meta { color: var(--text-muted); font-size: 13px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.news-article .article-meta span { margin-right: 16px; }
.news-article h1 { font-size: 24px; color: var(--text); margin-bottom: 14px; line-height: 1.4; }
.news-article .article-body { font-size: 15px; line-height: 1.9; color: var(--text); }
.news-article .article-body p { margin-bottom: 14px; text-indent: 2em; }
.news-article .article-body .notice-stamp { display: inline-block; padding: 4px 10px; background: #fff3f3; color: var(--danger); border: 1px solid #ffd6d6; border-radius: 3px; font-size: 12px; margin-left: 6px; }
[data-puzzle="date-contradiction"] { cursor: pointer; background: rgba(200,164,96,0.15); border-bottom: 2px dotted var(--accent); transition: all 0.2s; padding: 0 2px; }
[data-puzzle="date-contradiction"]:hover { background: rgba(200,164,96,0.3); border-bottom-color: var(--danger); }

/* ============== 关于页 ============== */
.about-hero { position: relative; height: 220px; border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; }
.about-hero img { width: 100%; height: 100%; object-fit: cover; }
.about-hero .hero-text { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,61,98,0.85) 0%, rgba(14,61,98,0.3) 100%); display: flex; flex-direction: column; justify-content: center; padding: 0 40px; color: #fff; }
.about-hero h2 { font-size: 28px; margin-bottom: 6px; }
.about-hero p { opacity: 0.85; }

.about-content { background: var(--bg-card); padding: 30px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.about-content h2 { color: var(--primary-dark); font-size: 20px; margin: 24px 0 14px; padding-left: 12px; border-left: 4px solid var(--primary); }
.about-content h2:first-child { margin-top: 0; }
.about-content p { margin-bottom: 12px; text-indent: 2em; color: var(--text); }

.leadership-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin: 20px 0; }
.leader-card { background: var(--bg); padding: 18px; border-radius: var(--radius); text-align: center; border: 1px solid var(--border); transition: all 0.3s; }
.leader-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.leader-avatar { width: 90px; height: 90px; border-radius: 50%; margin: 0 auto 10px; background: linear-gradient(135deg, #e3edf5, #cfdde8); display: flex; align-items: center; justify-content: center; font-size: 28px; color: var(--primary-dark); overflow: hidden; position: relative; cursor: pointer; }
.leader-avatar img { width: 100%; height: 100%; object-fit: cover; }
.leader-card .leader-name { font-size: 16px; font-weight: 700; color: var(--primary-dark); }
.leader-card .leader-title { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.leader-card.missing .leader-avatar { filter: grayscale(0.4); opacity: 0.85; }

.hidden-coords {
  display: inline-block;
  position: relative;
  padding: 0 2px;
  font-size: 13px;
  line-height: inherit;
  color: #ffffff;           /* 白字藏在白背景里（同色隐藏） */
  background-color: #ffffff; /* 背景也是白，双重保障 */
  user-select: text;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s;
}
.hidden-coords::selection {
  color: var(--danger);     /* 选中后变红色，明显可见 */
  background: rgba(168, 50, 50, 0.12);
}
.hidden-coords::-moz-selection {
  color: var(--danger);
  background: rgba(168, 50, 50, 0.12);
}
.hidden-coords:hover,
.hidden-coords:focus {
  /* 悬停时给一个极淡的提示光晕，既不突兀又给点反馈 */
  color: #e8e8e8;
  background: #fafafa;
  box-shadow: inset 0 0 0 1px rgba(180,180,180,0.25);
}

/* ============== 科室页 ============== */
.dept-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.dept-card { background: var(--bg-card); padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow-sm); border-top: 3px solid var(--primary); transition: all 0.3s; }
.dept-card:hover { box-shadow: var(--shadow-md); }
.dept-card h3 { color: var(--primary-dark); font-size: 17px; margin-bottom: 8px; }
.dept-card .dept-head { font-size: 13px; color: var(--accent); margin-bottom: 8px; }
.dept-card .dept-desc { font-size: 14px; color: var(--text-light); line-height: 1.7; }
.dept-card [data-puzzle="oncology-hidden"] { position: relative; display: inline-block; }
.dept-card [data-puzzle="oncology-hidden"] .hidden-num { position: absolute; top: -8px; right: -22px; color: var(--danger); font-weight: 700; font-size: 18px; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.dept-card [data-puzzle="oncology-hidden"]:hover .hidden-num { opacity: 0.8; }
.dept-card [data-puzzle="oncology-hidden"].active .hidden-num { opacity: 0.9; }

/* ============== 专家页 ============== */
.expert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.expert-card { background: var(--bg-card); padding: 16px; border-radius: var(--radius); box-shadow: var(--shadow-sm); text-align: center; transition: all 0.3s; cursor: pointer; }
.expert-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.expert-avatar { width: 100px; height: 100px; border-radius: 50%; margin: 0 auto 10px; overflow: hidden; background: linear-gradient(135deg, #d9e6f0, #bcd3e3); }
.expert-avatar img { width: 100%; height: 100%; object-fit: cover; }
.expert-card .expert-name { font-size: 16px; font-weight: 700; color: var(--primary-dark); }
.expert-card .expert-title { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.expert-card .expert-dept { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.expert-card.missing { opacity: 0.7; }

/* ============== 预约挂号 ============== */
.appointment-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; }
.appointment-main { background: var(--bg-card); padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.appointment-aside { background: var(--bg-card); padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow-sm); height: fit-content; }
.dept-select { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 20px; }
.dept-btn { padding: 12px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; color: var(--text); transition: all 0.2s; }
.dept-btn:hover, .dept-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.expert-list-table { width: 100%; border-collapse: collapse; margin-top: 14px; }
.expert-list-table th, .expert-list-table td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; font-size: 14px; }
.expert-list-table th { background: var(--bg); color: var(--primary-dark); font-weight: 600; }
.expert-list-table .book-btn { background: var(--accent); color: #fff; padding: 5px 14px; border-radius: 3px; font-size: 13px; }
.expert-list-table .book-btn.full { background: #ccc; cursor: not-allowed; }
.expert-list-table [data-puzzle="booked-tomorrow"] { cursor: pointer; color: var(--danger); }

.appointment-steps { counter-reset: step; list-style: none; padding: 0; }
.appointment-steps li { padding: 10px 0 10px 36px; position: relative; font-size: 13px; color: var(--text-light); }
.appointment-steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 8px; width: 24px; height: 24px; background: var(--primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; }

/* ============== 报告查询 ============== */
.report-query { background: var(--bg-card); padding: 30px; border-radius: var(--radius); box-shadow: var(--shadow-sm); max-width: 600px; margin: 0 auto; }
.report-query h2 { color: var(--primary-dark); margin-bottom: 20px; text-align: center; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; color: var(--text-light); margin-bottom: 6px; }
.form-group input { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 14px; outline: none; transition: border 0.2s; }
.form-group input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,90,138,0.1); }
.btn-primary { background: var(--primary); color: #fff; padding: 10px 24px; border-radius: var(--radius); font-size: 14px; transition: background 0.2s; }
.btn-primary:hover { background: var(--primary-dark); }

.query-result { margin-top: 24px; padding: 20px; background: var(--bg); border-radius: var(--radius); border-left: 3px solid var(--primary); }
.query-result .result-empty { color: var(--text-muted); text-align: center; padding: 20px; }
.record-detail { font-size: 14px; line-height: 2; }
.record-detail .field-label { color: var(--text-light); display: inline-block; width: 110px; }
.record-detail .field-value { color: var(--text); font-weight: 500; }
.record-detail .field-value.alert { color: var(--danger); }

/* ============== 财务/招标/审计页 ============== */
.data-table-page { background: var(--bg-card); padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.data-table { width: 100%; border-collapse: collapse; margin-top: 14px; }
.data-table th, .data-table td { padding: 12px 14px; border: 1px solid var(--border); font-size: 14px; text-align: left; }
.data-table th { background: var(--primary); color: #fff; font-weight: 500; }
.data-table tr:nth-child(even) { background: var(--bg); }
.data-table [data-puzzle] { cursor: pointer; transition: background 0.2s; }
.data-table [data-puzzle]:hover { background: #fff3cd !important; }
.data-table .altered-num { position: relative; }
.data-table .altered-num .original { position: absolute; left: 14px; top: 12px; color: var(--danger); font-size: 11px; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.data-table .altered-num:hover .original, .data-table .altered-num.active .original { opacity: 0.85; }

/* ============== 平面图 ============== */
.floorplan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.floor-cell { background: var(--bg); border: 1px solid var(--border); padding: 14px; border-radius: 4px; text-align: center; font-size: 13px; cursor: pointer; transition: all 0.2s; }
.floor-cell:hover { background: #eaf2f8; border-color: var(--primary); }
.floor-cell.equipment { background: #f5f5f5; color: var(--text-muted); }
.floor-cell.archive-actual { background: #fff5f5; color: var(--danger); }
.floor-cell.locked { background: #2a2a2a; color: #aaa; cursor: not-allowed; }

/* ============== 档案袋浮窗 ============== */
.archive-fab { position: fixed; right: 24px; bottom: 24px; width: 56px; height: 56px; background: var(--primary); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-lg); cursor: pointer; z-index: 100; transition: transform 0.2s, background 0.2s; }
.archive-fab:hover { transform: scale(1.08); background: var(--primary-dark); }
.archive-fab.has-new { animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(26,90,138,0.5); } 50% { box-shadow: 0 0 0 12px rgba(26,90,138,0); } }

.archive-panel { position: fixed; right: -440px; top: 0; bottom: 0; width: 420px; background: #fff; box-shadow: -8px 0 24px rgba(0,0,0,0.15); z-index: 200; transition: right 0.3s; display: flex; flex-direction: column; }
.archive-panel.open { right: 0; }
.archive-header { padding: 18px 22px; background: var(--primary); color: #fff; display: flex; justify-content: space-between; align-items: center; }
.archive-header h3 { font-size: 18px; letter-spacing: 2px; }
.archive-close { color: #fff; font-size: 28px; line-height: 1; cursor: pointer; background: none; }
.archive-tabs { display: flex; flex-wrap: wrap; background: var(--primary-dark); }
.archive-tab { flex: 1; min-width: 70px; padding: 10px 6px; color: rgba(255,255,255,0.7); font-size: 13px; background: none; border: none; cursor: pointer; transition: all 0.2s; }
.archive-tab:hover { color: #fff; background: rgba(0,0,0,0.15); }
.archive-tab.active { background: #fff; color: var(--primary-dark); }
.archive-content { flex: 1; overflow-y: auto; padding: 18px; }

.archive-section { margin-bottom: 18px; }
.archive-section h4 { color: var(--primary-dark); font-size: 14px; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.progress-bar { background: var(--bg); border-radius: 4px; height: 8px; overflow: hidden; margin: 6px 0 12px; }
.progress-bar .progress-fill { background: linear-gradient(90deg, var(--primary), var(--accent)); height: 100%; transition: width 0.4s; }
.chapter-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.chapter-item .chapter-status { font-size: 12px; }
.chapter-item .status-done { color: #2d7a3d; }
.chapter-item .status-doing { color: var(--accent); }
.chapter-item .status-todo { color: var(--text-muted); }

/* 章节手风琴 */
.chapter-accordion { border-bottom: 1px dashed var(--border); }
.chapter-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 4px; cursor: pointer; font-size: 13px;
  transition: background 0.15s; user-select: none;
}
.chapter-header:hover { background: rgba(26,90,138,0.04); border-radius: 4px; }
.chapter-left { display: flex; align-items: center; gap: 8px; }
.chapter-toggle-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 3px;
  background: var(--bg); color: var(--primary); font-weight: 700;
  font-size: 14px; line-height: 1; border: 1px solid var(--border);
  transition: all 0.2s;
}
.chapter-header:hover .chapter-toggle-icon { background: var(--primary); color: #fff; }
.chapter-name { font-weight: 500; color: var(--text); }
.chapter-header .chapter-status { font-size: 12px; }
.chapter-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 8px 0 30px;
}
.chapter-body.open {
  max-height: 800px;
  padding: 4px 8px 12px 30px;
}
.chapter-puzzles {
  background: var(--bg); border-radius: 6px; padding: 4px 10px;
  border-left: 2px solid var(--primary-light);
}
.chapter-puzzle-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 7px 0; border-bottom: 1px dashed rgba(220,220,220,0.6);
  font-size: 12px;
}
.chapter-puzzle-item:last-child { border-bottom: none; }
.puzzle-dot {
  width: 8px; height: 8px; border-radius: 50%;
  margin-top: 5px; flex-shrink: 0;
  background: var(--text-muted); opacity: 0.5;
}
.chapter-puzzle-item.solved .puzzle-dot {
  background: #2d7a3d; opacity: 1;
}
.puzzle-info { flex: 1; }
.puzzle-name { font-weight: 600; color: var(--text); }
.chapter-puzzle-item.pending .puzzle-name { color: var(--text-muted); font-weight: 500; }
.puzzle-hint { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.chapter-puzzle-item.pending .puzzle-hint { color: var(--accent); opacity: 0.8; }
.puzzle-status { font-size: 11px; flex-shrink: 0; padding: 1px 6px; border-radius: 10px; }
.chapter-puzzle-item.solved .puzzle-status {
  color: #2d7a3d; background: rgba(45,122,61,0.08);
}
.chapter-puzzle-item.pending .puzzle-status {
  color: var(--text-muted); background: rgba(0,0,0,0.04);
}

.clue-item { padding: 10px 12px; background: var(--bg); border-radius: 4px; margin-bottom: 8px; font-size: 13px; line-height: 1.6; border-left: 3px solid var(--accent); }
.clue-item .clue-time { font-size: 11px; color: var(--text-muted); display: block; margin-top: 4px; }

.character-card { padding: 12px; background: var(--bg); border-radius: 4px; margin-bottom: 10px; font-size: 13px; }
.character-card .char-name { font-weight: 700; color: var(--primary-dark); font-size: 14px; }
.character-card .char-title { color: var(--text-light); font-size: 12px; margin: 3px 0 6px; }
.character-card .char-status { color: var(--danger); font-size: 12px; }

.evidence-item { padding: 12px; background: #fff8e8; border: 1px solid #f0d878; border-radius: 4px; margin-bottom: 8px; font-size: 13px; }
.evidence-item .ev-title { font-weight: 700; color: #8a6a20; }
.evidence-item .ev-desc { color: var(--text-light); margin-top: 4px; font-size: 12px; }

.notes-area { width: 100%; min-height: 200px; padding: 12px; border: 1px solid var(--border); border-radius: 4px; font-size: 13px; font-family: inherit; resize: vertical; outline: none; }
.notes-area:focus { border-color: var(--primary); }
.notes-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* ============== 提示消息 ============== */
.li-message { position: fixed; left: 24px; bottom: 24px; max-width: 360px; background: #fff; border-left: 4px solid var(--primary); box-shadow: var(--shadow-lg); padding: 16px 38px 16px 16px; border-radius: 4px; z-index: 150; transform: translateX(-440px); transition: transform 0.4s ease; display: flex; gap: 12px; }
.li-message.show { transform: translateX(0); }
.li-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.li-content { flex: 1; }
.li-header { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.li-text { font-size: 13px; line-height: 1.6; color: var(--text); }
.li-close { position: absolute; right: 8px; top: 8px; font-size: 20px; color: var(--text-muted); cursor: pointer; line-height: 1; background: none; }

/* ============== 模态框 ============== */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 300; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.show { display: flex; }
.modal-box { background: #fff; border-radius: 8px; max-width: 600px; width: 100%; max-height: 88vh; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: modalIn 0.25s ease; }
@keyframes modalIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-header { padding: 16px 22px; background: var(--primary); color: #fff; font-size: 17px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 22px; overflow-y: auto; font-size: 14px; line-height: 1.8; }
.modal-body p { margin-bottom: 10px; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.modal-footer .btn-secondary { background: var(--bg); color: var(--text); padding: 8px 18px; border-radius: 4px; font-size: 13px; border: 1px solid var(--border); }

/* ============== 日记页 ============== */
.diary-book { background: #f8f4e8; padding: 30px; border-radius: 8px; box-shadow: var(--shadow-md); border: 1px solid #e0d8b8; max-width: 720px; margin: 0 auto; font-family: "STKaiti", "KaiTi", serif; }
.diary-book .diary-title { text-align: center; color: #5a3a1a; font-size: 22px; margin-bottom: 20px; border-bottom: 2px dashed #c8b888; padding-bottom: 14px; }
.diary-page { display: none; background: #fffef5; padding: 28px; border-radius: 4px; min-height: 400px; box-shadow: inset 0 0 30px rgba(200,180,120,0.15); }
.diary-page.active { display: block; animation: pageFlip 0.5s ease; }
@keyframes pageFlip { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.diary-page .page-header { color: #8a5a3a; font-size: 14px; margin-bottom: 14px; display: flex; justify-content: space-between; }
.diary-page h3 { color: #5a2a1a; font-size: 19px; margin-bottom: 16px; }
.diary-page .page-content { font-size: 15px; line-height: 2; color: #3a2a1a; white-space: pre-wrap; }
.diary-nav { display: flex; justify-content: space-between; margin-top: 20px; padding-top: 16px; border-top: 1px dashed #c8b888; }
.diary-nav button { background: #c8a460; color: #fff; padding: 8px 18px; border-radius: 4px; font-size: 13px; }
.diary-nav button:disabled { background: #ccc; cursor: not-allowed; }
.diary-progress { text-align: center; color: #8a5a3a; font-size: 12px; margin-top: 10px; }

/* ============== 监控页 ============== */
.surveillance-page { background: #1a1a1a; color: #c0c0c0; padding: 30px; border-radius: 8px; min-height: 500px; font-family: "Courier New", monospace; }
.surveillance-page h2 { color: #4a9; border-bottom: 1px solid #444; padding-bottom: 10px; margin-bottom: 18px; }
.surveillance-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.surveillance-tile { background: #0a0a0a; border: 1px solid #333; aspect-ratio: 4/3; position: relative; display: flex; align-items: center; justify-content: center; color: #555; font-size: 12px; }
.surveillance-tile .tile-label { position: absolute; top: 4px; left: 6px; color: #4a9; font-size: 10px; }
.surveillance-tile .tile-time { position: absolute; top: 4px; right: 6px; color: #888; font-size: 10px; }
.surveillance-tile.online::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,0.1) 0, rgba(0,0,0,0.1) 1px, transparent 1px, transparent 3px); pointer-events: none; }
.surveillance-tile.b2-archive { cursor: pointer; }
.surveillance-tile.b2-archive.unlocked { color: #f44; border-color: #600; }
.surveillance-tile.b2-archive.unlocked::after { content: "●REC"; position: absolute; bottom: 6px; right: 6px; color: #f44; font-size: 10px; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.3; } }
.surveillance-timestamp { text-align: center; color: #4a9; font-size: 24px; margin: 20px 0; letter-spacing: 4px; }
.surveillance-notice { color: #888; font-size: 13px; text-align: center; margin: 20px 0; }
.surveillance-locked-msg { color: #a44; text-align: center; padding: 30px; font-size: 14px; }

/* ============== 通用工具类 ============== */
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none !important; }
.fade-in { animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ============== 结局页 ============== */
.ending-page { min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; }
.ending-card { max-width: 760px; background: #fff; padding: 40px; border-radius: 12px; box-shadow: var(--shadow-lg); text-align: center; }
.ending-tag { display: inline-block; padding: 4px 14px; border-radius: 20px; font-size: 12px; color: #fff; margin-bottom: 18px; letter-spacing: 2px; }
.ending-tag.normal { background: var(--primary); }
.ending-tag.hidden-end { background: var(--accent); }
.ending-title { font-size: 36px; font-weight: 700; margin-bottom: 8px; }
.ending-subtitle { font-size: 16px; color: var(--text-muted); margin-bottom: 28px; letter-spacing: 4px; }
.ending-body { text-align: left; font-size: 15px; line-height: 2; color: var(--text); white-space: pre-wrap; }
.ending-actions { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--border); }
.ending-actions button { margin: 0 8px; padding: 10px 24px; border-radius: 4px; font-size: 14px; }

/* ============== 404 ============== */
.error-page { text-align: center; padding: 80px 20px; }
.error-page .error-code { font-size: 96px; color: var(--text-muted); font-weight: 700; }
.error-page .error-msg { color: var(--text-light); margin: 10px 0 24px; }

/* ============== 页脚 ============== */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  padding: 40px 0 0;
  margin-top: 60px;
  border-top: 4px solid var(--accent);
}
.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px;
  padding-bottom: 30px;
}
.footer-col h4 {
  color: #fff;
  font-size: 15px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  letter-spacing: 1px;
  font-weight: 600;
}
.footer-col ul {
  list-style: none;
}
.footer-col li {
  padding: 6px 0;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,0.65);
}
.footer-col a {
  color: rgba(255,255,255,0.65);
  transition: color 0.2s, padding-left 0.2s;
  display: inline-block;
}
.footer-col a:hover {
  color: var(--accent);
  padding-left: 4px;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 18px 0;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  line-height: 2;
}
.footer-bottom p {
  margin: 4px 0;
}
.footer-bottom a {
  color: rgba(255,255,255,0.5);
  transition: color 0.2s;
}
.footer-bottom a:hover {
  color: rgba(255,255,255,0.8);
}
.footer-meta {
  font-size: 11px;
  opacity: 0.9;
}
.footer-meta a[data-puzzle] {
  cursor: default;
  transition: color 0.5s;
}
.footer-meta a[data-puzzle]:hover {
  color: rgba(255,255,255,0.45);
}
