:root {
  --green: #006241;
  --green-ink: #003d29;
  --green-soft: #e4f1eb;
  --green-selected: #d4eee3;
  --green-line: rgba(0, 98, 65, 0.18);
  --paper: #eef3ef;
  --sheet: #fffcf7;
  --ink: #14241c;
  --muted: #5d6e66;
  --gold: #b58b2a;
  --gold-bg: #f4ead0;
  --rubric-task: #6d28d9;
  --rubric-task-ink: #4c1d95;
  --rubric-task-bg: rgba(109, 40, 217, 0.12);
  --rubric-org: #1d4ed8;
  --rubric-org-ink: #1e3a8a;
  --rubric-org-bg: rgba(29, 78, 216, 0.12);
  --rubric-dev: #b58b2a;
  --rubric-dev-ink: #8a6508;
  --rubric-dev-bg: #f4ead0;
  --rubric-lang: #c62828;
  --rubric-lang-ink: #8a1f1f;
  --rubric-lang-bg: #fde8e8;
  --danger: #7a3333;
  --rail: #f7faf7;
  --radius: 16px;
  --shadow: 0 12px 32px rgba(20, 36, 28, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: Outfit, system-ui, sans-serif;
}

.dash {
  position: relative;
  display: grid;
  grid-template-columns: 272px 1fr;
  height: 100%;
  overflow: hidden;
  transition: grid-template-columns 0.22s ease;
}

.rail {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 16px;
  background: var(--rail);
  border-right: 1px solid var(--green-line);
  min-height: 0;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 44px;
}

.brand-copy {
  min-width: 0;
  flex: 1;
}

.icon-btn.rail-collapse {
  display: inline-flex;
  width: 36px;
  height: 36px;
  margin-left: auto;
  flex-shrink: 0;
  background: transparent;
}

.rail-collapse:hover,
.rail-collapse.is-on {
  background: var(--green-soft);
}

html.rail-collapsed .rail-collapse .nav-icon {
  transform: scaleX(-1);
}

.brand-mark {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: transparent;
  flex-shrink: 0;
  display: block;
}

.brand-kicker {
  margin: 0;
  letter-spacing: 0.22em;
  font-size: 10px;
  font-weight: 600;
  color: var(--green);
}

.brand h1 {
  margin: 2px 0 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 22px;
  font-weight: 400;
}

.new-session {
  width: 100%;
  margin-top: 10px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nav {
  display: grid;
  gap: 4px;
  overflow: auto;
  flex: 1;
  min-height: 0;
  align-content: start;
}

.nav-group-label {
  margin: 14px 4px 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-group-label:first-child {
  margin-top: 0;
}

.nav-group-label[hidden] {
  display: none;
}

.nav-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 9px 14px;
  border-radius: 12px;
  font: 600 14px Outfit, sans-serif;
  cursor: pointer;
  gap: 8px;
}

.nav-btn[hidden] {
  display: none;
}

.nav-lead {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.nav-btn:active:not(:disabled):not(.is-on) {
  background: var(--green-selected);
}

.nav-btn:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.nav-btn:disabled {
  cursor: not-allowed;
}

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

.nav-btn.is-on {
  background: var(--green-selected);
  color: var(--green-ink);
  border: 0;
  border-right: 3px solid var(--green);
  border-radius: 12px 0 0 12px;
  margin-right: -16px;
  padding-right: 13px;
  box-shadow: none;
}

.nav-btn.is-on:hover {
  background: #c7e6d8;
  border-color: var(--green);
}

.nav-btn.is-on:active:not(:disabled) {
  background: #b7dccb;
}

.nav-btn.is-on .count-pill {
  background: #fff;
  color: var(--green);
}

.nav-btn.is-scoring .count-pill {
  display: none !important;
}

.analyze-queue {
  margin: 0;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--green-ink);
}

.analyze-background {
  align-self: center;
}

.analyze-overlay-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.btn-linear-danger,
.analyze-stop {
  color: var(--danger);
  border-color: rgba(122, 51, 51, 0.35);
  background: transparent;
}

.btn-linear-danger:hover,
.analyze-stop:hover {
  background: #fde8e8;
  color: var(--danger);
}

.btn-linear-danger:active:not(:disabled),
.analyze-stop:active:not(:disabled) {
  background: #f8d0d0;
}

.btn-linear-danger:focus-visible,
.analyze-stop:focus-visible {
  outline: 2px solid var(--danger);
  outline-offset: 2px;
}

.btn-linear-danger:disabled,
.analyze-stop:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.draft-scoring-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.session-stop {
  color: var(--danger);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  background: none;
  border: 0;
  cursor: pointer;
}

.draft-scoring-bar {
  flex: 0 0 auto;
  margin: 12px 22px 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1e1b4b;
  font-size: 13.5px;
  font-weight: 500;
  filter:
    drop-shadow(0 8px 18px rgba(37, 99, 235, 0.16))
    drop-shadow(0 2px 12px rgba(139, 92, 246, 0.19));
}

.draft-scoring-frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 2px;
  border-radius: 14px;
  background: linear-gradient(120deg, #2563eb, #7c3aed 55%, #4f46e5);
}

.draft-scoring-frame::before,
.draft-scoring-frame::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.draft-scoring-frame::before {
  inset: -45%;
  background: conic-gradient(
    from 0deg,
    #1d4ed8,
    #60a5fa 18%,
    #7c3aed 40%,
    #e9d5ff 52%,
    #38bdf8 68%,
    #a855f7 84%,
    #1d4ed8
  );
  animation: score-border-spin 2.05s linear infinite;
}

.draft-scoring-frame::after {
  inset: -50%;
  background: conic-gradient(
    from 0deg,
    transparent 0 74%,
    rgba(147, 197, 253, 0) 78%,
    #bfdbfe 86%,
    #fff 90%,
    #ddd6fe 94%,
    transparent 100%
  );
  filter: blur(8px);
  opacity: 0.95;
  animation: score-border-spin 1.55s linear infinite;
}

.draft-scoring-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 14px;
  border-radius: 12px;
  background: linear-gradient(115deg, #dbeafe 0%, #c7d2fe 38%, #ede9fe 72%, #ddd6fe 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    0 8px 20px rgba(79, 70, 229, 0.12);
}

.draft-scoring-copy {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.draft-scoring-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: radial-gradient(circle at 35% 30%, #93c5fd, #6366f1 70%);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.55);
  animation: score-pulse 2.2s ease-out infinite;
}

#draft-scoring-text {
  min-width: 0;
}

.draft-scoring-bar .ghost {
  color: #312e81;
  border-color: rgba(99, 102, 241, 0.22);
  background: rgba(255, 255, 255, 0.55);
}

.draft-scoring-bar .ghost:hover {
  background: rgba(255, 255, 255, 0.78);
}

.draft-scoring-bar .analyze-stop {
  color: var(--danger);
  border-color: rgba(122, 51, 51, 0.28);
}

.draft-scoring-bar[hidden] {
  display: none !important;
}

@keyframes score-border-spin {
  to {
    transform: rotate(1turn);
  }
}

@keyframes score-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.42);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 9px rgba(99, 102, 241, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .draft-scoring-frame::before,
  .draft-scoring-frame::after,
  .draft-scoring-pulse {
    animation: none;
  }
  .draft-scoring-bar {
    filter:
      drop-shadow(0 6px 14px rgba(37, 99, 235, 0.11))
      drop-shadow(0 2px 10px rgba(139, 92, 246, 0.12));
  }
  .draft-scoring-frame::before,
  .draft-scoring-frame::after {
    display: none;
  }
  .draft-scoring-inner {
    box-shadow: none;
    background: linear-gradient(115deg, #dbeafe, #ede9fe);
  }
}

.essay-mock-card.is-scoring .session-card-kicker {
  color: var(--green);
  font-weight: 600;
}

.count-pill {
  display: inline-block;
  min-width: 1.4em;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  flex-shrink: 0;
}

.count-pill[hidden],
.nav-scoring[hidden] {
  display: none !important;
}

.nav-scoring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 1.6em;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--green);
  flex-shrink: 0;
}

.nav-scoring span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  animation: navScorePulse 0.85s ease-in-out infinite;
}

.nav-scoring span:nth-child(2) {
  animation-delay: 0.14s;
}

.nav-scoring span:nth-child(3) {
  animation-delay: 0.28s;
}

.nav-btn.is-on .nav-scoring {
  background: var(--green);
}

@keyframes navScorePulse {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0) scale(0.9);
  }
  40% {
    opacity: 1;
    transform: translateY(-2px) scale(1);
  }
}

.rail-block {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.rail-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.rail-label .nav-icon {
  width: 14px;
  height: 14px;
}

.session-scroll,
.vocab-scroll,
.essay-view,
.rewrite-view,
.scroll-pane,
#essay,
.prompt-panel textarea {
  overflow: auto;
}

.session-scroll,
.vocab-scroll {
  flex: 1;
  min-height: 0;
}

.session-scroll {
  perspective: 900px;
}

.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 76px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--green-line);
  background: var(--sheet);
}

.assign-skill-table td.is-click {
  cursor: pointer;
}

.assign-replay-block {
  display: grid;
  gap: 12px;
}

.assign-replay-prompt,
.assign-replay-essay,
.assign-replay-note {
  margin: 0;
  white-space: pre-wrap;
}

.assign-replay-essay {
  padding: 12px 14px;
  border: 1px solid var(--green-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--sheet) 88%, white);
}

.assign-replay-q {
  display: grid;
  gap: 6px;
  padding: 12px 0;
  border-top: 1px solid var(--green-line);
}

.assign-replay-q:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
}

.top-title {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 20px;
}

.title-block {
  min-width: 0;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.icon-btn.nav-toggle,
.icon-btn.lookup-toggle,
.nav-scrim {
  display: none;
}

.nav-scrim[hidden] {
  display: none !important;
}

.page-back {
  flex-shrink: 0;
  padding: 5px 12px;
  font-size: 13px;
}

.page-back:hover:not(:disabled) {
  background: var(--green-soft);
}

.page-back:active:not(:disabled) {
  background: var(--green-selected);
}

.page-back:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-back[hidden],
.test-quit[hidden] {
  display: none !important;
}

.test-quit {
  flex-shrink: 0;
  padding: 5px 12px;
  font-size: 13px;
}

.icon-btn[hidden] {
  display: none !important;
}

.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--green-soft);
  color: var(--green-ink);
  cursor: pointer;
}

.icon-btn:hover,
.icon-btn.is-on {
  background: var(--green-selected);
}

.icon-btn:active:not(:disabled) {
  background: #c7e6d8;
}

.icon-btn:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.icon-btn .count-pill {
  position: absolute;
  top: 4px;
  right: 2px;
}

.icon-btn .nav-icon {
  width: 18px;
  height: 18px;
}

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-lookup {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-lookup-field {
  position: relative;
  display: block;
}

.top-lookup-field::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  border: 1.75px solid var(--green);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.7;
}

.top-lookup-field::after {
  content: "";
  position: absolute;
  left: 28px;
  top: calc(50% + 5px);
  width: 6px;
  height: 1.75px;
  background: var(--green);
  border-radius: 2px;
  transform: rotate(45deg);
  pointer-events: none;
  opacity: 0.7;
}

.top-lookup input {
  width: 200px;
  border: 0;
  border-radius: 999px;
  padding: 11px 18px 11px 42px;
  font: 400 14px Outfit, system-ui, sans-serif;
  background: var(--green-soft);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.top-lookup input::placeholder {
  color: #7a8f86;
}

.top-lookup input:hover {
  background: #dceee5;
}

.top-lookup input:focus {
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 98, 65, 0.16), 0 8px 20px rgba(0, 98, 65, 0.08);
}

.score-chip {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--green);
}

.score-chip strong {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 52px;
  line-height: 0.9;
  letter-spacing: -0.03em;
}

.score-chip span {
  font-size: 16px;
  color: var(--muted);
}

.score-to {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: var(--green-ink);
}

.score-to .score-arrow {
  font-size: 22px;
  color: var(--green);
}

.score-to strong {
  font-size: 36px;
  color: var(--green-ink);
}

.rewrite-meter {
  height: 6px;
  margin: 0 0 10px;
  background: #fff;
  border: 1px solid var(--green-line);
  border-radius: 99px;
  overflow: hidden;
}

.rewrite-meter-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--green);
  transition: width 0.45s ease;
}

.view {
  display: none;
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding: 16px;
}

.view.is-active {
  display: flex;
  flex-direction: column;
  animation: rise 0.35s ease;
}

.coming-soon:not([hidden]) {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 48px 28px;
  text-align: center;
}

.coming-soon h2 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 32px;
  font-weight: 400;
  color: var(--green-ink);
}

.coming-soon p {
  margin: 0;
  max-width: 420px;
  color: var(--muted);
  line-height: 1.55;
}

#view-compose.is-active {
  overflow: hidden;
}

.essay-flow {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.essay-phase {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  transition: transform 0.48s cubic-bezier(0.22, 1, 0.32, 1), opacity 0.36s ease;
}

.essay-phase[data-phase="draft"] {
  transform: translateX(0);
  opacity: 1;
}

.essay-phase[data-phase="review"] {
  transform: translateX(18%);
  opacity: 0;
  pointer-events: none;
}

#view-compose.is-review .essay-phase[data-phase="draft"] {
  transform: translateX(-12%);
  opacity: 0;
  pointer-events: none;
}

#view-compose.is-review .essay-phase[data-phase="review"] {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

#view-review.is-active {
  overflow: hidden;
}

.compose-grid,
.review-grid,
.words-grid {
  display: grid;
  gap: 14px;
  width: 100%;
  min-height: 0;
  flex: 1;
}

.compose-grid {
  grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.4fr);
}

.review-grid {
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.38fr) minmax(268px, 0.85fr);
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
}

.review-grid > .panel {
  min-height: 0;
  overflow: hidden;
}

.review-grid > .metrics-panel {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.draft-read .essay-view {
  min-height: 0;
  height: auto;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.essay-view,
.rewrite-view {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: #fff;
  border: 1px solid var(--green-line);
  border-radius: 12px;
  padding: 16px;
  line-height: 1.7;
  font-size: 15.5px;
  white-space: pre-wrap;
}

.metrics-panel {
  min-height: 0;
}

.metrics-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.metrics-kicker[hidden],
.trait-notes[hidden] {
  display: none !important;
}

.metrics-overall {
  background: #fff;
  border: 1px solid var(--green-line);
  border-radius: 14px;
  padding: 12px 14px 14px;
  margin-bottom: 16px;
}

.metrics-overall .score-chip {
  margin-bottom: 8px;
}

.metrics-panel.is-ielts .score-chip strong {
  font-size: 44px;
}

.metrics-overall .score-band {
  display: inline-flex;
  text-transform: none;
  letter-spacing: 0;
  background: var(--green-soft);
  color: var(--green);
  border-radius: 999px;
  padding: 3px 9px;
  margin-bottom: 8px;
}

.metrics-overall .score-blurb {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
}

.metrics-panel.is-ielts .score-focus,
#score-focus {
  display: none !important;
}

.metrics-panel.is-ielts .rubric,
.metrics-panel.has-abbrev-traits .rubric {
  gap: 8px;
  margin: 0 0 16px;
}

.metrics-panel.is-ielts .rubric li,
.metrics-panel.has-abbrev-traits .rubric li {
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.metrics-panel.is-ielts .rubric li span:first-child,
.metrics-panel.has-abbrev-traits .rubric li span:first-child {
  line-height: 1.25;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.trait-notes {
  display: grid;
  gap: 10px;
}

.trait-card {
  background: #fff;
  border: 1px solid var(--green-line);
  border-left-width: 3px;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}

.trait-card-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 6px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  color: inherit;
  font: inherit;
  pointer-events: none;
}

.trait-card-head span {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--green-ink);
  line-height: 1.35;
}

.trait-card-head strong {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--green);
  line-height: 1;
  margin-left: auto;
}

.trait-card-chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 3px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.16s ease;
}

.trait-card.is-open .trait-card-chevron {
  transform: rotate(90deg);
}

.trait-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
}

.trait-card p[hidden] {
  display: none !important;
}

.trait-card:not(.is-open) .trait-card-preview {
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trait-card-task {
  border-left-color: var(--rubric-task);
}

.trait-card-org {
  border-left-color: var(--rubric-org);
}

.trait-card-dev {
  border-left-color: var(--rubric-dev);
}

.trait-card-lang {
  border-left-color: var(--rubric-lang);
}

.trait-card.is-hot {
  box-shadow: inset 0 0 0 1px var(--green);
}

.words-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
}

.panel {
  background: var(--sheet);
  border: 1px solid var(--green-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.card-wash,
.student-slide-profile,
.admin-stack > .panel:only-of-type,
.vocab-hub > .panel:first-child,
.home-grid > .panel:not(.welcome-card):not(.home-feature):not(.cap-panel),
.home-main > .panel,
.review-grid > .panel:first-child,
.words-grid > .panel:first-child {
  background:
    radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--green-soft) 72%, transparent) 0%, transparent 58%),
    var(--sheet);
}

.panel.draft-read {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

h2,
h3 {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.ghost.is-on {
  background: var(--green-selected);
  border-color: var(--green);
  color: var(--green-ink);
}

.draft-tools {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.draft-tools-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.highlight-legend {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
}

.highlight-legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  flex: 0 0 auto;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-dot.legend-task {
  background: var(--rubric-task);
}

.legend-dot.legend-org {
  background: var(--rubric-org);
}

.legend-dot.legend-dev {
  background: var(--rubric-dev);
}

.legend-dot.legend-lang {
  background: var(--rubric-lang);
}

#highlight-hint {
  margin: 0;
  font-size: 12px;
}

.highlight-toggles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  flex-shrink: 0;
}

.highlight-toggles .ghost {
  font-size: 12px;
  padding: 6px 10px;
}

.draft-file-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 4px;
}

.mini-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 11px Outfit, sans-serif;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.switch {
  width: 28px;
  height: 16px;
  border: 0;
  padding: 0;
  border-radius: 999px;
  background: #cdd6d1;
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  vertical-align: middle;
}

.switch.is-on {
  background: var(--green);
}

.switch:hover:not(:disabled):not(.is-on) {
  background: #c0cac5;
}

.switch.is-on:hover:not(:disabled) {
  background: var(--green-ink);
}

.switch:active:not(:disabled) {
  filter: brightness(0.92);
}

.switch:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

.switch:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 36, 28, 0.22);
  transition: transform 0.18s ease;
  pointer-events: none;
}

.switch.is-on .switch-knob {
  transform: translateX(12px);
}

.ui-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--green-line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--green-soft) 42%, var(--sheet));
}

.ui-switch-row > span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.ui-switch-row > span > span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.ui-switch-row .session-meta {
  margin: 0;
}

.ui-switch-row .switch {
  width: 40px;
  height: 22px;
}

.ui-switch-row .switch-knob {
  width: 18px;
  height: 18px;
}

.ui-switch-row .switch.is-on .switch-knob {
  transform: translateX(18px);
}

.essay-view.hide-fill .mark,
.essay-view.hide-fill .mark.is-active {
  background: transparent !important;
}

.essay-view.hide-line .mark,
.essay-view.hide-line .mark.is-active {
  border-bottom-color: transparent !important;
  box-shadow: none !important;
}

.essay-view.hide-fill.hide-line .mark-deduct {
  display: none;
}

.essay-view.hide-fill.hide-line .mark.is-active {
  outline: 2px solid var(--green);
  outline-offset: 1px;
  color: inherit;
}

.session-pdf {
  color: var(--green);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  background: none;
  border: 0;
  cursor: pointer;
}

.panel-title p,
.score-blurb,
.meta,
.hint,
.empty-state p {
  color: var(--muted);
  margin: 0;
}

.field-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 8px;
}

textarea,
.lookup-form input {
  width: 100%;
  border: 1px solid var(--green-line);
  border-radius: 12px;
  padding: 12px 14px;
  font: 400 15px/1.55 Outfit, system-ui, sans-serif;
  background: #fff;
  color: var(--ink);
}

textarea:focus,
.lookup-form input:focus {
  outline: 2px solid var(--green);
}

.draft-panel textarea,
.prompt-panel textarea {
  flex: 1;
  resize: none;
}

#phase-draft.is-analyzing #essay,
#phase-draft.is-analyzing #prompt {
  background: #e8eeea;
  color: var(--muted);
  cursor: not-allowed;
  opacity: 1;
}

#phase-draft.is-analyzing .essay-task-tab,
#phase-draft.is-analyzing .prompt-gen-fab,
#phase-draft.is-analyzing .dropzone,
#phase-draft.is-analyzing .essay-chart-drop,
#phase-draft.is-analyzing .essay-chart-types,
#phase-draft.is-analyzing #browse,
#phase-draft.is-analyzing .essay-import-notes {
  pointer-events: none;
  opacity: 0.55;
}

#phase-draft.is-analyzing .essay-import-notes textarea {
  background: #e8eeea;
  color: var(--muted);
  cursor: not-allowed;
}

#analyze.is-scoring:disabled {
  opacity: 1;
  cursor: wait;
}

#analyze.is-scoring .nav-scoring {
  background: transparent;
  min-width: 0;
  height: auto;
  padding: 0;
  gap: 4px;
}

#analyze.is-scoring .nav-scoring span {
  width: 5px;
  height: 5px;
  background: #fff;
}

.draft-body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.draft-body textarea {
  flex: 1;
  min-height: 0;
  width: 100%;
}

.draft-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(255, 252, 247, 0.84);
  backdrop-filter: blur(3px);
  border-radius: 12px;
  z-index: 2;
}

.draft-overlay[hidden] {
  display: none;
}

.draft-overlay-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 22em;
  text-align: center;
}

.draft-overlay-card.is-progress {
  max-width: 28em;
  width: min(100%, 28em);
  align-items: stretch;
  text-align: left;
  max-height: 100%;
  overflow: auto;
}

.draft-overlay-card.is-progress .draft-overlay-spinner {
  align-self: center;
}

.draft-overlay-card.is-progress #analyze-overlay-text,
.draft-overlay-card.is-progress #analyze-overlay-text-zh,
.draft-overlay-card.is-progress #speaking-score-text,
.draft-overlay-card.is-progress #speaking-score-text-zh {
  text-align: center;
}

.analyze-scene {
  position: relative;
  height: 88px;
  margin: 0 auto 4px;
}

.analyze-illust {
  display: none;
  width: 160px;
  height: 88px;
  margin: 0 auto;
}

.analyze-scene[data-stage="connecting"] .analyze-illust[data-for="connecting"],
.analyze-scene[data-stage="reading"] .analyze-illust[data-for="reading"],
.analyze-scene[data-stage="scoring"] .analyze-illust[data-for="scoring"],
.analyze-scene[data-stage="marks"] .analyze-illust[data-for="marks"] {
  display: block;
}

.analyze-illust .scene-sheet {
  stroke: var(--green);
  stroke-width: 2;
  fill: #fff;
}

.analyze-illust .scene-line,
.analyze-illust .scene-arc {
  stroke: var(--green-line);
  stroke-width: 2;
  stroke-linecap: round;
}

.analyze-illust .scene-dot,
.analyze-illust .scene-pen {
  fill: var(--green);
}

.analyze-illust .scene-dot-a { animation: scene-pulse 1.2s ease-in-out infinite; }
.analyze-illust .scene-dot-b { animation: scene-pulse 1.2s ease-in-out 0.15s infinite; }
.analyze-illust .scene-dot-c { animation: scene-pulse 1.2s ease-in-out 0.3s infinite; }

.analyze-illust .scene-scan {
  fill: var(--green-soft);
  animation: scene-scan 1.8s ease-in-out infinite;
}

.analyze-illust .scene-bar {
  fill: var(--green);
  transform-box: fill-box;
  transform-origin: left center;
  animation: scene-bar 1.6s ease-in-out infinite;
}

.analyze-illust .scene-bar-2 { animation-delay: 0.15s; }
.analyze-illust .scene-bar-3 { animation-delay: 0.3s; }

.analyze-illust .scene-mark {
  fill: var(--gold-bg);
  stroke: var(--gold);
  stroke-width: 1.5;
  animation: scene-mark 1.4s ease-in-out infinite;
}

.analyze-illust .scene-pen {
  animation: scene-pen 1.4s ease-in-out infinite;
}

@keyframes scene-pulse {
  0%, 100% { opacity: 0.35; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

@keyframes scene-scan {
  0% { transform: translateY(0); opacity: 0.35; }
  50% { transform: translateY(28px); opacity: 0.9; }
  100% { transform: translateY(0); opacity: 0.35; }
}

@keyframes scene-bar {
  0%, 100% { transform: scaleX(0.45); opacity: 0.55; }
  50% { transform: scaleX(1); opacity: 1; }
}

@keyframes scene-mark {
  0%, 100% { transform: scaleX(0.4); opacity: 0.5; }
  50% { transform: scaleX(1); opacity: 1; }
}

@keyframes scene-pen {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-10px, 2px); }
}

.analyze-elapsed,
.analyze-meta,
.analyze-wait-hint {
  margin: 0;
  text-align: center;
  font: 500 12px/1.4 Outfit, sans-serif;
  color: var(--muted);
}

.analyze-wait-hint {
  line-height: 1.45;
  max-width: 28em;
  margin: 0 auto;
}

.analyze-stages {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.analyze-stages li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font: 500 13px/1.4 Outfit, sans-serif;
  color: var(--muted);
}

.analyze-stages li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-line);
  flex-shrink: 0;
}

.analyze-stages li.is-on {
  color: var(--green-ink);
  font-weight: 600;
}

.analyze-stages li.is-on::before {
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
  animation: stage-dot 1s ease-in-out infinite;
}

.analyze-stages li.is-done {
  color: var(--green-ink);
}

.analyze-stages li.is-done::before {
  background: var(--green);
}

@keyframes stage-dot {
  0%, 100% { box-shadow: 0 0 0 3px var(--green-soft); }
  50% { box-shadow: 0 0 0 5px var(--green-selected); }
}

.analyze-live {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.analyze-live-kicker {
  margin: 4px 0 0;
  font: 600 11px/1.3 Outfit, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.analyze-live-parts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.analyze-live-parts li {
  margin: 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--green-line);
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.analyze-live-parts li.is-wait strong {
  color: var(--muted);
  font-weight: 500;
}

.analyze-live-parts li.is-in {
  animation: live-in 0.35s ease-out;
}

.analyze-live-parts li.is-fill strong {
  color: var(--green);
  display: inline-block;
  animation: trait-tick 0.45s ease-in-out infinite;
}

.analyze-live-parts strong {
  font-weight: 600;
  color: var(--green-ink);
  font-variant-numeric: tabular-nums;
}

@keyframes trait-tick {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@keyframes live-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.draft-overlay-card p {
  margin: 0;
  font: 600 15px/1.5 Outfit, sans-serif;
  color: var(--green-ink);
}

.draft-overlay-card p + p {
  font-weight: 500;
  font-size: 14px;
  color: var(--muted);
}

.draft-overlay-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--green-soft);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: overlay-spin 0.8s linear infinite;
}

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

.draft-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.draft-action-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.dropzone {
  margin: 12px 0;
  padding: 16px 20px;
  border: 1px dashed rgba(0, 98, 65, 0.35);
  border-radius: 12px;
  text-align: center;
  color: var(--muted);
  background: var(--green-soft);
  font-size: 13px;
}

.dropzone p {
  margin: 0;
  padding: 2px 4px;
}

.dropzone.is-hot {
  border-color: var(--green);
}

.linkish,
.ghost,
.primary,
.danger-link,
.nav-btn {
  font-family: inherit;
  cursor: pointer;
}

.linkish {
  border: 0;
  background: none;
  color: var(--green);
  font-weight: 600;
  padding: 0;
}

.danger-link {
  color: var(--danger);
  font: inherit;
  font-size: 12px;
  background: none;
  border: 0;
}

.danger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
}

.danger-icon:hover {
  background: rgba(122, 51, 51, 0.1);
}

.danger-icon .nav-icon {
  width: 15px;
  height: 15px;
}

.primary,
.ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.18s ease, background 0.18s ease;
}

.primary[hidden],
.ghost[hidden] {
  display: none;
}

.btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.primary {
  border: 0;
  background: var(--green);
  color: #fff;
}

.primary:hover {
  background: var(--green-ink);
  transform: translateY(-1px);
}

.primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.primary:disabled:hover {
  background: var(--green);
  transform: none;
}

.primary.is-busy,
.primary.is-busy:disabled,
.primary.is-busy:disabled:hover {
  opacity: 0.88;
  cursor: wait;
  background: var(--green);
  transform: none;
}

.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: currentColor;
  border-radius: 50%;
  flex-shrink: 0;
  animation: overlay-spin 0.7s linear infinite;
}

.primary.is-busy .btn-spinner {
  display: inline-block;
}

.ghost.is-busy .btn-spinner {
  display: inline-block;
  border-color: rgba(0, 98, 65, 0.22);
  border-top-color: var(--green);
}

