:root {
  --ink: #17201e;
  --muted: #65716e;
  --faint: #8d9894;
  --line: #dbe2df;
  --line-strong: #c9d3cf;
  --canvas: #f3f6f4;
  --paper: #ffffff;
  --soft: #f8faf9;
  --green: #245e54;
  --green-dark: #173e37;
  --green-pale: #e8f0ed;
  --amber: #bc7a24;
  --amber-pale: #fbf1df;
  --coral: #bf6048;
  --coral-pale: #f8ebe7;
  --blue: #3f6675;
  --shadow: 0 18px 60px rgba(24, 42, 37, 0.08);
  --shadow-soft: 0 8px 24px rgba(24, 42, 37, 0.06);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(36, 94, 84, 0.22);
  outline-offset: 2px;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.intro-gate {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  overflow: hidden;
  background: #f2eee4;
  place-items: center;
  transition: opacity 620ms ease, visibility 620ms ease;
}

.intro-gate::before {
  position: absolute;
  inset: -30px;
  background: url("/intro-poster.jpg?v=20261109-compliance-1") center / cover no-repeat;
  content: "";
  filter: blur(24px) saturate(0.8);
  opacity: 0.38;
  transform: scale(1.05);
}

.intro-gate[hidden] {
  display: none;
}

.intro-video {
  position: relative;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  background: #f2eee4;
  transition: transform 700ms cubic-bezier(0.2, 0.72, 0.2, 1), filter 700ms ease;
}

.intro-controls {
  position: absolute;
  z-index: 3;
  bottom: clamp(28px, 6vh, 66px);
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
}

.intro-enter,
.intro-sound {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 52px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.intro-enter {
  min-width: 240px;
  padding: 0 28px;
  color: #f8f2e2;
  border: 1px solid var(--green-dark);
  background: var(--green-dark);
  box-shadow: 0 14px 32px rgba(19, 54, 47, 0.2);
}

.intro-sound {
  position: fixed;
  z-index: 3;
  top: max(22px, env(safe-area-inset-top));
  right: max(22px, env(safe-area-inset-right));
  min-height: 38px;
  padding: 0 13px;
  color: var(--green-dark);
  border: 1px solid rgba(23, 62, 55, 0.2);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
}

.intro-sound svg {
  width: 16px;
  height: 16px;
}

.intro-play {
  position: absolute;
  z-index: 4;
  bottom: 112px;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 0 20px 0 14px;
  border: 1px solid rgba(23, 62, 55, 0.26);
  border-radius: 999px;
  color: var(--green-dark);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 30px rgba(24, 42, 37, 0.14);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transform: translateX(-50%);
  transition: transform 160ms ease, background 160ms ease;
}

.intro-play[hidden] {
  display: none;
}

.intro-play svg {
  width: 30px;
  height: 30px;
  padding: 7px;
  border-radius: 50%;
  color: white;
  fill: currentColor;
  background: var(--green-dark);
}

.intro-play:hover {
  background: rgba(255, 255, 255, 0.94);
  transform: translate(-50%, -2px);
}

.intro-enter:hover,
.intro-sound:hover {
  transform: translateY(-2px);
}

.intro-enter:active,
.intro-sound:active {
  transform: translateY(0) scale(0.99);
}

.intro-gate.is-leaving {
  visibility: hidden;
  opacity: 0;
}

.intro-gate.is-leaving .intro-video {
  filter: blur(3px);
  transform: scale(1.035);
}

body.intro-open {
  overflow: hidden;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  color: white;
  background: var(--green-dark);
  border-radius: var(--radius);
  place-items: center;
}

.brand-mark svg {
  width: 21px;
  height: 21px;
}

.brand strong {
  display: block;
  font-size: 20px;
  letter-spacing: 0.06em;
}

.brand small {
  display: block;
  margin-top: -1px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.03em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.engine-chip,
.meta-pill,
.mode-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 11px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px var(--amber-pale);
}

.engine-chip.is-ready .status-dot {
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-pale);
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: white;
  cursor: pointer;
  place-items: center;
  transition: 160ms ease;
}

.icon-button:hover {
  color: var(--green);
  border-color: var(--green);
  transform: translateY(-1px);
}

.app-shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: calc(100vh - 72px);
}

.site-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #f7f8f5;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
}

.site-footer p + p {
  margin-top: 3px;
}

.sidebar {
  position: sticky;
  top: 72px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: calc(100vh - 72px);
  padding: 24px 18px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: #eef2f0;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.current-project {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.current-project::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--coral));
  content: "";
  opacity: 0.82;
}

.project-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.project-heading-row .eyebrow {
  margin-bottom: 5px;
}

.project-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--muted);
  background: #eef2f0;
  font-size: 8px;
  font-weight: 700;
}

.project-status::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
  content: "";
}

.project-status.is-ready {
  color: var(--green);
  background: var(--green-pale);
}

.project-status.is-ready::before {
  background: var(--green);
}

.project-status.is-followup {
  color: #8c3e30;
  background: var(--coral-pale);
}

.project-status.is-followup::before {
  background: var(--coral);
  box-shadow: 0 0 0 3px rgba(191, 96, 72, 0.1);
}

.current-project h1 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  transition: color 180ms ease;
}

.current-project > p:not(.eyebrow) {
  margin: 5px 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  transition: opacity 180ms ease, transform 180ms ease;
}

.current-project.is-updating h1 {
  animation: project-title-in 360ms cubic-bezier(0.2, 0.72, 0.2, 1);
}

.current-project.is-updating > p:not(.eyebrow) {
  animation: project-meta-in 360ms 45ms cubic-bezier(0.2, 0.72, 0.2, 1);
}

