/*
 * republic-lurk-script.css — 《潜伏》剧本独立栏目样式
 *
 * 用于：
 *   /republic/lurk/script           （剧集索引页）
 *   /republic/lurk/script/[ep]      （单集剧本阅读页）
 *
 * 思路：剧本是「读」的版面，不是「看」的版面。版心要窄，行距要松，
 * 场景标题要醒目但克制，对白与提示要有视觉层级。
 * 与其他子专题共用 republic-subpage.css 的 hero / shell / hero-badge 样式。
 */

/* ── 索引页：剧集列表 ─────────────────────────────────── */
.lurk-script-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
}

@media (min-width: 700px) {
  .lurk-script-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
  }
}

.lurk-script-list-item {
  margin: 0;
}

.lurk-script-list-link {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.95rem 1.1rem;
  background: #fffdf9;
  border: 1px solid rgba(129, 112, 90, 0.2);
  border-left: 3px solid #8f2a24;
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.lurk-script-list-link:hover {
  box-shadow: 0 6px 18px rgba(60, 40, 20, 0.08);
  transform: translateY(-1px);
  border-left-color: #6a1f1a;
}

.lurk-script-list-num {
  font-family: "Montserrat", "Inter", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8f2a24;
  font-weight: 600;
}

.lurk-script-list-body {
  min-width: 0;
}

.lurk-script-list-body h3 {
  margin: 0 0 0.25rem;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.4;
  color: #1c355e;
  font-family: "Noto Serif SC", "Source Han Serif SC", serif;
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lurk-script-list-meta {
  margin: 0;
  display: flex;
  gap: 0.85rem;
  font-size: 11px;
  color: #8a7c6f;
  letter-spacing: 0.06em;
  font-family: "Montserrat", "Inter", sans-serif;
}

.lurk-script-list-cta {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8f2a24;
  font-family: "Montserrat", "Inter", sans-serif;
  font-weight: 600;
}

/* ── 单集阅读页：导航栏 ──────────────────────────────── */
.lurk-script-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid rgba(129, 112, 90, 0.18);
  border-bottom: 1px solid rgba(129, 112, 90, 0.18);
  flex-wrap: wrap;
}

.lurk-script-nav--top {
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}

.lurk-script-nav--bottom {
  margin-top: 2rem;
}

.lurk-script-nav-index,
.lurk-script-nav-prev,
.lurk-script-nav-next {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #5d5347;
  font-family: "Noto Serif SC", serif;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.lurk-script-nav-index:hover,
.lurk-script-nav-prev:hover,
.lurk-script-nav-next:hover {
  color: #8f2a24;
  border-bottom-color: rgba(143, 42, 36, 0.4);
}

.lurk-script-nav-pager {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.lurk-script-nav-disabled {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #c0b8aa;
  font-family: "Noto Serif SC", serif;
}

/* ── 单集阅读页：剧本正文 ──────────────────────────── */
.lurk-script-article {
  max-width: 720px;
  margin: 0 auto;
  padding: 0.5rem 0 1rem;
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  color: #2c2620;
}

.lurk-script-scene {
  margin-bottom: 2.2rem;
}

.lurk-script-scene:last-child {
  margin-bottom: 1rem;
}

.lurk-script-scene-heading {
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1c355e;
  background: rgba(143, 42, 36, 0.06);
  border-left: 3px solid #8f2a24;
  letter-spacing: 0.04em;
  font-family: "Noto Serif SC", serif;
  line-height: 1.5;
}

.lurk-script-line {
  margin: 0 0 0.55rem;
  font-size: 15px;
  line-height: 1.95;
  color: #2c2620;
  text-indent: 2em;
  text-align: justify;
}

.lurk-script-spacer {
  height: 0.5rem;
}

/* ── 单集阅读页：返回链接 ──────────────────────────── */
.lurk-script-back {
  text-align: center;
  padding-top: 2rem;
}

.lurk-script-back-link {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: #5d5347;
  text-decoration: none;
  border-bottom: 1px solid rgba(129, 112, 90, 0.4);
  padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}

.lurk-script-back-link:hover {
  color: #8f2a24;
  border-bottom-color: #8f2a24;
}

/* ── 移动端紧凑化 ────────────────────────────────────── */
@media (max-width: 640px) {
  .lurk-script-list-link {
    grid-template-columns: 3.5rem minmax(0, 1fr);
    gap: 0.75rem;
  }
  .lurk-script-list-cta {
    grid-column: 1 / -1;
    margin-top: 0.4rem;
  }
  .lurk-script-nav {
    gap: 0.5rem;
  }
  .lurk-script-nav-pager {
    gap: 0.8rem;
    width: 100%;
    justify-content: space-between;
  }
  .lurk-script-line {
    font-size: 14px;
    line-height: 1.9;
  }
}

/* ── 台词搜索区块 ─────────────────────────────────────── */
.lurk-search-section {
  margin-bottom: 0.5rem;
}

.lurk-search-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fffdf9;
  border: 1.5px solid rgba(129, 112, 90, 0.28);
  border-radius: 3px;
  padding: 0.5rem 0.75rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.lurk-search-bar:focus-within {
  border-color: #8f2a24;
  box-shadow: 0 0 0 3px rgba(143, 42, 36, 0.08);
}

.lurk-search-icon {
  font-size: 1rem;
  opacity: 0.5;
  flex-shrink: 0;
}

.lurk-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.97rem;
  font-family: "Noto Serif SC", "Source Han Serif SC", serif;
  color: #2a1f14;
  min-width: 0;
}

.lurk-search-input::placeholder {
  color: #b0a090;
  font-style: italic;
}

.lurk-search-clear {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: #b0a090;
  padding: 0 0.2rem;
  line-height: 1;
  flex-shrink: 0;
}

.lurk-search-clear:hover {
  color: #8f2a24;
}

.lurk-search-btn {
  flex-shrink: 0;
  background: #8f2a24;
  color: #fff;
  border: none;
  border-radius: 2px;
  padding: 0.38rem 1rem;
  font-size: 0.84rem;
  font-family: "Noto Serif SC", serif;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.18s;
}

.lurk-search-btn:hover:not(:disabled) {
  background: #6a1f1a;
}

.lurk-search-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

/* 结果区 */
.lurk-search-results {
  margin-top: 1.2rem;
}

.lurk-search-empty {
  color: #7a6b5a;
  font-size: 0.93rem;
  font-style: italic;
  padding: 0.6rem 0;
}

.lurk-search-summary {
  font-size: 0.84rem;
  color: #7a6b5a;
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
}

.lurk-search-summary strong {
  color: #8f2a24;
  font-weight: 700;
}

/* 按集分组 */
.lurk-search-group {
  margin-bottom: 1.4rem;
  border-left: 3px solid #8f2a24;
  padding-left: 1rem;
}

.lurk-search-group-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "Noto Serif SC", serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1c355e;
  text-decoration: none;
  margin-bottom: 0.7rem;
  transition: color 0.15s;
}

.lurk-search-group-title:hover {
  color: #8f2a24;
}

.lurk-search-group-count {
  font-size: 0.76rem;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  background: rgba(143, 42, 36, 0.1);
  color: #8f2a24;
  padding: 0.1em 0.5em;
  border-radius: 2px;
}

.lurk-search-group-arrow {
  margin-left: auto;
  font-size: 0.85rem;
  color: #8f2a24;
  opacity: 0.7;
}

/* 命中条目列表 */
.lurk-search-hit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.lurk-search-hit {
  background: #faf8f4;
  border: 1px solid rgba(129, 112, 90, 0.15);
  padding: 0.65rem 0.9rem;
  border-radius: 2px;
}

.lurk-search-context {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.75;
  font-family: "Noto Serif SC", "Source Han Serif SC", serif;
}

.lurk-search-context--dim {
  color: #a09080;
}

.lurk-search-context--match {
  color: #2a1f14;
  font-weight: 500;
}

.lurk-search-mark {
  background: #fff0a0;
  color: #5a1a00;
  font-weight: 700;
  border-radius: 1px;
  padding: 0 1px;
}