.ghost.is-busy,
.ghost.is-busy:disabled,
.ghost.is-busy:disabled:hover {
  opacity: 0.88;
  cursor: wait;
}

.speak-analyze-wait {
  display: inline-flex;
  cursor: wait;
}

.ghost {
  border: 1px solid var(--green-line);
  background: transparent;
  color: var(--green);
}

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

.primary:active:not(:disabled) {
  background: #00291c;
  transform: none;
}

.primary:focus-visible {
  outline: 2px solid var(--green-ink);
  outline-offset: 2px;
}

.ghost:active:not(:disabled) {
  background: var(--green-selected);
}

.ghost:focus-visible,
.page-back:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.ghost:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: transparent;
  transform: none;
}

.linkish:hover,
.danger-link:hover {
  text-decoration: underline;
}

.linkish:active,
.danger-link:active {
  opacity: 0.72;
}

.linkish:focus-visible,
.danger-link:focus-visible,
.danger-icon:focus-visible,
.danger-btn:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.linkish:disabled,
.danger-link:disabled,
.danger-icon:disabled,
.danger-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: none;
}

.danger-icon:active:not(:disabled) {
  background: rgba(122, 51, 51, 0.18);
}

.danger-btn:hover:not(:disabled) {
  background: #fde8e8;
}

.danger-btn:active:not(:disabled) {
  background: #f8d0d0;
}

.score-project {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green-ink);
}

.score-focus {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--green-ink);
  background: #fff;
  border: 1px solid var(--green);
  border-radius: 10px;
  padding: 8px 10px;
}

.rubric li.is-hot span:first-child {
  color: var(--green);
  font-weight: 600;
}

.bar {
  position: relative;
}

.bar > .bar-project {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: rgba(0, 98, 65, 0.28);
  width: 0;
  transition: width 0.45s ease;
}

.score-band {
  margin: 0 0 8px;
  color: var(--green);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
}

.score-blurb {
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 12px;
  color: var(--muted);
}

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

.rubric li {
  display: grid;
  grid-template-columns: minmax(0, 88px) minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
  font-size: 12px;
}

.rubric-comment {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  font-weight: 400;
}

.bar {
  height: 6px;
  background: var(--green-soft);
  border-radius: 99px;
  overflow: hidden;
}

.bar > .bar-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--green);
  position: relative;
  z-index: 1;
  transition: width 0.6s ease;
}

.mark {
  position: relative;
  background: var(--rubric-lang-bg);
  border-bottom: 2px solid var(--rubric-lang);
  cursor: pointer;
  border-radius: 3px;
  animation: glowIn 0.45s ease both;
}

.mark-deduct {
  user-select: none;
  pointer-events: none;
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--rubric-lang);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: super;
  line-height: 1.6;
}

.mark-sentence .mark {
  background: var(--rubric-lang-bg);
  border-bottom-color: var(--rubric-lang);
}

.mark-task {
  background: var(--rubric-task-bg);
  border-bottom-color: var(--rubric-task);
}

.mark-task .mark-deduct {
  background: var(--rubric-task);
}

.mark-org,
.mark-organization {
  background: var(--rubric-org-bg);
  border-bottom-color: var(--rubric-org);
}

.mark-org .mark-deduct,
.mark-organization .mark-deduct {
  background: var(--rubric-org);
}

.mark-dev,
.mark-development {
  background: var(--rubric-dev-bg);
  border-bottom-color: var(--rubric-dev);
  border-bottom-style: dashed;
}

.mark-dev .mark-deduct,
.mark-development .mark-deduct {
  background: var(--rubric-dev);
}

.mark-lang,
.mark-grammar,
.mark-wording,
.mark-paraphrase,
.mark-structure,
.mark-native,
.mark-mechanics {
  background: var(--rubric-lang-bg);
  border-bottom-color: var(--rubric-lang);
}

.mark-lang .mark-deduct,
.mark-grammar .mark-deduct,
.mark-wording .mark-deduct,
.mark-paraphrase .mark-deduct,
.mark-structure .mark-deduct,
.mark-native .mark-deduct,
.mark-mechanics .mark-deduct {
  background: var(--rubric-lang);
}

.mark.is-active {
  box-shadow: 0 0 0 2px currentColor;
}

.mark-task.is-active {
  background: rgba(109, 40, 217, 0.22);
  border-bottom-color: var(--rubric-task);
  color: var(--rubric-task);
}

.mark-org.is-active,
.mark-organization.is-active {
  background: rgba(29, 78, 216, 0.22);
  border-bottom-color: var(--rubric-org);
  color: var(--rubric-org);
}

.mark-dev.is-active,
.mark-development.is-active {
  background: #efe0b0;
  border-bottom-color: var(--rubric-dev);
  color: var(--rubric-dev-ink);
}

.mark-lang.is-active,
.mark-grammar.is-active,
.mark-wording.is-active,
.mark-paraphrase.is-active,
.mark-structure.is-active,
.mark-native.is-active,
.mark-mechanics.is-active {
  background: #f8cfcf;
  border-bottom-color: var(--rubric-lang);
  color: var(--rubric-lang-ink);
}

.rewrite-change.is-active {
  background: var(--green-soft);
  border-bottom-color: var(--green);
}

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

.suggestions .scroll-pane {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.issue-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}

.issue-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--green-line);
  background: #fff;
  color: var(--ink);
  font: 600 11px Outfit, sans-serif;
  padding: 5px 8px;
  border-radius: 999px;
  cursor: pointer;
}

.issue-chip-trait {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.issue-chip-sev {
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.02em;
}

.issue-chip.is-must .issue-chip-sev,
.issue-sev.is-must {
  background: rgba(198, 40, 40, 0.12);
  color: #b71c1c;
}

.issue-chip.is-suggest .issue-chip-sev,
.issue-sev.is-suggest {
  background: var(--rubric-org-bg);
  color: var(--rubric-org);
}

.issue-chip-deduct {
  color: var(--muted);
  font-weight: 500;
}

.issue-sev {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  vertical-align: 1px;
}

.issue-chip.is-ready {
  background: var(--green-selected);
  border-color: rgba(0, 98, 65, 0.4);
}

.issue-chip.is-applied {
  background: #fff;
  box-shadow: inset 0 0 0 1px currentColor;
}

.issue-chip.is-on {
  font-weight: 700;
}

.issue-chip.chip-task {
  color: var(--rubric-task-ink);
  border-color: rgba(109, 40, 217, 0.35);
  background: var(--rubric-task-bg);
}

.issue-chip.chip-task.is-on {
  background: rgba(109, 40, 217, 0.2);
  border-color: var(--rubric-task);
}

.issue-chip.chip-org {
  color: var(--rubric-org-ink);
  border-color: rgba(29, 78, 216, 0.35);
  background: var(--rubric-org-bg);
}

.issue-chip.chip-org.is-on {
  background: rgba(29, 78, 216, 0.2);
  border-color: var(--rubric-org);
}

.issue-chip.chip-dev {
  color: var(--rubric-dev-ink);
  border-color: rgba(181, 139, 42, 0.45);
  background: var(--rubric-dev-bg);
}

.issue-chip.chip-dev.is-on {
  background: #efe0b0;
  border-color: var(--rubric-dev);
}

.issue-chip.chip-lang {
  color: var(--rubric-lang-ink);
  border-color: rgba(198, 40, 40, 0.4);
  background: var(--rubric-lang-bg);
}

.issue-chip.chip-lang.is-on {
  background: #f8cfcf;
  border-color: var(--rubric-lang);
}

.issue-card {
  padding-left: 12px;
  border-left: 3px solid var(--rubric-lang);
}

.issue-card-task {
  border-left-color: var(--rubric-task);
}

.issue-card-org {
  border-left-color: var(--rubric-org);
}

.issue-card-dev {
  border-left-color: var(--rubric-dev);
}

.issue-card-lang {
  border-left-color: var(--rubric-lang);
}

.issue-type-task {
  color: var(--rubric-task);
}

.issue-type-org {
  color: var(--rubric-org);
}

.issue-type-dev {
  color: var(--rubric-dev);
}

.issue-type-lang {
  color: var(--rubric-lang);
}

.rewrite-pair {
  display: grid;
  gap: 8px;
}

.suggest-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.suggest-actions .primary,
.suggest-actions .ghost {
  font-size: 13px;
  padding: 8px 12px;
}

.lang-toggle,
.exam-toggle {
  display: flex;
  background: #fff;
  border: 1px solid var(--green-line);
  border-radius: 999px;
  padding: 3px;
}

body.is-exam-locked .exam-toggle {
  display: none !important;
}

.lang-toggle button,
.exam-toggle button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 600 12px Outfit, sans-serif;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.lang-toggle button {
  width: 34px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
}

.lang-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lang-toggle button.is-on,
.exam-toggle button.is-on {
  background: var(--green);
  color: #fff;
}

.lang-toggle button:hover:not(:disabled):not(.is-on),
.exam-toggle button:hover:not(:disabled):not(.is-on) {
  background: var(--green-soft);
  color: var(--green-ink);
}

.lang-toggle button.is-on:hover:not(:disabled),
.exam-toggle button.is-on:hover:not(:disabled) {
  background: var(--green-ink);
}

.lang-toggle button:active:not(:disabled):not(.is-on),
.exam-toggle button:active:not(:disabled):not(.is-on) {
  background: var(--green-selected);
}

.lang-toggle button.is-on:active:not(:disabled),
.exam-toggle button.is-on:active:not(:disabled) {
  background: #00291c;
}

.lang-toggle button:focus-visible,
.exam-toggle button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.lang-toggle button:disabled,
.exam-toggle button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

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

.alt-list li {
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid var(--green-line);
}

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

.compare-card {
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid var(--green-line);
  border-left: 3px solid var(--green);
}

.compare-card p {
  margin: 0;
  line-height: 1.55;
}

.compare-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.alt-list small,
.session-meta {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.issue-type,
.why-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--green);
}

.why-label {
  color: var(--muted);
  margin: 12px 0 4px;
}

.why-text {
  margin: 0;
  line-height: 1.5;
  font-size: 14px;
}

.related {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--green-line);
}

.quote-block,
.improved-block {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  line-height: 1.55;
  font-size: 14px;
}

.quote-block {
  background: #fff;
  border: 1px dashed var(--green-line);
  color: var(--ink);
}

.improved-block {
  background: #fff;
  border: 1px solid var(--green);
  color: var(--green-ink);
}

.rewrite-pending {
  color: var(--muted);
  font-style: italic;
}

.rewrite-stream {
  position: relative;
  overflow: hidden;
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--green);
}

.rewrite-stream-label {
  margin: 0 0 10px;
  color: var(--green-ink);
  font-size: 12px;
  font-weight: 600;
}

.rewrite-stream-meter {
  height: 4px;
  margin: 0 0 10px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--green-soft);
}

.rewrite-stream-meter span {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 99px;
  background: var(--green);
  animation: stream-meter 1.2s ease-in-out infinite;
}

.ghost.is-busy {
  opacity: 0.7;
  cursor: wait;
}

@keyframes stream-meter {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

.rewrite-stream-lines {
  display: grid;
  gap: 8px;
}

.rewrite-stream-line {
  display: block;
  height: 10px;
  width: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--green-soft) 0%, var(--green-selected) 40%, #fff 55%, var(--green-soft) 100%);
  background-size: 220% 100%;
  animation: stream-write 1.15s ease-in-out infinite;
}

.rewrite-stream-line.is-mid {
  width: 78%;
  animation-delay: 0.12s;
}

.rewrite-stream-line.is-short {
  width: 46%;
  animation-delay: 0.24s;
}

.rewrite-stream-caret {
  display: inline-block;
  width: 2px;
  height: 14px;
  margin-top: 2px;
  background: var(--green);
  animation: stream-caret 0.9s steps(2, end) infinite;
}

.rewrite-steam {
  position: absolute;
  right: 14px;
  top: 8px;
  width: 28px;
  height: 28px;
  pointer-events: none;
}

.rewrite-steam span {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: rgba(0, 98, 65, 0.22);
  animation: steam-rise 1.6s ease-out infinite;
}

.rewrite-steam span:nth-child(2) {
  animation-delay: 0.35s;
  margin-left: -10px;
}

.rewrite-steam span:nth-child(3) {
  animation-delay: 0.7s;
  margin-left: 2px;
}

@keyframes stream-write {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

@keyframes stream-caret {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@keyframes steam-rise {
  0% {
    transform: translateY(6px) scale(0.6);
    opacity: 0;
  }
  25% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(-22px) scale(1.15);
    opacity: 0;
  }
}

.issue-chip.is-wait {
  opacity: 1;
  background: repeating-linear-gradient(
    90deg,
    #fff 0,
    #fff 12px,
    var(--green-soft) 12px,
    var(--green-soft) 24px
  );
  background-size: 48px 100%;
  animation: stream-chip 1.2s linear infinite;
}

@keyframes stream-chip {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 48px 0;
  }
}

.rewrite-pending + .ghost {
  margin-top: 8px;
}

.original-chip {
  font-style: italic;
  color: var(--danger);
}

.rewrite-now {
  margin: 0;
  color: var(--green-ink);
  font-weight: 500;
}

.rewrite-change {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: var(--green);
  background: var(--green-soft);
  border-radius: 3px;
  cursor: pointer;
}

.rewrite-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.rewrite-detail:empty::before {
  content: "Select an underlined phrase to see the original wording.";
  color: var(--muted);
  font-size: 14px;
}

.lookup-form {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.lookup-form input {
  flex: 1;
  border-radius: 999px;
}

.lookup-result,
.word-card,
.session-card {
  background: #fff;
  border: 1px solid var(--green-line);
  border-radius: 12px;
  padding: 12px;
}

.lookup-result:empty {
  display: none;
}

.card-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  align-content: start;
}

.session-card {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transform-origin: center center;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.session-card.is-flip {
  animation: sessionFlip 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes sessionFlip {
  0% {
    transform: rotateY(-92deg) translateZ(12px);
    opacity: 0;
  }
  62% {
    transform: rotateY(10deg) translateZ(0);
    opacity: 1;
  }
  100% {
    transform: rotateY(0);
    opacity: 1;
  }
}

.session-card.is-current {
  background: var(--green-selected);
  color: var(--ink);
  border-color: var(--green);
  box-shadow: none;
}

.session-card.is-current:hover {
  background: #c7e6d8;
}

.session-card.is-current .danger-link {
  color: var(--danger);
}

.session-card strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
  font-size: 13px;
}

.session-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.session-actions span {
  display: flex;
  gap: 10px;
  align-items: center;
}

.word-card {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
}

.word-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.word-card-top strong {
  font-size: 14px;
  line-height: 1.3;
}

.word-card-top .zh {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.word-card-top .danger-link {
  flex-shrink: 0;
  margin-left: auto;
}

.word-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.word-card-ex {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.word-card .zh,
.popover-zh {
  color: var(--green-ink);
}

.word-popover {
  position: fixed;
  z-index: 80;
  width: min(280px, calc(100% - 24px));
  background: var(--sheet);
  border: 1px solid var(--green-line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 14px 16px 16px;
  animation: pop 0.22s ease;
}

.word-popover[hidden] {
  display: none !important;
}

.popover-word {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 24px;
}

.popover-meta,
.popover-ex {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.popover-zh {
  margin: 8px 0;
}

.word-popover .primary {
  margin-top: 10px;
  width: 100%;
}

.select-rewrite[hidden] {
  display: none !important;
}

.select-rewrite {
  min-width: 240px;
  max-width: min(360px, calc(100vw - 24px));
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--green);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 98, 65, 0.18);
}

.select-rewrite.is-wide {
  max-width: min(520px, calc(100vw - 24px));
  min-width: min(420px, calc(100vw - 24px));
}

.select-rewrite #select-rewrite-label {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
}

.select-rewrite-actions:not([hidden]) {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.select-rewrite .rewrite-stream {
  margin: 0 0 2px;
}

.select-diff:not([hidden]) {
  display: grid;
  gap: 10px;
}

.select-diff .why-label {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.select-diff-del {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  background: #fde8e8;
  color: #8a1f1f;
  border-radius: 3px;
}

.select-diff-ins {
  text-decoration: none;
  background: var(--green-soft);
  color: var(--green-ink);
  border-radius: 3px;
  box-shadow: inset 0 -2px 0 var(--green);
}

.select-rewrite.is-busy {
  pointer-events: none;
}

.toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.toast-card {
  pointer-events: auto;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 14px 14px 16px;
  background: var(--sheet);
  border-radius: 10px;
  border: 1px solid var(--green-line);
  border-left: 4px solid var(--green);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(-8px);
  animation: toastIn 0.28s ease forwards;
}

.toast-card.is-out {
  animation: toastOut 0.18s ease forwards;
}

.toast-card.is-success {
  border-left-color: var(--green);
}

.toast-card.is-info {
  border-left-color: var(--green-ink);
}

.toast-card.is-warning {
  border-left-color: var(--gold);
}

.toast-card.is-error {
  border-left-color: var(--danger);
}

.toast-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 1px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.toast-icon svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toast-card.is-success .toast-icon {
  background: var(--green);
}

.toast-card.is-info .toast-icon {
  background: var(--green-ink);
}

.toast-card.is-warning .toast-icon {
  background: var(--gold);
}

.toast-card.is-error .toast-icon {
  background: var(--danger);
}

.toast-copy {
  min-width: 0;
  flex: 1;
  padding-top: 0;
}

.toast-title {
  margin: 0;
  font: 700 14px Outfit, system-ui, sans-serif;
  color: var(--ink);
  line-height: 1.25;
}

.toast-msg {
  margin: 3px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
}

.toast-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.toast-actions button {
  border: 0;
  background: transparent;
  color: var(--green);
  font: 700 13px Outfit, system-ui, sans-serif;
  padding: 0;
  cursor: pointer;
}

.toast-actions button.is-primary {
  color: var(--green);
}

.toast-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin: -4px -4px 0 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: 6px;
}

.toast-close:hover {
  color: var(--green-ink);
  background: var(--green-soft);
}

.toast-close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.hint {
  margin-top: 12px;
  font-size: 13px;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes glowIn {
  from {
    background-color: transparent;
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 36, 28, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  z-index: 40;
}

.drawer-backdrop.is-on {
  opacity: 1;
  pointer-events: auto;
}

.words-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 100%);
  background: var(--sheet);
  border-left: 1px solid var(--green-line);
  box-shadow: -16px 0 40px rgba(20, 36, 28, 0.12);
  z-index: 41;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 16px 16px;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.32, 1);
}

.words-drawer.is-open {
  transform: translateX(0);
}

.words-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.words-drawer-head h2 {
  margin: 0;
  font-size: 24px;
}

.words-drawer .lookup-form {
  flex: 0 0 auto;
}

.words-drawer .lookup-result {
  flex: 0 0 auto;
  min-height: 0;
}

.words-drawer .vocab-scroll {
  flex: 1;
  min-height: 0;
}

.vocab-mount {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.vocab-hero,
.vocab-live {
  flex: 1;
  min-height: 0;
  background: var(--sheet);
  border: 1px solid var(--green-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  overflow: auto;
}

.vocab-live,
.vocab-live * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.vocab-live .vocab-slot-input,
.vocab-live .vocab-spell,
.vocab-live .vocab-spell-wrap,
.vocab-live .vocab-spell-hidden,
.vocab-live .vocab-spell-slots,
.vocab-live .vocab-spell-slots * {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

.vocab-hero {
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.vocab-hero h2 {
  font-size: 36px;
  margin: 4px 0 12px;
  color: var(--green-ink);
}

.vocab-lead {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 15px;
}

.vocab-points {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.vocab-points li {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--green-line);
  color: var(--ink);
  line-height: 1.5;
  font-size: 14px;
}

.vocab-point-art {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green);
  flex-shrink: 0;
}

.vocab-point-art svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.vocab-point-art.is-rise {
  background: rgba(29, 78, 216, 0.12);
  color: var(--rubric-org);
}

.vocab-point-art.is-book {
  background: var(--gold-bg);
  color: var(--gold);
}

.vocab-point-art.is-chart {
  background: var(--green-soft);
  color: var(--green);
}

.vocab-start {
  margin-top: 16px;
  padding: 12px 22px;
  font: 600 15px Outfit, sans-serif;
  border-radius: 12px;
  cursor: pointer;
}

.vocab-side .vocab-start {
  width: 100%;
  margin-top: 10px;
}

.vocab-side.has-capacity .vocab-start {
  width: auto;
  min-width: 220px;
  margin: 18px auto 0;
  padding-inline: 28px;
}

.vocab-cap-summary {
  margin: 6px auto 0;
  max-width: 22em;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  color: var(--green-ink);
}

.vocab-side .vocab-lead {
  margin: 10px 0 0;
}

.vocab-cap-retake {
  margin: 10px auto 0;
  max-width: 22em;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
  color: var(--muted);
}

.vocab-name-form {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.vocab-name-form input {
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--green-line);
  border-radius: 12px;
  padding: 12px 14px;
  font: 400 16px Outfit, system-ui, sans-serif;
  background: #fff;
  color: var(--ink);
}

.vocab-name-form input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 98, 65, 0.16);
  border-color: var(--green);
}

.vocab-name-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.speaking-hero .vocab-name-actions .primary,
.speaking-hero .vocab-name-actions .ghost {
  min-height: 42px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
}

.vocab-live-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.vocab-student {
  color: var(--muted);
  font-size: 13px;
}

.vocab-student strong {
  color: var(--green-ink);
  font-weight: 600;
}

.vocab-quit {
  padding: 6px 12px;
  font-size: 13px;
}

.speaking-live-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.vocab-report-name {
  margin: 4px 0 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 22px;
  line-height: 1.25;
  color: var(--green-ink);
}

.vocab-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}

.vocab-incomplete .vocab-quit-count {
  margin: 8px 0 12px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 28px;
  color: var(--green-ink);
}

.vocab-incomplete .vocab-quit-count span {
  color: var(--muted);
  font-size: 18px;
}

body.vocab-locked .nav-btn:not([data-view="vocab"]),
body.vocab-locked .rail-block,
body.vocab-locked .top-lookup,
body.vocab-locked .lookup-toggle,
body.vocab-locked .exam-toggle,
body.vocab-locked #words-open {
  opacity: 0.38;
  pointer-events: none;
}

body.vocab-locked .nav-btn:disabled,
body.vocab-locked .primary:disabled,
body.vocab-locked .exam-toggle button:disabled {
  cursor: not-allowed;
}

body.vocab-locked .top-lookup input:disabled {
  cursor: not-allowed;
  background: #e6ece8;
}

body.speaking-locked .nav-btn:not([data-view="speaking"]),
body.speaking-locked .nav-btn[data-view="speaking"]:disabled,
body.speaking-locked .rail-block,
body.speaking-locked .top-lookup,
body.speaking-locked .lookup-toggle,
body.speaking-locked .exam-toggle,
body.speaking-locked #words-open {
  opacity: 0.38;
  pointer-events: none;
}

body.speaking-locked .nav-btn:disabled,
body.speaking-locked .primary:disabled,
body.speaking-locked .exam-toggle button:disabled {
  cursor: not-allowed;
}

.speaking-mount {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#view-speaking.is-picking .speaking-mount {
  overflow: auto;
}

.speaking-mount .essay-session-panel .essay-mock-card .danger-icon {
  cursor: pointer;
}

.speaking-mount .danger-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.essay-choice:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

.speaking-hero {
  max-width: 720px;
}

#view-speaking .listen-hero {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  box-sizing: border-box;
}

#view-speaking.is-active .speaking-mount {
  flex: 1 1 auto;
  min-height: 0;
}

#view-speaking .listen-hero.listen-wait.speaking-wait-full {
  max-width: none;
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  justify-content: center;
  align-items: center;
  text-align: center;
}

#view-speaking .listen-hero .vocab-name-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

#view-speaking .listen-hero.listen-wait .vocab-name-actions {
  justify-content: center;
}

#view-speaking .listen-hero .vocab-name-actions .primary,
#view-speaking .listen-hero .vocab-name-actions .ghost {
  min-height: 44px;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
}

.speaking-wait {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
}

.speaking-wait .draft-overlay-spinner {
  margin-bottom: 8px;
}

.speaking-wait-zh {
  margin-top: -8px;
  font-size: 14px;
}

.speaking-error {
  margin: 0 0 12px;
  color: var(--danger);
  font-size: 14px;
}

.speaking-live,
.speaking-result {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: var(--sheet);
  border: 1px solid var(--green-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 28px;
}

.speaking-live,
.speaking-live * {
  -webkit-user-select: none;
  user-select: none;
}

.speaking-scenario {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--green-line);
  line-height: 1.55;
  color: var(--ink);
}

.speaking-scenario.is-done {
  margin-bottom: 14px;
}

.speaking-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 18px 0 12px;
  gap: 8px;
}

.speaking-orb-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.speaking-meter {
  --speaking-level: 0;
  --speaking-orb-blue: #3e63dd;
  --speaking-orb-purple: #8e4ec6;
  width: 148px;
  height: 148px;
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.speaking-meter::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    from 180deg,
    var(--speaking-orb-blue),
    transparent 32%,
    var(--speaking-orb-purple),
    transparent 68%,
    var(--speaking-orb-blue)
  );
  animation: speaking-orb-spin 10s linear infinite;
}

.speaking-meter::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--sheet);
}

.speaking-meter i {
  position: relative;
  z-index: 1;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 40% 32%,
    color-mix(in srgb, var(--speaking-orb-blue) 55%, transparent),
    color-mix(in srgb, var(--speaking-orb-purple) 22%, transparent) 70%,
    transparent
  );
  animation: speaking-orb-pulse 3.2s ease-in-out infinite;
}

.speaking-clock-text {
  margin: 0;
  min-height: 1.05em;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
  color: var(--green-ink);
}

.speaking-clock-text:empty {
  min-height: 0;
}

.speaking-stage-prepare .speaking-clock-text,
.speaking-stage-gap .speaking-clock-text,
.speaking-stage-prepare .speaking-phase,
.speaking-stage-gap .speaking-phase {
  color: var(--gold);
}

.speaking-phase {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--green-ink);
}

.speaking-hint {
  margin: 0;
  max-width: 420px;
  color: var(--muted);
  line-height: 1.5;
}

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

@keyframes speaking-orb-pulse {
  0%,
  100% {
    opacity: calc(0.5 + var(--speaking-level) * 0.35);
    transform: scale(calc(0.92 + var(--speaking-level) * 0.22));
  }
  50% {
    opacity: 1;
    transform: scale(calc(1 + var(--speaking-level) * 0.28));
  }
}

.speaking-result h2 {
  margin: 4px 0 12px;
  font-size: 32px;
  color: var(--green-ink);
}

.speaking-result.speaking-review h2 {
  margin: 0;
  font-size: 22px;
}

.speaking-players {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.speaking-players-scenario {
  grid-template-columns: 1fr;
  margin-bottom: 8px;
}

.speaking-players audio {
  width: 100%;
  height: 36px;
}

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

.speaking-compare {
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--green-line);
}

.speaking-compare-top {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: start;
  margin-bottom: 12px;
}

.speaking-compare-top p {
  margin: 0;
  line-height: 1.5;
}

.speaking-num {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
}

.speaking-score {
  margin: 0 0 12px 42px;
  display: grid;
  gap: 8px;
}

.speaking-score-card {
  border-radius: 12px;
  padding: 10px 12px;
}

.speaking-score-card.is-en {
  background: #f3f4f6;
}

.speaking-score-card.is-zh {
  background: #e8f1fb;
}

.speaking-score-card .speaking-score-blurb,
.speaking-score-card .speaking-score-notes {
  margin: 0;
}

.speaking-score-card .speaking-score-notes {
  margin-top: 8px;
}

.speaking-wait-shell {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
}

.speaking-wait-shell .draft-overlay {
  position: absolute;
  inset: 0;
}

.speaking-wait-shell .draft-overlay-card.is-progress {
  align-items: center;
  text-align: center;
}

.speaking-wait-shell .draft-overlay-card.is-progress #speaking-gen-text,
.speaking-wait-shell .draft-overlay-card.is-progress #speaking-gen-text-zh,
.speaking-wait-shell .draft-overlay-card.is-progress .analyze-elapsed,
.speaking-wait-shell .draft-overlay-card.is-progress .analyze-wait-hint {
  text-align: center;
  width: 100%;
}

.speaking-wait-shell .analyze-overlay-actions {
  justify-content: center;
}

.speaking-score-words {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.speaking-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.4;
  background: var(--green-soft);
  color: var(--green-ink);
}

.speaking-chip.is-sub {
  background: var(--gold-bg);
  color: var(--gold);
}

.speaking-chip.is-miss {
  background: var(--rubric-lang-bg);
  color: var(--danger);
  text-decoration: line-through;
}

.speaking-said,
.speaking-score-status {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--muted);
}