@keyframes project-title-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes project-meta-in {
  from {
    opacity: 0;
    transform: translateX(-4px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.episode-badge {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-pale);
  font-size: 9px;
  font-weight: 800;
}

.episode-dots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  margin-bottom: 13px;
}

.episode-dots span {
  height: 3px;
  border-radius: 99px;
  background: #e4eae7;
  transition: background 260ms ease, transform 260ms ease;
}

.episode-dots span.is-past {
  background: #a7c0b8;
}

.episode-dots span.is-current {
  background: var(--coral);
  transform: scaleY(1.8);
}

.series-controls {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.series-controls .button {
  flex: 1;
  min-height: 30px;
  padding: 0 8px;
  font-size: 9px;
}

.series-controls .button:disabled {
  cursor: default;
  opacity: 0.38;
}

.progress-track {
  position: relative;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ebe9;
}

.progress-track span {
  position: relative;
  display: block;
  width: 20%;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: width 420ms cubic-bezier(0.2, 0.72, 0.2, 1);
}

.progress-track span::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 28px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.56));
  content: "";
}

.step-nav {
  display: grid;
  gap: 14px;
  padding: 8px 3px 14px;
}

.step-button {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 62px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition:
    transform 160ms cubic-bezier(0.2, 0.72, 0.2, 1),
    box-shadow 160ms ease,
    color 160ms ease,
    background 160ms ease;
}

.step-button:not(:last-child)::after {
  position: absolute;
  z-index: 0;
  top: 46px;
  bottom: -15px;
  left: 27px;
  width: 1px;
  background: rgba(36, 94, 84, 0.14);
  content: "";
  pointer-events: none;
}

.step-button > * {
  position: relative;
  z-index: 1;
}

.step-button:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.38);
}

.step-button.is-active {
  color: var(--green-dark);
  border-color: rgba(255, 255, 255, 0.94);
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    0 15px 34px rgba(24, 42, 37, 0.1),
    inset 3px 0 0 var(--coral),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(12px);
  transform: translate(5px, -2px);
}

.step-button:active {
  transform: translateY(0) scale(0.995);
}

.step-icon {
  display: grid;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  border: 1px solid rgba(36, 94, 84, 0.08);
  color: #70807a;
  background: rgba(255, 255, 255, 0.42);
  place-items: center;
  transition:
    transform 160ms cubic-bezier(0.2, 0.72, 0.2, 1),
    color 160ms ease,
    background 160ms ease;
}

.step-button.is-active .step-icon {
  color: white;
  border-color: transparent;
  background: var(--green);
  box-shadow: 0 7px 15px rgba(36, 94, 84, 0.18);
  transform: scale(1.06);
}

.step-button > span:nth-child(2) {
  font-size: 13px;
  font-weight: 600;
}

.step-button b {
  margin-right: 5px;
  color: var(--faint);
  font-size: 10px;
  font-weight: 700;
}

.step-button.is-active b {
  color: var(--coral);
}

.step-status {
  justify-self: end;
  display: grid;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(101, 113, 110, 0.28);
  place-items: center;
}

.step-status.is-done {
  width: 14px;
  height: 14px;
  color: var(--green);
  background: var(--green-pale);
  box-shadow: 0 0 0 2px rgba(36, 94, 84, 0.05);
  font-size: 8px;
  font-weight: 800;
}

.step-status.is-done::after {
  content: "✓";
}

.sample-library {
  position: relative;
  display: grid;
  gap: 0;
}

.sample-card {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--paper);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(36, 94, 84, 0.035);
  transition:
    transform 170ms cubic-bezier(0.2, 0.72, 0.2, 1),
    box-shadow 170ms ease,
    border-color 170ms ease,
    background 170ms ease;
}

.sample-card + .sample-card {
  margin-top: -4px;
}

.sample-card:hover {
  color: var(--ink);
  border-color: var(--green);
  background: var(--paper);
  z-index: 3;
}

.sample-card:active {
  transform: translateY(0) scale(0.995);
}

.sample-card svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-top: 2px;
  color: var(--green);
  transition: transform 170ms cubic-bezier(0.2, 0.72, 0.2, 1);
}

.sample-card strong,
.sample-card small {
  display: block;
}

.sample-card strong {
  color: var(--ink);
  font-size: 12px;
}

.sample-card small {
  color: var(--muted);
  font-size: 10px;
}

@media (hover: hover) and (pointer: fine) {
  .step-button:hover {
    box-shadow: var(--shadow-soft);
    transform: translateY(-3px);
  }

  .step-button:hover .step-icon {
    transform: translateY(-1px) scale(1.03);
  }

  .step-button.is-active:hover {
    transform: translate(5px, -3px);
  }

  .sample-card:hover {
    box-shadow: var(--shadow-soft);
    transform: translateY(-5px);
  }

  .sample-card:hover svg {
    transform: translateY(-1px) rotate(-2deg);
  }

  .button:hover {
    transform: translateY(-2px);
  }
}

.button:active {
  transform: translateY(0) scale(0.99);
}

.sidebar-note {
  display: flex;
  gap: 9px;
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--line);
  color: var(--green);
}

.sidebar-note p {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
}

.sidebar-note span {
  color: var(--muted);
  font-weight: 400;
}

.main-content {
  min-width: 0;
  padding: 36px clamp(22px, 4vw, 54px) 60px;
}

.screen {
  display: none;
  max-width: 1160px;
  margin: 0 auto;
  animation: screen-in 180ms ease both;
}

