/*
 * Greenroom
 * 극장의 대기실(green room)에서 가져온 색과, 대본처럼 조판한 대화가 중심이다.
 * 대사는 명조, 화면 조작부는 고딕으로 구분한다.
 */

:root {
  --chalk: #f0f3ee;
  --page: #fbfcfa;
  --ink: #17211d;
  --muted: #5d6b64;
  --green: #1e3a32;
  --green-soft: #dbe5dd;
  --brass: #94691a;
  --brass-light: #d9b76a;
  --line: #c5cfc6;
  --danger: #9a2b2b;

  --sans: "IBM Plex Sans KR", "IBM Plex Sans", system-ui, sans-serif;
  --serif: "Noto Serif KR", "Source Serif 4", Georgia, serif;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: 2rem;
  --step-4: 2.75rem;

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --measure: 40rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--chalk);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.55;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

/* 한국어는 어절 단위로 줄을 바꾼다. 긴 낱말은 overflow-wrap 이 끊는다. */
:lang(ko) {
  word-break: keep-all;
  overflow-wrap: break-word;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-3);
}

h2 {
  font-size: var(--step-2);
}

h3 {
  font-size: var(--step-1);
}

p {
  margin: 0;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: var(--step--1);
}

/* 상단 바 */

.bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem var(--gutter);
  background: var(--green);
  color: var(--chalk);
}

.brand {
  font-family: var(--serif);
  font-size: var(--step-1);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.bar nav {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: var(--step--1);
}

.bar nav a {
  text-decoration: none;
}

.bar nav a:hover,
.linklike:hover {
  text-decoration: underline;
}

.bar form {
  display: inline;
}

.linklike {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

/* 본문 틀 */

main {
  flex: 1;
}

.wrap {
  max-width: 62rem;
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 4rem;
}

.narrow {
  max-width: calc(var(--measure) + 2 * var(--gutter));
}

.stack > * + * {
  margin-top: 1rem;
}

.section {
  margin-top: 3.5rem;
}

.section > h2 {
  margin-bottom: 1.25rem;
}

/* 약관·처리방침. 한 절의 문단 사이는 좁게, 절 사이는 넓게. */
.legal h1 + p {
  margin-top: 0.4rem;
}

.legal .section {
  margin-top: 2.5rem;
}

.legal .section > h2 {
  margin-bottom: 0.6rem;
}

.legal .section > p + p {
  margin-top: 0.75rem;
}

/* 이용 안내 아래의 두 문서 링크, 가입 폼의 동의 문구. */
.legal-links {
  display: flex;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.consent {
  margin-bottom: 1rem;
}

/* 이용 안내 끝의 시드 활동 고지. 본문 절보다 한 단계 작은 제목, 글자는 ink. */
.seed-note {
  margin-top: 3rem;
}

.seed-note h2 {
  font-size: var(--step-0);
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.flash,
.error {
  margin: 0;
  padding: 0.75rem var(--gutter);
  font-size: var(--step--1);
}

.flash {
  background: var(--green-soft);
}

.error {
  color: var(--danger);
  padding: 0.6rem 0.9rem;
  border-left: 3px solid var(--danger);
  background: #f6e9e7;
}

footer.foot {
  padding: 1.5rem var(--gutter);
  background: var(--page);
  font-size: var(--step--1);
  color: var(--muted);
  display: flex;
  gap: 0.5rem 1.5rem;
  flex-wrap: wrap;
  justify-content: space-between;
}

footer.foot nav {
  display: flex;
  gap: 1rem;
}

/* 폼 */

label {
  display: block;
  font-weight: 500;
  font-size: var(--step--1);
  margin-bottom: 0.3rem;
}

.hint {
  display: block;
  font-weight: 400;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--page);
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 7rem;
  resize: vertical;
  font-family: var(--serif);
  line-height: 1.7;
}

.field + .field {
  margin-top: 1.1rem;
}

.check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  align-items: start;
  font-weight: 400;
  font-size: var(--step-0);
}

.check input {
  margin-top: 0.3rem;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--green);
}

.button {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--green);
  border-radius: 3px;
  background: var(--green);
  color: var(--chalk);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: #152b25;
}

.button.quiet {
  background: transparent;
  color: var(--green);
}

.button.quiet:hover {
  background: var(--green-soft);
}

.button.danger {
  background: transparent;
  border-color: var(--danger);
  color: var(--danger);
}