.speaking-score-status .ghost {
  margin-left: 8px;
}

.speaking-score-blurb {
  margin: 8px 0 4px;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.5;
}

.speaking-score-notes {
  margin: 4px 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.45;
}

.speaking-score-notes strong {
  color: var(--green-ink);
}

#view-speaking.is-review.is-active {
  overflow: hidden;
}

#view-speaking.is-review .speaking-mount {
  overflow: hidden;
}

.speaking-result.speaking-review {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 10px;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.speaking-review-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  min-width: 0;
  min-height: 0;
}

.speaking-review-toolbar h2 {
  margin: 0;
  font-size: 22px;
}

.speaking-review-toolbar .vocab-result-actions {
  margin: 0;
}

.speaking-review-body {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.speaking-review-grid {
  display: grid;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.4fr) minmax(0, 0.78fr);
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}

.speaking-review-grid > .panel {
  min-width: 0;
  min-height: 0;
  padding: 12px;
}

.speaking-review-grid > .suggestions {
  overflow: hidden;
}

.speaking-review-grid .metrics-overall {
  padding: 10px 12px 12px;
  margin-bottom: 12px;
}

.speaking-review-grid .score-chip strong {
  font-size: 44px;
}

.speaking-review-grid .metrics-overall .score-blurb {
  font-size: 13px;
}

.speaking-review-situation {
  margin-bottom: 12px;
}

.speaking-review-situation p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink);
}

.speaking-review-grid .rubric {
  margin: 0;
}

.speaking-review-grid .rubric li {
  grid-template-columns: minmax(0, 7.2em) minmax(0, 1fr) auto;
}

.speaking-review-grid .trait-card {
  cursor: default;
  padding: 8px 10px;
}

.speaking-review-grid .trait-card-head {
  margin-bottom: 4px;
}

.speaking-review-grid .trait-card p {
  display: block;
  font-size: 12.5px;
  -webkit-line-clamp: unset;
}

.speaking-review-mid {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.speaking-review-mid .panel-title {
  margin-bottom: 8px;
}

.speaking-q-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.speaking-q-card {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--green-line);
  border-radius: 12px;
  padding: 8px 10px;
}

.speaking-q-card .speaking-players {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.speaking-q-card .speaking-players > * {
  min-width: 0;
  overflow: hidden;
}

.speaking-review audio {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.speaking-q-card .speaking-compare-top {
  margin-bottom: 8px;
}

.speaking-q-card .speaking-compare-top p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
}

.speaking-q-card .why-label {
  margin: 0 0 4px;
  font-size: 10px;
}

.speaking-q-sub {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #ecefed;
  border: 1px solid var(--green-line);
}

.speaking-q-sub.is-note {
  background: #e8f1fb;
  border-color: rgba(29, 78, 216, 0.22);
}

.speaking-q-sub .why-label {
  margin: 0 0 4px;
}

.speaking-q-sub p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
}

.speaking-q-sub .speaking-score-status {
  margin: 0;
}

.speaking-q-sub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.speaking-q-sub-head .why-label {
  margin: 0;
}

.speaking-q-sub-head strong {
  font-size: 12px;
  font-weight: 600;
  color: var(--green-ink);
  white-space: nowrap;
}

.speaking-q-card audio {
  height: 32px;
}

.speaking-q-card .speaking-said,
.speaking-q-card .speaking-score-status {
  margin: 8px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
}

.speaking-review-note {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
}

.speaking-review-note strong {
  color: var(--green-ink);
  margin-right: 6px;
}

.speaking-review-sample {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--green-soft);
  border: 1px solid var(--green-line);
}

.speaking-review-sample-text {
  margin: 4px 0 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
}

.speaking-review-sample audio {
  width: 100%;
  height: 32px;
}

.speaking-review .suggestions .metrics-kicker {
  margin-top: 0;
}

.speaking-review .suggestions .trait-notes {
  margin-bottom: 14px;
}

.speaking-review .suggestions .suggestion-head {
  margin-bottom: 8px;
}

.speaking-review-tips ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13.5px;
  line-height: 1.5;
}

.speaking-review-tips li + li {
  margin-top: 8px;
}

.speaking-score-overlay {
  border-radius: var(--radius);
  z-index: 5;
}

.speaking-mount > .draft-scoring-bar {
  display: none;
}

@media (max-width: 960px) {
  .speaking-review-grid {
    grid-template-columns: 1fr;
    overflow: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .speaking-meter::before,
  .speaking-meter i {
    animation: none;
  }
}

.vocab-status {
  margin-bottom: 22px;
}

.vocab-progress {
  height: 8px;
  background: #fff;
  border: 1px solid var(--green-line);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 10px;
}

.vocab-progress span {
  display: block;
  height: 100%;
  background: var(--green);
  transition: width 0.35s ease;
}

.vocab-status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.vocab-level-chip {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-ink);
  white-space: nowrap;
}

.vocab-timer {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--green);
  font-size: 16px;
  min-width: 4.6em;
  text-align: right;
  white-space: nowrap;
}

.vocab-timer.is-warn {
  color: var(--gold);
}

.vocab-timer.is-hot {
  color: var(--danger);
}

.vocab-prompt-label {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 600;
}

.vocab-ask {
  min-height: 0;
}

.vocab-live.is-enter .vocab-ask {
  opacity: 0;
  transform: translateX(32px);
}

.vocab-live.is-enter.is-in .vocab-ask {
  opacity: 1;
  transform: none;
  transition: transform 0.48s cubic-bezier(0.22, 1, 0.32, 1), opacity 0.36s ease;
}

.vocab-live.is-exit .vocab-ask {
  opacity: 0;
  transform: translateX(-28px);
  transition: transform 0.26s ease, opacity 0.22s ease;
}

.vocab-result-in {
  animation: vocabResultIn 0.55s cubic-bezier(0.22, 1, 0.32, 1);
}

@keyframes vocabResultIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.vocab-confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  overflow: hidden;
}

.vocab-confetti i {
  position: absolute;
  top: -16px;
  display: block;
  animation: vocabConfetti var(--dur) cubic-bezier(0.16, 0.7, 0.32, 1) var(--delay) forwards;
}

@keyframes vocabConfetti {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--dx), 110vh, 0) rotate(var(--rot));
    opacity: 0.2;
  }
}

.vocab-stem {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 6px 0 22px;
}

.vocab-stem-copy {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-width: 0;
}

.vocab-ipa {
  margin: 0;
  font-family: "Times New Roman", Georgia, serif;
  font-size: clamp(16px, 2.4vw, 22px);
  line-height: 1.3;
  color: var(--muted);
}

.vocab-word {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.1;
  color: var(--green-ink);
}

.vocab-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 1px solid var(--green-line);
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  cursor: pointer;
}

.vocab-play:hover:not(:disabled) {
  background: var(--green-soft);
  border-color: var(--green);
}

.vocab-play:active:not(:disabled) {
  background: var(--green-selected);
}

.vocab-play:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.vocab-play:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.vocab-play.is-playing {
  background: var(--green-selected);
  border-color: var(--green);
}

.vocab-play.is-busy {
  opacity: 0.55;
  cursor: wait;
}

.vocab-play .nav-icon {
  width: 20px;
  height: 20px;
}

.vocab-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.vocab-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 16px 16px;
  border-radius: 14px;
  border: 1px solid var(--green-line);
  background: #fff;
  color: var(--ink);
  font: 500 16px Outfit, sans-serif;
  cursor: pointer;
  min-height: 64px;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.vocab-choice:hover:not(:disabled) {
  background: var(--green-soft);
  border-color: var(--green);
  transform: translateY(-1px);
}

.vocab-choice:active:not(:disabled) {
  transform: none;
  background: var(--green-selected);
}

.vocab-choice:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.vocab-choice:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.vocab-choice.is-correct {
  background: var(--green-selected);
  border-color: var(--green);
  color: var(--green-ink);
}

.vocab-choice.is-wrong {
  background: var(--rubric-lang-bg);
  border-color: var(--rubric-lang);
  color: var(--rubric-lang-ink);
}

.vocab-letter {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.vocab-keys {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.vocab-result {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.2fr);
  gap: 14px;
  flex: 1;
  min-height: 0;
}

.vocab-result .panel {
  overflow: auto;
}

.vocab-size {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--green);
}

.vocab-size strong {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 56px;
  line-height: 0.9;
  font-weight: 400;
}

.vocab-size span {
  color: var(--muted);
  font-size: 16px;
}

.vocab-timeout {
  color: var(--danger);
  font-size: 13px;
}

.vocab-report-head {
  width: 100%;
  align-items: flex-start;
  margin-bottom: 4px;
}

.vocab-report-titles {
  min-width: 0;
  flex: 1;
}

.vocab-result .panel.vocab-capacity {
  text-align: left;
}

.vocab-report-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 12px;
  flex: 1;
}

.vocab-report-body .vocab-size {
  justify-content: center;
  margin: 16px 0 8px;
}

.vocab-report-body .vocab-quit-count {
  margin: 16px 0 8px;
}

.vocab-report-body .vocab-cap-summary,
.vocab-report-body .score-blurb,
.vocab-report-score,
.vocab-report-note,
.vocab-report-body .vocab-timeout {
  max-width: 26rem;
  margin-left: auto;
  margin-right: auto;
}

.vocab-report-body .vocab-cap-summary {
  margin-top: 4px;
  font-size: 18px;
  line-height: 1.35;
}

.vocab-report-body .score-blurb {
  margin-top: 10px;
  margin-bottom: 0;
}

.vocab-report-score {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--muted);
}

.vocab-report-note {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.vocab-miss-panel .eyebrow {
  margin-bottom: 12px;
}

.vocab-miss-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.vocab-miss-empty {
  margin: 0;
  padding: 14px 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.vocab-miss {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--green-line);
}

.vocab-miss-body {
  min-width: 0;
  flex: 1;
  text-align: left;
}

.vocab-miss-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.vocab-miss-head strong {
  font-size: 16px;
  font-weight: 650;
  color: var(--green-ink);
  line-height: 1.3;
}

.vocab-miss-head .ipa {
  display: inline;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  font-family: "Times New Roman", Georgia, serif;
}

.vocab-miss-meta,
.vocab-miss .zh,
.vocab-miss .ex,
.vocab-miss .note {
  display: block;
  margin: 4px 0 0;
  line-height: 1.4;
}

.vocab-miss-meta,
.vocab-miss .ex,
.vocab-miss .note {
  font-size: 13px;
  color: var(--muted);
}

.vocab-miss .zh {
  color: var(--green-ink);
  font-size: 14px;
}

.vocab-miss-save {
  flex-shrink: 0;
  margin-top: 2px;
}

.speaking-result .vocab-result-actions {
  margin: 16px 0 0;
}

.speaking-review-toolbar .vocab-result-actions {
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 960px) {
  .compose-grid,
  .review-grid,
  .words-grid,
  .vocab-result {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    height: auto;
    overflow: visible;
  }

  .vocab-report-head {
    flex-direction: column;
    align-items: stretch;
  }

  .vocab-report-head .vocab-result-actions {
    justify-content: flex-start;
  }

  .speaking-players {
    grid-template-columns: 1fr;
  }

  .essay-flow {
    position: relative;
    min-height: 70vh;
    overflow: visible;
  }

  .essay-phase {
    position: relative;
    inset: auto;
    display: none;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .essay-phase.is-on {
    display: flex;
  }

  .vocab-choices {
    grid-template-columns: 1fr;
  }

  .view.is-active {
    display: flex;
    overflow: auto;
  }

  .review-grid > .panel {
    overflow: visible;
  }

  .essay-view,
  .rewrite-view,
  .draft-body {
    min-height: 280px;
    max-height: 60vh;
  }

  .essay-choice-grid,
  .essay-mock-grid,
  .essay-session-panel .js-session-list,
  .essay-session-panel .js-listen-session-list {
    grid-template-columns: 1fr;
  }

  #view-compose.is-picking .essay-phase,
  #view-compose.is-building .essay-phase {
    display: none !important;
  }

  #view-compose.is-picking #essay-gate,
  #view-compose.is-building #essay-gate {
    position: relative;
  }
}

.essay-gate {
  display: none;
  position: absolute;
  inset: 0;
  overflow: auto;
  z-index: 3;
  padding: 4px 2px 18px;
}

#view-compose.is-picking #essay-gate,
#view-compose.is-building #essay-gate {
  display: block;
  background: var(--paper);
  pointer-events: auto;
  z-index: 5;
}

#view-compose.is-picking .essay-phase,
#view-compose.is-building .essay-phase {
  opacity: 0;
  pointer-events: none !important;
  z-index: 1;
}

.essay-pick {
  max-width: 980px;
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 12px 8px 28px;
}

.essay-pick-hero {
  margin-bottom: 22px;
  padding: 24px 26px 20px;
  border: 1px solid var(--green-line);
  border-radius: 20px;
  background: linear-gradient(135deg, #fff 0%, var(--green-soft) 100%);
  box-shadow: var(--shadow);
}

.essay-pick-hero h2 {
  font-family: "Instrument Serif", serif;
  font-size: 42px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 4px 0 10px;
  color: var(--green-ink);
}

.essay-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.essay-land-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0 0 18px;
}
.essay-land-step {
  padding: 14px 16px;
  border: 1px solid var(--green-line);
  border-radius: 14px;
  background: rgba(255,255,255,.78);
}
.essay-land-step b { display: block; color: var(--green-ink); font-size: 14px; margin-bottom: 4px; }
.essay-land-step span { color: var(--muted); font-size: 12px; line-height: 1.45; }

.lite-reference-form #lite-task-content {
  min-height: 160px;
  resize: vertical;
  white-space: pre-wrap;
  border-radius: 14px;
  line-height: 1.55;
  padding: 14px 16px;
}
.lite-reference-form { width: 100%; align-self: stretch; }
.lite-task-helper { margin: -2px 0 2px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.assign-current-tasks .assign-basket-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.assign-add-task { width: 100%; justify-content: center; margin-top: 4px; }
.lite-task-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.lite-task-actions { width: 100%; }
.lite-task-actions > button { flex: 1 1 0; min-width: 0; justify-content: center; }
.lite-task-actions .secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 16px;
  border: 1px solid var(--green-line);
  border-radius: 999px;
  background: transparent;
  color: var(--green);
  font: 600 14px/1 Outfit, system-ui, sans-serif;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.lite-task-actions .secondary:hover { background: var(--green-soft); transform: translateY(-1px); }
.lite-task-actions .secondary:active { background: var(--green-selected); transform: none; }
.modal-card.modal-wide:has(#assign-form) {
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 20px 60px rgba(20, 36, 28, .16);
}
.modal-card.modal-wide:has(#assign-form) .assign-section { gap: 10px; }
.modal-card.modal-wide:has(#assign-form) .assign-section-label {
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--green-ink);
}
.lite-task-actions { gap: 8px; margin-top: 10px; }
.lite-task-actions .secondary {
  min-height: 42px;
  border-radius: 10px;
  background: #fff;
  color: var(--green-ink);
  box-shadow: 0 1px 2px rgba(20, 36, 28, .04);
}
.lite-task-actions .secondary:hover {
  background: var(--green-soft);
  border-color: var(--green);
}
.lite-task-editor { position: relative; width: 100%; min-width: 0; }
.lite-task-editor > .ui-field { width: 100%; min-width: 0; }
.lite-task-editor .ui-field > span { padding-right: 34px; }
.lite-import-icon { position: absolute; z-index: 3; top: 30px; right: 8px; width: 30px; height: 30px; padding: 0; }
.lite-task-editor.is-importing .lite-import-icon { top: 8px; right: 8px; }
.lite-lesson-picker {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid var(--green-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
  overflow: hidden;
}
.lite-lesson-picker .lite-lesson-picker-head { padding: 12px 14px; border-bottom: 1px solid var(--green-line); }
.lite-lesson-picker .cl-pick-grid { padding: 12px; gap: 12px; }
.lite-lesson-picker .cl-pick-grid { min-width: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.lite-lesson-picker .cl-pick-list,
.lite-lesson-picker .cl-pick-preview { min-width: 0; }
.lite-lesson-picker-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; color: var(--green-ink); }
.lite-lesson-picker .cl-pick-list,
.lite-lesson-picker .cl-pick-preview { border-radius: 10px; }

.essay-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  min-height: 340px;
  padding: 22px 22px 20px;
  border-radius: 22px;
  border: 1px solid var(--green-line);
  background: var(--sheet);
  box-shadow: var(--shadow);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  position: relative;
  overflow: hidden;
}
.essay-choice::before {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 58px;
  height: 1px;
  background: var(--green-line);
  opacity: .75;
}

.essay-choice::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  opacity: 0.35;
  pointer-events: none;
}

.essay-choice.is-original::after {
  background: var(--green-soft);
}

.essay-choice.is-ai::after {
  background: var(--gold-bg);
}

.essay-choice:hover,
.essay-choice:focus-visible {
  border-color: var(--green);
  transform: translateY(-2px);
}

.essay-choice:active:not(:disabled) {
  transform: none;
}

.essay-choice:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.essay-choice-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.essay-choice-art {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  background: var(--green-soft);
  color: var(--green);
  animation: landFloat 4s ease-in-out infinite;
}

.essay-choice.is-ai .essay-choice-art {
  background: var(--gold-bg);
  color: var(--gold);
}
@keyframes landFloat { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-4px) rotate(2deg); } }

.essay-choice-art svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.essay-choice strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  color: var(--green-ink);
}

.essay-choice-lead {
  display: block;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
  font-weight: 400;
  margin-bottom: auto;
}

.essay-choice-meta {
  display: block;
  margin: 16px 0 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
}

.essay-choice.is-ai .essay-choice-meta {
  color: var(--gold);
}

.essay-choice-cta {
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--green);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.essay-choice.is-ai .essay-choice-cta {
  background: var(--green-ink);
}

.essay-choice-solo {
  min-height: 360px;
  width: 100%;
  padding: 34px;
  background: linear-gradient(115deg, #fff 0%, #eef7f0 56%, #fff8e8 100%);
}
.essay-choice-solo::before { left: 34px; right: 34px; bottom: 76px; }
.essay-choice-solo::after { width: 250px; height: 250px; right: -42px; top: 38px; opacity: .55; animation: landPulse 5s ease-in-out infinite; }
.essay-choice-solo .essay-choice-art { width: 62px; height: 62px; border-radius: 20px; z-index: 1; }
.essay-choice-solo strong { font-size: 30px; z-index: 1; }
.essay-choice-solo .essay-choice-lead { max-width: 440px; font-size: 15px; z-index: 1; }
.essay-choice-solo .essay-choice-cta { z-index: 1; }
.essay-question-grid { display: grid; width: 100%; margin-top: 16px; grid-template-columns: minmax(0, 1fr); gap: 20px !important; row-gap: 20px !important; }
.essay-question-card {
  min-height: 220px;
  height: 220px;
  box-sizing: border-box;
  padding: 24px 34px 20px;
  isolation: isolate;
}
.essay-question-card::before { display: none; }
.essay-question-card .essay-choice-kicker { margin-bottom: 8px; }
.essay-question-card .essay-choice-art { margin-bottom: 8px; }
.essay-question-card strong { margin-bottom: 4px; }
.essay-question-card .essay-choice-lead { max-width: 62%; margin: 0 0 auto; line-height: 1.35; }
.essay-question-card .essay-choice-cta { align-self: flex-start; margin-top: 8px; }
.essay-choice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  z-index: 1;
}
.essay-choice-actions .essay-choice-cta { margin-top: 0; }
.essay-choice-cta.is-ghost {
  background: #fff;
  color: var(--green-ink);
  border: 1px solid var(--green-line);
}
.essay-choice.is-ai .essay-choice-actions .essay-choice-cta.is-ghost {
  background: #fff;
  color: var(--green-ink);
  border: 1px solid var(--green-line);
}
.speak-import-wait {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px 42px;
}
.speak-import-wait::after {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid var(--green-line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: speakImportSpin 0.8s linear infinite;
  flex: 0 0 auto;
}
@keyframes speakImportSpin {
  to { transform: rotate(360deg); }
}
.speak-import-q-card [data-import-score] {
  margin: 0 0 10px;
}
.speak-import-q-card [data-import-score] .speaking-q-sub {
  margin-left: 42px;
}
.speak-import-q-card [data-import-score] .speaking-score-status {
  margin: 0 0 0 42px;
}
.essay-choice:has(.essay-choice-actions) { cursor: default; }
.speak-import-page {
  max-width: none;
  margin: 0;
  width: 100%;
  min-height: 0;
}
.speak-import-page .speaking-review-toolbar {
  justify-content: flex-end;
}
.speak-import-page.is-analyzing .suggestions,
.speak-import-page.is-analyzing [data-import-notes-list] {
  pointer-events: none;
  opacity: 0.55;
}
.speak-import-page.is-analyzing [data-import-note-text] {
  background: #e8eeea;
  color: var(--muted);
  cursor: not-allowed;
}
.speaking-import-grid > .panel,
.speaking-import-grid > .suggestions {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.speaking-import-grid .panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}
.speaking-import-grid .scroll-pane {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.speaking-import-grid .suggestions .scroll-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.speak-import-batch-hint {
  margin: 0 0 10px;
  flex-shrink: 0;
}
.speak-import-q-list {
  overflow: visible;
  flex: none;
  padding-right: 0;
  gap: 12px;
}
.speak-import-q-card {
  margin: 0;
  background: #fff;
}
.speak-import-q-card .speaking-players {
  grid-template-columns: minmax(0, 1fr);
  margin: 0 0 10px 42px;
}
.speak-import-q-card .speak-import-drop {
  margin: 0 0 2px 42px;
}
.speak-import-q-card.is-filled .speak-import-drop {
  padding: 0;
  border: 0;
  background: transparent;
}
.speak-import-audio-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.speak-import-pick,
.speak-import-batch { display: inline-flex; cursor: pointer; }

#view-compose.is-import .essay-phase[data-phase="draft"] {
  gap: 10px;
}
#view-compose.is-import .essay-import-toolbar {
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
  min-width: 0;
}
#view-compose.is-import .essay-import-toolbar[hidden] {
  display: none;
}
#view-compose.is-import .essay-import-toolbar .vocab-result-actions {
  margin: 0;
}
#view-compose.is-import .compose-grid {
  grid-template-columns: minmax(220px, 0.78fr) minmax(0, 1.32fr) minmax(268px, 0.86fr);
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}
#view-compose.is-import .compose-grid > .panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#view-compose.is-import .prompt-box,
#view-compose.is-import .draft-body {
  flex: 1 1 auto;
  min-height: 0;
}
#view-compose.is-import .prompt-box textarea,
#view-compose.is-import .draft-body textarea {
  height: 100%;
  min-height: 0;
}
#view-compose.is-import .prompt-panel {
  overflow: auto;
}
#view-compose.is-import .prompt-box #prompt {
  padding-bottom: 12px;
}
#view-compose.is-import .compose-grid > aside.essay-import-notes {
  min-width: 0;
  min-height: 0;
}
#view-compose.is-import .draft-actions,
#view-compose.is-import #dropzone,
#view-compose.is-import .essay-ai-tools,
#view-compose.is-import #essay-generate-prompt,
#view-compose.is-import .essay-chart-types {
  display: none !important;
}
.essay-import-notes {
  display: none;
}
#view-compose.is-import .essay-import-notes {
  display: flex;
}
#view-compose.is-import .essay-import-notes[hidden] {
  display: none;
}
#view-compose.is-import .essay-import-notes .panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}
#view-compose.is-import .essay-import-notes .scroll-pane {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.essay-note-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid var(--green-line);
  border-radius: 14px;
  background: #fff;
}
.essay-note-card .ui-field span {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
}
.essay-note-card textarea {
  min-height: 44px;
  resize: vertical;
}
.essay-note-card .essay-note-remove {
  align-self: flex-start;
  margin-top: 0;
}
.essay-note-add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 76px;
  padding: 14px 12px;
  border: 1.5px dashed color-mix(in srgb, var(--green) 42%, var(--green-line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--green) 5%, #fff);
  color: var(--green-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  appearance: none;
  flex-shrink: 0;
}
.essay-note-add:hover,
.essay-note-add:focus-visible {
  background: color-mix(in srgb, var(--green) 10%, #fff);
  border-color: var(--green);
  outline: none;
}
.essay-note-add-plus {
  display: inline-flex;
  width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px dashed currentColor;
  font-size: 16px;
  line-height: 1;
}
.essay-import-clip {
  position: absolute;
  z-index: 8;
  transform: translate(-50%, -110%);
  border: 1px solid var(--green-line);
  border-radius: 999px;
  background: #fff;
  color: var(--green-ink);
  padding: 6px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(20, 36, 28, 0.12);
  cursor: pointer;
}
.essay-import-clip[hidden] {
  display: none;
}
@media (max-width: 960px) {
  #view-compose.is-import .compose-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    overflow: visible;
  }
}
.speaking-import-grid [data-import-lines],
.speaking-import-grid [data-import-part3] {
  min-height: 220px;
}
.features-panel .ui-switch-row { margin-top: 18px; }
.features-panel .ui-switch-row strong { display: block; margin-bottom: 4px; }
.essay-question-card .essay-choice-orbit { top: calc(50% - 67px); right: 10%; }
.essay-question-card .essay-choice-art { width: 44px; height: 44px; border-radius: 14px; }
.essay-choice-orbit { position: absolute; right: 88px; top: 104px; width: 134px; height: 134px; border: 1px dashed var(--green); border-radius: 50%; animation: landSpin 14s linear infinite; }
.essay-choice-orbit i { position: absolute; display: block; width: 14px; height: 14px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 7px rgba(220,170,53,.16); }
.essay-choice-orbit i:nth-child(1) { left: -7px; top: 56px; }
.essay-choice-orbit i:nth-child(2) { right: 13px; top: 5px; background: var(--green); }
.essay-choice-orbit i:nth-child(3) { right: 5px; bottom: 20px; background: var(--green-ink); }
@keyframes landSpin { to { transform: rotate(360deg); } }
@keyframes landPulse { 50% { transform: scale(1.08); opacity: .3; } }

.essay-mocks {
  max-width: 980px;
  margin: 0 auto;
  padding: 8px 4px 24px;
}

.essay-mocks-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.essay-mocks-bar h2 {
  margin: 0;
  font-size: 28px;
  color: var(--green-ink);
}

.essay-mock-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  align-items: stretch;
}

.speaking-mount .essay-mocks {
  width: 100%;
}

.speaking-mock-script {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--green-line);
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  min-height: 5.8em;
}

.essay-mock-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--sheet);
  border: 1px solid var(--green-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 14px 14px;
  min-height: 100%;
}

.essay-mock-card:has(.speaking-mock-go),
.essay-mock-card:has(.listen-mock-go),
.essay-mock-card:has(.session-card-tools),
.essay-mock-card:has(.essay-mock-foot) {
  padding-bottom: 54px;
}

.essay-mock-foot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1;
}

.essay-mock-foot .listen-mock-go,
.essay-mock-foot .speaking-mock-go {
  position: static;
}

.essay-mock-restart {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 13px;
}

.essay-mock-card.is-flip {
  animation: sessionFlip 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}


.essay-session-panel .listen-mock-script:empty {
  display: none;
}

.essay-session-panel .essay-mock-card {
  cursor: pointer;
  height: 188px;
  min-height: 188px;
  max-height: 188px;
  overflow: hidden;
  padding-bottom: 52px;
}

.essay-session-panel .essay-mock-heading {
  min-width: 0;
  overflow: hidden;
}

.essay-session-panel .essay-mock-card h3 {
  font-size: 17px;
  line-height: 1.25;
}

.essay-session-panel .listen-mock-script {
  margin: 0;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink);
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.essay-session-panel .session-card-kicker {
  flex-shrink: 0;
  flex-wrap: nowrap;
  overflow: hidden;
  min-width: 0;
  max-height: 1.4em;
  margin-bottom: 8px;
}

.essay-session-panel .session-card-kicker > * {
  flex-shrink: 0;
}

