.strip-reader-body {
  min-height: 100vh;
  background: #20231f;
  color: #171917;
}

.reader-header {
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 clamp(1rem, 4vw, 2rem);
  border-bottom: 1px solid rgba(243, 245, 247, 0.18);
  background: var(--charcoal-950);
  color: var(--off-white);
}

.reader-back {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  color: var(--steel-300);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: underline;
  text-underline-offset: 0.3rem;
  text-transform: uppercase;
}

.strip-reader {
  width: min(100%, 48rem);
  min-height: calc(100vh - 3.5rem);
  margin: 0 auto;
  padding: clamp(0.75rem, 3vw, 1.25rem);
  background: #f1ede3;
}

.stripboard-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.stripboard-heading .eyebrow {
  margin-bottom: 0.25rem;
  color: var(--crimson-600);
}

.stripboard-heading h1 {
  margin: 0;
  color: #111;
  font-size: clamp(1.45rem, 6vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.stripboard-heading .script-author {
  margin: 0.35rem 0 0;
  color: #555951;
  font-size: 0.7rem;
  font-weight: 750;
  text-transform: uppercase;
}

.stripboard-heading .script-version {
  margin: 0.15rem 0 0;
  color: #6b6e66;
  font-size: 0.64rem;
}

.stripboard-heading > p {
  margin: 0;
  color: #555951;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(0.62rem, 2vw, 0.75rem);
  text-align: right;
  white-space: nowrap;
}

.strip-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.strip-filters legend,
.strip-filters label span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.strip-filters select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0 0.55rem;
  border: 1px solid #34372f;
  border-radius: 4px;
  background: #faf8f2;
  color: #171917;
  font: 800 0.72rem/1 ui-sans-serif, system-ui, sans-serif;
}

.filter-progress {
  height: 0.35rem;
  margin: 0.7rem 0 0.85rem;
  border: 1px solid #34372f;
  background: #d4d0c7;
}

.filter-progress span {
  height: 100%;
  display: block;
  background: var(--crimson-600);
  transition: width 160ms ease;
}

.filter-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.strip-list {
  display: grid;
  gap: 2px;
}

.production-strip[hidden] {
  display: none;
}

.strip-summary {
  width: 100%;
  min-height: 3.25rem;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 0.75rem;
  padding: 0.3rem 0.65rem 0.3rem 0.35rem;
  border: 1px solid #20231f;
  border-radius: 0;
  color: #10130f;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.strip-summary--night {
  background: #244b83;
  color: #fff;
}

.strip-summary--day,
.strip-summary--other {
  background: #f7f3e9;
}

.strip-number {
  display: grid;
  place-content: center;
  border: 2px solid currentColor;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.strip-number small {
  display: block;
  margin-bottom: 0.1rem;
  font-size: 0.52rem;
}

.strip-heading {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  overflow: hidden;
  font-size: clamp(0.72rem, 2.8vw, 0.95rem);
  font-weight: 900;
  text-transform: uppercase;
}

.strip-heading strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.strip-heading small {
  flex: none;
  font-size: 0.64rem;
  font-weight: 800;
}

.strip-count {
  align-self: center;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1;
  text-align: right;
}

.strip-count small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.48rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.strip-details {
  padding: 0.8rem;
  border: 1px solid #20231f;
  border-top: 0;
  background: #ebe5d6;
}

.strip-details[hidden],
.episode-script[hidden] {
  display: none;
}

.cast-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}

.cast-chip {
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.55rem 0.15rem 0.2rem;
  border: 1px solid #373a33;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.cast-chip span {
  width: 1.35rem;
  height: 1.35rem;
  display: grid;
  place-content: center;
  border-radius: 50%;
  background: #171917;
  color: #fff;
}

.strip-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  margin: 0 0 0.65rem;
}

.strip-stats div {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  padding: 0.35rem 0.15rem;
  border: 1px solid #55584f;
  text-transform: uppercase;
}

.strip-stats dt {
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.strip-stats dd {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.1;
}

.episode-title {
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #55584f;
  font-size: 0.82rem;
  font-weight: 800;
}

.episode-title span {
  display: block;
  color: #63675d;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.read-scene {
  width: 100%;
  min-height: 2.75rem;
  border: 0;
  border-radius: 4px;
  background: #171917;
  color: #fff;
  cursor: pointer;
  font: 800 0.78rem/1 ui-sans-serif, system-ui, sans-serif;
}

.episode-script {
  margin-top: 0.75rem;
  scroll-margin-top: 1rem;
}

.episode-script > header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem;
  background: var(--navy-950);
  color: var(--off-white);
  font: 800 0.72rem/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
}

.screenplay-page {
  padding: clamp(1.25rem, 5vw, 3rem) clamp(0.85rem, 7vw, 4rem) 3rem;
  background: #fafaf7;
  color: #111;
  font-family: "Courier Prime", Courier, ui-monospace, monospace;
  font-size: clamp(0.8rem, 2.9vw, 0.95rem);
  line-height: 1.48;
}

.screenplay-page p {
  margin: 0 0 0.9rem;
  overflow-wrap: break-word;
}

.screenplay-scene-heading {
  margin-top: 1.45rem !important;
  font-weight: 700;
  text-transform: uppercase;
}

.screenplay-character {
  width: 60%;
  margin: 1.1rem 0 0.1rem auto !important;
  padding-left: 0.75rem;
  text-transform: uppercase;
}

.screenplay-dialogue {
  width: 76%;
  margin: 0 auto 0.9rem !important;
}

.screenplay-parenthetical {
  width: 60%;
  margin: 0 auto 0.1rem !important;
}

.screenplay-transition {
  margin: 1.35rem 0 !important;
  text-align: right;
  text-transform: uppercase;
}

.no-results {
  padding: 2rem 1rem;
  border: 1px dashed #55584f;
  text-align: center;
}

@media (max-width: 29rem) {
  .stripboard-heading {
    align-items: start;
    flex-direction: column;
  }

  .stripboard-heading > p {
    text-align: left;
  }

  .strip-heading {
    align-items: start;
    flex-direction: column;
    justify-content: center;
    gap: 0.1rem;
  }

  .strip-filters select {
    padding-inline: 0.35rem;
    font-size: 0.62rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .filter-progress span {
    transition: none;
  }
}
