/* 《黑球》剧本阅读页（2026-12-04）
   只给 film/la-bola-negra-script 用；正文类名由 tools/blackball-script.py 生成。 */

main.script-reader {
  --sp-measure: 44rem;
}

main.script-reader > h1 {
  margin-bottom: .35em;
  text-wrap: balance;
}

main.script-reader > .reader-credit {
  margin: 0 0 clamp(2rem, 5vw, 3rem);
  color: var(--secondary);
  font-size: .95rem;
  letter-spacing: .01em;
}

.screenplay {
  font-size: clamp(1rem, 1.15vw, 1.06rem);
}

/* 剧本自带的封面与版权页 */
.screenplay .sp-cover {
  margin: 0 0 .55rem;
  color: var(--secondary);
  font-size: .95rem;
  letter-spacing: .04em;
  text-align: center;
}

.screenplay > .sp-cover:first-child {
  margin-top: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: 1.4rem;
  color: var(--primary);
  font-size: clamp(2.2rem, 7vw, 3.4rem);
  font-weight: 600;
  letter-spacing: .18em;
  line-height: 1.1;
}

.screenplay .sp-front {
  margin: 0 0 1.4em;
  color: var(--secondary);
  font-size: .93rem;
  line-height: 1.9;
}

.screenplay .sp-front:first-of-type {
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

/* 场号 + 场景行 */
.screenplay .sp-scene {
  display: flex;
  align-items: baseline;
  gap: .95em;
  margin: clamp(2.6rem, 6vw, 3.6rem) 0 1.15rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .015em;
  line-height: 1.6;
  text-wrap: pretty;
  scroll-margin-top: 4.5rem;
}

.screenplay .sp-scene-num {
  flex: none;
  min-width: 1.7em;
  color: var(--secondary);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.screenplay .sp-scene-title {
  min-width: 0;
}

/* 动作段 */
.screenplay .sp-action {
  margin: 0 0 1.15em;
  line-height: 1.95;
  text-wrap: pretty;
}

/* 人物名与对白 */
.screenplay .sp-cue {
  margin: 1.7em 0 .25em;
  font-weight: 600;
  letter-spacing: .14em;
  line-height: 1.5;
  text-align: center;
}

.screenplay .sp-dial {
  margin: 0 auto .9em;
  width: min(100%, 28em);
  line-height: 1.95;
  text-wrap: pretty;
}

.screenplay .sp-paren {
  color: var(--secondary);
}

@media (max-width: 640px) {
  .screenplay .sp-dial {
    width: 86%;
  }

  .screenplay .sp-scene {
    gap: .7em;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