.essay-session-panel .session-card-kicker > span:last-child {
  min-width: 0;
  flex-shrink: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.essay-session-panel .essay-mock-top h3,
.essay-session-panel .session-card-kind {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.essay-mock-card.is-current {
  background: var(--green-selected);
  border-color: var(--green);
}

.essay-mock-card.is-current:hover {
  background: #c7e6d8;
}

.session-card-kicker {
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.session-manual-label {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #93c5fd;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.session-ai-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 6px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  background:
    linear-gradient(115deg, #dbeafe 0%, #c7d2fe 38%, #ede9fe 72%, #ddd6fe 100%) padding-box,
    linear-gradient(120deg, #2563eb, #7c3aed 55%, #4f46e5) border-box;
  color: #312e81;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.session-student-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: color-mix(in srgb, var(--panel) 88%, #0f172a 12%);
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

.session-ai-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  fill: currentColor;
}

.session-card-tools {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  z-index: 1;
}

.speaking-mock-go,
.listen-mock-go {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 14px rgba(0, 98, 65, 0.22);
}

.speaking-mock-go svg,
.listen-mock-go svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  stroke: none;
  margin-left: 2px;
}

.speaking-mock-go:hover,
.speaking-mock-go:focus-visible,
.listen-mock-go:hover,
.listen-mock-go:focus-visible {
  background: var(--green-ink);
}

.speaking-mock-go:active:not(:disabled),
.listen-mock-go:active:not(:disabled) {
  background: #00291c;
}

.speaking-mock-go:disabled,
.listen-mock-go:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.essay-mock-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  min-height: 28px;
}

.essay-mock-heading {
  min-width: 0;
  flex: 1;
}

.essay-mock-top .session-ai-label,
.essay-mock-top .session-manual-label {
  flex-shrink: 0;
  margin-top: 2px;
}

.session-card-kind {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quit-modal-name {
  display: grid;
  gap: 6px;
  margin-top: 6px;
}
#quit-modal:not(.is-name-prompt) .quit-modal-name,
.quit-modal-name[hidden] {
  display: none !important;
}
#quit-modal.is-name-prompt .quit-modal-name:not([hidden]),
.quit-modal-card.is-name-prompt .quit-modal-name:not([hidden]) {
  display: grid !important;
}

.quit-modal-name span {
  font-size: 12px;
  font-weight: 650;
  color: var(--ink);
}

.quit-modal-card.is-name-prompt {
  width: min(380px, calc(100% - 40px));
}

.quit-modal-card.is-name-prompt .quit-modal-actions.has-save,
.quit-modal-card.is-two-actions .quit-modal-actions.has-save {
  grid-template-columns: 1fr 1fr;
}

.quit-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-ink);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.quit-modal-close:hover,
.quit-modal-close:focus-visible {
  background: var(--green-selected);
}

.quit-modal-close .nav-icon {
  width: 14px;
  height: 14px;
}

.quit-modal-close[hidden] {
  display: none;
}

.essay-mock-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.essay-done-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  background: color-mix(in srgb, var(--green) 16%, transparent);
  color: var(--green-ink);
  white-space: nowrap;
}

.essay-mock-card.is-done {
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--green) 35%, transparent);
}

.essay-mock-card h3 {
  margin: 0;
  font-size: 20px;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  color: var(--green-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.essay-date-tag {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--green-soft);
  color: var(--green-ink);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.essay-paper-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  margin: 0 0 10px;
}

.essay-paper-tab {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--green-line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.essay-paper-tab.is-on {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.essay-q-list {
  display: grid;
  gap: 6px;
  margin-top: auto;
}

.essay-q-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 36px;
  text-align: left;
  border: 1px solid var(--green-line);
  background: #fff;
  border-radius: 10px;
  padding: 0 10px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.essay-q-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.essay-q-btn:hover,
.essay-q-btn:focus-visible {
  border-color: var(--green);
  background: var(--green-selected);
}

.essay-q-btn:active:not(:disabled) {
  background: #c7e6d8;
}

.essay-q-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.essay-q-btn em {
  font-style: normal;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  min-width: 16px;
  text-align: right;
  flex-shrink: 0;
}

.essay-q-btn em.is-spacer {
  visibility: hidden;
}

.prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.prompt-head .field-label {
  margin: 0;
}

.essay-change {
  flex-shrink: 0;
  padding: 6px 10px;
  font-size: 13px;
}

.essay-change[hidden] {
  display: none !important;
}

.essay-ai-tools {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin: 0 0 10px;
}

.essay-ai-tools[hidden] {
  display: none !important;
}

.essay-task-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.essay-task-tabs.is-ielts {
  grid-template-columns: 1fr 1fr 1fr;
}

.essay-task-tab[hidden] {
  display: none !important;
}

.essay-task-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  appearance: none;
  margin: 0;
  height: 36px;
  min-height: 36px;
  width: 100%;
  border: 1px solid var(--green-line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 0 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  cursor: pointer;
}

.essay-task-tab.is-on {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.prompt-box {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.prompt-box #prompt {
  flex: 1;
  min-height: 0;
  padding-bottom: 52px;
}

.prompt-gen-fab {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: 40px;
  height: 40px;
  padding: 0 0 0 11px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 98, 65, 0.22);
  cursor: pointer;
  white-space: nowrap;
  transition: width 0.22s ease, padding 0.22s ease;
}

.prompt-gen-fab[hidden] {
  display: none !important;
}

.prompt-gen-fab .btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: currentColor;
}

.prompt-gen-fab .btn-label {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  margin: 0;
  font: 600 13px/1 Outfit, system-ui, sans-serif;
  transition: max-width 0.22s ease, opacity 0.18s ease, margin 0.22s ease;
}

.prompt-gen-fab:hover,
.prompt-gen-fab:focus-visible,
.prompt-gen-fab:disabled {
  width: 11.75rem;
  padding: 0 14px 0 11px;
  gap: 8px;
}

.prompt-gen-fab:hover .btn-label,
.prompt-gen-fab:focus-visible .btn-label,
.prompt-gen-fab:disabled .btn-label {
  max-width: 10em;
  opacity: 1;
  margin-left: 8px;
}

.prompt-gen-fab:disabled {
  opacity: 0.7;
  cursor: wait;
}

#essay-generate-prompt {
  align-self: auto;
  flex-shrink: 0;
  font-size: 13px;
}

.prompt-panel.is-locked .prompt-box {
  flex: 0 1 auto;
  min-height: 180px;
}

.prompt-panel.is-locked #prompt {
  flex: 0 1 auto;
  min-height: 180px;
  height: auto;
  max-height: none;
  overflow: auto;
  background: #f4faf6;
  color: var(--ink);
}

.prompt-zh {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.prompt-figure {
  margin: 12px 0 0;
  padding: 0;
  border: 1px solid var(--green-line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.prompt-figure img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: #f7faf8;
}

.prompt-figure-html {
  padding: 12px 14px;
  overflow: auto;
  max-height: 480px;
  background: #f7faf8;
  font-size: 14px;
  line-height: 1.45;
}

.prompt-figure-html table {
  border-collapse: collapse;
  width: 100%;
  margin: 8px 0;
}

.prompt-figure-html th,
.prompt-figure-html td {
  border: 1px solid #444;
  padding: 6px 8px;
}

.essay-chart-types {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}
.essay-chart-types[hidden],
.essay-chart-field[hidden] {
  display: none !important;
}
.essay-chart-types .field-label {
  margin: 0;
}

.essay-chart-field {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
}

.essay-chart-field .field-label {
  margin: 0;
}

.essay-chart-field .prompt-figure {
  margin: 0;
}

.essay-chart-drop {
  padding: 14px 16px;
  border: 1px dashed rgba(0, 98, 65, 0.35);
  border-radius: 12px;
  background: var(--green-soft);
}

.essay-chart-drop.is-hot {
  border-color: var(--green);
}

.essay-chart-drop p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.essay-chart-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.essay-chart-hint {
  color: var(--muted);
  font-size: 12px;
}

.essay-chart-field.is-filled .essay-chart-drop {
  padding: 0;
  border: 0;
  background: transparent;
}

.ielts-write-filters {
  display: grid;
  gap: 0.85rem;
  margin: 0 0 1.1rem;
}

.ielts-write-filter-label {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font: 600 12px Outfit, system-ui, sans-serif;
  letter-spacing: 0.02em;
}

.ielts-write-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ielts-write-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid var(--green-line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font: 600 12px Outfit, system-ui, sans-serif;
  cursor: pointer;
}

.ielts-write-chip.is-on {
  background: var(--green-selected);
  border-color: transparent;
  color: var(--green-ink);
}

.ielts-write-chip:hover:not(.is-on) {
  background: var(--green-soft);
  color: var(--green-ink);
}

.essay-build {
  max-width: 760px;
  margin: 0 auto;
  background: var(--sheet);
  border: 1px solid var(--green-line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 18px 22px 20px;
}

.essay-build-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.essay-build-titles {
  flex: 1;
  min-width: 0;
}

.essay-build-titles h2 {
  margin: 0;
  font-size: 26px;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  color: var(--green-ink);
}

.essay-build-titles .eyebrow {
  margin-bottom: 2px;
}

.build-dots {
  display: flex;
  gap: 5px;
  margin: 0 0 10px;
}

.build-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-line);
}

.build-dot.is-done {
  background: var(--green);
  opacity: 0.45;
}

.build-dot.is-on {
  background: var(--green);
  transform: scale(1.15);
}

.build-hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.build-board {
  background: #fff;
  border: 1px solid var(--green-line);
  border-radius: 16px;
  padding: 12px 14px 14px;
  margin-bottom: 14px;
}

.build-cue {
  margin: 0 0 10px;
  padding: 0 0 10px;
  border-bottom: 1px dashed var(--green-line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.build-stem {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0;
  line-height: 1.45;
  font-size: 17px;
  font-family: "Instrument Serif", serif;
}

.build-text {
  white-space: pre-wrap;
}

.build-blank,
.build-chip {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  box-sizing: border-box;
  min-height: 32px;
  padding: 5px 14px;
  border-radius: 999px;
  font-family: Outfit, sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.build-blank {
  min-width: 5.5em;
  min-height: 32px;
  padding: 6px 16px;
  border: 1px dashed var(--green);
  background: var(--green-soft);
  color: var(--green-ink);
}

.build-blank:empty {
  color: transparent;
  min-width: 6em;
  padding: 8px 18px;
}

.build-blank:empty::before,
.build-blank:empty::after {
  content: none !important;
}

.build-blank.is-filled {
  border-style: solid;
  background: var(--green-selected);
}

.build-blank.is-right {
  border-color: var(--green);
  background: var(--green-selected);
}

.build-blank.is-wrong {
  border-color: #b42318;
  background: #fde8e6;
  color: #7a1f16;
}

.build-bank-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.build-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 32px;
  margin-bottom: 14px;
}

.build-chip {
  border: 1px solid var(--green-line);
  background: #fff;
  color: var(--ink);
  cursor: grab;
}

.build-chip.tone-1 {
  background: var(--green-soft);
}

.build-chip.tone-2 {
  background: #fff8e8;
}

.build-chip.tone-3 {
  background: #eef3ff;
}

.build-chip.is-on,
.build-chip:hover {
  border-color: var(--green);
  transform: translateY(-1px);
}

.build-status {
  margin: 0 0 6px;
  font-weight: 600;
  font-size: 14px;
}

.build-status.is-right {
  color: var(--green);
}

.build-status.is-wrong {
  color: #b42318;
}

.build-answer {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.45;
  font-size: 14px;
}

.build-answer span {
  color: var(--green-ink);
  font-weight: 600;
  margin-right: 6px;
}

.build-progress {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.build-actions {
  justify-content: flex-end;
}

.login-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: var(--paper);
}

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

.dash.is-locked {
  visibility: hidden;
}

html.has-session .login-gate {
  display: none !important;
}

html.has-session .dash.is-locked {
  visibility: visible;
}

.login-card {
  width: min(420px, calc(100% - 32px));
  background: var(--sheet);
  border: 1px solid var(--green-line);
  border-radius: 20px;
  padding: 28px 24px;
}

.login-card h1,
.login-card h2 {
  margin: 6px 0 8px;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
}

.login-lead,
.login-error {
  color: var(--muted);
  font-size: 14px;
}

.login-error {
  color: var(--danger);
}

.login-form,
.admin-form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.account-menu {
  position: relative;
}

.account-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  overflow: visible;
}

.account-initial {
  font: 600 15px Outfit, sans-serif;
  line-height: 38px;
}

.account-role-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sheet);
  color: var(--green-ink);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 2px var(--sheet);
}

.account-role-badge .nav-icon {
  width: 12px;
  height: 12px;
}

.account-role-admin {
  display: none;
}

.account-role-badge.is-admin .account-role-admin {
  display: block;
}

.account-role-badge.is-admin .account-role-student {
  display: none;
}

.account-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 196px;
  display: grid;
  gap: 4px;
  padding: 12px;
  background: var(--sheet);
  border: 1px solid var(--green-line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  z-index: 40;
}

.account-pop-name {
  margin: 0;
  font-weight: 600;
}

.account-role-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 2px 0 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.account-pop .ghost {
  justify-content: flex-start;
}

#account-pw[hidden] {
  display: none !important;
}

.account-chip {
  display: grid;
  justify-items: end;
  border: 1px solid var(--green-line);
  background: transparent;
  border-radius: 12px;
  padding: 6px 10px;
  cursor: pointer;
  color: inherit;
  text-align: right;
}

.account-chip strong {
  font-size: 13px;
}

.account-pop[hidden] {
  display: none;
}

.pw-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgba(20, 36, 28, 0.28);
}

.pw-modal[hidden] {
  display: none;
}

.home-mount {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 4px 24px;
}

.home-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}

.home-admin {
  align-items: start;
}

.home-feature {
  grid-column: 1 / -1;
}

.home-wide {
  grid-column: 1 / -1;
}

.home-side {
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
}

.home-main {
  display: grid;
  gap: 16px;
  align-content: start;
  min-width: 0;
}

.home-banner {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px 14px;
  background: var(--gold-bg);
  color: var(--green-ink);
  border-radius: 12px;
}

.dash-today-grid {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}

.dash-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.dash-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--green-line);
}

.home-kpis {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.home-kpis.is-two,
.home-kpis.is-four {
  grid-template-columns: repeat(2, 1fr);
}

.home-feature .dash-today-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  padding: 0 16px 16px;
  margin: 0;
}

.overview-card .session-meta {
  margin: 12px 0 0;
}

.home-kpis li {
  display: grid;
  gap: 4px;
}

.home-rate,
.home-mini-rate {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: var(--green-soft);
  overflow: hidden;
}

.home-mini-rate {
  display: inline-block;
  width: 52px;
  height: 6px;
  vertical-align: middle;
  margin-right: 6px;
}

.home-rate > span,
.home-mini-rate > span {
  display: block;
  height: 100%;
  background: var(--green);
  border-radius: inherit;
}

.home-bars li em {
  font-style: normal;
  color: var(--muted);
  font-size: 11px;
}

.home-follow {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.home-follow li,
.dash-list li.is-click,
.home-table tr.is-click,
.home-kpis li.is-click {
  cursor: pointer;
}

.home-follow li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--green-line);
}

.home-follow li > div,
.dash-list li > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.home-follow li span,
.dash-list li span {
  color: var(--muted);
  font-size: 12px;
}

.home-follow li.is-weak,
.home-table tr.is-weak td {
  background: color-mix(in srgb, var(--gold-bg) 70%, transparent);
}

.home-actions {
  margin: 10px 0 0;
}

.home-exam-kind + .home-exam-kind {
  margin-top: 12px;
}

.home-exam-charts {
  display: grid;
  gap: 16px;
}

.home-exam-charts .grade-chart-block {
  margin-top: 0;
}

.home-progress-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
  min-width: 0;
}

.home-progress-cell .session-meta {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.home-exam-skills {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
}

.home-exam-skills li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}

.skel-chart {
  height: 72px;
  border-radius: 10px;
}

.home-kpis strong {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  color: var(--green);
}

.home-kpis li.is-warn strong {
  color: #9b3a3a;
}

.home-chart {
  width: 100%;
  height: 120px;
  color: var(--green);
  margin: 8px 0;
}

.home-bars {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.home-bars li {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 10px;
  align-items: center;
}

.home-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.home-table th,
.home-table td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid var(--green-line);
  border-right: 0;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
  box-sizing: border-box;
  background: var(--sheet);
}

.home-table th {
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.home-table col.col-check { width: 44px; }
.home-table col.col-name { width: 22%; }
.home-table col.col-user { width: 16%; }
.home-table col.col-num { width: 12%; }
.home-table col.col-status { width: 14%; }
.home-table col.col-type { width: 12%; }
.home-table col.col-progress { width: 28%; }
.home-table col.col-action { width: 18%; }
.home-table col.col-when { width: 28%; }

.home-table td.home-actions {
  overflow: visible;
  white-space: nowrap;
}

.home-table th:last-child,
.home-table td:last-child {
  border-right: 0;
}

.home-table tbody tr:last-child td {
  border-bottom: 0;
}

.home-table td:has(.ui-datetime),
.home-table td:has(input[type="datetime-local"]),
.home-table td:has(input[type="date"]) {
  overflow: visible;
}

.home-table tr[data-open-student] {
  cursor: pointer;
}

.home-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.home-table .home-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 4px;
  white-space: nowrap;
  justify-content: flex-start;
}

.home-table td.home-actions,
.home-table td.cell-action {
  display: table-cell;
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
  overflow: visible;
  position: static;
  text-align: left;
}

.home-table td.home-actions > * + * {
  margin-left: 4px;
}

.home-table th:last-child {
  text-align: left;
}

.home-table .home-actions .ghost,
.home-table .home-actions .primary {
  padding: 4px 8px;
  font-size: 12px;
  white-space: nowrap;
}

.home-table .table-empty {
  margin: 0;
  padding: 16px 8px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.home-table tbody tr.is-empty:hover td {
  background: var(--sheet);
}

.home-table .cell-tags {
  display: table-cell;
  overflow: visible;
  white-space: normal;
  vertical-align: middle;
}

.home-table .tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.admin-stack {
  display: grid;
  gap: 16px;
  min-width: 0;
}

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

.assign-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 16px;
}

.check-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--green-line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

.vocab-hub {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
  align-items: stretch;
}

.vocab-hub > .panel {
  min-height: 0;
  overflow: auto;
}

.vocab-hub > .vocab-side {
  overflow: visible;
}

.vocab-assigned h2,
.vocab-side h2 {
  font-size: 28px;
  margin: 4px 0 12px;
  color: var(--green-ink);
}

.vocab-side {
  min-width: 0;
}

.vocab-assigned .card-head h2 {
  margin: 4px 0 0;
}

.vocab-assigned:has(.empty-state),
.essay-session-panel:has(.empty-state),
.home-feature:has(.empty-state),
.home-grid > .panel:has(.empty-state) {
  display: flex;
  flex-direction: column;
}

.vocab-assigned .empty-state,
.essay-session-panel .empty-state,
.home-feature .empty-state,
.home-grid > .panel .empty-state {
  flex: 1;
  min-height: 180px;
  grid-column: 1 / -1;
}

.empty-state {
  display: grid;
  justify-items: center;
  align-content: center;
  text-align: center;
  gap: 10px;
  padding: 12px 8px 8px;
  list-style: none;
}

.empty-state .session-meta {
  margin: 0;
  max-width: 28em;
  line-height: 1.5;
}

.empty-art {
  width: min(100%, 320px);
  height: 188px;
}

.empty-scene {
  width: 100%;
  height: 188px;
  overflow: visible;
}

.empty-orb {
  fill: rgba(0, 98, 65, 0.12);
  transform-box: fill-box;
  transform-origin: center;
  animation: wel-pulse 4.2s ease-in-out infinite;
}

.empty-orb-b {
  fill: rgba(181, 139, 42, 0.2);
  animation-duration: 5s;
  animation-delay: -1s;
}

.empty-plant {
  transform-box: fill-box;
  transform-origin: 86px 148px;
  animation: wel-sway 3.4s ease-in-out infinite;
}