.screen.is-active {
  display: block;
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.screen-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.screen-header h2 {
  max-width: 690px;
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(25px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.screen-header > div > p:last-child {
  max-width: 690px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.setup-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  align-items: center;
  gap: clamp(24px, 4vw, 54px);
  min-height: 350px;
  margin-bottom: 18px;
}

.hero-copy {
  min-width: 0;
}

.hero-title {
  max-width: 720px !important;
  margin: 0 !important;
  font-size: clamp(42px, 4.7vw, 66px) !important;
  line-height: 1.13 !important;
  letter-spacing: 0 !important;
}

.hero-line {
  display: block;
  overflow: hidden;
  padding: 0.02em 0 0.06em;
}

.hero-line > span {
  display: block;
  opacity: 0;
  transform: translateY(112%);
  animation: hero-line-in 820ms cubic-bezier(0.2, 0.72, 0.2, 1) forwards;
}

.hero-line:nth-child(2) > span {
  animation-delay: 90ms;
}

.hero-line:nth-child(3) > span {
  animation-delay: 180ms;
}

.hero-line strong {
  position: relative;
  color: var(--green);
  font-weight: 700;
}

.hero-line strong::after {
  position: absolute;
  right: 0;
  bottom: -0.08em;
  left: 0;
  height: 0.12em;
  background: var(--coral);
  content: "";
  opacity: 0.72;
  transform: scaleX(0);
  transform-origin: left;
  animation: hero-underline 620ms 720ms ease forwards;
}

@keyframes hero-line-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-underline {
  to {
    transform: scaleX(1);
  }
}

.hero-rule {
  display: block;
  width: min(180px, 34%);
  height: 2px;
  margin: 12px 0 2px;
  background: linear-gradient(90deg, var(--coral), rgba(191, 96, 72, 0));
  transform: scaleX(0);
  transform-origin: left;
  animation: hero-rule-in 720ms 520ms ease forwards;
}

@keyframes hero-rule-in {
  to {
    transform: scaleX(1);
  }
}

.hero-copy > p:last-of-type {
  max-width: 620px;
  margin: 11px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.hero-copy .mode-label {
  margin-top: 0;
}

.reading-stage {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 350px;
  perspective: 1100px;
  place-items: center;
}

.reading-stage::before {
  position: absolute;
  right: 35px;
  bottom: 22px;
  left: 35px;
  height: 62px;
  border-radius: 50%;
  background: rgba(23, 62, 55, 0.2);
  filter: blur(22px);
  content: "";
  transform: rotate(-2deg);
}

.book-object {
  position: relative;
  width: 320px;
  min-height: 336px;
  transform: rotateY(-7deg) rotateZ(-1.2deg);
  transform-style: preserve-3d;
  transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reading-stage.is-turning .book-object {
  transform: rotateY(-3deg) rotateZ(-0.5deg) translateY(-3px);
}

.book-page {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-height: 336px;
  padding: 25px 25px 19px 34px;
  overflow: hidden;
  border: 1px solid #ddd6c8;
  border-radius: 2px 9px 9px 2px;
  background:
    linear-gradient(90deg, rgba(60, 72, 64, 0.08), transparent 12%),
    #fbf9f2;
  box-shadow:
    14px 18px 35px rgba(23, 48, 42, 0.16),
    inset 1px 0 0 rgba(255, 255, 255, 0.9);
}

.book-page::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 21px;
  width: 1px;
  background: rgba(191, 96, 72, 0.18);
  content: "";
}

.stage-page-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(101, 113, 110, 0.17);
  color: var(--faint);
  font-size: 8px;
  font-weight: 700;
}

.stage-meta-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.stage-kind {
  padding: 2px 5px;
  border: 1px solid rgba(36, 94, 84, 0.24);
  border-radius: 2px;
  color: var(--green);
  background: rgba(232, 240, 237, 0.72);
  font-size: 7px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.stage-source {
  margin: 18px 0 0;
  color: #2d3734;
  font-family: "Songti SC", "STSong", serif;
  font-size: 13px;
  line-height: 1.9;
}

.stage-source mark {
  padding: 1px 2px;
  color: inherit;
  background: linear-gradient(
    transparent 56%,
    rgba(214, 165, 73, 0.38) 56%
  );
}

.stage-thread {
  position: absolute;
  top: 102px;
  right: 31px;
  width: 46px;
  height: 1px;
  background: var(--coral);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: right;
  transition: 420ms ease;
}

.stage-question {
  align-self: flex-end;
  margin: 15px 2px 0;
  color: #8c3e30;
  font-family: "Kaiti SC", "STKaiti", serif;
  font-size: 17px;
  font-weight: 700;
  opacity: 0;
  transform: translateX(10px);
  transition: 440ms ease;
}

.stage-dialogue {
  margin-top: 12px;
  padding: 9px 10px;
  border-left: 2px solid var(--green);
  background: rgba(36, 94, 84, 0.055);
  opacity: 0;
  transform: translateY(6px);
  transition: 420ms 90ms ease;
}

.stage-dialogue span,
.stage-task span {
  color: var(--green);
  font-size: 7px;
  font-weight: 800;
}

.stage-dialogue p {
  margin: 3px 0 0;
  color: #4e5b57;
  font-size: 9px;
  line-height: 1.55;
}

.stage-evidence {
  align-self: flex-start;
  margin-top: 12px;
  padding: 4px 8px;
  border: 1px solid rgba(36, 94, 84, 0.34);
  border-radius: 2px;
  color: var(--green);
  background: rgba(232, 240, 237, 0.76);
  font-size: 8px;
  font-weight: 800;
  opacity: 0;
  transform: rotate(-1deg) scale(0.93);
  transition: 380ms 150ms ease;
}

.stage-task {
  display: grid;
  gap: 7px;
  margin-top: auto;
  padding-top: 11px;
  border-top: 1px solid rgba(101, 113, 110, 0.15);
  opacity: 0.24;
  transition: 420ms ease;
}

.stage-task i {
  display: block;
  width: 100%;
  height: 1px;
  background: rgba(101, 113, 110, 0.2);
}

.stage-chain {
  display: flex;
  gap: 5px;
  margin-top: 13px;
}

.stage-chain span {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: rgba(101, 113, 110, 0.15);
  transition: background 300ms ease;
}

.reading-stage[data-phase="question"] .stage-thread {
  opacity: 1;
  transform: scaleX(1);
}

.reading-stage[data-phase="question"] .stage-question,
.reading-stage[data-phase="evidence"] .stage-question,
.reading-stage[data-phase="task"] .stage-question {
  opacity: 1;
  transform: translateX(0);
}

.reading-stage[data-phase="evidence"] .stage-dialogue,
.reading-stage[data-phase="task"] .stage-dialogue {
  opacity: 1;
  transform: translateY(0);
}

.reading-stage[data-phase="evidence"] .stage-evidence,
.reading-stage[data-phase="task"] .stage-evidence {
  opacity: 1;
  transform: rotate(-1deg) scale(1);
}

.reading-stage[data-phase="task"] .stage-task {
  opacity: 1;
}

.reading-stage[data-phase="question"] .stage-chain span:nth-child(-n + 3),
.reading-stage[data-phase="evidence"] .stage-chain span:nth-child(-n + 5),
.reading-stage[data-phase="task"] .stage-chain span {
  background: var(--green);
}

.page-turn {
  position: absolute;
  z-index: 3;
  top: 2px;
  right: -2px;
  bottom: 2px;
  width: 17px;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(90deg, transparent, rgba(70, 62, 43, 0.12));
  box-shadow: inset 6px 0 10px rgba(255, 255, 255, 0.86);
  pointer-events: none;
  transform-origin: left center;
}

.reading-stage.is-turning .page-turn {
  animation: page-turn 600ms cubic-bezier(0.2, 0.7, 0.25, 1);
}

@keyframes page-turn {
  0% {
    transform: rotateY(0);
  }
  45% {
    transform: rotateY(-18deg);
  }
  100% {
    transform: rotateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-line > span,
  .hero-line strong::after,
  .hero-rule {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .reading-stage.is-turning .book-object,
  .reading-stage.is-turning .page-turn {
    animation: none;
  }

  .step-button,
  .step-icon,
  .sample-card,
  .sample-card svg,
  .button {
    transition: none;
  }

  .step-button:hover,
  .step-button.is-active,
  .sample-card:hover,
  .button:hover {
    transform: none;
  }
}

.mode-label {
  flex: 0 0 auto;
  color: var(--green);
  border-color: #cddbd6;
  background: var(--green-pale);
}

.header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
}

.setup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(290px, 0.7fr);
  gap: 18px;
  align-items: stretch;
}

.setup-chain {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 18px;
}

.setup-chain-node {
  position: relative;
  min-width: 0;
  padding: 11px 12px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.setup-chain-node:not(:last-child)::after {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: -7px;
  width: 7px;
  height: 1px;
  background: var(--line-strong);
  content: "";
}

.setup-chain-node b,
.setup-chain-node span,
.setup-chain-node small {
  display: block;
}

.setup-chain-node b {
  color: var(--green);
  font-size: 8px;
}

.setup-chain-node span {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
}

.setup-chain-node small {
  margin-top: 1px;
  color: var(--faint);
  font-size: 9px;
}

.form-surface,
.guide-surface,
.output-surface,
.summary-card,
.source-panel,
.support-panel,
.script-paper,
.script-sidebar,
.score-panel,
.check-panel,
.coverage-panel,
.warning-panel,
.handoff-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.form-surface {
  padding: clamp(22px, 3vw, 32px);
  box-shadow: var(--shadow);
}

.advanced-settings {
  margin: 1px 0 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.advanced-settings summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  color: var(--green-dark);
  cursor: pointer;
  list-style: none;
}

.advanced-settings summary::-webkit-details-marker {
  display: none;
}

.advanced-settings summary::after {
  color: var(--green);
  content: "＋";
  font-size: 16px;
}

.advanced-settings[open] summary::after {
  content: "−";
}

.advanced-settings summary span {
  font-size: 12px;
  font-weight: 700;
}

.advanced-settings summary small {
  margin-left: auto;
  color: var(--faint);
  font-size: 9px;
  font-weight: 400;
}

.advanced-settings-body {
  padding: 3px 0 7px;
}

.output-surface {
  display: flex;
  flex-direction: column;
  padding: 24px;
  color: white;
  background: var(--green-dark);
}

.output-surface .eyebrow {
  color: rgba(255, 255, 255, 0.5);
}

.output-surface h3 {
  margin: 0;
  font-family: "Songti SC", serif;
  font-size: 22px;
  line-height: 1.45;
  text-wrap: balance;
}

.output-list {
  display: grid;
  gap: 0;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.output-list li {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.output-list li:last-child {
  border-bottom: 0;
}

.output-list b,
.output-list span {
  display: block;
}

.output-list b {
  font-size: 12px;
}

.output-list span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
  line-height: 1.55;
}

.output-note {
  display: flex;
  gap: 9px;
  margin-top: auto;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
}

.output-note svg {
  flex: 0 0 auto;
  color: #f1dcb0;
}

.output-note p {
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  line-height: 1.6;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 145px;
  gap: 13px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
}

.field > span {
  font-size: 12px;
  font-weight: 700;
}

.field em {
  margin-left: 5px;
  color: var(--faint);
  font-size: 10px;
  font-style: normal;
  font-weight: 500;
}

.field input,
.field select,
.field textarea,
.question-text,
.inline-edit {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  outline: 0;
  background: var(--soft);
  color: var(--ink);
  transition: 160ms ease;
}

.field input,
.field select {
  min-height: 44px;
  padding: 0 12px;
}

.field textarea {
  min-height: 130px;
  padding: 12px;
  line-height: 1.6;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.question-text:focus,
.inline-edit:focus {
  border-color: var(--green);
  background: white;
  box-shadow: 0 0 0 3px rgba(36, 94, 84, 0.09);
}

.field-hint {
  color: var(--faint);
  font-size: 10px;
}

.form-options {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px 0 20px;
  border-top: 1px solid var(--line);
}

.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}

.toggle-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 99px;
  background: #cbd4d1;
  transition: 160ms ease;
}

.switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  content: "";
  transition: 160ms ease;
}

.toggle-row input:checked + .switch {
  background: var(--green);
}

.toggle-row input:checked + .switch::after {
  transform: translateX(14px);
}

.toggle-row input:disabled + .switch {
  opacity: 0.45;
}

.toggle-row.is-locked {
  cursor: default;
}

.toggle-row.is-locked input:disabled + .switch {
  opacity: 1;
}

.material-confirm-row {
  align-items: flex-start;
  margin: 12px 0 4px;
}

.material-confirm-row .switch {
  flex: 0 0 auto;
  margin-top: 1px;
}

.form-actions {
  display: flex;
  gap: 10px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.6;
  transform: none;
}

.button.primary {
  color: white;
  background: var(--green);
  box-shadow: 0 7px 18px rgba(36, 94, 84, 0.18);
}

.button.primary:hover {
  background: var(--green-dark);
}

.button.secondary {
  color: var(--green-dark);
  border-color: var(--line-strong);
  background: white;
}

.button.ghost {
  color: var(--muted);
  border-color: var(--line);
  background: transparent;
}

.button.compact {
  min-height: 36px;
  padding: 0 12px;
}

.button.full-width {
  width: 100%;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 0;
  border: 0;
  color: var(--green);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.text-button svg {
  width: 13px;
  height: 13px;
}

.guide-surface {
  display: flex;
  flex-direction: column;
  padding: 25px;
  background: var(--green-dark);
  color: white;
}

.guide-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 19px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.guide-index {
  display: grid;
  width: 49px;
  height: 49px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: #f1dcb0;
  font-family: "Songti SC", serif;
  font-size: 25px;
  place-items: center;
}

.guide-surface .eyebrow {
  color: rgba(255, 255, 255, 0.54);
}

.guide-surface h3 {
  margin: 0;
  font-family: "Songti SC", serif;
  font-size: 21px;
}

.rule-list {
  display: grid;
  gap: 0;
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.rule-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.rule-list li:last-child {
  border-bottom: 0;
}

.rule-list li > span {
  color: #f1dcb0;
  font-size: 9px;
  font-weight: 700;
}

.rule-list b,
.rule-list small {
  display: block;
}

.rule-list b {
  font-size: 12px;
}

.rule-list small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 10px;
}

.guide-foot {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
}

.guide-foot svg {
  flex: 0 0 auto;
  color: #f1dcb0;
}

.guide-foot p {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
}

.guide-foot span {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.58);
  font-weight: 400;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.mode-field-row {
  grid-template-columns: minmax(0, 1fr) 170px;
}

.participant-row {
  grid-template-columns: 150px minmax(0, 1fr);
}

.mode-banner {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(240px, 0.78fr);
  align-items: center;
  gap: 16px;
  margin: 0 0 24px;
  padding: 18px 20px;
  border: 1px solid #c7d9d3;
  border-radius: var(--radius);
  background: var(--green-pale);
}

.mode-banner-icon {
  display: grid;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: white;
  background: var(--green);
  place-items: center;
}

.mode-banner h3 {
  margin: 0;
  font-family: "Songti SC", serif;
  font-size: 18px;
}

.mode-banner p:not(.eyebrow) {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.mode-reason {
  padding-left: 16px;
  border-left: 1px solid #c7d9d3;
}

.mode-reason span {
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.role-protocol-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: -8px 0 24px;
}

.role-protocol-card {
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr);
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
}

.role-protocol-card h3 {
  margin: 0 0 4px;
  font-family: "Songti SC", serif;
  font-size: 16px;
}

.role-protocol-card p,
.role-protocol-card small {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.role-protocol-card small {
  margin-top: 4px;
  color: var(--green);
}

.summary-card {
  position: relative;
  padding: 21px 22px;
}

.proposition-card {
  border-left: 3px solid var(--green);
}

.controversy-card {
  border-left: 3px solid var(--coral);
}

.summary-card h3 {
  max-width: 95%;
  margin: 0;
  font-family: "Songti SC", serif;
  font-size: 18px;
  line-height: 1.48;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 30px 0 12px;
}

.section-heading h3,
.panel-title h3 {
  margin: 0;
  font-family: "Songti SC", serif;
  font-size: 17px;
}

.question-editor {
  display: grid;
  gap: 8px;
}

.question-row {
  display: grid;
  grid-template-columns: 42px 74px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
}

.question-index {
  color: var(--faint);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.type-select {
  width: 100%;
  height: 31px;
  padding: 0 5px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--green);
  background: var(--green-pale);
  font-size: 10px;
  font-weight: 700;
}

.question-text {
  min-height: 39px;
  padding: 8px 10px;
  border-color: transparent;
  background: transparent;
  resize: vertical;
}

.delete-question {
  display: grid;
  width: 29px;
  height: 29px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: var(--faint);
  background: transparent;
  cursor: pointer;
  place-items: center;
}

.delete-question:hover {
  color: var(--coral);
  background: var(--coral-pale);
}

.delete-question svg {
  width: 14px;
  height: 14px;
}

.outline-support-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 14px;
  margin-top: 22px;
}

.source-panel,
.support-panel {
  padding: 20px;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
}

.panel-title > svg {
  color: var(--green);
}

.evidence-list {
  display: grid;
  gap: 8px;
}

.evidence-item {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 8px;
  width: 100%;
  padding-bottom: 9px;
  border-bottom: 1px solid #edf0ef;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  color: var(--muted);
  background: transparent;
  text-align: left;
  font-size: 11px;
  cursor: pointer;
  transition: 160ms ease;
}

.evidence-item:hover {
  color: var(--green-dark);
  border-bottom-color: #c7d9d3;
}

.evidence-item svg {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  color: var(--green);
}

.evidence-item p {
  margin: 0;
}

.analogy-note {
  margin-top: 14px;
  padding: 12px;
  border-radius: 6px;
  background: var(--amber-pale);
}

.analogy-note span {
  color: var(--amber);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.analogy-note p {
  margin: 4px 0 0;
  color: #6f552d;
  font-size: 11px;
}

.support-list {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  counter-reset: support;
  list-style: none;
}

.support-list li {
  position: relative;
  padding-left: 30px;
  color: var(--muted);
  font-size: 11px;
  counter-increment: support;
}

.support-list li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 21px;
  height: 21px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--green);
  content: counter(support, decimal-leading-zero);
  font-size: 8px;
  font-weight: 700;
  place-items: center;
}

.script-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 14px;
  align-items: start;
}

.script-paper {
  min-height: 580px;
  padding: clamp(22px, 4vw, 40px);
  box-shadow: var(--shadow);
}

.empty-state {
  display: grid;
  min-height: 470px;
  color: var(--faint);
  text-align: center;
  place-content: center;
}

.empty-state svg {
  width: 38px;
  height: 38px;
  margin: 0 auto 10px;
}

.empty-state h3 {
  margin: 0;
  color: var(--muted);
  font-family: "Songti SC", serif;
}

.empty-state p {
  margin: 5px 0 0;
  font-size: 11px;
}

.dialogue-line {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 13px;
  margin-bottom: 18px;
}

.speaker {
  display: grid;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: white;
  background: var(--green);
  font-size: 12px;
  font-weight: 800;
  place-items: center;
}

.dialogue-line.b .speaker {
  color: #6e4b18;
  background: #f1dfbd;
}

.dialogue-line.c .speaker {
  background: var(--blue);
}

.dialogue-line.d .speaker {
  background: var(--coral);
}

.dialogue-line.s .speaker {
  color: var(--green-dark);
  border: 1px solid var(--green);
  background: white;
}

.role-name {
  display: block;
  margin-bottom: 3px;
  color: var(--faint);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.function-tag {
  display: inline-flex;
  margin-right: 7px;
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--green-dark);
  background: var(--green-pale);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.03em;
  vertical-align: 1px;
}

.dialogue-line.b .function-tag {
  color: #6e4b18;
  background: var(--amber-pale);
}

.dialogue-content {
  padding-top: 3px;
}

.dialogue-content textarea {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 0;
  overflow: hidden;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-family: "Songti SC", "STSong", serif;
  font-size: 15px;
  line-height: 1.75;
  resize: none;
}

.dialogue-content textarea:focus {
  box-shadow: inset 0 -1px 0 var(--green);
}

.evidence-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.evidence-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border: 1px solid #c9dbd4;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-pale);
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.evidence-chip:hover {
  border-color: var(--green);
  background: #dcebe5;
}

.evidence-chip svg {
  width: 10px;
  height: 10px;
}

.script-sidebar {
  display: grid;
  gap: 0;
  padding: 18px;
}

.aside-section {
  padding-bottom: 17px;
  margin-bottom: 17px;
  border-bottom: 1px solid var(--line);
}

.role-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 9px;
  margin-top: 10px;
}

.role-row p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.role-badge {
  display: grid;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  color: white;
  background: var(--green);
  font-size: 9px;
  font-weight: 800;
  place-items: center;
}

.role-badge.b {
  color: #6e4b18;
  background: #f1dfbd;
}

.legend {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.legend-dot.source {
  background: var(--green);
}

.legend-dot.overview {
  background: var(--blue);
}

.legend-dot.analogy {
  background: var(--amber);
}

.legend-dot.boundary {
  background: var(--coral);
}

.deliverable-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #eef2f0;
}

.deliverable-tab {
  flex: 1;
  min-height: 38px;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.deliverable-tab.is-active {
  color: var(--green-dark);
  background: white;
  box-shadow: 0 2px 8px rgba(28, 46, 40, 0.08);
}

.deliverable-panel[hidden] {
  display: none;
}

.task-sheet,
.teacher-sheet {
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.task-sheet-header {
  padding-bottom: 18px;
  border-bottom: 2px solid var(--green);
}

.task-sheet-header h3 {
  margin: 4px 0 7px;
  font-family: "Songti SC", serif;
  font-size: clamp(23px, 3vw, 32px);
}

.task-sheet-header p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.task-section {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.task-section:last-child {
  border-bottom: 0;
}

.task-section h4 {
  margin: 0 0 12px;
  font-family: "Songti SC", serif;
  font-size: 18px;
}

.task-core-issue {
  padding: 17px 18px;
  border-left: 4px solid var(--coral);
  background: var(--soft);
  font-family: "Songti SC", serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.65;
}

.task-evidence-list {
  display: grid;
  gap: 9px;
}

.task-evidence {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
}

.task-evidence p {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.65;
}

.evidence-status {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-pale);
  font-size: 8px;
  font-weight: 800;
}

.evidence-status.pending {
  color: #74552a;
  background: var(--amber-pale);
}

.evidence-status.provided {
  color: var(--blue);
  background: #e9eff2;
}

.task-debate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.task-debate-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.task-debate-card b {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
}

.task-debate-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.task-prompt {
  margin: 14px 0 7px;
  color: var(--muted);
  font-size: 11px;
}

.task-line {
  height: 27px;
  border-bottom: 1px solid #bfc9c5;
}

.task-writing-box {
  margin-top: 10px;
  padding: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
}

.task-writing-box ol {
  margin: 8px 0 16px;
  padding-left: 20px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.75;
}

.task-writing-lines {
  display: grid;
  gap: 19px;
  padding-top: 4px;
}

.task-writing-lines span {
  border-bottom: 1px solid #cbd3d0;
}

.teacher-lead {
  margin: 0 0 18px;
  padding: 13px 15px;
  border-radius: 6px;
  color: #6f552d;
  background: var(--amber-pale);
  font-size: 11px;
  line-height: 1.65;
}

.teacher-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.teacher-note {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
}

.teacher-note h4 {
  margin: 0 0 9px;
  font-family: "Songti SC", serif;
  font-size: 16px;
}

.teacher-note ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 19px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.rubric-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}

.rubric-table th,
.rubric-table td {
  padding: 10px;
  border: 1px solid var(--line);
  line-height: 1.55;
  text-align: left;
  vertical-align: top;
}

.rubric-table th {
  color: var(--green-dark);
  background: var(--green-pale);
}

.rubric-check {
  white-space: nowrap;
  color: var(--muted);
}

.qa-grid {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 14px;
}

.score-panel {
  display: flex;
  align-items: center;
  gap: 23px;
  padding: 28px;
}

.score-ring {
  --score: 0;
  display: grid;
  flex: 0 0 auto;
  width: 126px;
  height: 126px;
  border-radius: 50%;
  background: conic-gradient(var(--green) calc(var(--score) * 1%), #e8edeb 0);
  place-items: center;
}

.score-ring::before {
  position: absolute;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: white;
  content: "";
}

.score-ring > div {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  width: 74px;
}

.score-ring strong {
  font-family: "Songti SC", serif;
  font-size: 38px;
  line-height: 1;
}

.score-ring span {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.score-ring small {
  width: 100%;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  text-align: center;
}

.score-summary h3 {
  margin: 10px 0 4px;
  font-family: "Songti SC", serif;
  font-size: 20px;
}

.score-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.check-panel,
.coverage-panel,
.warning-panel {
  padding: 22px;
}

.check-list {
  display: grid;
}

.check-item {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 9px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid #edf0ef;
}

.check-item:last-child {
  border-bottom: 0;
}

.check-mark {
  display: grid;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  color: white;
  background: var(--green);
  place-items: center;
}

.check-mark svg {
  width: 12px;
  height: 12px;
}

.check-item.is-failed .check-mark {
  background: var(--coral);
}

.check-copy b {
  display: block;
  font-size: 11px;
}

.check-copy span {
  color: var(--muted);
  font-size: 9px;
}

.check-state {
  color: var(--green);
  font-size: 9px;
  font-weight: 800;
}

.check-item.is-failed .check-state {
  color: var(--coral);
}

.qa-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.practice-panel {
  margin-top: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.practice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.practice-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
}

.practice-card span {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-pale);
  font-size: 9px;
  font-weight: 800;
}

.practice-card h4 {
  margin: 9px 0 5px;
  font-family: "Songti SC", serif;
  font-size: 13px;
  line-height: 1.5;
}

.practice-card p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.coverage-bars {
  display: grid;
  gap: 12px;
}

.coverage-row {
  display: grid;
  grid-template-columns: 128px 1fr 26px;
  align-items: center;
  gap: 9px;
}

.coverage-row span {
  color: var(--muted);
  font-size: 9px;
}

.coverage-row b {
  font-size: 10px;
  text-align: right;
}

.bar-track {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #e8edeb;
}

.bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.coverage-row:nth-child(2) .bar-track i {
  background: var(--blue);
}

.coverage-row:nth-child(3) .bar-track i {
  background: var(--coral);
}

.coverage-row:nth-child(4) .bar-track i {
  background: var(--amber);
}

.coverage-row:nth-child(5) .bar-track i {
  background: #7a6a4c;
}

.coverage-row:nth-child(6) .bar-track i {
  background: #6f8190;
}

.warning-list {
  display: grid;
  gap: 8px;
}

.warning-item {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-radius: 6px;
  color: #74552a;
  background: var(--amber-pale);
  font-size: 10px;
}

.warning-item svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: 1px;
}

.muted {
  color: var(--muted);
  font-size: 11px;
}

.handoff-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
  padding: 22px 24px;
  border-color: #c7d9d3;
  background: var(--green-pale);
}

.handoff-panel h3 {
  max-width: 760px;
  margin: 0;
  font-family: "Songti SC", serif;
  font-size: 16px;
}

.handoff-note {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
}

.handoff-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.toast {
  position: fixed;
  z-index: 60;
  right: 22px;
  bottom: 22px;
  max-width: min(360px, calc(100vw - 44px));
  padding: 11px 15px;
  border-radius: 6px;
  color: white;
  background: var(--green-dark);
  box-shadow: var(--shadow);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-error {
  background: #7a3428;
}

.drawer-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: none;
  justify-content: flex-end;
  background: rgba(20, 34, 30, 0.34);
  backdrop-filter: blur(3px);
}

.drawer-backdrop.is-visible {
  display: flex;
}

.drawer {
  display: flex;
  flex-direction: column;
  width: min(440px, calc(100vw - 24px));
  height: 100%;
  padding: 24px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: -18px 0 60px rgba(18, 35, 30, 0.16);
  animation: drawer-in 180ms ease both;
}

.wide-drawer {
  width: min(740px, calc(100vw - 24px));
}

@keyframes drawer-in {
  from {
    transform: translateX(20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.drawer-header h2 {
  margin: 0;
  font-family: "Songti SC", serif;
  font-size: 22px;
}

.drawer-close {
  flex: 0 0 auto;
}

.drawer-body {
  padding-top: 18px;
  overflow-y: auto;
}

.evidence-full {
  margin: 0;
  color: var(--ink);
  font-family: "Songti SC", serif;
  font-size: 17px;
  line-height: 1.8;
}

.drawer-note {
  margin-top: 18px;
  padding: 13px;
  border-left: 3px solid var(--amber);
  background: var(--amber-pale);
}

.drawer-note strong {
  color: #6b4d22;
  font-size: 11px;
}

.drawer-note p {
  margin: 4px 0 0;
  color: #775c35;
  font-size: 10px;
}

.drawer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.danger-text {
  color: var(--coral);
}

.version-list {
  display: grid;
  align-content: start;
  gap: 9px;
}

.version-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
}

.version-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.version-card h3 {
  margin: 0;
  font-size: 12px;
}

.version-card time {
  color: var(--faint);
  font-size: 9px;
}

.version-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.version-meta span {
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--muted);
  background: #e9efec;
  font-size: 8px;
}

.version-compare {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.version-card footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 9px;
}

.library-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 15px;
}

.library-filter {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: white;
  font-size: 10px;
  cursor: pointer;
}

.library-filter.is-active {
  color: white;
  border-color: var(--green);
  background: var(--green);
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.library-book {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.library-book:hover {
  border-color: var(--green);
  background: white;
  transform: translateY(-1px);
}

.library-book span {
  color: var(--green);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.library-book h3 {
  margin: 6px 0 3px;
  font-family: "Songti SC", serif;
  font-size: 15px;
}

.library-book p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.loading-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: none;
  background: rgba(20, 34, 30, 0.46);
  backdrop-filter: blur(4px);
  place-items: center;
}

.loading-overlay.is-visible {
  display: grid;
}

.loading-card {
  width: min(340px, calc(100vw - 40px));
  padding: 30px;
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
  text-align: center;
}

.loader {
  display: block;
  width: 36px;
  height: 36px;
  margin: 0 auto 14px;
  border: 2px solid var(--green-pale);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 750ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-card p {
  margin: 0;
  font-weight: 700;
}

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

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 12px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .current-project,
  .sample-library,
  .sidebar-note {
    display: none;
  }

  .step-nav {
    display: flex;
    overflow-x: auto;
  }

  .step-button {
    flex: 1 0 150px;
  }

  .step-button.is-active,
  .step-button.is-active:hover {
    transform: translateY(-2px);
  }

  .setup-grid,
  .qa-grid {
    grid-template-columns: 1fr;
  }

  .setup-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .reading-stage {
    width: min(100%, 390px);
    min-height: 350px;
    margin: 2px auto 0;
  }

  .setup-chain {
    grid-template-columns: repeat(6, minmax(128px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .guide-surface {
    min-height: 520px;
  }

  .script-layout {
    grid-template-columns: 1fr;
  }

  .script-sidebar {
    grid-template-columns: 1fr 1fr;
  }

  .script-sidebar .button {
    grid-column: 1 / -1;
  }
}

.followup-panel {
  margin-top: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.followup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 24px;
}

.followup-composer h3,
.learning-trace-panel h3 {
  margin: 0;
  font-family: "Songti SC", serif;
  font-size: 20px;
}

.followup-composer > p:not(.eyebrow),
.learning-trace-panel > p:not(.eyebrow) {
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.followup-composer > textarea,
.learning-trace-panel textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  outline: 0;
  background: var(--soft);
  color: var(--ink);
  line-height: 1.6;
  resize: vertical;
}

.followup-composer > textarea:focus,
.learning-trace-panel textarea:focus {
  border-color: var(--green);
  background: white;
  box-shadow: 0 0 0 3px rgba(36, 94, 84, 0.09);
}

.followup-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 9px;
}

.followup-classification {
  margin-top: 14px;
  padding: 15px;
  border: 1px solid #c7d9d3;
  border-radius: 6px;
  background: var(--green-pale);
}

.classification-summary {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 12px;
}

.classification-summary p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.classification-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.classification-controls .field {
  margin-bottom: 6px;
}

.followup-classification small {
  display: block;
  margin: 2px 0 12px;
  color: var(--muted);
  font-size: 9px;
}

.learning-trace-panel {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.learning-trace-panel .field {
  margin-bottom: 11px;
}

.learning-trace-panel .field > span {
  font-size: 10px;
}

.followup-history {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.followup-record {
  padding: 9px 10px;
  border-radius: 5px;
  background: var(--soft);
}

.followup-record b {
  display: inline-flex;
  margin-bottom: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-pale);
  font-size: 8px;
}

.followup-record p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

@media (max-width: 980px) {
  .followup-grid {
    grid-template-columns: 1fr;
  }

  .learning-trace-panel {
    padding-top: 20px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 680px) {
  .intro-controls {
    right: 20px;
    bottom: max(24px, env(safe-area-inset-bottom));
    left: 20px;
    transform: none;
  }

  .intro-enter {
    width: 100%;
    min-width: 0;
  }

  .intro-sound {
    top: max(18px, env(safe-area-inset-top));
    right: 18px;
    width: 40px;
    min-height: 40px;
    padding: 0;
  }

  .intro-sound span {
    display: none;
  }

  .topbar {
    min-height: 64px;
    padding: 0 14px;
  }

  .brand small,
  .engine-chip {
    display: none;
  }

  .app-shell {
    min-height: calc(100vh - 64px);
  }

  .sidebar {
    top: 64px;
    padding: 8px 12px;
  }

  .step-button {
    grid-template-columns: 28px 1fr;
    flex-basis: 124px;
  }

  .step-icon {
    width: 28px;
    height: 28px;
  }

  .step-button b,
  .step-status {
    display: none;
  }

  .main-content {
    padding: 24px 14px 40px;
  }

  .screen-header {
    display: block;
  }

  .hero-title {
    font-size: clamp(38px, 11vw, 50px) !important;
  }

  .reading-stage {
    min-height: 310px;
  }

  .book-object {
    width: 282px;
    min-height: 300px;
    transform: rotateY(-5deg) rotateZ(-0.8deg);
  }

  .book-page {
    min-height: 300px;
    padding: 21px 20px 16px 30px;
  }

  .mode-label,
  .header-actions {
    margin-top: 14px;
  }

  .header-actions {
    flex-wrap: wrap;
  }

  .field-row,
  .summary-grid,
  .outline-support-grid,
  .qa-bottom-grid,
  .role-protocol-grid,
  .task-debate-grid,
  .teacher-columns {
    grid-template-columns: 1fr;
  }

  .deliverable-tabs {
    overflow-x: auto;
  }

  .deliverable-tab {
    flex: 0 0 auto;
    min-width: 108px;
    padding: 0 12px;
  }

  .task-sheet,
  .teacher-sheet {
    padding: 20px 16px;
  }

  .rubric-table {
    display: block;
    overflow-x: auto;
  }

  .mode-banner {
    grid-template-columns: 36px 1fr;
  }

  .mode-reason {
    grid-column: 1 / -1;
    padding: 12px 0 0;
    border-top: 1px solid #c7d9d3;
    border-left: 0;
  }

  .form-actions {
    flex-direction: column;
  }

  .advanced-settings summary small {
    display: none;
  }

  .question-row {
    grid-template-columns: 30px 64px minmax(0, 1fr) 28px;
    gap: 6px;
  }

  .script-sidebar {
    grid-template-columns: 1fr;
  }

  .practice-grid,
  .library-grid {
    grid-template-columns: 1fr;
  }

  .score-panel,
  .handoff-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .handoff-panel .button {
    width: 100%;
  }

  .handoff-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }
}