.button[disabled] {
  opacity: 0.55;
  cursor: default;
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1.5rem;
}

/* 첫 화면 */

.hero {
  background: var(--green);
  color: var(--chalk);
}

.hero-inner {
  max-width: 62rem;
  margin: 0 auto;
  padding: 2rem var(--gutter) 2.5rem;
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, var(--step-4));
  line-height: 1.12;
}

.hero .lede {
  margin-top: 1rem;
  max-width: 32rem;
  color: #cfdcd3;
}

.hero-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
}

.hero .quiet-link {
  padding: 0.6rem 0;
  color: var(--chalk);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.hero .quiet-link:hover {
  color: var(--brass-light);
}

.hero .button {
  background: var(--brass-light);
  border-color: var(--brass-light);
  color: var(--ink);
}

.hero .button:hover {
  background: #e6c98a;
}

.playbill {
  background: var(--page);
  color: var(--ink);
  padding: 1.75rem 1.75rem 1.25rem;
  border-radius: 2px;
  box-shadow: 0 1.5rem 3rem -1.5rem rgba(6, 18, 14, 0.7); /* taste-skill-ignore: 유일한 떠 있는 요소 */
  transform: rotate(-0.6deg);
}

/* 예시 대본은 좁으므로 큐 열을 이름 폭에 맞춘다. */
.playbill .script .line {
  grid-template-columns: auto minmax(0, 1fr);
}

.playbill .aside {
  margin-top: 1rem;
  font-size: var(--step--1);
  color: var(--muted);
}

/* 펄스 바와 티커: 지금 이 서비스에서 일어나는 일. 숫자가 바뀌어도 자리는 움직이지 않는다. */

.pulse-bar {
  background: var(--green-soft);
}

.pulse-figures {
  max-width: 62rem;
  margin: 0 auto;
  padding: 0.75rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 2.25rem;
}

.pulse-figures strong {
  display: inline-block;
  min-width: 3ch;
  margin-left: 0.4rem;
  font-family: var(--serif);
  font-size: var(--step-2);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ticker {
  list-style: none;
  max-width: 62rem;
  margin: 0 auto;
  padding: 1rem var(--gutter) 0;
  font-size: var(--step--1);
  color: var(--muted);
}

.ticker:empty {
  display: none;
}

.ticker li {
  padding: 0.15rem 0;
}

/* 한 열, 최대 여섯 줄(서버는 여덟 줄을 보낸다). 새 줄이 위에 끼면 아래 줄이 밀려 내려간다.
   1440×900 첫 화면에서 피드의 첫 카드가 티커 아래로 보이게 하는 높이다. */
.ticker li:nth-child(n + 7) {
  display: none;
}

/* 새 줄이 위에서 들어온다. 움직임을 줄인 설정에서는 상태만 바뀐다. */
.ticker li.is-new {
  animation: ticker-in 220ms ease-out;
}

@keyframes ticker-in {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
}

.ticker a {
  text-decoration: none;
}

.ticker a:hover {
  text-decoration: underline;
}

/* 피드: 한 종류의 카드가 세로로 이어지는 단일 열 */

.feed {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.card {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  background: var(--page);
  border-radius: 2px;
  overflow: hidden;
}

/* 캐릭터를 구분하는 좁은 색 띠. 글자를 올리지 않는 장식이다. */
.card::before {
  content: "";
  background: hsl(var(--hue) 35% 70%);
}

.card h3 a {
  text-decoration: none;
}

.card h3 a:hover {
  text-decoration: underline;
}

.card .tagline {
  margin-top: -0.25rem;
  font-family: var(--serif);
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.card .credit {
  color: var(--muted);
}

.card .credit .badge {
  margin-left: 0.35rem;
}

/* 태그는 보조 정보라 작은 흐린 글자. 각 태그는 그 태그로 검색하는 링크다. */
.card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.6rem;
  color: var(--muted);
}

.card .tags a {
  text-decoration: none;
}

.card .tags a:hover {
  text-decoration: underline;
}

.card .numbers {
  font-variant-numeric: tabular-nums;
}

.card .button {
  margin-top: 0.5rem;
}

/* 탐색 격자의 카드: 같은 줄의 카드 높이를 맞추고 버튼을 바닥에 둔다. */
.card--compact .button {
  margin-top: auto;
}

.card--compact .numbers {
  margin-bottom: 0.5rem;
}

/* 좁은 칸에서는 배지가 다음 줄로 자주 넘어간다. 줄 첫머리에서 들여 보이지 않게 바깥 여백을 뺀다
   (배지 앞의 공백 하나가 같은 줄일 때의 간격이 된다). */
.card--compact .credit .badge {
  margin-left: 0;
}

.nudge {
  padding: 1.5rem 1.25rem;
  background: var(--green-soft);
  border-radius: 2px;
}

.nudge p {
  margin-top: 0.4rem;
  max-width: var(--measure);
}

.nudge .button {
  margin-top: 1rem;
}

.more {
  margin-top: 1.5rem;
}

.empty {
  margin-top: 1rem;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 1.5rem 2rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.steps li {
  counter-increment: step;
  border-top: 2px solid var(--green);
  padding-top: 0.8rem;
}

.steps li::before {
  content: counter(step);
  font-family: var(--serif);
  font-size: var(--step-2);
  color: var(--brass);
}

.steps h3 {
  margin: 0.2rem 0 0.4rem;
}

/* 대본처럼 조판한 대화 */

.script {
  font-family: var(--serif);
  line-height: 1.75;
}

.script .line {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0 1.25rem;
  padding: 0.55rem 0;
  /* 새 대사로 스크롤할 때 하단에 고정된 입력창에 가려지지 않게 한다. */
  scroll-margin-bottom: 13rem;
}

.script .cue {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 2;
  text-align: right;
  overflow-wrap: anywhere;
}

.script .line.character .cue {
  color: var(--brass);
}

.script .line.reader .cue {
  color: var(--muted);
}

.script .line.reader .said {
  color: #36443e;
}

.script .said {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.script .direction {
  padding: 0.55rem 0 0.55rem 9.75rem;
  font-style: italic;
  color: var(--muted);
}

.script .line.aside-note .said {
  font-family: var(--sans);
  font-size: var(--step--1);
  line-height: 1.6;
  padding: 0.7rem 0.9rem;
  background: var(--green-soft);
  border-radius: 3px;
}

/* 하이라이트: 작가가 쓴 대본 발췌. 카드에는 최신 하나의 앞 두 줄, 캐릭터 페이지에는 전부. */

.excerpt .line {
  padding: 0.3rem 0;
}

/* 카드 안에서는 두 줄이 한 격자를 나눠 써서 큐 열이 이름 폭(최대 8.5rem)에 맞춰 정렬되고,
   긴 대사는 세 줄에서 잘라 카드가 길어지지 않게 한다. 전문은 캐릭터 페이지에 있다. */
.card .excerpt {
  align-self: stretch;
  display: grid;
  grid-template-columns: fit-content(8.5rem) minmax(0, 1fr);
  align-items: baseline;
  gap: 0.3rem 1rem;
  margin: 0.35rem 0 0.15rem;
}

.card .excerpt .line {
  display: contents;
}

.card .excerpt .said {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.highlights {
  margin-top: 2rem;
}

.highlights h2 {
  font-size: var(--step-1);
}

/* 하이라이트는 green-soft 면(대화 대본은 page 면). 놋쇠(3.8)와 muted(4.3)는 green-soft 위에서
   대비가 모자라므로 큐를 초록(캐릭터)과 잉크(독자)로 바꾼다. */
.highlights .excerpt {
  margin-top: 0.75rem;
  padding: 0.6rem 1.25rem;
  background: var(--green-soft);
  border-radius: 2px;
}

.highlights .line.character .cue {
  color: var(--green);
}

.highlights .line.reader .cue {
  color: var(--ink);
}

/* 박수 버튼: 납작하다. 아직 안 눌렀으면 밑줄 친 글자(접힌 하이라이트 여는 줄과 같은 모양),
   이미 보냈으면(aria-pressed) green-soft 면. 선·아이콘은 쓰지 않는다. */
.applause {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  margin-top: 0.4rem;
  padding: 0 0.75rem;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: var(--step--1);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.applause:hover {
  color: var(--green);
}

.applause[aria-pressed="true"] {
  background: var(--green-soft);
  text-decoration: none;
}

.applause .num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* 마우스·터치로 눌렀을 때만 applause.js 가 붙이는 작은 확대(200ms, transform 만). */
.applause.is-bumped {
  animation: applause-bump 200ms ease-out;
}

@keyframes applause-bump {
  50% {
    transform: scale(1.08);
  }
}

/* 접힌 하이라이트를 여는 줄. 기본 삼각형 표시를 없애는 대신 링크처럼 밑줄을 둔다.
   연 뒤에도 숨기지 않는다: 숨기면 키보드 포커스가 사라지고, 다시 눌러 접을 수 없다. */
.highlights-more summary {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  margin-top: 0.5rem;
  font-size: var(--step--1);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.highlights + .page-script {
  margin-top: 2.5rem;
}

.studio-highlights .rows {
  margin-bottom: 1.25rem;
}

/* 하이라이트 삭제 버튼: 글자 링크 모양이지만 터치 목표는 44px. */
.studio-highlights .linklike {
  min-height: 2.75rem;
  padding: 0 0.25rem;
}

/* 하이라이트 작성 폼: 줄마다 말하는 쪽(좁은 칸)과 대사(넓은 칸). */
.highlight-form {
  margin-top: 1.5rem;
}

.highlight-form .error {
  margin-bottom: 1.25rem;
}

.slot {
  margin: 0;
  padding: 0;
  border: 0;
}

.slot + .slot {
  margin-top: 1.5rem;
}

.slot legend {
  padding: 0;
  margin-bottom: 0.5rem;
  font-family: var(--serif);
  font-weight: 600;
}

.slot-fields {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: 0.75rem 1rem;
  align-items: start;
}

.slot-fields .field + .field {
  margin-top: 0;
}

.slot textarea {
  min-height: 4.25rem;
}

/* 말하는 쪽 선택도 입력창과 같은 높이로(터치 목표 44px). */
.slot select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--page);
  color: var(--ink);
  font: inherit;
  font-size: max(1rem, 16px);
}

/* 탐색: 제목 → 장르 칩 → 검색 → 격자. 격자는 이 화면에서만 쓴다. */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: 3px;
  background: var(--page);
  color: var(--ink);
  font-size: var(--step--1);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.chip:hover {
  background: var(--green-soft);
}

.chip[aria-current="true"] {
  background: var(--green);
  color: var(--chalk);
}

.explore-search {
  margin-top: 1.5rem;
  max-width: var(--measure);
}

.search-row {
  display: flex;
  gap: 0.5rem;
}

.search-row input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--page);
  color: var(--ink);
  font: inherit;
}

.explore-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.explore .empty {
  margin-top: 2.5rem;
}

@media (max-width: 62rem) {
  .explore-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 작가 프로필: 이름 → 핸들 → 소개글 → 숫자 한 줄 → 작품 → 캐릭터 카드 열 */

.author-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  max-width: var(--measure);
}

/* 이름과 오리지널 배지를 한 줄에. 배지는 제목 밖에 두어 제목은 한 글꼴로 남긴다. */
.author-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
}

.author-name h1 {
  font-size: var(--step-4);
}

.author-head .handle {
  color: var(--muted);
}

.author-head .bio {
  margin-top: 0.5rem;
  font-family: var(--serif);
  font-size: var(--step-1);
  white-space: pre-line;
}

.author-head .figures-line {
  margin-top: 0.5rem;
}

/* 숫자 묶음 하나가 줄 끝에서 갈라지지 않게 한다. 구분점은 뒤 항목의 앞에 붙여(사이에 줄바꿈 없는
   공백), 줄이 바뀌면 "·" 이 앞 줄 끝이 아니라 새 줄 머리에 함께 간다. */
.author-head .figures-line span {
  white-space: nowrap;
}

.author-head .figures-line span + span::before {
  content: "\00b7\00a0";
}

.author-head .button {
  margin-top: 0.75rem;
}

.works {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  /* 한 줄로 자르는 시놉시스가 열 너비를 밀어내지 않게 최소 너비를 0 으로 둔다. */
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  max-width: var(--measure);
}

.works p {
  margin-top: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 독자 대화 화면 */

.room {
  max-width: 46rem;
  margin: 0 auto;
  padding: 2rem var(--gutter) 1.5rem;
}

.room-head {
  padding-bottom: 0.25rem;
}

.room-head h1 {
  font-size: var(--step-3);
}

.room-head .tagline {
  margin-top: 0.4rem;
  font-family: var(--serif);
  font-size: var(--step-1);
}

.room-head .credit {
  margin-top: 0.5rem;
}

.room-head .figures-line {
  margin-top: 0.35rem;
}

.num {
  font-family: var(--serif);
  font-variant-numeric: tabular-nums;
}

.notice {
  margin-top: 1rem;
  padding: 0.6rem 0.9rem;
  background: var(--green-soft);
  border-radius: 3px;
  font-size: var(--step--1);
}

.page-script {
  background: var(--page);
  border-radius: 2px;
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  min-height: 14rem;
}

.composer {
  position: sticky;
  bottom: 0;
  background: var(--chalk);
  padding: 0.9rem 0 0.75rem;
}

.composer form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: end;
}

.composer textarea {
  min-height: 3rem;
  max-height: 10rem;
}

.composer .meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  font-size: var(--step--1);
  color: var(--muted);
}

.composer .tools {
  display: flex;
  gap: 1rem;
}

.composer .status {
  min-height: 1.4rem;
  margin-bottom: 0.4rem;
  font-size: var(--step--1);
}

.composer .status.bad {
  color: var(--danger);
}

dialog.gate {
  max-width: 30rem;
  width: calc(100% - 2rem);
  border: 0;
  border-radius: 4px;
  padding: 1.75rem;
  background: var(--page);
  color: var(--ink);
}

dialog.gate::backdrop {
  background: rgba(15, 30, 25, 0.72);
}

dialog.gate ul {
  margin: 1rem 0 1.25rem;
  padding-left: 1.1rem;
}

dialog.gate li + li {
  margin-top: 0.5rem;
}

/* 스튜디오 */

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.rows li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 1rem;
  background: var(--page);
  border-radius: 2px;
}

.rows .name {
  font-family: var(--serif);
  font-size: var(--step-1);
  font-weight: 600;
}

.rows .entry {
  flex: 1 1 20rem;
}

.rows .entry p {
  font-family: var(--serif);
  color: #36443e;
  white-space: pre-wrap;
}

.badge {
  display: inline-block;
  white-space: nowrap;
  font-size: var(--step--1);
  padding: 0.1rem 0.5rem;
  border-radius: 2rem;
  background: var(--green-soft);
  color: var(--green);
}

.badge.live {
  background: var(--green);
  color: var(--chalk);
}

.badge.official {
  font-weight: 500;
}

.linkbox {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
  padding: 0.8rem 0.9rem;
  background: var(--green-soft);
  border-radius: 3px;
}

.linkbox code {
  font-family: var(--sans);
  overflow-wrap: anywhere;
}

/* 지표 */

.figures {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2.5rem;
  margin: 0;
}

.figures div {
  min-width: 7rem;
}

.figures dt {
  font-size: var(--step--1);
  color: var(--muted);
}

.figures dd {
  margin: 0;
  font-family: var(--serif);
  font-size: var(--step-2);
  font-variant-numeric: tabular-nums;
}

.table-scroll {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

th {
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--muted);
}

th:first-child,
td:first-child {
  text-align: left;
}

.up {
  color: #1f6b46;
}

.down {
  color: var(--danger);
}

@media (max-width: 46rem) {
  .explore-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .author-name h1 {
    font-size: var(--step-3);
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 2rem;
  }

  /* 좁은 화면에서는 예시 대본을 빼서 첫 화면에 피드가 들어오게 한다. */
  .playbill {
    display: none;
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  /* 세 숫자를 한 줄에 고정된 칸으로 둔다. 라벨은 위, 숫자는 아래. */
  .pulse-figures {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 1rem;
  }

  .pulse-figures span {
    display: flex;
    flex-direction: column;
    font-size: var(--step--1);
  }

  .pulse-figures strong {
    margin-left: 0;
  }

  /* 좁은 화면에서는 최근 활동을 네 줄만 보여 피드가 첫 화면에 들어오게 한다. */
  .ticker li:nth-child(n + 5) {
    display: none;
  }

  .script .line {
    grid-template-columns: minmax(0, 1fr);
  }

  .script .cue {
    text-align: left;
  }

  .script .direction {
    padding-left: 0;
  }

  /* 좁은 화면의 카드 발췌도 큐를 대사 위에 둔다. 대사는 두 줄에서 자른다. */
  .card .excerpt {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .card .excerpt .said {
    -webkit-line-clamp: 2;
    line-clamp: 2;
    margin-bottom: 0.3rem;
  }

  .highlights .excerpt {
    padding: 0.5rem 0.9rem;
  }

  .slot-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-script {
    padding: 0.75rem 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }

  .ticker li.is-new {
    animation: none;
  }

  .applause.is-bumped {
    animation: none;
  }
}