.empty-plant path {
  fill: rgba(0, 98, 65, 0.18);
  stroke: var(--green);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-board {
  fill: url(#vempty-board);
}

.empty-paper,
.empty-sheet {
  fill: url(#vempty-page);
  stroke: rgba(0, 98, 65, 0.18);
  stroke-width: 1.2;
}

.empty-sheet {
  fill: url(#sempty-page);
}

.empty-sheet-back {
  fill: url(#sempty-cover);
  opacity: 0.85;
  transform: translate(6px, 6px);
}

.empty-clip {
  transform-box: fill-box;
  transform-origin: center;
  animation: wel-float 3.8s ease-in-out infinite;
}

.empty-clip-top {
  fill: none;
  stroke: #c9a227;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-rule {
  fill: none;
  stroke: rgba(0, 98, 65, 0.22);
  stroke-width: 2;
  stroke-linecap: round;
}

.empty-stack {
  transform-box: fill-box;
  transform-origin: center;
  animation: wel-float 4s ease-in-out infinite;
}

.empty-quill {
  fill: #c9a227;
  transform-box: fill-box;
  transform-origin: 210px 80px;
  animation: wel-wiggle 3.2s ease-in-out infinite;
}

.empty-spark {
  fill: #c9a227;
  transform-box: fill-box;
  transform-origin: center;
  animation: wel-twinkle 2.4s ease-in-out infinite;
}

.empty-spark-b {
  animation-delay: -1s;
}

.empty-glass {
  transform-box: fill-box;
  transform-origin: 188px 58px;
  animation: wel-wiggle 3.4s ease-in-out infinite;
}

.empty-glass circle {
  fill: url(#cempty-page);
  stroke: var(--green);
  stroke-width: 3;
}

.empty-glass path {
  fill: none;
  stroke: var(--green);
  stroke-width: 5;
  stroke-linecap: round;
}

.empty-desk {
  fill: rgba(0, 98, 65, 0.1);
}

.empty-letter-a,
.empty-letter-zh {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 18px;
  fill: var(--green);
}

.empty-letter-zh {
  fill: #c9a227;
  animation: wel-twinkle 3s ease-in-out infinite;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: 0.01em;
  white-space: nowrap;
  background: var(--green-soft);
  color: var(--green-ink);
}

.status-pill.is-in_school,
.status-pill.is-active,
.status-pill.is-scheduled,
.status-pill.is-live,
.status-pill.is-passed,
.status-pill.is-complete {
  background: #d7efe4;
  color: #0f6b45;
}

.status-pill.is-progress,
.status-pill.is-incomplete,
.status-pill.is-assigned {
  background: #f4ead0;
  color: #8a6508;
}

.status-pill.is-overdue {
  background: #f8e0e0;
  color: #9b3a3a;
}

.due-mark {
  font-weight: 600;
}

.due-mark.is-overdue {
  color: #9b3a3a;
}

.due-mark.is-soon {
  color: #8a6508;
}

.due-mark.is-done {
  color: var(--muted);
  font-weight: 500;
}

.status-pill.is-graduated,
.status-pill.is-archived,
.status-pill.is-ended {
  background: #eceae4;
  color: #5a5852;
}

.status-pill.is-unset {
  background: #f3f1ea;
  color: #6e6c66;
  box-shadow: inset 0 0 0 1px var(--green-line);
}

.status-pill.is-behind {
  background: #f8e0d8;
  color: #9a3b24;
}

.status-pill.is-removed,
.status-pill.is-suspended,
.status-pill.is-failed {
  background: #fde8e8;
  color: #8a1f1f;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.card-head h2,
.card-head h3 {
  margin: 0;
}

.range-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.range-pill {
  border: 1px solid var(--green-line);
  background: transparent;
  border-radius: 999px;
  padding: 5px 12px;
  font: 600 12px Outfit, sans-serif;
  color: var(--muted);
  cursor: pointer;
}

.range-pill.is-on {
  background: var(--green-selected);
  color: var(--green-ink);
  border-color: transparent;
}

.person-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.person-id {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  line-height: 1.2;
}

.person-user {
  display: block;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.person-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.role-tag {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

.mini-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-ink);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 11px;
  flex-shrink: 0;
}

.mini-icon {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green-ink);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.mini-icon svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cap-radar-card {
  display: grid;
  grid-template-columns: minmax(180px, 1.15fr) minmax(0, 0.9fr);
  gap: 8px 12px;
  align-items: center;
  min-width: 0;
  overflow: visible;
}

.cap-radar-card.is-chart {
  grid-template-columns: 1fr;
  justify-items: center;
}

.cap-radar {
  width: 100%;
  max-width: 280px;
  height: auto;
  overflow: visible;
  justify-self: center;
}

.cap-radar-plot {
  position: relative;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1;
  margin: 0 auto;
  overflow: visible;
}

.cap-radar-plot .cap-radar {
  position: absolute;
  inset: 8%;
  width: auto;
  max-width: none;
  height: auto;
  justify-self: stretch;
}

.radar-spoke {
  position: absolute;
  left: calc(50% + var(--x) * 43%);
  top: calc(50% + var(--y) * 43%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 0;
  max-width: 6.8em;
  padding: 3px 7px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--sheet) 94%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--green-line) 70%, transparent);
  color: var(--green-ink);
  line-height: 1.15;
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.radar-spoke.is-top {
  transform: translate(-50%, -92%);
}

.radar-spoke.is-tr,
.radar-spoke.is-br {
  transform: translate(-8%, -50%);
}

.radar-spoke.is-tl,
.radar-spoke.is-bl {
  transform: translate(-92%, -50%);
}

.radar-spoke b {
  font-size: 13px;
  font-weight: 700;
  font-family: Outfit, "PingFang SC", "Noto Sans SC", sans-serif;
}

.radar-spoke small {
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--green);
}

.cap-radar-stat {
  min-width: 0;
}

.radar-ring {
  fill: none;
  stroke: var(--green-line);
  stroke-width: 1.2;
}

.radar-axis {
  stroke: var(--green-line);
  stroke-width: 1.2;
}

.radar-fill {
  fill: rgba(0, 98, 65, 0.18);
  stroke: var(--green);
  stroke-width: 2;
}

.radar-dot {
  fill: var(--green);
  stroke: #fff;
  stroke-width: 1.2;
}

.radar-label {
  fill: var(--green-ink);
  font-size: 13px;
  font-family: Outfit, sans-serif;
  font-weight: 600;
}

.radar-pct {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.cap-radar-stat .vocab-size {
  margin: 0;
  flex-wrap: wrap;
  gap: 6px;
}

.cap-radar-stat .vocab-size strong {
  font-size: clamp(28px, 3.6vw, 40px);
  line-height: 1;
}

.cap-radar-stat .vocab-size span {
  font-size: 14px;
}

.cap-band {
  margin: 4px 0 0;
  color: var(--green-ink);
  font-size: 13px;
  font-weight: 600;
}

.cap-legend {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 3px;
}

.cap-legend li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  font-size: 12px;
  line-height: 1.35;
  color: var(--green-ink);
}

.cap-legend span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cap-legend b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.cap-radar-stat .session-meta {
  margin: 8px 0 0;
  max-width: 28em;
  line-height: 1.45;
}

.vocab-side.has-capacity,
.cap-panel {
  text-align: center;
}

.vocab-side.has-capacity {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vocab-side.has-capacity .eyebrow,
.cap-panel .card-head {
  width: 100%;
}

.vocab-side.has-capacity .eyebrow,
.cap-panel .card-head,
.cap-panel .card-head .eyebrow {
  align-self: stretch;
  text-align: left;
}

.vocab-side .cap-radar-card,
.vocab-capacity .cap-radar-card,
.cap-panel .cap-radar-card,
.home-grid .cap-radar-card {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  width: 100%;
}

.vocab-side .cap-radar-stat,
.vocab-capacity .cap-radar-stat,
.cap-panel .cap-radar-stat {
  text-align: center;
}

.vocab-side .cap-radar-plot,
.vocab-capacity .cap-radar-plot,
.cap-panel .cap-radar-plot,
.home-grid .cap-radar-plot {
  max-width: 340px;
}

.home-banner.is-ok {
  background: var(--green-soft);
  color: var(--green-ink);
}

.modal-card {
  position: relative;
  width: min(720px, calc(100% - 32px));
  max-height: min(86vh, 820px);
  overflow: auto;
  background: var(--sheet);
  border-radius: 20px;
  padding: 24px;
  border: 1px solid var(--green-line);
}

.modal-card.quit-modal-card {
  position: relative;
  width: min(328px, calc(100% - 40px));
  max-height: none;
  overflow: visible;
  padding: 22px 20px 18px;
  display: grid;
  gap: 8px;
  text-align: left;
}

.quit-modal-card h2 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 400;
}

.quit-modal-card .session-meta {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.quit-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.quit-modal-actions.has-save {
  grid-template-columns: 1fr;
}

.quit-modal-actions .ghost,
.quit-modal-actions .primary {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
}

.modal-card.modal-wide {
  width: min(1100px, calc(100% - 24px));
  max-height: min(90vh, 920px);
}

.modal-card.modal-wide:has(#assign-form) {
  height: min(90vh, 820px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-card.modal-wide:has(#assign-form) .assign-modal {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.modal-card.modal-wide:has(#assign-form) .assign-layout {
  min-height: 0;
  height: 100%;
  align-items: stretch;
  overflow: hidden;
}

.modal-card.modal-wide:has(#assign-form) .assign-col {
  min-height: 0;
  overflow: auto;
  align-content: start;
}

.modal-card.modal-wide:has(#assign-form) .assign-col-vocab,
.modal-card.modal-wide:has(#assign-form) .assign-col-types,
.modal-card.modal-wide:has(#assign-form) .assign-col-students {
  display: flex;
  flex-direction: column;
}

.modal-card.modal-wide:has(#assign-form) .assign-suite-list,
.modal-card.modal-wide:has(#assign-form) .assign-type-groups,
.modal-card.modal-wide:has(#assign-form) .assign-list-checks {
  flex: 1 1 auto;
  max-height: none;
  min-height: 0;
}

.modal-card.modal-wide:has(#assign-form) .assign-student-wrap {
  flex: 1 1 auto;
  max-height: none;
  min-height: 0;
}

.modal-form {
  display: grid;
  gap: 14px;
}

.custom-question-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px max(24px, env(safe-area-inset-right)) 24px max(24px, env(safe-area-inset-left));
  background: rgba(18, 24, 32, .28);
}
.modal-card.has-custom-question-overlay { overflow: visible; }
.custom-question-dialog {
  width: min(680px, 100%);
  max-height: min(760px, calc(100dvh - 48px));
  overflow: auto;
  padding: 24px;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #dfe4ea);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(18, 24, 32, .18);
}
.custom-question-dialog .modal-form { margin: 0; }

.ca-custom-question-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding: 22px 24px 24px;
  background: var(--paper);
}
.ca-custom-question-overlay [hidden] { display: none !important; }
.ca-custom-question-form {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 42rem;
  margin: 0 auto;
}
.ga-vocab-form {
  max-width: none;
}
.ga-vocab-form .cl-pick-grid {
  min-height: 320px;
}
.ga-vocab-list {
  align-content: start;
  gap: 2px;
  padding: 8px;
}
.ca-custom-question-form .modal-actions { margin-top: 6px; }
.ca-added-tasks { display: grid; gap: 6px; margin-top: 10px; }
.ca-added-task-list { display: grid; gap: 6px; }
.ca-added-task {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  padding: 6px 10px;
  min-height: 36px;
  border: 1px solid var(--green-line);
  border-radius: 10px;
  background: #fff;
}
.ca-added-task > div { min-width: 0; }
.ca-added-task .cl-source-tag,
.assign-task-card .cl-source-tag {
  min-width: 88px;
  justify-self: start;
  text-align: center;
}
.ca-added-task-text,
.assign-task-text {
  margin: 0;
  min-width: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--green-ink-strong, #14241c);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ca-added-task-tools {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  justify-self: end;
}
input.ca-task-input.ui-input {
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 10px;
}
.cl-static-value {
  margin: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--green-ink-strong, #14241c);
}
.cl-klass-card.is-compact {
  padding: 10px 14px;
}
.cl-klass-card.is-compact .cl-klass-mark {
  width: 40px;
  height: 40px;
}
.cl-klass-card.is-compact h3 {
  margin: 0;
  font-size: 20px;
}
.ca-slide .cl-meta-grid {
  grid-template-columns: minmax(140px, 1.1fr) minmax(0, 1.2fr) minmax(0, 0.9fr);
}
.assign-task-card.is-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px 12px;
  padding: 8px 12px;
}
.assign-task-card.is-row > div {
  display: contents;
}
.assign-acc {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green-ink);
  white-space: nowrap;
}
.assign-progress {
  font-size: 12px;
  font-weight: 600;
  color: var(--green-ink);
  white-space: nowrap;
}
.assign-task-done {
  justify-self: end;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.assign-task-card.is-row .status-pill.assign-task-done {
  margin: 0;
  gap: 6px;
  position: relative;
  overflow: visible;
}
.assign-done-check {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}
.assign-task-card.is-row {
  min-height: 48px;
}
.assign-task-card.is-row .ghost,
.assign-task-card.is-row .primary,
.assign-task-card.is-row .status-pill.assign-task-done {
  min-height: 32px;
  min-width: 72px;
  padding: 0 12px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1;
}
.ca-chart-field {
  display: grid;
  gap: 10px;
}
.ca-chart-preview {
  border: 1px solid var(--green-line);
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  overflow: hidden;
}
.ca-chart-preview img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
}
.ca-chart-upload {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.ca-chart-upload input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.ca-chart-upload-btn {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--green-line);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}
.ca-chart-upload-hint {
  font-size: 12px;
  color: var(--muted, #5b6b63);
}
.student-assign-table .col-status {
  width: 18%;
}
.status-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.modal-form h2 {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
}

.modal-form h3 {
  margin: 4px 0 0;
  font-size: 16px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 4px;
}

.modal-actions .danger-btn {
  margin-right: auto;
}

.home-table thead th {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding-top: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--green-line);
}

.home-table tbody tr:hover td {
  background: var(--green-soft);
}

.home-table tbody tr.is-skel:hover td,
.home-table tbody tr.is-empty:hover td {
  background: var(--sheet);
}

.roster-card .home-table {
  margin-top: 4px;
}

.table-wrap {
  width: 100%;
  min-width: 0;
  overflow: auto;
  overscroll-behavior-x: contain;
}

.home-table.table-pin {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  width: max-content;
  min-width: 100%;
}

.home-table.table-fit {
  width: 100%;
  min-width: 0;
  table-layout: auto;
}

.home-table.table-fit th:last-child,
.home-table.table-fit td.home-actions {
  width: 9rem;
  min-width: 9rem;
}

.table-pin th:first-child,
.table-pin td:first-child {
  width: 0;
  min-width: 0;
  max-width: 13rem;
  white-space: nowrap;
}

.table-pin.is-picking th:first-child,
.table-pin.is-picking td:first-child {
  min-width: 44px;
  max-width: 52px;
}

.table-wrap.is-pin-end .table-pin th:last-child,
.table-wrap.is-pin-end .table-pin td.home-actions,
.table-wrap.is-pin-end .table-pin td.cell-action {
  width: 0;
  min-width: 0;
  max-width: none;
  text-align: left;
  white-space: nowrap;
}

.table-wrap.is-pin.is-overflow .table-pin > thead > tr > th:first-child,
.table-wrap.is-pin.is-overflow .table-pin > tbody > tr > td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--sheet);
  background-clip: padding-box;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-wrap.is-pin.is-overflow .table-pin > tbody > tr > td:first-child .person-cell {
  max-width: 100%;
}

.table-wrap.is-pin.is-overflow .table-pin > thead > tr > th:first-child {
  z-index: 5;
}

.table-wrap.is-pin.is-overflow.is-pin-end .table-pin > thead > tr > th:last-child,
.table-wrap.is-pin.is-overflow.is-pin-end .table-pin td.home-actions,
.table-wrap.is-pin.is-overflow.is-pin-end .table-pin td.cell-action {
  position: sticky;
  right: 0;
  z-index: 4;
  background: var(--sheet);
  background-clip: padding-box;
  text-align: left;
  white-space: nowrap;
}

.table-wrap.is-pin-end .table-pin td.home-actions,
.table-wrap.is-pin-end .table-pin td.cell-action {
  overflow: visible;
}

.table-wrap.is-pin.is-overflow.is-pin-end .table-pin > thead > tr > th:last-child {
  z-index: 6;
}

.table-wrap.is-pin .table-pin tbody tr:hover td,
.table-wrap.is-pin .table-pin tbody tr:hover td:first-child,
.table-wrap.is-pin .table-pin tbody tr:hover td:last-child {
  background: var(--green-soft);
}

.table-wrap.is-pin .table-pin tbody tr.is-empty td,
.table-wrap.is-pin .table-pin td[colspan] {
  position: static;
  left: auto;
  right: auto;
  background: var(--sheet);
  box-shadow: none;
}

.table-wrap.is-pin .table-pin tbody tr.is-empty:hover td {
  background: var(--sheet);
}

.table-wrap.has-left-shadow .table-pin > thead > tr > th:first-child,
.table-wrap.is-pin.has-left-shadow .table-pin > tbody > tr > td:first-child {
  box-shadow: 8px 0 10px -2px rgba(20, 36, 28, 0.16);
}

.table-wrap.is-pin-end.has-right-shadow .table-pin > thead > tr > th:last-child,
.table-wrap.is-pin-end.has-right-shadow .table-pin td.home-actions,
.table-wrap.is-pin-end.has-right-shadow .table-pin td.cell-action {
  box-shadow: -8px 0 10px -2px rgba(20, 36, 28, 0.16);
}

.table-wrap.is-pin .table-pin tbody tr.is-flash td:first-child,
.table-wrap.is-pin .table-pin tbody tr.is-flash td:last-child {
  animation: rowFlashCell 1s ease;
}

@keyframes rowFlashCell {
  0% { background: var(--green-selected); }
  100% { background: var(--sheet); }
}

.home-table tbody tr.is-miss,
.home-table tbody tr.is-page-hide {
  display: none;
}

.table-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: 8px 0 0;
}

.table-pager[hidden] {
  display: none !important;
}

.table-pager-status {
  min-width: 4.5em;
  text-align: center;
  font: 500 12px/1 Outfit, sans-serif;
  color: var(--muted);
}

.table-pager .ghost {
  min-width: 0;
  padding: 5px 10px;
  font-size: 12px;
}

.home-table .col-person {
  width: 38%;
}

.home-table .col-status {
  width: 16%;
}

.home-table .col-when {
  width: 28%;
}

.home-table .col-num,
.home-table .col-action {
  width: 14%;
}

.roster-table .col-action {
  width: 24%;
}

.home-actions .ghost {
  padding: 4px 10px;
  font-size: 12px;
  white-space: nowrap;
}

.roster-table td:nth-child(2),
.roster-table td:nth-child(3),
.roster-table td:nth-child(4) {
  white-space: nowrap;
}

.home-admin.is-refreshing .home-kpis,
.home-admin.is-refreshing .home-table {
  opacity: 0.72;
  transition: opacity 0.2s ease;
}

.ui-menu-list[hidden] {
  display: none !important;
}

.welcome-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 8px 16px;
  align-items: center;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(181, 139, 42, 0.18), transparent 56%),
    radial-gradient(80% 80% at 0% 120%, rgba(0, 98, 65, 0.12), transparent 50%),
    var(--sheet);
}

.welcome-copy {
  min-width: 0;
  z-index: 1;
}

.welcome-card h2 {
  font-size: clamp(28px, 3vw, 38px);
  margin: 4px 0 8px;
  color: var(--green-ink);
}

.welcome-days {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  max-width: 36em;
}

.welcome-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.home-quota-card h2 {
  margin: 4px 0 12px;
  color: var(--green-ink);
}

.home-quota {
  margin: 0;
  max-width: none;
}

.home-quota-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--green-ink);
}

.home-quota-line,
.home-quota-none {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--muted);
}

.home-quota-bar {
  height: 6px;
  border-radius: 99px;
  background: rgba(0, 98, 65, 0.12);
  overflow: hidden;
  margin: 0 0 10px;
}

.home-quota-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green-ink);
}

.home-quota-bar.is-day span {
  background: var(--gold);
}

.home-quota-break {
  list-style: none;
  margin: 6px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--green-line);
  display: grid;
  gap: 7px;
}

.home-quota-break-kicker {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
}

.home-quota-break li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  font-size: 13px;
  color: var(--muted);
}

.home-quota-break strong {
  font-weight: 600;
  color: var(--green-ink);
  font-variant-numeric: tabular-nums;
}

.welcome-art {
  height: 148px;
}

.welcome-scene {
  width: 100%;
  height: 148px;
  overflow: visible;
}

.wel-orb {
  fill: rgba(0, 98, 65, 0.12);
  transform-box: fill-box;
  transform-origin: center;
  animation: wel-pulse 4.2s ease-in-out infinite;
}

.wel-orb-b {
  fill: rgba(181, 139, 42, 0.2);
  animation-duration: 5s;
  animation-delay: -1s;
}

.wel-plant {
  transform-box: fill-box;
  transform-origin: 86px 148px;
  animation: wel-sway 3.4s ease-in-out infinite;
}

.wel-plant path {
  fill: rgba(0, 98, 65, 0.18);
  stroke: var(--green);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wel-book {
  transform-box: fill-box;
  transform-origin: center;
  animation: wel-float 3.6s ease-in-out infinite;
}

.wel-cover {
  fill: url(#wel-cover);
}

.wel-leaf {
  fill: #f4ead0;
}

.wel-sheet {
  fill: url(#wel-page);
  stroke: rgba(0, 98, 65, 0.18);
  stroke-width: 1;
}

.wel-rule {
  fill: none;
  stroke: rgba(0, 98, 65, 0.28);
  stroke-width: 1.5;
  stroke-linecap: round;
}

.wel-pencil {
  transform-box: fill-box;
  transform-origin: center;
  animation: wel-wiggle 2.4s ease-in-out infinite;
}

.wel-pencil path:first-child {
  fill: #c9a227;
}

.wel-pencil path:last-child {
  fill: #5d6e66;
}

.wel-spark {
  fill: var(--gold);
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes wel-wiggle {
  0%,
  100% {
    transform: rotate(-12deg) translateY(0);
  }
  50% {
    transform: rotate(8deg) translateY(-6px);
  }
}

.wel-spark-a {
  animation: wel-twinkle 1.7s ease-in-out infinite;
}

.wel-spark-b {
  animation: wel-twinkle 2.1s ease-in-out infinite 0.35s;
}

.wel-spark-c {
  animation: wel-twinkle 1.9s ease-in-out infinite 0.7s;
}

.wel-desk {
  fill: rgba(0, 98, 65, 0.1);
}

@keyframes wel-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes wel-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.72;
  }
}

@keyframes wel-twinkle {
  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.75);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@keyframes wel-sway {
  0%,
  100% {
    transform: rotate(-5deg);
  }
  50% {
    transform: rotate(6deg);
  }
}

.skel {
  display: block;
  background: linear-gradient(90deg, var(--green-soft) 20%, #f7fbf8 45%, var(--green-soft) 70%);
  background-size: 200% 100%;
  animation: skel-shine 1.15s ease infinite;
  border-radius: 8px;
}

.skel-num {
  width: 64px;
  height: 32px;
  border-radius: 10px;
}

.skel-line {
  width: 72%;
  height: 10px;
}

.skel-line-short {
  width: 48%;
  height: 8px;
  margin-top: 4px;
}

.skel-line-tiny {
  width: 28px;
  height: 10px;
}

.skel-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
}

@keyframes skel-shine {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

.ui-field {
  display: grid;
  gap: 6px;
  margin: 0;
  min-width: 0;
}

.ui-field > span:first-child {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.ui-input,
.ui-select select,
.login-card input:not([type="checkbox"]):not([type="radio"]) {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 42px;
  border: 1px solid var(--green-line);
  border-radius: 12px;
  padding: 0 14px;
  font: 500 14px/1 Outfit, system-ui, sans-serif;
  background: #fff;
  color: var(--ink);
}

textarea.ui-input {
  height: auto;
  min-height: 88px;
  padding: 10px 14px;
  line-height: 1.5;
  resize: vertical;
}

.ui-input::placeholder,
.login-card input::placeholder,
textarea.ui-input::placeholder {
  color: #9aa39a;
  font-weight: 500;
}

.ui-datetime {
  display: block;
  position: relative;
  min-width: 0;
}

.ui-datetime .ui-input[type="datetime-local"],
.ui-input[type="datetime-local"],
.ui-input[type="date"],
.ui-input[type="time"] {
  appearance: auto;
  -webkit-appearance: auto;
  min-height: 42px;
  height: 42px;
  color-scheme: light;
  padding: 0 10px 0 12px;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
}

.ui-input[type="datetime-local"]::-webkit-datetime-edit,
.ui-input[type="date"]::-webkit-datetime-edit,
.ui-input[type="time"]::-webkit-datetime-edit {
  display: inline-flex;
  align-items: center;
  padding: 0;
  height: 100%;
  line-height: 1.2;
}

.ui-input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper,
.ui-input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.ui-input[type="time"]::-webkit-datetime-edit-fields-wrapper {
  display: inline-flex;
  align-items: center;
  padding: 0;
}

.ui-input[type="datetime-local"]::-webkit-datetime-edit-text,
.ui-input[type="date"]::-webkit-datetime-edit-text,
.ui-input[type="time"]::-webkit-datetime-edit-text,
.ui-input[type="datetime-local"]::-webkit-datetime-edit-month-field,
.ui-input[type="datetime-local"]::-webkit-datetime-edit-day-field,
.ui-input[type="datetime-local"]::-webkit-datetime-edit-year-field,
.ui-input[type="datetime-local"]::-webkit-datetime-edit-hour-field,
.ui-input[type="datetime-local"]::-webkit-datetime-edit-minute-field,
.ui-input[type="date"]::-webkit-datetime-edit-month-field,
.ui-input[type="date"]::-webkit-datetime-edit-day-field,
.ui-input[type="date"]::-webkit-datetime-edit-year-field {
  padding: 0 1px;
  line-height: 1.2;
}

.ui-input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.ui-input[type="date"]::-webkit-calendar-picker-indicator,
.ui-input[type="time"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.55;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  flex-shrink: 0;
}

.ui-select {
  position: relative;
  display: block;
}

.ui-select::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.ui-select select {
  padding-right: 36px;
  cursor: pointer;
}

.ui-input:hover:not(:disabled):not(:focus),
.ui-select select:hover:not(:disabled):not(:focus),
.login-card input:hover:not(:disabled):not(:focus) {
  border-color: color-mix(in srgb, var(--green) 55%, var(--green-line));
}

.ui-input:focus,
.ui-select select:focus,
.login-card input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-selected);
}

.ui-input:disabled,
.ui-select select:disabled,
.login-card input:disabled {
  background: #eef3ef;
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.72;
}

.assign-checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  margin: 0;
}

.assign-list-checks {
  flex: 1 1 auto;
  min-height: 280px;
  max-height: none;
  height: 100%;
  overflow: auto;
  align-content: start;
  border: 1px solid color-mix(in srgb, var(--green-ink) 18%, transparent);
  border-radius: 10px;
  padding: 6px;
  box-sizing: border-box;
}

.assign-list-checks.assign-checks {
  grid-template-columns: 1fr;
  gap: 2px;
  margin: 0;
}

.assign-list-checks > .ui-check {
  min-height: 34px;
  height: 34px;
  box-sizing: border-box;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  overflow: hidden;
  font: 500 13px/1.3 Outfit, system-ui, sans-serif;
  gap: 8px;
}

.assign-list-checks > .ui-check:hover {
  background: color-mix(in srgb, var(--green-ink) 10%, transparent);
}

#school-lesson-form .assign-list-checks {
  flex: none;
  min-height: 160px;
  max-height: min(40vh, 320px);
  height: auto;
}

.assign-list-checks > .ui-check > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  font-size: inherit;
  font-weight: inherit;
}

.ui-check {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid var(--green-line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.3;
  min-width: 0;
}

.ui-check input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.ui-check-box {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1.5px solid var(--green-line);
  background: #fff;
  flex-shrink: 0;
  position: relative;
}

.ui-check input:checked + .ui-check-box {
  background: var(--green);
  border-color: var(--green);
}

.ui-check input:checked + .ui-check-box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: 0;
  border-left: 0;
  transform: rotate(45deg);
}

.ui-check:has(input:checked) {
  background: var(--green-soft);
  border-color: transparent;
}

.ui-check:hover {
  border-color: color-mix(in srgb, var(--green) 50%, var(--green-line));
  background: var(--green-soft);
}

.ui-check:active {
  background: var(--green-selected);
}

.ui-check:has(input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}

.ui-check input:disabled {
  cursor: not-allowed;
}

.ui-check:focus-within {
  box-shadow: 0 0 0 3px var(--green-selected);
}

.modal-busy {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  background: rgba(255, 252, 247, 0.8);
  backdrop-filter: blur(3px);
  border-radius: 20px;
}

.modal-busy[hidden] {
  display: none;
}

.modal-busy p {
  margin: 0;
  font-weight: 600;
  color: var(--green-ink);
}

.modal-card.is-busy {
  overflow: hidden;
}

.assign-modal .assign-filters {
  margin-top: 4px;
}

.class-teacher-wrap {
  max-height: 180px;
  overflow: auto;
  margin-top: 8px;
}

.homework-board .home-kpis {
  margin-bottom: 16px;
}

@media (max-width: 980px) {
  .home-grid,
  .home-side,
  .home-main,
  .vocab-hub,
  .assign-filters,
  .assign-layout,
  .home-kpis,
  .welcome-card,
  .cap-radar-card,
  .vocab-side .cap-radar-card,
  .vocab-capacity .cap-radar-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .cap-legend {
    width: min(100%, 220px);
    margin-inline: auto;
  }

  .welcome-art {
    height: 120px;
    justify-self: end;
    width: min(220px, 50%);
  }

  .assign-col-vocab {
    padding-right: 0;
    padding-bottom: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--green-line);
  }

  .assign-layout-content .assign-col-vocab {
    padding-right: 0;
    border-right: 0;
  }

  .assign-layout-content .assign-col-types {
    padding-left: 0;
    padding-top: 8px;
  }

  .assign-layout-people .assign-col-basket {
    padding-right: 0;
    padding-bottom: 18px;
    border-right: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--green-ink) 32%, transparent);
  }

  .assign-layout-people .assign-col-students {
    padding-left: 0;
    padding-top: 8px;
  }

  .assign-col-students {
    padding-left: 0;
    padding-top: 8px;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.card-head-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.table-search {
  margin: 0;
  width: 240px;
  min-width: 200px;
  flex: 0 0 240px;
}

.table-search .ui-input {
  height: 38px;
}

.table-status {
  margin: 0;
  min-width: 148px;
  flex: 0 0 auto;
}

.table-status .ui-select,
.table-status .ui-menu {
  display: block;
}

.table-status .ui-menu-btn,
.table-status select {
  height: 38px;
}

.table-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}

.school-fb-filters {
  margin: 0 0 12px;
}

.table-toolbar.school-grades-tools {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: stretch;
  gap: 10px;
  margin: 0 0 12px;
}

.school-grades-tools .table-status {
  flex: 0 1 220px;
  width: auto;
  min-width: 0;
}

.home-table .col-name {
  width: 24%;
}

.home-table .col-user,
.cell-user {
  width: 22%;
}

.roster-table .col-status {
  width: 16%;
}

.roster-table .col-when {
  width: 22%;
}

.roster-table .col-action {
  width: 16%;
}

.cell-user {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--muted);
}

.assign-student-table td:first-child,
.assign-student-table th:first-child {
  text-align: left;
  overflow: visible;
}

.home-table.assign-student-table col.col-check {
  width: 28px;
}

.home-table.assign-student-table col.col-name {
  width: 52%;
}

.home-table.assign-student-table col.col-user {
  width: auto;
}

.assign-student-table th:first-child,
.assign-student-table td:first-child {
  width: 28px;
  padding-left: 8px;
  padding-right: 0;
}

.assign-student-table td:nth-child(2),
.assign-student-table th:nth-child(2) {
  padding-left: 4px;
}

.assign-student-table td:first-child .ui-check-solo {
  margin: 0;
  padding: 0;
  width: 22px;
  height: 22px;
}

.home-table tbody tr[hidden] {
  display: none;
}

.ui-check-solo {
  padding: 4px;
  border: 0;
  background: transparent;
  width: 26px;
  height: 26px;
}

.ui-native,
.ui-select select.ui-native,
.ui-menu select.ui-native,
.ui-select select.ui-native:disabled,
.ui-menu select.ui-native:disabled {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0 !important;
  pointer-events: none;
  width: 0 !important;
  height: 0 !important;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip: rect(0, 0, 0, 0);
}

.ui-menu.ui-select::after {
  display: none;
}

.ui-menu-btn {
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--green-line);
  border-radius: 12px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  font: 500 14px Outfit, system-ui, sans-serif;
  cursor: pointer;
}

.ui-menu-btn:hover:not(:disabled):not(:focus) {
  border-color: color-mix(in srgb, var(--green) 55%, var(--green-line));
}

.ui-menu-btn:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-selected);
}

.ui-menu-btn:active:not(:disabled) {
  background: var(--green-soft);
}

.ui-menu-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #eef3ef;
}

.ui-menu-caret {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: translateY(-2px) rotate(45deg);
  flex-shrink: 0;
}

.ui-menu.is-open .ui-menu-caret {
  transform: translateY(2px) rotate(225deg);
}

.ui-menu-list {
  position: fixed;
  z-index: 80;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--sheet);
  border: 1px solid var(--green-line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-height: min(360px, 50vh);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ui-menu-list button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 8px 10px;
  font: 500 13px Outfit, system-ui, sans-serif;
  color: var(--ink);
  cursor: pointer;
}

.ui-menu-list button:hover,
.ui-menu-list button.is-on {
  background: var(--green-soft);
  color: var(--green-ink);
}

.ui-menu-list button:active:not(:disabled) {
  background: var(--green-selected);
}

.ui-menu-list button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: -2px;
}

.ui-menu-list button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ui-menu-group {
  padding: 8px 10px 4px;
  font: 600 10px/1.2 Outfit, system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.assign-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 22px 0;
  align-items: start;
}

.assign-layout-content {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: 0;
  height: 100%;
  min-height: 0;
}

.assign-layout-content .assign-col-vocab,
.assign-layout-content .assign-col-types {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  gap: 10px;
}

.assign-layout-content .assign-inline-row {
  flex: 0 0 auto;
}

.assign-layout-content .assign-col-vocab {
  padding-right: 28px;
  border-right: 1px solid color-mix(in srgb, var(--green-ink) 32%, transparent);
}

.assign-layout-content .assign-col-types {
  padding-left: 28px;
}

.assign-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
}

.assign-section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  flex: 0 0 auto;
}

.assign-col {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.assign-col-vocab {
  padding-right: 28px;
  border-right: 1px solid color-mix(in srgb, var(--green-ink) 32%, transparent);
}

.assign-steps {
  display: none;
}

.assign-layout-people {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: 0;
  align-items: start;
}

.assign-layout-people .assign-col-basket {
  padding-right: 28px;
  border-right: 1px solid color-mix(in srgb, var(--green-ink) 32%, transparent);
}

.assign-layout-people .assign-col-students {
  padding-left: 28px;
}

.assign-basket-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.assign-basket-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--green-ink) 6%, transparent);
  cursor: grab;
}

.assign-basket-item.is-dragging {
  opacity: 0.45;
}

.assign-basket-item.is-drag-over {
  outline: 1px dashed color-mix(in srgb, var(--green-ink) 55%, transparent);
}

.assign-basket-drag {
  opacity: 0.45;
  user-select: none;
}

.assign-type-row {
  display: grid;
  grid-template-columns: 18px 5.75rem 6.5rem minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
  padding-left: 12px;
  padding-right: 12px;
}

.assign-type-row .ui-check-box {
  grid-column: 1;
  margin: 0;
}

.assign-type-range,
.assign-type-tag,
.assign-type-summary {
  min-width: 0;
  line-height: 1.35;
}

.assign-type-range {
  grid-column: 2;
  white-space: nowrap;
}

.assign-type-tag {
  grid-column: 3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.assign-type-summary {
  grid-column: 4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assign-inline-field .exam-toggle,
.assign-inline-field .assign-seg {
  margin-top: 2px;
}

.assign-split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: 14px 18px;
  align-items: start;
}

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

.assign-split-left,
.assign-split-right {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.assign-suite-list {
  display: grid;
  gap: 2px;
  flex: 1 1 auto;
  min-height: 280px;
  max-height: none;
  height: 100%;
  overflow: auto;
  border: 1px solid color-mix(in srgb, var(--green-ink) 18%, transparent);
  border-radius: 10px;
  padding: 6px;
}

.assign-suite-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 34px;
  height: 34px;
  box-sizing: border-box;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0 10px;
  border-radius: 8px;
  cursor: pointer;
  color: inherit;
  font: 500 13px/1.3 Outfit, system-ui, sans-serif;
  overflow: hidden;
}

.assign-suite-item:hover,
.assign-suite-item.is-on {
  background: color-mix(in srgb, var(--green-ink) 10%, transparent);
}

.assign-suite-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
  font-size: inherit;
  font-weight: inherit;
}

.assign-suite-meta {
  flex: 0 1 auto;
  max-width: 42%;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.65;
  margin-left: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.assign-suite-picked {
  flex: 0 0 auto;
  color: var(--green-ink);
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
}

.assign-type-groups {
  flex: 1 1 auto;
  min-height: 280px;
  max-height: none;
  height: 100%;
  overflow: auto;
  display: grid;
  gap: 10px;
  align-content: start;
}

.assign-module-block {
  display: grid;
  gap: 4px;
}

.assign-module-head {
  color: #1d4f91;
  font-weight: 600;
}

.assign-seg {
  justify-self: start;
}

.assign-seg.is-triple,
.assign-seg.is-skills {
  display: inline-flex;
  flex-wrap: wrap;
  width: 100%;
}

.assign-seg.is-skills {
  max-width: 100%;
}

.assign-seg.is-skills button {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
}

.assign-inline-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px 18px;
  align-items: start;
}

.assign-inline-row.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.assign-inline-row h3 {
  margin: 0 0 6px;
}

.assign-inline-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.assign-basket {
  margin: 8px 0 4px;
}

.assign-basket-x {
  flex: 0 0 auto;
  min-width: 28px;
  padding: 0 6px;
}

.assign-analyze-check {
  margin-top: 8px;
}

.essay-plain {
  white-space: pre-wrap;
  margin: 0;
  font: inherit;
}

.assign-col-students {
  padding-left: 28px;
}

#school-class-form .assign-col-students {
  padding-left: 28px;
}

.assign-col h3 {
  margin: 4px 0 0;
}

.assign-student-head {
  align-items: center;
  margin-bottom: 8px;
  min-width: 0;
}

.assign-student-head h3 {
  margin: 0;
  flex: 0 0 auto;
}

.assign-student-head .card-head-tools {
  flex-wrap: nowrap;
}

.assign-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 32px;
  align-items: center;
}

.assign-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 999px;
  padding: 4px 8px 4px 10px;
  background: var(--green-selected);
  color: var(--green-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.assign-chip span {
  font-weight: 500;
  opacity: 0.7;
}

.assign-chip:hover:not(:disabled) {
  background: #c7e6d8;
}

.assign-chip:active:not(:disabled) {
  background: #b7dccb;
}

.assign-chip:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.assign-chip:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.assign-student-wrap {
  max-height: min(52vh, 480px);
  overflow: auto;
  border: 1px solid var(--green-line);
  border-radius: 12px;
}

.login-stage {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(280px, 420px);
  gap: 28px;
  align-items: center;
  width: min(860px, calc(100% - 32px));
}

.login-art {
  justify-self: center;
}

.login-scene {
  width: min(340px, 42vw);
  height: auto;
}

.login-orb {
  fill: rgba(0, 98, 65, 0.12);
  transform-box: fill-box;
  transform-origin: center;
  animation: wel-pulse 4.4s ease-in-out infinite;
}

.login-orb-b {
  fill: rgba(181, 139, 42, 0.18);
  animation-delay: -1.2s;
}

.login-plant path {
  fill: #2e8f63;
  stroke: #006241;
  stroke-width: 1.2;
}

.login-plant path:first-child {
  fill: none;
}

.login-cover {
  fill: url(#login-cover);
}

.login-leaf {
  fill: #f4ead0;
}

.login-sheet {
  fill: url(#login-page);
  stroke: rgba(0, 98, 65, 0.35);
  stroke-width: 1;
}

.login-rule {
  fill: none;
  stroke: rgba(0, 98, 65, 0.35);
  stroke-width: 1.2;
  stroke-linecap: round;
}

.login-book {
  animation: wel-float 3.8s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.login-lamp {
  fill: #0d5a3c;
  animation: wel-float 3.2s ease-in-out infinite 0.4s;
  transform-box: fill-box;
  transform-origin: center;
}

.login-lamp ellipse {
  fill: rgba(0, 98, 65, 0.2);
}

.login-smoke {
  fill: rgba(0, 98, 65, 0.2);
  animation: login-drift 3.6s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.login-letter {
  font: 700 18px Outfit, sans-serif;
  fill: var(--green-ink);
  animation: wel-twinkle 2.2s ease-in-out infinite;
}

.login-letter.z {
  fill: var(--gold);
  font-size: 20px;
  animation-delay: 0.6s;
}

.login-star {
  fill: var(--gold);
  transform-box: fill-box;
  transform-origin: center;
  animation: wel-twinkle 1.8s ease-in-out infinite;
}

.login-star.s2 {
  animation-delay: 0.35s;
}

.login-star.s3 {
  animation-delay: 0.7s;
}

.login-star.s4 {
  animation-delay: 1s;
}

@keyframes login-drift {
  0%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-10px) scale(1.08);
    opacity: 1;
  }
}

.account-avatar {
  overflow: visible;
}

.role-scene {
  display: grid;
  width: 40px;
  height: 40px;
  pointer-events: none;
}

.role-svg {
  width: 40px;
  height: 40px;
  grid-area: 1 / 1;
}

.role-scene[data-role="admin"] .role-learner,
.role-scene[data-role="student"] .role-teacher {
  display: none;
}

.role-glow {
  fill: rgba(255, 255, 255, 0.12);
}

.role-face {
  fill: #f4ead0;
}

.role-glasses,
.role-lens,
.role-stem,
.role-smile,
.role-tassel {
  fill: none;
  stroke: #fff;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.role-lens {
  fill: rgba(255, 255, 255, 0.18);
}

.role-apple {
  fill: #c62828;
}

.role-book,
.role-cap {
  fill: #f4ead0;
}

.role-bead {
  fill: var(--gold);
  animation: wel-twinkle 1.4s ease-in-out infinite;
}

.role-teacher {
  animation: role-bob 2.8s ease-in-out infinite;
}

.role-learner {
  animation: role-tip 2.6s ease-in-out infinite;
}

.role-tassel {
  transform-box: fill-box;
  transform-origin: 32px 14px;
  animation: role-swing 1.8s ease-in-out infinite;
}

@keyframes role-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
}

@keyframes role-tip {
  0%,
  100% {
    transform: rotate(-4deg);
  }
  50% {
    transform: rotate(5deg);
  }
}

@keyframes role-swing {
  0%,
  100% {
    transform: rotate(-18deg);
  }
  50% {
    transform: rotate(16deg);
  }
}

.vocab-side-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 8px;
  align-items: center;
}

.vocab-cap-scene {
  width: 120px;
  height: 88px;
}

.empty-art.vocab-cap-art {
  width: min(100%, 220px);
  height: 160px;
  display: grid;
  place-items: center;
}

.empty-art .vocab-cap-scene {
  width: min(100%, 200px);
  height: 148px;
}

.empty-art .vcap-book path {
  fill: url(#hcap-page);
}

.vcap-orb {
  fill: rgba(181, 139, 42, 0.18);
  transform-box: fill-box;
  transform-origin: center;
  animation: wel-pulse 4s ease-in-out infinite;
}

.vcap-glass circle {
  fill: rgba(255, 255, 255, 0.55);
  stroke: var(--green);
  stroke-width: 2;
}

.vcap-glass path {
  fill: none;
  stroke: var(--green);
  stroke-width: 3;
  stroke-linecap: round;
}

.vcap-glass {
  transform-box: fill-box;
  transform-origin: center;
  animation: vcap-scan 3.2s ease-in-out infinite;
}

.vcap-book path {
  fill: url(#vcap-page);
  stroke: var(--green);
  stroke-width: 1.2;
}

.vcap-book {
  animation: wel-float 3.4s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.vcap-a,
.vcap-b {
  fill: var(--green-ink);
  font: 700 14px Outfit, sans-serif;
}

.vcap-b {
  animation: wel-twinkle 1.8s ease-in-out infinite 0.4s;
}

.vcap-zh {
  fill: var(--gold);
  font: 700 16px Outfit, sans-serif;
  animation: wel-twinkle 2s ease-in-out infinite;
}

@keyframes vcap-scan {
  0%,
  100% {
    transform: translate(0, 0) rotate(-8deg);
  }
  50% {
    transform: translate(6px, -4px) rotate(6deg);
  }
}

@media (max-width: 980px) {
  .login-stage,
  .vocab-side-head,
  .card-head-tools {
    grid-template-columns: 1fr;
  }

  .login-stage {
    display: grid;
  }

  .login-art {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wel-book,
  .wel-orb,
  .wel-spark,
  .wel-plant,
  .wel-pencil,
  .skel,
  .login-orb,
  .login-smoke,
  .login-lamp,
  .login-star,
  .login-book,
  .login-letter,
  .role-teacher,
  .role-learner,
  .role-tassel,
  .role-bead,
  .vcap-orb,
  .vcap-glass,
  .vcap-zh,
  .vcap-book,
  .vcap-b,
  .empty-orb,
  .empty-plant,
  .empty-clip,
  .empty-stack,
  .empty-quill,
  .empty-spark,
  .empty-letter-zh {
    animation: none;
  }
}

#view-compose.is-picking .essay-change,
#view-compose.is-building .essay-change {
  display: none;
}

.essay-land-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0 0 18px;
  padding: 4px 0 10px;
  background: var(--paper);
}

.essay-land-tablist {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.land-exam-toggle {
  flex-shrink: 0;
}

.essay-land-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.essay-land-tools .table-status {
  flex: 0 0 auto;
  width: auto;
}

.land-session-filter[hidden] {
  display: none !important;
}

.essay-land-tab {
  border: 1px solid var(--green-line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font: 600 13px Outfit, system-ui, sans-serif;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.essay-land-tab.is-on {
  background: var(--green-selected);
  color: var(--green-ink);
  border-color: transparent;
}

.essay-land-tab:hover:not(:disabled):not(.is-on) {
  background: var(--green-soft);
  color: var(--green-ink);
}

.essay-land-tab:active:not(:disabled) {
  background: var(--green-selected);
}

.essay-land-tab:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.essay-land-tab:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.essay-land-panel {
  flex: 1;
  min-height: 0;
}

.essay-land-panel[hidden] {
  display: none !important;
}

.essay-land-panel[data-land-panel="write"],
.essay-land-panel[data-land-panel="practice"] {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.essay-session-panel .session-pager,
.session-pager {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
  width: 100%;
}

.essay-session-panel .js-session-list,
.essay-session-panel .js-listen-session-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
  align-items: stretch;
  max-height: none;
  overflow: visible;
  padding: 0;
  margin: 0;
  list-style: none;
  perspective: 900px;
}

.essay-session-panel .js-session-list:has(.empty-state),
.essay-session-panel .js-listen-session-list:has(.empty-state) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.assign-history {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}

.assign-history th.col-check,
.assign-history td.cell-check {
  text-align: center;
  overflow: visible;
  padding-left: 8px;
  padding-right: 4px;
}

.assign-history .col-when {
  width: 12%;
}

.assign-history .col-lists {
  width: 16%;
}

.assign-history .col-type {
  width: 10%;
}

.assign-history .col-types {
  width: 18%;
}

.assign-history .col-by {
  width: 10%;
}

.assign-history .col-who {
  width: 14%;
}

.assign-history .col-status {
  width: 10%;
}

.assign-history .col-num {
  width: 8%;
}

.home-table tbody tr.is-flash {
  animation: rowFlash 1s ease;
}

@keyframes rowFlash {
  0% { background: var(--green-selected); }
  100% { background: transparent; }
}

.assign-history .col-action {
  width: 1%;
}

.assign-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px 18px;
  margin: 0;
}

.assign-meta div {
  margin: 0;
}

.assign-meta dt {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 4px;
}

.assign-meta dd {
  margin: 0;
  font-size: 14px;
}

.assign-lists-table td[rowspan] {
  vertical-align: middle;
}

.impersonate-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
  margin: 12px 22px 0;
  padding: 10px 14px;
  border: 1px solid var(--green-line);
  border-radius: 12px;
  background: var(--green-soft);
}

.impersonate-bar[hidden] {
  display: none;
}

.impersonate-bar p {
  margin: 0;
  font-size: 14px;
  color: var(--green-ink);
}

.assign-detail-table .col-name {
  width: 28%;
}

.assign-detail-table .col-status {
  width: 16%;
}

.assign-detail-table .col-num {
  width: 18%;
}

.assign-detail-table .col-misses {
  width: 14%;
}

.assign-detail-table .cell-misses {
  white-space: nowrap;
}

.assign-miss-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.assign-miss-list li {
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--green-soft);
  font-size: 12px;
}

.assign-miss-list li span {
  color: var(--muted);
}

.assign-miss-rows {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
}

.assign-miss-rows li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--green-line);
}

.assign-miss-rows li:first-child {
  padding-top: 0;
}

.assign-miss-rows li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.assign-miss-rows li strong {
  font-size: 16px;
}

.assign-miss-rows li span {
  color: var(--muted);
  text-align: right;
}

.vocab-live .vocab-spell {
  -webkit-user-select: text;
  user-select: text;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
  font-size: 22px;
  letter-spacing: 0.04em;
}

.vocab-spell-wrap {
  position: relative;
  margin: 12px 0 24px;
  min-height: 40px;
}

.vocab-spell-slots {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-end;
  gap: 6px 8px;
  margin: 0;
  min-height: 40px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
}

.vocab-spell-hidden {
  position: absolute;
  inset: 0;
  z-index: 2;
  margin: 0;
  border: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  color: transparent;
  caret-color: transparent;
  background: transparent;
  font-size: 16px;
  -webkit-text-fill-color: transparent;
  -webkit-user-select: text;
  user-select: text;
  pointer-events: auto;
  touch-action: manipulation;
  outline: none;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

.vocab-spell-hidden:focus,
.vocab-spell-hidden:focus-visible {
  outline: none;
  border: 0;
  box-shadow: none;
}

.vocab-slot-blank,
.vocab-slot.is-given,
.vocab-slot.is-sep {
  flex: 0 0 auto;
}

.vocab-slot-blank,
.vocab-slot.is-given {
  width: 0.92em;
  min-width: 0.92em;
  border: 0;
  border-bottom: 2px dashed var(--green-ink);
  background: transparent;
  text-align: center;
  font-family: "Outfit", sans-serif;
  font-size: clamp(18px, 2.8vw, 28px);
  line-height: 1.1;
  color: var(--green-ink);
  padding: 0 0 4px;
  border-radius: 0;
  box-shadow: none;
}

.vocab-slot.is-given {
  border-bottom-style: solid;
  font-weight: 600;
}

.vocab-slot.is-sep {
  width: 0.36em;
  min-width: 0.32em;
  text-align: center;
  font-size: clamp(18px, 2.8vw, 28px);
  line-height: 1.1;
  color: var(--muted);
  padding: 0 0 4px;
}

.vocab-slot-blank.is-caret {
  border-bottom-color: var(--green);
  border-bottom-style: solid;
}

.vocab-spell-wrap:hover .vocab-slot-blank:not(.is-caret) {
  border-bottom-color: color-mix(in srgb, var(--green) 55%, var(--green-ink));
}

.vocab-spell-wrap:active .vocab-slot-blank {
  border-bottom-style: solid;
}

.vocab-spell-hidden:disabled {
  cursor: not-allowed;
}

.student-assign-table .col-due {
  width: 12%;
}

.student-assign-table .col-action {
  width: 1%;
}

.home-feature .student-assign-table {
  margin-top: 4px;
}

.assign-view-modal h3 {
  margin: 8px 0 0;
  font-size: 16px;
}

.vocab-zh-stem {
  font-size: clamp(28px, 5vw, 48px);
}

.vocab-letter-hint {
  margin: 0 0 18px;
  font-family: "Outfit", sans-serif;
  font-size: 28px;
  letter-spacing: 0.18em;
  color: var(--green-ink);
  text-align: center;
}

.vocab-spell-field {
  display: block;
  text-align: center;
  margin: 0 0 16px;
}

.vocab-dictation-actions {
  display: flex;
  justify-content: center;
}

.vocab-dictation-ask {
  max-width: 520px;
  margin: 0 auto;
}

.assign-history th,
.assign-history td {
  display: table-cell;
}

.assign-history td:not(.cell-action):not(.cell-check) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assign-history th:last-child,
.assign-history td.cell-action {
  width: 1%;
  text-align: left;
  overflow: visible;
  white-space: nowrap;
  vertical-align: middle;
  box-sizing: border-box;
}

.assign-history td.cell-action .ghost {
  display: inline-flex;
  padding: 5px 12px;
  font-size: 12px;
}

.assign-history td.cell-who {
  overflow: hidden;
  text-overflow: clip;
}

.assign-history .who-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.assign-history .who-names {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assign-history .who-more {
  flex-shrink: 0;
  color: var(--muted);
  font-weight: 600;
}

.home-reload {
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.home-reload .nav-icon {
  width: 16px;
  height: 16px;
}

.create-fab {
  position: relative;
  left: auto;
  bottom: auto;
  z-index: 25;
  width: 56px;
  height: 56px;
  margin-top: auto;
  flex-shrink: 0;
  align-self: flex-start;
  border: 0;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 98, 65, 0.28);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.staff-ai-nav {
  display: none;
}

#view-staff-ai.is-active {
  min-height: 0;
  overflow: hidden;
  flex: 1;
}

#view-staff-ai #staff-ai-mount {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.create-fab-mark {
  font: 700 15px Outfit, system-ui, sans-serif;
  letter-spacing: 0.02em;
}

.create-fab:hover:not(:disabled) {
  background: var(--green-ink);
}

.create-fab:active:not(:disabled) {
  background: #00291c;
  transform: scale(0.96);
}

.create-fab:focus-visible {
  outline: 2px solid var(--green-ink);
  outline-offset: 3px;
}

.create-fab:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.create-pop {
  position: absolute;
  left: 16px;
  bottom: 88px;
  z-index: 26;
  width: calc(100% - 32px);
  display: grid;
  gap: 8px;
  padding: 16px;
  background: var(--sheet);
  border: 1px solid var(--green-line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.create-pop[hidden] {
  display: none;
}

.create-pop h2 {
  margin: 0 0 4px;
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 22px;
  font-weight: 400;
}

.create-pop-item {
  text-align: left;
  border: 1px solid var(--green-line);
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  font: 600 13px Outfit, system-ui, sans-serif;
  color: var(--ink);
  cursor: pointer;
}

.create-pop-item:hover {
  background: var(--green-soft);
}

.create-pop-item:active {
  background: var(--green-selected);
}

.create-pop-item:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

@media (min-width: 881px) {
  html.rail-collapsed .dash {
    grid-template-columns: 76px 1fr;
  }

  html.rail-collapsed .rail {
    padding: 20px 8px;
    overflow: visible;
    z-index: 8;
  }

  html.rail-collapsed .brand {
    justify-content: center;
  }

  html.rail-collapsed .brand-mark,
  html.rail-collapsed .brand-copy {
    display: none;
  }

  html.rail-collapsed .rail-collapse {
    margin: 0;
  }

  html.rail-collapsed .nav {
    justify-items: center;
  }

  html.rail-collapsed .nav-group-label {
    width: 18px;
    height: 1px;
    margin: 10px 0 4px;
    padding: 0;
    overflow: hidden;
    color: transparent;
    background: var(--green-line);
    letter-spacing: 0;
  }

  html.rail-collapsed .nav-btn {
    position: relative;
    justify-content: center;
    width: 44px;
    min-height: 44px;
    padding: 10px;
    margin: 0;
    border-radius: 12px;
  }

  html.rail-collapsed .nav-btn.is-on {
    margin-right: 0;
    padding-right: 10px;
    border-right: 0;
    border-radius: 12px;
  }

  html.rail-collapsed .nav-lead {
    gap: 0;
    justify-content: center;
  }

  html.rail-collapsed .nav-lead [data-nav-label] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  html.rail-collapsed .nav-btn .count-pill {
    display: none !important;
  }

  html.rail-collapsed .nav-btn .nav-scoring {
    position: absolute;
    top: 2px;
    right: 2px;
    margin: 0;
  }

  html.rail-collapsed .create-fab {
    align-self: center;
    width: 48px;
    height: 48px;
  }

  html.rail-collapsed .create-pop {
    left: calc(100% + 10px);
    bottom: 16px;
    width: 260px;
  }
}

body.vocab-locked .create-fab,
body.speaking-locked .create-fab,
body.vocab-locked .create-pop,
body.speaking-locked .create-pop {
  opacity: 0.38;
  pointer-events: none;
}

#assign-mount.is-picking .assign-history col.col-check {
  width: 44px;
}

#assign-mount.is-picking .assign-history th.col-check,
#assign-mount.is-picking .assign-history td.cell-check {
  display: table-cell;
  width: 44px;
  min-width: 44px;
  max-width: 48px;
  overflow: visible;
  white-space: normal;
  vertical-align: middle;
}

#assign-mount.is-picking .assign-history .col-action,
#assign-mount.is-picking .assign-history th:last-child,
#assign-mount.is-picking .assign-history td.cell-action {
  width: 14%;
}

/* School / curriculum V2 */
.class-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  margin: 1px 4px 1px 0;
  border: 1px solid color-mix(in srgb, var(--green-line) 70%, transparent);
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-soft, var(--ink));
  background: color-mix(in srgb, var(--sheet) 88%, var(--green-wash, #e8f0ea));
}

.class-chip.is-listening {
  background: var(--rubric-org-bg);
  border-color: color-mix(in srgb, var(--rubric-org) 28%, var(--green-line));
  color: var(--rubric-org-ink);
}

.class-chip.is-reading {
  background: var(--rubric-dev-bg);
  border-color: color-mix(in srgb, var(--rubric-dev) 32%, var(--green-line));
  color: var(--rubric-dev-ink);
}

.class-chip.is-writing {
  background: #d7efe4;
  border-color: color-mix(in srgb, var(--green) 28%, var(--green-line));
  color: var(--green-ink);
}

.class-chip.is-speaking {
  background: var(--rubric-task-bg);
  border-color: color-mix(in srgb, var(--rubric-task) 28%, var(--green-line));
  color: var(--rubric-task-ink);
}

.class-chip.is-homework {
  background: var(--gold-bg);
  border-color: color-mix(in srgb, var(--gold) 32%, var(--green-line));
  color: var(--rubric-dev-ink);
}

.class-chip.is-exam {
  background: color-mix(in srgb, var(--danger, #c45c5c) 12%, #fff);
  border-color: color-mix(in srgb, var(--danger, #c45c5c) 28%, var(--green-line));
  color: var(--danger, #a33b3b);
}

.class-chip.is-vocab {
  background: color-mix(in srgb, #6b7fd7 12%, #fff);
  border-color: color-mix(in srgb, #6b7fd7 28%, var(--green-line));
  color: #3d4e9a;
}

.class-chip.is-muted {
  background: color-mix(in srgb, var(--sheet) 88%, var(--green-wash, #e8f0ea));
  color: var(--ink-soft, var(--ink));
}

.tag-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  max-width: 100%;
}

.cell-tags {
  vertical-align: middle;
}

.cell-clip {
  display: inline-block;
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.home-table .tag-chips .class-chip,
.assign-history .tag-chips .class-chip,
.student-assign-table .tag-chips .class-chip {
  font-size: 11px;
  padding: 2px 8px;
  line-height: 1.35;
}

.assign-history .cell-type-tags .tag-chips {
  flex-wrap: nowrap;
  white-space: nowrap;
}

.assign-history .cell-type-tags {
  white-space: nowrap;
  overflow: hidden;
}

.assign-history .cell-type-tags .class-chip {
  flex: 0 0 auto;
}

.class-chip.is-campus {
  margin: 0;
  background: #d7efe4;
  border-color: color-mix(in srgb, var(--green) 28%, var(--green-line));
  color: var(--green-ink);
}

.class-chip.is-online {
  margin: 0;
  background: var(--rubric-task-bg);
  border-color: color-mix(in srgb, var(--rubric-task) 28%, var(--green-line));
  color: var(--rubric-task-ink);
}

.class-chip.is-in_class {
  background: var(--green-soft);
  border-color: color-mix(in srgb, var(--green) 28%, var(--green-line));
  color: var(--green-ink);
}

.cell-classes {
  max-width: 220px;
}

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

.modal-form-wide textarea.ui-input {
  min-height: 72px;
  resize: vertical;
}

.school-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 16px;
  border-bottom: 1px solid var(--green-line);
  padding-bottom: 10px;
}

.school-tab-body {
  min-width: 0;
}

.school-schedule-preview {
  min-width: 0;
}

.roster-tabs {
  margin-top: 4px;
}

.home-feature .roster-tabs {
  margin: 0 0 8px;
}

.school-tab {
  border: 0;
  background: transparent;
  color: var(--ink-soft, var(--ink));
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
  border-radius: 8px;
}

.school-tab.is-on {
  background: color-mix(in srgb, var(--green) 14%, transparent);
  color: var(--ink);
  font-weight: 600;
}

.school-tab:hover:not(:disabled):not(.is-on) {
  background: var(--green-soft);
}

.school-tab:active:not(:disabled) {
  background: var(--green-selected);
}

.school-tab:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.school-tab:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.school-subhead {
  align-items: flex-end;
  gap: 12px 16px;
  margin-bottom: 12px;
}

.school-subhead h3 {
  margin: 0;
}

.school-subhead .school-toolbar {
  margin-bottom: 0;
  justify-content: flex-end;
}

.school-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.school-toolbar .table-status,
.school-toolbar .table-search {
  min-width: 9.5rem;
}

.card-head .school-toolbar {
  margin-bottom: 0;
  justify-content: flex-end;
}

.school-inline-field {
  min-width: 180px;
  margin: 0;
}

.school-grow {
  flex: 1 1 240px;
}

.school-member-list,
.school-vocab-picks {
  max-height: 280px;
  overflow: auto;
}

.school-format-pick {
  display: block;
  font-size: 12px;
  margin: -4px 0 8px 28px;
  color: var(--ink-soft, var(--ink));
}

.fb-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ui-check-compact {
  font-size: 12px;
}

.school-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.school-cal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 12px;
}

.school-cal-toolbar .school-filter-row {
  margin-bottom: 0;
  flex: 1 1 12rem;
}

.school-cal-toolbar .school-cal-nav {
  flex: 0 0 auto;
}

.school-filter-chip {
  border: 1px solid var(--green-line);
  background: transparent;
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink);
}

.school-filter-chip.is-on {
  background: color-mix(in srgb, var(--green) 16%, transparent);
  border-color: color-mix(in srgb, var(--green) 40%, var(--green-line));
}

.school-filter-chip:hover:not(:disabled):not(.is-on) {
  background: var(--green-soft);
}

.school-filter-chip:active:not(:disabled) {
  background: var(--green-selected);
}

.school-filter-chip:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.school-filter-chip:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.school-mode-toggle {
  display: inline-flex;
  gap: 4px;
}

.school-mode-toggle .ghost.is-on {
  background: color-mix(in srgb, var(--green) 14%, transparent);
}

.school-day-group {
  margin-bottom: 18px;
}

.school-day-label {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 650;
}

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

.school-session-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 1px solid var(--green-line);
  background: color-mix(in srgb, var(--sheet) 92%, transparent);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.school-session-row:hover {
  border-color: color-mix(in srgb, var(--green) 45%, var(--green-line));
  transform: translateY(-1px);
}

.school-session-time {
  font-size: 13px;
  color: var(--ink-soft, var(--ink));
}

.school-session-main {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.school-detail-panel {
  animation: school-panel-in 0.22s ease;
}

@keyframes school-panel-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.school-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.assign-task-cards { display: grid; gap: 8px; }
.assign-task-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--green-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--green-soft) 24%, #fff);
}
.assign-task-card > div { min-width: 0; display: grid; gap: 5px; }
.assign-task-card strong { overflow-wrap: anywhere; }
.assign-task-card.is-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px 12px;
  padding: 8px 12px;
}
.assign-task-card.is-row > div { display: contents; }

.school-prose {
  white-space: pre-wrap;
  line-height: 1.55;
  margin: 0;
}

.school-feedback-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--green-line);
}

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

.school-feedback-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
}

.school-feedback-tags {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.school-empty {
  padding: 28px 8px;
}

tr.is-click {
  cursor: pointer;
}

.home-table tbody tr.is-click:hover td {
  background: color-mix(in srgb, var(--green) 6%, var(--sheet));
}

@media (max-width: 720px) {
  .modal-grid-2,
  .school-detail-grid {
    grid-template-columns: 1fr;
  }

  .school-session-row {
    grid-template-columns: 1fr;
  }

  .roster-table-wide {
    font-size: 13px;
  }

  .school-cal-board {
    grid-template-columns: 1fr;
  }

  .school-cal-cell {
    min-height: 96px;
  }

  .school-cal-cell {
    min-height: 96px;
  }

  .school-cal-events {
    max-height: 72px;
  }

  .school-cal-nav {
    flex-wrap: wrap;
  }

  .school-card-grid {
    grid-template-columns: 1fr;
  }
}

/* School redesign polish */
.school-page .school-panel {
  position: relative;
  overflow: visible;
}

.school-head {
  align-items: flex-start;
}

.school-head-copy h2 {
  margin: 4px 0 6px;
  letter-spacing: -0.02em;
}

.school-head-copy .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.school-ico {
  width: 1.05em;
  height: 1.05em;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
  vertical-align: -0.15em;
}

.school-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
  padding-left: 0;
}

.school-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.18s ease, color 0.18s ease;
}

.school-hint {
  margin: 0;
  max-width: 36ch;
}

.school-empty-art {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 12px;
}

.school-empty-orb {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--sheet) 90%, white), color-mix(in srgb, var(--green) 22%, var(--sheet)));
  border: 1px solid var(--green-line);
}

.school-empty-mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.school-empty-mark .school-ico {
  width: 32px;
  height: 32px;
  opacity: 0.75;
}

.school-empty-inline {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 28px 12px;
  text-align: center;
  color: var(--ink-soft, var(--ink));
}

.school-empty-copy {
  text-align: center;
  padding: 24px;
}

.school-vocab-table-wrap {
  max-height: 280px;
  overflow: auto;
  margin-bottom: 12px;
  border: 1px solid var(--green-line);
  border-radius: 12px;
}

.school-vocab-table th:first-child,
.school-vocab-table td:first-child {
  width: 40px;
}

.fb-preview .school-prose {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}

.feedback-slide .school-prose {
  margin-top: 4px;
}

.assign-view-slide .assign-miss-rows {
  margin-top: 2px;
}

.school-table tr[data-fb-student] td {
  vertical-align: top;
}

.school-table tr[data-fb-student] td.home-actions {
  vertical-align: middle;
}

.school-table tr.is-fb-more td {
  border-top-style: dotted;
}

.school-table td.col-when {
  width: 9.5rem;
  white-space: nowrap;
}

.school-table td.cell-user {
  width: 10rem;
  white-space: nowrap;
}

.fb-when {
  display: block;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.ghost-primary {
  border-color: color-mix(in srgb, var(--green) 35%, var(--green-line));
}

.school-cal {
  display: grid;
  gap: 10px;
}

.school-cal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.school-cal-nav-month {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.school-cal-nav-label {
  display: grid;
  justify-items: center;
  gap: 1px;
  min-width: 9.5rem;
}

.school-cal-nav-label strong {
  font-size: 15px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.school-cal-nav-label .session-meta {
  font-size: 11px;
  line-height: 1.2;
}

.school-cal-nav .ghost {
  width: 32px;
  min-width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 10px;
}

.school-cal-nav [data-cal-today] {
  width: auto;
  min-width: 0;
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.school-cal-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 280px);
  gap: 14px;
  align-items: start;
}

@media (max-width: 1180px) {
  .school-cal-board {
    grid-template-columns: 1fr;
  }
}

.school-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  padding: 8px;
  border: 1px solid var(--green-line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--sheet) 88%, var(--paper));
}

.school-cal-dow {
  text-align: center;
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
  padding: 2px 0 6px;
  letter-spacing: 0.04em;
}

.school-cal-dow.is-weekend {
  color: color-mix(in srgb, var(--muted) 80%, var(--ink));
}

.school-cal-cell {
  min-height: 112px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--sheet);
  color: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 3px;
  padding: 4px 4px 5px;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.school-cal-cell:hover {
  border-color: var(--green-line);
  background: color-mix(in srgb, var(--green) 6%, var(--sheet));
}

.school-cal-cell.is-weekend {
  background: color-mix(in srgb, var(--sheet) 82%, var(--paper));
}

.school-cal-cell.is-out {
  background: color-mix(in srgb, var(--paper) 55%, var(--sheet));
  opacity: 0.58;
}

.school-cal-cell.is-out:hover {
  opacity: 0.86;
}

.school-cal-cell.has-events {
  background: color-mix(in srgb, var(--green) 5%, var(--sheet));
}

.school-cal-cell.is-today {
  background: color-mix(in srgb, var(--green) 10%, var(--sheet));
}

.school-cal-cell.is-on {
  border-color: color-mix(in srgb, var(--green) 42%, var(--green-line));
  background: color-mix(in srgb, var(--green) 12%, var(--sheet));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--green) 16%, transparent);
}

.school-cal-num {
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.school-cal-cell.is-today .school-cal-num {
  border-radius: 999px;
  background: var(--green);
  color: #fff;
}

.school-cal-events {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  max-height: 86px;
  overflow-x: hidden;
  overflow-y: auto;
}

.school-cal-lesson {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  gap: 1px;
  width: 100%;
  margin: 0;
  padding: 3px 5px 4px 6px;
  border: 0;
  border-radius: 6px;
  border-left: 2px solid color-mix(in srgb, var(--green) 55%, var(--green-line));
  background: color-mix(in srgb, var(--green) 12%, var(--sheet));
  color: var(--green-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  line-height: 1.15;
}

.school-cal-lesson.is-listening {
  border-left-color: var(--rubric-org);
  background: color-mix(in srgb, var(--rubric-org-bg) 70%, var(--sheet));
  color: var(--rubric-org-ink);
}

.school-cal-lesson.is-reading {
  border-left-color: var(--rubric-dev);
  background: color-mix(in srgb, var(--rubric-dev-bg) 70%, var(--sheet));
  color: var(--rubric-dev-ink);
}

.school-cal-lesson.is-writing {
  border-left-color: var(--green);
  background: color-mix(in srgb, var(--green-soft) 70%, var(--sheet));
  color: var(--green-ink);
}

.school-cal-lesson.is-speaking {
  border-left-color: var(--rubric-task);
  background: color-mix(in srgb, var(--rubric-task-bg) 70%, var(--sheet));
  color: var(--rubric-task-ink);
}

.school-cal-lesson.is-ended {
  opacity: 0.72;
}

.school-cal-lesson:hover {
  filter: brightness(0.97);
}

.school-cal-lesson-time {
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  opacity: 0.78;
}

.school-cal-lesson-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.015em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.school-cal-lesson-class {
  display: inline-block;
  max-width: 100%;
  margin-top: 1px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: inherit;
  opacity: 0.62;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.school-cal-lesson.is-agenda {
  gap: 2px;
  padding: 8px 10px 8px 10px;
  border-radius: 10px;
  border-left-width: 3px;
}

.school-cal-lesson.is-agenda .school-cal-lesson-time {
  font-size: 12px;
}

.school-cal-lesson.is-agenda .school-cal-lesson-name {
  font-size: 13px;
  -webkit-line-clamp: 3;
}

.school-cal-lesson.is-agenda .school-cal-lesson-class {
  font-size: 11px;
  opacity: 0.7;
}

.school-cal-lesson-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-top: 2px;
}

.school-cal-lesson.is-card {
  gap: 4px;
  min-height: 124px;
  padding: 12px 14px 12px 14px;
  border-radius: 12px;
  border-left-width: 4px;
}

.school-cal-lesson.is-card .school-cal-lesson-time {
  font-size: 12px;
}

.school-cal-lesson.is-card .school-cal-lesson-name {
  font-size: 16px;
  letter-spacing: -0.02em;
  -webkit-line-clamp: 3;
}

.school-cal-lesson.is-card .school-cal-lesson-class {
  font-size: 11px;
  opacity: 0.7;
}

.school-cal-lesson.is-card .class-chip {
  margin: 0;
  padding: 1px 7px;
  font-size: 11px;
}

.school-cal-day-panel {
  border: 1px solid var(--green-line);
  border-radius: 16px;
  padding: 14px 14px 12px;
  background: var(--sheet);
  min-height: 220px;
  animation: school-panel-in 0.22s ease;
}

.school-cal-day-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.school-cal-day-panel h3 {
  margin: 2px 0 0;
  font-size: 18px;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.school-cal-day-count {
  margin: 4px 0 12px;
  font-size: 12px;
  color: var(--muted);
}

.school-cal-agenda {
  display: grid;
  gap: 6px;
}

.school-cal-day-panel.is-placeholder {
  display: grid;
  align-content: start;
}

.feedback-who {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--green-line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--green) 6%, var(--sheet));
}

.feedback-who .mini-avatar {
  width: 40px;
  height: 40px;
  font-size: 16px;
}

.feedback-body {
  min-height: 148px;
  resize: vertical;
  line-height: 1.55;
}

.fb-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fb-pill {
  position: relative;
  display: inline-flex;
  cursor: pointer;
  margin: 0;
}

.fb-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.fb-pill span {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--green-line);
  background: var(--sheet);
  font-size: 13px;
  font-weight: 600;
}

.fb-pill input:focus-visible + span {
  box-shadow: 0 0 0 3px var(--green-selected);
}

.fb-pill input:checked + span {
  background: var(--green-soft);
  border-color: color-mix(in srgb, var(--green) 40%, var(--green-line));
  color: var(--green-ink);
}

.school-table td.home-actions {
  width: 1%;
}

.school-table.table-fit th:last-child,
.school-table.table-fit td.home-actions {
  width: 9rem;
  min-width: 9rem;
}

.assign-student-table .person-name,
.assign-student-table .cell-user {
  white-space: nowrap;
}

.assign-student-table .person-cell {
  min-width: 140px;
}

.school-table .ui-datetime .ui-input[type="datetime-local"],
.school-table .ui-input[type="datetime-local"] {
  min-height: 36px;
  height: 36px;
}

.sched-pickers {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.sched-pick-btn {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
}

.sched-pick-sep {
  color: var(--muted);
}

.sched-pick-pop {
  position: fixed;
  z-index: 80;
  min-width: 260px;
  max-width: min(320px, calc(100vw - 24px));
  max-height: min(360px, calc(100vh - 24px));
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--green-line);
  border-radius: 14px;
  background: var(--sheet);
  box-shadow: 0 16px 40px rgba(20, 36, 28, 0.16);
}

.sched-pick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.sched-pick-head strong {
  font-size: 13px;
}

.sched-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.sched-cal-grid span,
.sched-cal-grid button {
  display: grid;
  place-items: center;
  min-height: 32px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  font-size: 12px;
  color: var(--ink);
}

.sched-cal-grid span {
  color: var(--muted);
  font-size: 11px;
}

.sched-cal-grid button:hover,
.sched-time-list button:hover,
.sched-cal-grid button.is-on,
.sched-time-list button.is-on {
  background: var(--green-selected);
}

.sched-cal-grid button.is-muted {
  color: var(--muted);
}

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

.sched-time-list button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  color: var(--ink);
}

.attendance-table-wrap {
  max-height: min(420px, 55vh);
  overflow: auto;
}

.attendance-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  max-height: min(420px, 55vh);
  overflow: auto;
}

.attendance-list li,
.attendance-row {
  display: block;
  width: 100%;
  margin: 0;
}

.attendance-list .ui-check {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--green-line);
  border-radius: 10px;
  background: var(--sheet);
  box-sizing: border-box;
}

.attendance-person {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.attendance-person .session-meta {
  margin: 0;
}

.school-table .ui-datetime .ui-input[type="datetime-local"],
.school-table .ui-input[type="datetime-local"] {
  min-width: 210px;
  width: 100%;
  font-size: 13px;
  border-radius: 8px;
  padding: 0 8px 0 10px;
}

.school-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.school-table .home-actions {
  gap: 4px;
}

.school-class-card {
  display: grid;
  gap: 6px;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--green-line);
  border-radius: 16px;
  background: var(--sheet);
  font: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.school-class-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--green) 28%, var(--green-line));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--green-ink) 6%, transparent);
}

.school-class-card strong {
  font-size: 15px;
  letter-spacing: -0.01em;
}

.school-card-skill {
  font-size: 12px;
  text-transform: capitalize;
  color: var(--ink-soft, var(--ink));
}

.school-mode-toggle .ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.school-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.school-class-card .school-cal-lesson-class {
  font-size: 11px;
  opacity: 0.7;
}

.school-slide {
  position: fixed;
  inset: 0;
  z-index: 34;
  pointer-events: none;
}

.school-slide.is-open {
  pointer-events: auto;
}

.school-slide-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 36, 28, 0.28);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.school-slide.is-open .school-slide-backdrop {
  opacity: 1;
}

.school-slide-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(440px, 100%);
  background: var(--paper);
  border-left: 1px solid var(--green-line);
  box-shadow: -16px 0 40px rgba(20, 36, 28, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.32, 1), width 0.28s ease;
}

.school-slide-panel.is-wide {
  width: min(56rem, 100%);
}

.school-slide.is-open .school-slide-panel {
  transform: translateX(0);
}

.school-slide-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 12;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.school-slide-close:hover,
.school-slide-close:focus-visible {
  background: var(--green-selected);
}

.school-slide-close .nav-icon {
  width: 16px;
  height: 16px;
}

.school-slide-panel.is-wide .school-slide-close {
  top: 16px;
  right: 16px;
}

.school-slide-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 20px 24px;
}

.school-slide-panel.is-wide .school-slide-body {
  padding: 22px 24px 28px;
}

.school-slide-foot {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  background: var(--paper);
  border-top: 1px solid var(--green-line);
}

.school-slide-panel.is-wide .school-slide-foot {
  padding: 14px 24px calc(14px + env(safe-area-inset-bottom, 0px));
}

.school-slide-foot[hidden] {
  display: none !important;
}

.school-slide-foot .cl-actions-gap {
  flex: 1;
}

.school-slide-foot .danger-link {
  margin-right: auto;
}

.school-slide-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-right: 44px;
}

.school-slide-head h2 {
  margin: 4px 0 6px;
}

.school-slide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.school-slide-panel .school-detail-grid {
  grid-template-columns: 1fr;
}

.school-slide-who {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 8px;
}

.school-slide-who .mini-avatar {
  width: 40px;
  height: 40px;
  font-size: 16px;
}

.school-slide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.school-slide-assign {
  display: grid;
  gap: 8px;
}

.school-slide-assign-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--green-line);
}

.school-slide-assign-row:last-child {
  border-bottom: 0;
}

.school-slide-panel h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.school-slide-dl {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
  font-size: 13px;
}

.school-slide-dl dt {
  color: var(--muted);
  font-weight: 600;
}

.school-slide-dl dd {
  margin: 0;
  min-width: 0;
}

.school-slide-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.student-slide {
  display: grid;
  gap: 10px;
}

.school-slide-card {
  background: var(--sheet);
  border: 1px solid var(--green-line);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(20, 36, 28, 0.05);
  padding: 14px 16px;
  min-width: 0;
}

.student-slide-profile {
  background:
    radial-gradient(118% 90% at 0% 0%, color-mix(in srgb, var(--green-soft) 78%, transparent) 0%, transparent 56%),
    var(--sheet);
}

/* --- Class checklists (学习清单) --- */

.cl-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: 0.01em;
  white-space: nowrap;
  background: var(--green-soft);
  color: var(--green-ink);
}

.cl-status-pill.is-done {
  background: #d7efe4;
  color: #0f6b45;
}

.cl-status-pill.is-progress {
  background: #f4ead0;
  color: #8a6508;
}

.cl-status-pill.is-overdue {
  background: #f8e0e0;
  color: #9b3a3a;
}

.cl-progress {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.cl-form-card {
  display: grid;
  gap: 8px;
}

.cl-slide {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}

.cl-slide .school-slide-head {
  display: block;
  padding-right: 44px;
}

.cl-slide .school-slide-head .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.cl-slide .school-slide-head h2 {
  margin: 6px 0 0;
  font-size: 22px;
  line-height: 1.25;
}

.cl-student-chips {
  margin-top: 2px;
}

.cl-klass-card .school-slide-who {
  align-items: center;
  margin: 0;
}

.cl-klass-mark {
  width: 52px;
  height: 52px;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cl-klass-mark .school-ico {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cl-field-label {
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 13px;
  color: var(--green-ink-strong, #14241c);
}

.cl-hint {
  margin: 0;
  font-size: 12px;
  color: var(--green-ink);
  opacity: 0.85;
}

.cl-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

@media (max-width: 640px) {
  .cl-meta-grid {
    grid-template-columns: 1fr;
  }
}

.cl-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.cl-multiselect {
  position: relative;
  display: grid;
  gap: 8px;
}

.cl-multiselect .ui-menu-btn {
  width: 100%;
  justify-content: space-between;
}

.cl-due-btn .ui-menu-caret {
  margin-left: auto;
}

.cl-student-pop {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--green-line);
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(20, 36, 28, 0.16);
  padding: 6px;
  max-height: 260px;
  overflow-y: auto;
}

.cl-multiselect .ui-menu-btn .ui-menu-caret {
  margin-left: auto;
}

.cl-multiselect .ui-menu-btn.is-open .ui-menu-caret {
  transform: translateY(2px) rotate(225deg);
}

.cl-student-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  font: 500 13px/1.3 Outfit, system-ui, sans-serif;
  color: var(--green-ink-strong, #14241c);
  text-align: left;
}

.cl-student-opt em {
  margin-left: auto;
  font-style: normal;
  font-size: 12px;
  color: var(--green-ink);
  opacity: 0.7;
}

.cl-student-opt:hover {
  background: color-mix(in srgb, var(--green-soft) 55%, transparent);
}

.cl-student-opt.is-on {
  background: var(--green-soft);
}

.cl-student-opt.is-on::after {
  content: "✓";
  margin-left: 6px;
  color: var(--green);
  font-weight: 700;
}

.cl-todos-card {
  display: grid;
  gap: 0;
  padding: 16px 18px 12px;
}

.cl-todos-card > .cl-field-label {
  margin-bottom: 12px;
}

.cl-skill-block {
  border: 0;
  padding: 12px 0;
  margin: 0;
  box-shadow: none;
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--green-line);
}

.cl-skill-block:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.cl-skill-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cl-skill-head h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green-ink-strong, #14241c);
}

.cl-todo-list {
  display: grid;
  gap: 6px;
}

.cl-todo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: color-mix(in srgb, var(--paper) 55%, #fff);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.cl-todo:hover {
  background: #fff;
  border-color: var(--green-line);
}

.cl-todo.is-editing {
  background: #fff;
  border-color: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 12%, transparent);
}

.cl-todo.is-done {
  background: color-mix(in srgb, var(--green-soft) 42%, #fff);
}

.cl-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: none;
  cursor: pointer;
}

.cl-check input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.cl-check-box {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1.5px solid var(--green-line);
  background: #fff;
  flex-shrink: 0;
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.cl-check input:checked + .cl-check-box {
  background: var(--green);
  border-color: var(--green);
}

.cl-check input:checked + .cl-check-box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: 0;
  border-left: 0;
  transform: rotate(40deg);
}

.cl-todo-text {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--green-ink-strong, #14241c);
  overflow-wrap: anywhere;
}

.cl-todo-text.is-done {
  color: var(--green-ink);
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--green-ink) 46%, transparent);
}

.cl-todo-edit {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--green-ink-strong, #14241c);
  padding: 0;
}

.cl-student-mark {
  flex: none;
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
  background: color-mix(in srgb, var(--green) 14%, #fff);
  color: var(--green-ink);
  white-space: nowrap;
}

.cl-todo-tools {
  display: inline-flex;
  gap: 2px;
  flex: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.cl-todo:hover .cl-todo-tools,
.cl-todo.is-editing .cl-todo-tools {
  opacity: 1;
  pointer-events: auto;
}

.cl-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--green-ink);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.cl-icon-btn.has-tooltip::after {
  content: attr(data-cl-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 7px);
  z-index: 20;
  max-width: 180px;
  padding: 5px 8px;
  border-radius: 6px;
  background: #14241c;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 3px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.cl-icon-btn.has-tooltip:hover::after,
.cl-icon-btn.has-tooltip:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.cl-icon-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cl-icon-btn:hover {
  background: color-mix(in srgb, var(--green-soft) 80%, transparent);
  color: var(--green-ink-strong, #14241c);
}

.cl-icon-btn.is-on {
  background: var(--green-soft);
  color: var(--green);
}

.cl-icon-btn.is-danger:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.cl-skill-note {
  display: grid;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--green-line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--green-soft) 45%, #fff);
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.cl-skill-note:hover {
  border-color: color-mix(in srgb, var(--green) 40%, var(--green-line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 10%, transparent);
}

.cl-note-row {
  display: grid;
  gap: 2px;
}

.cl-note-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--green);
}

.cl-note-row p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--green-ink-strong, #14241c);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cl-note-modal {
  display: grid;
  gap: 12px;
}

.cl-note-field {
  display: grid;
  gap: 6px;
}

.cl-note-field span {
  font-size: 13px;
  font-weight: 700;
  color: var(--green-ink-strong, #14241c);
}

.cl-note-field textarea {
  width: 100%;
  min-height: 96px;
  resize: vertical;
  border: 1px solid var(--green-line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  color: var(--green-ink-strong, #14241c);
  background: #fff;
}

.cl-note-field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 12%, transparent);
}

.cl-source-tag {
  flex: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--green-ink);
  background: color-mix(in srgb, var(--green-soft) 66%, transparent);
  border-radius: 999px;
  padding: 2px 8px;
}

.cl-add-row {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 2px;
  min-height: 28px;
}

.cl-add-hint {
  font-size: 12px;
  color: var(--green-ink);
  opacity: 0.65;
}

.cl-meta-dates {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.cl-date-chip {
  font-size: 12px;
  color: var(--green-ink);
  background: color-mix(in srgb, var(--green-soft) 52%, transparent);
  border-radius: 999px;
  padding: 3px 10px;
  font-variant-numeric: tabular-nums;
}

.cl-due-pop .sched-cal-grid button {
  min-height: 34px;
}

.cl-pick-modal {
  display: grid;
  gap: 12px;
}

.cl-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green-ink);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.cl-modal-close:hover {
  background: color-mix(in srgb, var(--green-soft) 80%, transparent);
  color: var(--green-ink-strong, #14241c);
}

.cl-modal-close .nav-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
}

.cl-pick-modal {
  position: relative;
}

.cl-pick-modal .school-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-right: 40px;
}

.cl-pick-grid {
  display: grid;
  grid-template-columns: minmax(220px, 5fr) minmax(240px, 6fr);
  gap: 14px;
  min-height: 260px;
}

@media (max-width: 640px) {
  .cl-pick-grid {
    grid-template-columns: 1fr;
  }
}

.cl-pick-list {
  display: grid;
  gap: 4px;
  align-content: start;
  max-height: 340px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--green-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--green-soft) 26%, transparent);
}

.cl-lesson-row {
  display: grid;
  gap: 2px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 9px 10px;
  cursor: pointer;
  text-align: left;
  font: 500 13px/1.35 Outfit, system-ui, sans-serif;
  color: var(--green-ink-strong, #14241c);
}

.cl-lesson-row strong {
  font-weight: 600;
}

.cl-lesson-row em {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--green-ink);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cl-lesson-row:hover {
  background: color-mix(in srgb, var(--green-soft) 60%, transparent);
}

.cl-lesson-row.is-on {
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--green);
}

.cl-pick-preview {
  border: 1px solid var(--green-line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--paper) 72%, #eef1ef);
  padding: 14px;
  max-height: 340px;
  overflow-y: auto;
  display: grid;
  gap: 8px;
  align-content: start;
}

.cl-preview-head strong {
  font-size: 14px;
  color: var(--green-ink-strong, #14241c);
}

.cl-preview-para {
  margin: 0;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.5;
  color: var(--green-ink-strong, #14241c);
}

.cl-preview-para:not(.is-empty) {
  background: rgba(20, 36, 28, 0.045);
  border-radius: 10px;
  padding: 8px 10px;
}

.cl-preview-bullet {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--green);
  margin-top: 7px;
}

.cl-preview-para.is-empty {
  color: var(--green-ink);
  opacity: 0.7;
}

.cl-pick-empty {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--green-ink);
}

.cl-slide-actions {
  margin-top: 16px;
}

.cl-actions-gap {
  flex: 1;
}

.school-slide-card .card-head {
  margin-bottom: 8px;
  align-items: center;
}

.school-slide-card .card-head h3 {
  margin: 0;
}

.school-slide-card .card-head .table-status {
  margin: 0;
  min-width: 148px;
  flex: 0 0 auto;
}

.student-slide-profile .school-slide-who {
  margin: 0;
  padding-bottom: 0;
  border-bottom: 0;
  align-items: flex-start;
}

.student-slide-who-copy {
  flex: 1;
  min-width: 0;
}

.student-slide-who-copy h3 {
  margin: 0 0 2px;
  font-size: 22px;
}

.student-slide-profile .school-slide-who .mini-avatar {
  width: 52px;
  height: 52px;
  font-size: 20px;
}

.student-slide-profile .school-slide-actions {
  margin: 0;
  padding: 0;
  flex-shrink: 0;
}

.student-slide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 28px;
  margin: 0;
}

.student-slide-grid > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.student-slide-grid dt {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.student-slide-grid dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.class-student-slide .school-prose {
  margin: 0 0 6px;
}

.student-slide-grid .is-span {
  grid-column: 1 / -1;
}

.student-slide-profile .school-slide-who + .student-slide-grid {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--green-line) 88%, transparent);
}

.school-slide-panel .table-wrap {
  border: 1px solid color-mix(in srgb, var(--green-line) 80%, transparent);
  border-radius: 12px;
  background: var(--sheet);
}

.school-slide-panel .home-table.table-pin {
  min-width: 100%;
}

.lesson-slide-pair {
  display: grid;
  gap: 16px;
}

.school-slide-panel.is-wide .lesson-slide-pair {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.lesson-slide-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lesson-slide-copy.is-homework {
  background:
    radial-gradient(118% 90% at 100% 0%, color-mix(in srgb, var(--gold-bg) 72%, transparent) 0%, transparent 58%),
    var(--sheet);
}

.lesson-slide-body {
  flex: 1;
  padding: 14px 16px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--paper) 70%, var(--sheet));
  border: 1px solid color-mix(in srgb, var(--green-line) 80%, transparent);
}

.lesson-slide-copy.is-homework .lesson-slide-body {
  background: color-mix(in srgb, var(--gold-bg) 28%, var(--sheet));
  border-color: color-mix(in srgb, var(--gold) 22%, var(--green-line));
}

.lesson-slide-mark {
  border: 1px solid color-mix(in srgb, var(--green) 22%, var(--green-line));
}

.lesson-slide-mark .mini-icon {
  width: 22px;
  height: 22px;
  background: transparent;
  border-radius: 0;
}

.lesson-slide-mark svg {
  width: 22px;
  height: 22px;
}

.lesson-slide-prose {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.lesson-slide-prose.is-empty {
  color: var(--muted);
}

.lesson-slide-profile.is-listening {
  background:
    radial-gradient(118% 90% at 0% 0%, color-mix(in srgb, var(--rubric-org-bg) 88%, transparent) 0%, transparent 56%),
    var(--sheet);
}

.lesson-slide-profile.is-listening .lesson-slide-mark {
  background: var(--rubric-org-bg);
  color: var(--rubric-org-ink);
  border-color: color-mix(in srgb, var(--rubric-org) 28%, var(--green-line));
}

.lesson-slide-profile.is-reading {
  background:
    radial-gradient(118% 90% at 0% 0%, color-mix(in srgb, var(--rubric-dev-bg) 88%, transparent) 0%, transparent 56%),
    var(--sheet);
}

.lesson-slide-profile.is-reading .lesson-slide-mark {
  background: var(--rubric-dev-bg);
  color: var(--rubric-dev-ink);
  border-color: color-mix(in srgb, var(--gold) 32%, var(--green-line));
}

.lesson-slide-profile.is-writing {
  background:
    radial-gradient(118% 90% at 0% 0%, color-mix(in srgb, var(--green-soft) 78%, transparent) 0%, transparent 56%),
    var(--sheet);
}

.lesson-slide-profile.is-speaking {
  background:
    radial-gradient(118% 90% at 0% 0%, color-mix(in srgb, var(--rubric-task-bg) 88%, transparent) 0%, transparent 56%),
    var(--sheet);
}

.lesson-slide-profile.is-speaking .lesson-slide-mark {
  background: var(--rubric-task-bg);
  color: var(--rubric-task-ink);
  border-color: color-mix(in srgb, var(--rubric-task) 28%, var(--green-line));
}

.lesson-slide .school-slide-chips {
  margin: 0;
}

@media (max-width: 720px) {
  .student-slide-grid {
    grid-template-columns: 1fr;
  }

  .student-slide-profile .school-slide-who {
    flex-wrap: wrap;
  }

  .school-slide-panel.is-wide .lesson-slide-pair {
    grid-template-columns: 1fr;
  }

  .ca-custom-question-overlay {
    padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  }
}

.student-slide .school-tabs {
  margin: 0;
  padding-bottom: 8px;
}

.student-slide .school-tab-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.student-slide .school-filter-row {
  margin-bottom: 10px;
}

.grade-band-input {
  width: 4.5rem;
  min-width: 0;
  padding: 6px 8px;
  text-align: center;
}

.grade-editor-table td {
  vertical-align: middle;
}

.grade-table-block,
.grade-chart-block {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.grade-table-block:first-child,
.grade-chart-block:first-child {
  margin-top: 0;
}

.grade-table-block .eyebrow,
.grade-chart-block .eyebrow {
  margin: 0;
}

.grade-chart-card {
  display: grid;
  gap: 8px;
}

.grade-chart {
  width: 100%;
  height: auto;
  display: block;
  color: var(--green);
  overflow: visible;
}

.grade-grid,
.grade-axis,
.grade-line {
  pointer-events: none;
}

.grade-point {
  cursor: pointer;
}

.grade-hit,
.grade-hit-bar {
  fill: transparent;
}

.grade-point:hover .grade-bar {
  filter: brightness(1.08);
}

.grade-point:hover .grade-dot {
  r: 5;
  stroke: var(--sheet);
  stroke-width: 1.5;
}

.grade-grid {
  stroke: var(--green-line);
  stroke-width: 1;
}

.grade-axis {
  fill: var(--muted);
  font-size: 11px;
  font-family: Outfit, system-ui, sans-serif;
}

.grade-axis.grade-x {
  font-size: 12px;
}

.grade-bar {
  fill: var(--green);
}

.grade-line {
  fill: none;
  stroke-width: 2.25;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.grade-bar.is-reading { fill: var(--rubric-dev); }
.grade-line.is-reading { stroke: var(--rubric-dev); }
.grade-dot.is-reading { fill: var(--rubric-dev); }
.grade-swatch.is-reading { background: var(--rubric-dev); }

.grade-bar.is-listening { fill: var(--rubric-org); }
.grade-line.is-listening { stroke: var(--rubric-org); }
.grade-dot.is-listening { fill: var(--rubric-org); }
.grade-swatch.is-listening { background: var(--rubric-org); }

.grade-bar.is-speaking { fill: var(--rubric-task); }
.grade-line.is-speaking { stroke: var(--rubric-task); }
.grade-dot.is-speaking { fill: var(--rubric-task); }
.grade-swatch.is-speaking { background: var(--rubric-task); }

.grade-bar.is-writing { fill: var(--green); }
.grade-line.is-writing { stroke: var(--green); }
.grade-dot.is-writing { fill: var(--green); }
.grade-swatch.is-writing { background: var(--green); }

.grade-bar.is-entry { fill: #94a3b8; }
.grade-line.is-entry { stroke: #94a3b8; }
.grade-dot.is-entry { fill: #94a3b8; }
.grade-swatch.is-entry { background: #94a3b8; }

.grade-bar.is-midterm { fill: var(--rubric-org); }
.grade-line.is-midterm { stroke: var(--rubric-org); }
.grade-dot.is-midterm { fill: var(--rubric-org); }
.grade-swatch.is-midterm { background: var(--rubric-org); }

.grade-bar.is-final { fill: var(--green); }
.grade-line.is-final { stroke: var(--green); }
.grade-dot.is-final { fill: var(--green); }
.grade-swatch.is-final { background: var(--green); }

.grade-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.grade-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.grade-swatch {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.grade-chart-tip {
  position: fixed;
  z-index: 80;
  pointer-events: none;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--green-ink);
  color: var(--sheet);
  font-size: 12px;
  line-height: 1.35;
  font-family: Outfit, system-ui, sans-serif;
  box-shadow: 0 10px 24px rgba(20, 36, 28, 0.2);
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 8px));
}

.grade-chart-tip[hidden] {
  display: none;
}

.quota-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.quota-stepper .ui-input {
  width: 4.5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.quota-stepper button {
  width: 32px;
  height: 32px;
  padding: 0;
  flex-shrink: 0;
}

.ui-field .field-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.ui-field .field-hint.is-ok { color: var(--ink); }
.ui-field .field-hint.is-bad { color: var(--danger); }

.cell-quota {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cell-quota small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.llm-panel h2 {
  margin: 0 0 8px;
}

.settings-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 14px;
  border-bottom: 1px solid var(--green-line);
}

.settings-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 9px 12px;
  cursor: pointer;
  font: inherit;
}

.settings-tab.is-on {
  border-bottom-color: var(--green);
  color: var(--ink);
  font-weight: 650;
}

.baseline-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.baseline-panel h2 { margin: 0 0 8px; }
.baseline-grid, .baseline-lists { display: grid; gap: 16px; margin-top: 18px; }
.baseline-grid article, .baseline-lists article { border: 1px solid var(--green-line); border-radius: 10px; padding: 14px; background: #fff; }
.baseline-grid h3, .baseline-lists h3 { margin: 0 0 12px; font-size: 14px; }
.baseline-grid p { margin: 7px 0; color: var(--muted); }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; }
.metric-grid b { font-size: 20px; font-variant-numeric: tabular-nums; }
.metric-grid small { display: block; color: var(--muted); font-size: 11px; font-weight: 500; margin-top: 3px; }
.baseline-lists ul { list-style: none; margin: 0; padding: 0; }
.baseline-lists li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--green-line); font-size: 12px; }
.baseline-lists li:last-child { border-bottom: 0; }
.baseline-lists code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.baseline-lists span { white-space: nowrap; color: var(--muted); }

@media (min-width: 900px) {
  .baseline-grid { grid-template-columns: 2fr 1fr 1fr; }
  .baseline-lists { grid-template-columns: 1fr 1fr; }
}

.llm-status {
  margin: 0 0 4px;
  font-size: 15px;
}

.llm-grid {
  display: grid;
  gap: 16px;
  margin: 18px 0;
}

@media (min-width: 900px) {
  .llm-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.llm-card {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--green-line);
  border-radius: 14px;
  background: #fff;
}

.llm-card.is-on {
  border-color: var(--green);
  box-shadow: 0 0 0 1px var(--green);
}

.llm-card-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
}

.llm-card-head small {
  display: block;
  color: var(--muted);
  font-weight: 400;
}

.llm-card .ui-select {
  width: 100%;
}

.llm-actions {
  display: flex;
  justify-content: flex-end;
}

.llm-restart-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(11, 31, 24, 0.55);
  color: #fff;
  font-size: 18px;
}

.llm-restart-mask[hidden] {
  display: none !important;
}



/* IELTS Speaking V1 */
.ielts-topic-section {
  margin: 1.25rem 0 0;
}

.ielts-topic-section h3 {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.ielts-topic-list {
  margin-top: 0.25rem;
}

.ielts-cue-card {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--green-line);
  color: var(--ink);
  box-shadow: none;
}

.ielts-cue-prompt {
  margin: 0;
  font-size: inherit;
  font-weight: 400;
  line-height: 1.55;
}

.ielts-cue-say {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.72;
}

.ielts-cue-card ul {
  margin: 0;
  padding-left: 1.15rem;
}

.ielts-cue-card li {
  margin: 0.2rem 0;
  line-height: 1.55;
  font-weight: 400;
}

.speaking-live.is-ielts-cue .speaking-stage {
  margin-top: 0.25rem;
}

.ielts-live-q {
  margin: 0.65rem 0 0;
  max-width: 36rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

/* Same card language as TOEFL .speaking-scenario */
.ielts-live-script {
  margin: 0 auto 20px;
  max-width: none;
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--green-line);
  font-size: inherit;
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  text-align: left;
  white-space: pre-wrap;
}

/* IELTS speaking pick width parity with TOEFL */
#view-speaking .essay-pick,
#view-speaking .essay-mocks {
  width: 100%;
  max-width: 980px;
  box-sizing: border-box;
}

#view-speaking .essay-choice-grid {
  width: 100%;
}
@media (max-width: 680px) {
  .essay-land-steps { grid-template-columns: 1fr; }
  .essay-pick-hero { padding: 18px; }
}

.ielts-bank-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 1.1rem;
}

.ielts-bank-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--green-line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font: 600 13px Outfit, system-ui, sans-serif;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.ielts-bank-tab.is-on {
  background: var(--green-selected);
  border-color: transparent;
  color: var(--green-ink);
}

.ielts-bank-tab:hover:not(:disabled):not(.is-on) {
  background: var(--green-soft);
  color: var(--green-ink);
}

.ielts-bank-tab:active:not(:disabled) {
  background: var(--green-selected);
}

.ielts-bank-tab:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.ielts-bank-tab:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

body.is-ielts #view-speaking .essay-choice.is-ai:disabled .essay-choice-cta {
  background: color-mix(in srgb, var(--green-ink, #1a3a2a) 45%, #9aa59c);
}

@media (max-width: 880px) {
  html,
  body,
  .dash {
    height: 100%;
    overflow: hidden;
  }

  @supports (height: 100dvh) {
    html,
    body,
    .dash {
      height: 100dvh;
    }
  }

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

  .rail-collapse {
    display: none !important;
  }

  .nav-scrim:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(20, 36, 28, 0.4);
  }

  .rail {
    position: fixed;
    top: 0;
    bottom: 0;
    left: calc(-1 * (280px + env(safe-area-inset-left, 0px)));
    z-index: 40;
    width: min(272px, calc(100vw - 48px));
    padding-top: max(20px, env(safe-area-inset-top, 0px));
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    border-right: 1px solid var(--green-line);
    box-shadow: none;
    overflow: hidden;
    pointer-events: none;
    transition: left 0.28s ease, box-shadow 0.28s ease;
  }

  html.nav-open .rail,
  .dash.nav-open .rail {
    left: 0;
    box-shadow: 16px 0 40px rgba(20, 36, 28, 0.18);
    pointer-events: auto;
  }

  .rail .brand,
  .rail .nav {
    pointer-events: auto;
  }

  html:not(.nav-open) .rail .brand,
  html:not(.nav-open) .rail .nav {
    visibility: hidden;
  }

  .nav-btn {
    min-height: 44px;
    padding: 12px 14px;
  }

  .nav-btn.is-on {
    margin-right: 0;
    padding-right: 14px;
    border-radius: 12px;
    border-right: 0;
  }

  .stage {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .topbar {
    align-items: center;
    gap: 10px;
    padding: max(10px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 10px 12px;
  }

  .icon-btn.nav-toggle,
  .icon-btn.lookup-toggle {
    display: inline-flex;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }

  .top-title {
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .page-back {
    min-height: 44px;
    padding: 8px 12px;
  }

  .topbar-tools {
    gap: 6px;
    flex-shrink: 0;
  }

  .top-lookup {
    display: none;
  }

  html.lookup-open .topbar {
    flex-wrap: wrap;
  }

  html.lookup-open .top-lookup {
    display: flex;
    order: 5;
    flex: 1 1 100%;
    width: 100%;
  }

  html.lookup-open .top-lookup-field,
  html.lookup-open .top-lookup input {
    width: 100%;
  }

  .icon-btn,
  .account-avatar {
    width: 44px;
    height: 44px;
  }

  .create-fab {
    position: fixed;
    left: max(16px, env(safe-area-inset-left, 0px));
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    z-index: 42;
    margin: 0;
    pointer-events: auto;
  }

  .create-pop {
    position: fixed;
    left: max(16px, env(safe-area-inset-left, 0px));
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    width: min(280px, calc(100vw - 32px));
    z-index: 43;
    pointer-events: auto;
  }

  .words-drawer {
    padding-top: max(18px, env(safe-area-inset-top, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  }

  .view.is-active {
    overflow-x: hidden;
    overflow-y: scroll;
    padding: 12px 12px calc(88px + env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
  }

  .home-mount,
  .speaking-mount,
  .vocab-mount,
  .vocab-hero,
  .vocab-live,
  .essay-flow {
    flex: none;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible;
  }

  #view-compose.is-active,
  #view-speaking.is-review.is-active {
    overflow-x: hidden;
    overflow-y: scroll;
  }

  #view-speaking.is-picking .speaking-mount,
  #view-speaking.is-review .speaking-mount {
    overflow: visible;
  }

  .login-gate {
    overflow: auto;
    align-content: start;
    place-items: center;
    padding: max(20px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px))
      max(20px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  }

  .login-stage,
  .login-card {
    width: min(100%, 420px);
  }

  .login-card {
    padding: 24px 18px;
  }

  .home-grid,
  .home-side,
  .home-main,
  .vocab-hub,
  .assign-filters,
  .assign-layout,
  .home-kpis,
  .welcome-card,
  .cap-radar-card,
  .vocab-side .cap-radar-card,
  .vocab-capacity .cap-radar-card {
    justify-items: stretch;
    text-align: left;
  }

  .home-kpis {
    grid-template-columns: 1fr;
  }

  .welcome-art {
    justify-self: center;
    width: min(220px, 70%);
    height: 110px;
  }

  .cap-legend {
    margin-inline: 0;
  }

  .essay-pick-hero h2 {
    font-size: 32px;
  }

  .essay-choice-grid,
  .essay-mock-grid {
    grid-template-columns: 1fr;
  }

  .essay-choice {
    min-height: 0;
  }

  .compose-grid,
  .review-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .essay-view,
  .rewrite-view,
  .draft-body,
  #essay,
  .prompt-panel textarea {
    min-height: min(52vh, 420px);
    max-height: none;
  }

  .draft-scoring-bar {
    margin: 10px 12px 0;
    overflow: visible;
  }

  .draft-scoring-inner,
  .draft-scoring-copy {
    align-items: flex-start;
  }

  .draft-scoring-bar-actions {
    flex-wrap: wrap;
    width: 100%;
  }

  .draft-scoring-bar-actions .ghost,
  .draft-scoring-bar-actions .analyze-stop,
  .primary,
  .ghost {
    min-height: 44px;
  }

  .draft-overlay {
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    align-items: center;
  }

  .draft-overlay-card.is-progress {
    width: min(100%, 28em);
    max-height: min(100%, calc(100dvh - 7rem));
  }

  .speaking-live,
  .speaking-result {
    padding: 16px 14px calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .speaking-live-actions {
    width: 100%;
    justify-content: stretch;
  }

  .speaking-live-actions .primary,
  .speaking-live-actions .ghost {
    flex: 1 1 100%;
  }

  .vocab-choices {
    grid-template-columns: 1fr;
  }

  .vocab-choice {
    min-height: 52px;
  }

  .vocab-status-row {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    gap: 8px;
  }

  .vocab-result-actions {
    width: 100%;
  }

  .vocab-result-actions .primary,
  .vocab-result-actions .ghost {
    min-height: 44px;
  }

  .card-head,
  .school-head,
  .school-subhead {
    flex-wrap: wrap;
    align-items: stretch;
  }

  .card-head-tools,
  .school-toolbar {
    width: 100%;
    justify-content: stretch;
  }

  .table-search,
  .table-status,
  .school-toolbar .table-search,
  .school-toolbar .table-status,
  .school-inline-field,
  .school-grow {
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
  }

  .table-toolbar.school-grades-tools {
    flex-wrap: nowrap;
  }

  .school-grades-tools .table-status {
    flex: 1 1 0;
    width: auto;
  }

  .table-search .ui-input,
  .school-toolbar .primary,
  .school-toolbar .ghost,
  .card-head-tools .primary,
  .card-head-tools .ghost {
    width: 100%;
    min-height: 44px;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrap .home-table:not(.table-fit),
  .home-table.table-pin {
    width: max-content;
    min-width: 100%;
  }

  .table-wrap.is-pin .table-pin > thead > tr > th:first-child,
  .table-wrap.is-pin .table-pin > tbody > tr > td:first-child,
  .table-wrap .home-table:not(.table-fit) > thead > tr > th:first-child,
  .table-wrap .home-table:not(.table-fit) > tbody > tr > td:first-child {
    position: sticky;
    left: 0;
    z-index: 3;
    background: var(--sheet);
    background-clip: padding-box;
  }

  .table-wrap.is-pin .table-pin > thead > tr > th:first-child,
  .table-wrap .home-table:not(.table-fit) > thead > tr > th:first-child {
    z-index: 5;
  }

  .table-wrap.is-pin-end .table-pin td.home-actions,
  .table-wrap.is-pin-end .table-pin td.cell-action,
  .table-wrap.is-pin-end .table-pin > thead > tr > th:last-child,
  .table-wrap .home-table:not(.table-fit) td.home-actions,
  .table-wrap .home-table:not(.table-fit) td.cell-action {
    position: sticky;
    right: 0;
    z-index: 4;
    background: var(--sheet);
    background-clip: padding-box;
    white-space: nowrap;
  }

  .table-wrap.is-pin-end .table-pin > thead > tr > th:last-child {
    z-index: 6;
  }

  .home-table .home-actions .ghost,
  .home-table .home-actions .primary {
    min-height: 44px;
  }

  .school-cal-board {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .school-cal-grid {
    min-width: 36rem;
  }

  .school-cal-cell {
    min-width: 3.2rem;
    min-height: 72px;
  }

  .modal-grid-2,
  .quit-modal-actions {
    grid-template-columns: 1fr;
  }

  .modal-card,
  .modal-card.modal-wide {
    width: calc(100% - 20px);
    max-height: min(92dvh, 820px);
    padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .modal-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .modal-actions .danger-btn {
    margin-right: 0;
  }

  .modal-actions .primary,
  .modal-actions .ghost,
  .modal-actions .danger-btn {
    width: 100%;
    min-height: 44px;
  }

  .llm-card {
    padding: 12px;
  }

  .llm-card .ui-input,
  .llm-card select,
  .llm-card .ui-select {
    width: 100%;
  }

  .school-tab,
  .school-filter-chip,
  .ielts-bank-tab,
  .essay-land-tab {
    min-height: 44px;
  }

  #view-speaking.is-review .speaking-mount,
  #view-speaking.is-review .speaking-result.speaking-review,
  #view-speaking.is-review .speaking-review-body,
  #view-speaking.is-review .speaking-review-grid,
  #view-speaking.is-review .speaking-review-grid > .panel,
  #view-speaking.is-review .speaking-review-grid > .suggestions,
  #view-speaking.is-review .speaking-review-mid,
  #view-speaking.is-review .speaking-q-list,
  #view-compose .essay-flow,
  #view-compose .essay-phase,
  #view-compose .review-grid,
  #view-compose .review-grid > .panel,
  #view-compose .metrics-panel,
  #view-compose .essay-view,
  #view-compose .rewrite-view,
  #view-compose .draft-read .essay-view {
    flex: none;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible;
  }

  .pw-modal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: max(12px, env(safe-area-inset-top, 0px)) 0 calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .pw-modal .modal-card {
    margin-top: auto;
    margin-bottom: auto;
  }

  .modal-card.modal-wide:has(#assign-form) {
    height: auto;
    max-height: none;
    display: block;
    overflow: visible;
  }

  .modal-card.modal-wide:has(#assign-form) .assign-modal {
    display: flex;
    flex-direction: column;
    grid-template-rows: none;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .modal-card.modal-wide:has(#assign-form) .assign-layout,
  .modal-card.modal-wide:has(#assign-form) .assign-col,
  .modal-card.modal-wide:has(#assign-form) .assign-col-vocab,
  .modal-card.modal-wide:has(#assign-form) .assign-col-types,
  .modal-card.modal-wide:has(#assign-form) .assign-col-students {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .assign-layout,
  .modal-card.modal-wide:has(#assign-form) .assign-layout {
    grid-template-columns: 1fr;
  }

  .assign-col-vocab {
    padding-right: 0;
    padding-bottom: 18px;
    border-right: 0;
    border-bottom: 1px solid var(--green-line);
  }

  .assign-layout-content .assign-col-vocab {
    padding-right: 0;
    border-right: 0;
  }

  .assign-layout-content .assign-col-types {
    padding-left: 0;
    padding-top: 8px;
  }

  .assign-layout-people .assign-col-basket {
    padding-right: 0;
    padding-bottom: 18px;
    border-right: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--green-ink) 32%, transparent);
  }

  .assign-layout-people .assign-col-students,
  .assign-col-students {
    padding-left: 0;
    padding-top: 8px;
  }

  .modal-card.modal-wide:has(#assign-form) .assign-list-checks,
  .modal-card.modal-wide:has(#assign-form) .assign-student-wrap {
    flex: none;
    max-height: none;
    min-height: 0;
    overflow: visible;
  }

  .vocab-spell-slots {
    flex-wrap: wrap;
    overflow: visible;
    white-space: normal;
    row-gap: 12px;
  }

  .vocab-spell-wrap {
    min-height: 44px;
  }

  .vocab-slot-blank,
  .vocab-slot.is-given {
    width: 1.35em;
    min-width: 1.35em;
    min-height: 44px;
    padding-bottom: 8px;
  }
}

.staff-ai-page {
  display: grid;
  grid-template-columns: minmax(200px, 0.34fr) minmax(0, 1fr);
  gap: 16px;
  min-height: 0;
  flex: 1;
  height: 100%;
}

.staff-ai-threads,
.staff-ai-main {
  min-width: 0;
  min-height: 0;
}

.staff-ai-threads {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.staff-ai-thread-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  display: grid;
  gap: 8px;
  align-content: start;
}

.staff-ai-thread-list > li,
.staff-ai-thread-card {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--green-line);
  border-radius: 12px;
  background: var(--sheet);
}

.staff-ai-thread-list > li:has(.staff-ai-thread.is-on),
.staff-ai-thread-card:has(.staff-ai-thread.is-on) {
  border-color: color-mix(in srgb, var(--green) 40%, var(--green-line));
  background: var(--green-soft);
}

.staff-ai-thread {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  width: auto;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--ink);
  cursor: pointer;
}

.staff-ai-thread.is-on,
.staff-ai-thread:hover {
  background: transparent;
}

.staff-ai-thread span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.staff-ai-del {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  line-height: 1;
  font-size: 16px;
}

.staff-ai-del:hover {
  background: color-mix(in srgb, var(--danger, #b42318) 12%, transparent);
  color: var(--danger, #b42318);
}

.staff-ai-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.staff-ai-stream {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 4px 16px;
}

.staff-ai-hero {
  margin: auto;
  text-align: center;
  max-width: 420px;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.staff-ai-hero .speaking-orb-wrap {
  margin-bottom: 8px;
}

.staff-ai-hero h2 {
  margin: 8px 0 6px;
}

.staff-ai-bubble {
  max-width: min(72%, 640px);
  padding: 10px 14px;
  border-radius: 16px;
  line-height: 1.5;
  font-size: 14px;
}

.staff-ai-bubble.is-user {
  margin-left: auto;
  background: var(--green);
  color: #fff;
  white-space: pre-wrap;
}

.staff-ai-bubble.is-ai {
  margin-right: auto;
  background: var(--sheet);
  border: 1px solid var(--green-line);
}

.staff-ai-md h3,
.staff-ai-md h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.staff-ai-md p,
.staff-ai-md ul,
.staff-ai-md ol,
.staff-ai-md table {
  margin: 0 0 8px;
}

.staff-ai-md ul,
.staff-ai-md ol {
  padding-left: 1.2em;
}

.staff-ai-md table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.staff-ai-md th,
.staff-ai-md td {
  border-bottom: 1px solid var(--green-line);
  text-align: left;
  padding: 4px 6px;
}

.staff-ai-dock {
  display: grid;
  gap: 10px;
}

.staff-ai-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.staff-ai-chip {
  border: 1px solid var(--green-line);
  background: var(--sheet);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  color: var(--green-ink);
}

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

.ai-composer-glow {
  position: relative;
  border-radius: 18px;
  padding: 1.5px;
  background: linear-gradient(
    135deg,
    var(--speaking-orb-blue, #3e63dd),
    color-mix(in srgb, var(--speaking-orb-purple, #8e4ec6) 70%, #fff),
    var(--speaking-orb-blue, #3e63dd)
  );
}

.ai-composer-glow::before,
.ai-composer-glow::after {
  content: none;
}

.staff-ai-compose {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  padding: 10px 12px 8px;
  border-radius: 16.5px;
  background: var(--sheet);
}

.staff-ai-md.is-stream {
  white-space: pre-wrap;
  word-break: break-word;
}

.staff-ai-compose textarea {
  width: 100%;
  min-height: 52px;
  max-height: 160px;
  resize: vertical;
  border: 0;
  background: transparent;
  padding: 4px 2px;
  font: inherit;
  color: var(--ink);
}

.staff-ai-compose textarea:focus {
  outline: none;
}

.staff-ai-compose-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.staff-ai-hint {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.staff-ai-dots span {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--green);
  animation: staffAiPulse 1s infinite ease-in-out;
}

.staff-ai-dots span:nth-child(2) { animation-delay: 0.15s; }
.staff-ai-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes staffAiPulse {
  0%, 80%, 100% { opacity: 0.3; }
  40% { opacity: 1; }
}

@media (max-width: 980px) {
  .staff-ai-page {
    grid-template-columns: 1fr;
  }
  .staff-ai-threads {
    max-height: 160px;
  }
}

.todo-card {
  position: relative;
  overflow: visible;
}

.todo-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.todo-head h2 {
  margin-bottom: 2px;
}

.todo-art {
  width: 88px;
  height: 64px;
  flex: none;
  color: var(--green);
}

.todo-art svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.todo-orb {
  fill: color-mix(in srgb, var(--green-soft) 80%, #fff);
  animation: todo-float 3.4s ease-in-out infinite;
}

.todo-leaf path {
  fill: color-mix(in srgb, var(--green) 55%, #fff);
  stroke: var(--green);
  stroke-width: 1.2;
  transform-origin: 28px 40px;
  animation: todo-sway 2.8s ease-in-out infinite;
}

.todo-check circle {
  fill: var(--green);
}

.todo-check path {
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.todo-check {
  transform-origin: 58px 38px;
  animation: todo-pop 2.6s ease-in-out infinite;
}

@keyframes todo-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes todo-sway {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(5deg); }
}

@keyframes todo-pop {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.08); }
}

.todo-body {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.todo-empty {
  margin: 10px 0 0;
  padding: 14px 12px;
  border: 1px dashed var(--green-line);
  border-radius: 12px;
  color: var(--muted, #6b7a72);
  font-size: 13px;
  text-align: center;
}

.todo-card.is-empty .todo-head {
  align-items: center;
}

.todo-skill {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green-ink);
}

.todo-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 8px 0;
  border-top: 1px solid var(--green-line);
  cursor: pointer;
  position: relative;
}

.todo-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.todo-item .cl-check-box {
  margin-top: 1px;
}

.todo-item input:checked + .cl-check-box {
  background: var(--green);
  border-color: var(--green);
}

.todo-item input:checked + .cl-check-box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: 0;
  border-left: 0;
  transform: rotate(40deg);
}

.todo-item-text {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.45;
}

.todo-item.is-on .todo-item-text {
  color: var(--green-ink);
  text-decoration: line-through;
  text-decoration-color: color-mix(in srgb, var(--green-ink) 40%, transparent);
}

.todo-confetti {
  position: absolute;
  left: 8px;
  top: 10px;
  width: 1px;
  height: 1px;
  pointer-events: none;
  z-index: 3;
}

.todo-confetti i {
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 10px;
  border-radius: 1px;
  animation: todo-burst 0.85s ease-out forwards;
}

@keyframes todo-burst {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(0.7); opacity: 0; }
}

.due-soon-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.due-soon-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--green-line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--paper) 70%, #fff);
  text-align: left;
  cursor: pointer;
}

.due-soon-item:hover {
  border-color: var(--green);
}

.due-soon-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.due-soon-copy strong {
  font-size: 13px;
  font-weight: 650;
}

.due-soon-copy span {
  font-size: 12px;
  color: var(--green-ink);
}

.due-soon-item.is-overdue {
  border-color: color-mix(in srgb, #9b3a3a 28%, var(--green-line));
}

.due-soon-empty {
  margin: 12px 0 0;
}

.notice-push-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.modal-card.notice-editor-modal {
  width: min(1080px, calc(100% - 24px));
}

.notice-editor {
  gap: 16px;
}

.notice-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 512px;
  gap: 18px;
  align-items: start;
}

.notice-editor-fields {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.notice-editor-preview {
  min-width: 0;
  display: grid;
  gap: 10px;
  justify-items: center;
  align-content: start;
  padding: 14px 12px 16px;
  border: 1px dashed var(--green-line);
  border-radius: 18px;
  background:
    radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--green-soft) 55%, transparent) 0%, transparent 58%),
    color-mix(in srgb, var(--paper) 78%, #fff);
}

.notice-editor-preview .eyebrow {
  justify-self: start;
  margin: 0 4px;
}

.notice-pop-card {
  width: 480px;
  max-width: calc(100vw - 48px);
  max-height: min(72vh, 520px);
  overflow: auto;
  padding: 18px 16px 14px;
  background: var(--sheet);
  border: 1px solid var(--green-line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 6px;
}

#notice-modal .notice-pop-card {
  width: 480px;
  max-width: calc(100vw - 48px);
}

.notice-pop-card h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.notice-pop-card .session-meta {
  margin: 0;
}

.notice-pop-when {
  display: grid;
  gap: 2px;
  margin: 4px 0 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--green-soft) 72%, #fff);
  border: 1px solid var(--green-line);
}

.notice-pop-when span {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--green-ink);
}

.notice-pop-when strong {
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
  color: var(--ink, #14241c);
}

.notice-image-field {
  margin: 0;
}

.notice-image-figure {
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  background: var(--paper);
}

.notice-image-figure img {
  display: block;
  width: 100%;
  max-height: 160px;
  object-fit: contain;
}

.notice-editor-fields .essay-chart-drop {
  margin: 0;
}

.notice-editor-fields .ui-datetime {
  width: 100%;
}

.notice-editor-fields .ui-datetime .ui-input {
  width: 100%;
}

.notice-pop-card .is-placeholder {
  color: var(--muted);
}

.notice-pop-card.is-preview {
  pointer-events: none;
}

.notice-pop-image {
  display: block;
  width: 100%;
  max-height: 140px;
  object-fit: contain;
  border-radius: 12px;
  background: var(--paper);
}

.notice-pop-body {
  margin: 4px 0 2px;
  line-height: 1.55;
  white-space: normal;
  font-size: 14px;
}

.notice-pop-card .modal-actions {
  margin-top: 8px;
}

@media (max-width: 880px) {
  .notice-push-row,
  .notice-editor-grid {
    grid-template-columns: 1fr;
  }
}


.essay-choice.is-locked,
.essay-choice[disabled][hidden] {
  display: none;
}
