﻿:root {
  color-scheme: light;
  /* 常态白底：干净可读，点缀色克制 */
  --bg: #f5f6f7;
  --bg-deep: #f5f6f7;
  --surface: #ffffff;
  --surface-muted: #f7f8f9;
  --ink: #202529;
  --muted: #687078;
  --line: #e3e6e9;
  --green: #166b59;
  --green-hover: #125a4a;
  --green-soft: #e8f2ef;
  --gold: #b27a17;
  --gold-soft: #fff4db;
  --red: #a8463d;
  --red-soft: #fbedeb;
  --shadow: 0 8px 24px rgba(32, 37, 41, 0.06);
  --shadow-soft: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 4px 14px rgba(32, 37, 41, 0.04);
  --radius: 10px;
  --radius-sm: 8px;
  --font-ui: "Manrope", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: "PingFang SC", "Microsoft YaHei", "Manrope", sans-serif;
  font-family: var(--font-ui);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
textarea,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 68px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.brand-block,
.coach-heading,
.timer,
.review-header,
.drill-heading,
.page-heading,
.answer-context,
.section-heading,
.workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-block {
  justify-content: flex-start;
}

.brand-block strong,
.brand-block span,
.coach-heading strong,
.coach-heading span {
  display: block;
}

.brand-block strong {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-block span,
.coach-heading span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.brand-mark,
.coach-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-family: var(--font-ui);
  font-weight: 800;
  box-shadow: none;
}

.coach-avatar {
  background: var(--gold-soft);
  color: var(--gold);
}

.view-tabs,
.filter-group {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(241, 246, 243, 0.92);
}

.view-tab,
.filter-button,
.library-filter {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.view-tab.active,
.filter-button.active,
.library-filter.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  font-weight: 700;
}

.nav-incomplete-hint {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fff4df;
  color: #8a5a12;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
  vertical-align: 0.05em;
  white-space: nowrap;
}

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

.user-guide-entry { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; color: var(--green); background: white; font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
#userGuideDialog { width: min(940px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); padding: 24px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 18px; color: var(--ink); background: white; overflow-y: auto; }
#userGuideDialog::backdrop { background: rgba(20, 37, 32, .55); }
.user-guide-header, .user-guide-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
#userGuideDialog button { font: inherit; cursor: pointer; padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line); }
.user-guide-search { display: block; margin: 20px 0; font-size: 13px; }
.user-guide-search input { display: block; width: 100%; box-sizing: border-box; padding: 12px; margin-top: 6px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.user-guide-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 26px; }
#guideContents { display: flex; flex-direction: column; gap: 6px; }
#guideContents button { text-align: left; background: #f7f9f8; }
#guideContents button[aria-current="true"] { background: #e5f5ec; color: #176b48; border-color: #a9d7ba; font-weight: 700; }
#userGuideDialog article { line-height: 1.8; overflow-wrap: anywhere; }
#guideSteps { padding-left: 22px; }
#guideSteps li { margin-bottom: 12px; }
.user-guide-footer { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; }
.user-guide-footer > div { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 650px) {
  #userGuideDialog { padding: 16px; }
  .user-guide-layout { grid-template-columns: 1fr; gap: 16px; }
  #guideContents { display: grid; grid-template-columns: 1fr 1fr; }
  #guideContents button { font-size: 12px; }
  .user-guide-footer { flex-wrap: wrap; }
  .header-status { flex-wrap: wrap; justify-content: flex-end; }
}

.nav-incomplete-hint[data-state="complete"], .daily-task-complete {
  background: #e5f5ec;
  color: #176b48;
}
.nav-incomplete-hint[data-state="empty"] { background: #eef1f3; color: #64717a; }
#dailyEncouragement { position: fixed; top: 100px; left: 50%; transform: translateX(-50%); z-index: 1500; display: flex; gap: 14px; align-items: center; width: max-content; max-width: calc(100vw - 32px); box-sizing: border-box; padding: 16px 20px; border: 1px solid #a9d7ba; border-radius: 14px; background: #e5f5ec; color: #176b48; box-shadow: var(--shadow-soft); }
#dailyEncouragement[hidden] { display: none; }
#dailyEncouragement button { flex: 0 0 auto; border: 0; background: transparent; color: inherit; cursor: pointer; }
@media (max-width: 600px) {
  .view-tabs { flex-wrap: wrap; }
  .view-tab .nav-incomplete-hint { margin-left: 3px; font-size: 9px; }
}

.view-tab.has-incomplete,
.adaptive-plan-float > summary.has-incomplete {
  position: relative;
}

.adaptive-plan-float > summary {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.adaptive-plan-navigation .secondary-button {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.adaptive-plan-navigation .secondary-button.has-incomplete {
  border-color: #d8b36a;
  background: linear-gradient(180deg, #fffaf0, #fff);
}

.adaptive-plan-navigation .secondary-button .nav-incomplete-hint {
  margin-left: 6px;
}

.agent-tab span,
.pro-chip {
  margin-left: 4px;
  color: var(--gold);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  vertical-align: 0.05em;
}

.pro-chip.on-primary {
  color: rgba(255, 236, 179, 0.95);
}

.agent-pro-hint {
  margin: 0;
  padding: 8px 28px 0;
  background: white;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.agent-pro-hint .pro-chip {
  margin-left: 0;
}

.agent-panel-slot {
  min-height: 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.agent-live-panel {
  display: none;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  flex: 1;
}

.agent-live-panel.is-mounted {
  display: flex;
}

.agent-live-panel .agent-conversation {
  flex: 1 1 0%;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
}

/* 鏁撮〉 AI 鏁欑粌锛氳褰曞尯鍗犳弧鍓╀綑楂樺害骞跺彲婊氾紝搴曢儴杈撳叆鍖哄缁堝畬鏁村彲瑙?*/
#agentPageSlot .agent-live-panel {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

#agentPageSlot .agent-conversation {
  flex: 0 0 auto;
  min-height: 160px;
  max-height: 45vh;
}

#agentPageSlot .agent-quick-actions,
#agentPageSlot .agent-pro-hint,
#agentPageSlot .agent-composer {
  flex: 0 0 auto;
}

#agentPageSlot .agent-composer {
  padding-top: 12px;
  padding-bottom: 20px;
}

#agentPageSlot .agent-composer textarea {
  min-height: 96px;
  height: 96px;
  max-height: none;
  resize: vertical;
}

.agent-live-panel .agent-pro-hint,
.agent-live-panel .agent-quick-actions,
.agent-live-panel .agent-composer {
  padding-left: 0;
  padding-right: 0;
}

.agent-float-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: #1f4d3a;
  color: #f4faf6;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(20, 40, 30, 0.22);
}

.agent-float-btn:hover {
  background: #2a6350;
}

.agent-float-btn.dock-open {
  outline: 2px solid #9fd0bc;
}

.agent-dock-root {
  position: fixed;
  inset: 0;
  z-index: 75;
  pointer-events: none;
}

.agent-dock-root.open {
  pointer-events: none;
}

.agent-dock-root.open:not(.pinned) {
  pointer-events: auto;
}

.agent-dock-root.open.pinned .agent-dock-panel {
  pointer-events: auto;
}

.agent-dock-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 28, 24, 0.34);
}

.agent-dock-root.pinned .agent-dock-backdrop {
  display: none;
}

.agent-dock-panel {
  position: absolute;
  right: 16px;
  bottom: 72px;
  width: min(440px, calc(100vw - 24px));
  height: min(78vh, 720px);
  min-width: 320px;
  min-height: 380px;
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px);
  display: flex;
  flex-direction: column;
  background: #f7faf8;
  border: 1px solid #c5d4cb;
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(20, 40, 30, 0.22);
  overflow: hidden;
  outline: none;
  pointer-events: auto;
}

.agent-dock-panel.dragging,
.agent-dock-panel.resizing {
  user-select: none;
  opacity: 0.96;
}

.agent-dock-resize {
  position: absolute;
  z-index: 2;
}

.agent-dock-resize-e {
  top: 18px;
  right: 0;
  width: 8px;
  height: calc(100% - 26px);
  cursor: ew-resize;
}

.agent-dock-resize-s {
  left: 18px;
  bottom: 0;
  width: calc(100% - 26px);
  height: 8px;
  cursor: ns-resize;
}

.agent-dock-resize-se {
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
}

.agent-dock-resize-se::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 9px;
  height: 9px;
  border-right: 2px solid #8aa396;
  border-bottom: 2px solid #8aa396;
  border-radius: 0 0 2px 0;
  opacity: 0.85;
}

.agent-dock-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #d7e4dc;
  cursor: grab;
}

.agent-dock-header:active {
  cursor: grabbing;
}

.agent-dock-tool {
  border: 1px solid #b7c8be;
  background: #eef4f0;
  color: #2a3b33;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.agent-dock-tool.active {
  background: #2f5d4a;
  border-color: #2f5d4a;
  color: #f4faf6;
}

.agent-dock-header h2 {
  margin: 2px 0 0;
  font-size: 20px;
}

.agent-dock-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.agent-dock-close {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #4a5d54;
  padding: 0 4px;
}

.agent-dock-slot {
  padding: 12px 16px 8px;
  overflow: hidden;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.agent-dock-slot .agent-live-panel {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.agent-dock-slot .agent-conversation {
  flex: 0 0 auto;
  min-height: 120px;
  max-height: 35vh;
}

.agent-dock-slot .agent-quick-actions,
.agent-dock-slot .agent-pro-hint,
.agent-dock-slot .agent-composer {
  flex: 0 0 auto;
}

.agent-dock-slot .agent-composer textarea {
  min-height: 84px;
  max-height: 140px;
}

.agent-dock-sync-note {
  margin: 0;
  padding: 8px 16px 12px;
  font-size: 11px;
  color: #7a8d84;
  border-top: 1px solid #e0ebe4;
}

@media (max-width: 720px) {
  .agent-dock-panel {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: min(88vh, 900px);
    max-height: min(88vh, 900px);
    border-radius: 16px 16px 0 0;
  }

  .agent-dock-resize {
    display: none;
  }

  .agent-float-btn {
    right: 14px;
    bottom: 14px;
  }
}

.agent-shell {
  width: min(1380px, calc(100% - 40px));
  min-height: calc(100vh - 88px);
  margin: 12px auto 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: stretch;
}

.agent-main,
.agent-memory {
  border: 1px solid var(--line);
  background: var(--surface);
}

.agent-main {
  display: flex;
  height: calc(100vh - 96px);
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.agent-main .agent-header {
  flex: 0 0 auto;
  padding-top: 18px;
  padding-bottom: 14px;
}

.agent-header,
.agent-memory-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.agent-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--line);
}

.agent-header h1,
.agent-memory h2 {
  margin: 4px 0 0;
  letter-spacing: 0;
}

.agent-header h1 {
  font-size: 24px;
}

.agent-status,
.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.agent-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9aa19d;
}

.agent-status.online i { background: #2e9b78; }
.agent-status.setup i { background: var(--gold); }
.agent-status.offline i { background: var(--red); }

.agent-conversation {
  overflow-y: auto;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  background: #fafbfa;
}

.agent-message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: min(760px, 92%);
}

.agent-message > div:not(.coach-avatar),
.agent-message-body {
  min-width: 0;
  flex: 1 1 auto;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: white;
}

.agent-message .coach-avatar {
  flex: 0 0 auto;
  overflow: hidden;
}

.agent-message p {
  margin: 7px 0 0;
  color: #424a4f;
  line-height: 1.65;
  white-space: pre-wrap;
}

.user-message {
  align-self: flex-end;
  justify-content: flex-end;
}

.user-message > div {
  border-color: #cbded7 !important;
  background: var(--green-soft) !important;
}

.coach-message {
  align-items: flex-start;
}

.agent-chat-nudge {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.error-message > div {
  border-color: #ecd2cc !important;
  background: var(--red-soft) !important;
}

.agent-result {
  width: min(820px, 96%);
}

.agent-original-feedback {
  width: min(760px, 100%);
  margin: 0 auto;
  padding-top: 32px;
  border-top: 1px solid rgba(32, 37, 41, 0.1);
  color: var(--ink);
}

.practice-feedback-report {
  width: 100%;
  margin: 0 0 8px;
  padding: 8px 4px 24px;
  border-top: 0;
}

.practice-feedback-report .original-feedback-title h2 {
  font-size: 22px;
}

.practice-feedback-report .original-collocations .feedback-save {
  margin-top: 8px;
}

.practice-feedback-report .original-feedback-section {
  margin-top: 28px;
}

.original-feedback-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.original-feedback-title h2 {
  margin: 0;
  font-size: 24px;
}

.original-feedback-title span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
}

.original-feedback-head > p:first-of-type {
  margin: 8px 0 0;
  color: #48544e;
  line-height: 1.6;
}

.original-trace {
  margin-top: 16px;
}

.original-trace h3,
.original-feedback-section > h3 {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.original-trace ol {
  margin: 12px 0 0;
  padding: 0 0 0 16px;
  border-left: 2px solid rgba(178, 122, 23, 0.4);
  list-style: none;
}

.original-trace li + li {
  margin-top: 12px;
}

.original-trace li {
  font-size: 14px;
}

.original-trace p,
.original-trace strong {
  display: block;
  margin: 0;
  line-height: 1.55;
}

.original-trace p {
  color: #4f5b55;
}

.original-trace strong {
  color: var(--ink);
  font-weight: 600;
}

.original-trace strong span,
.original-trace .trace-observation {
  color: var(--muted);
  font-weight: 400;
}

.original-trace .trace-observation {
  margin-top: 4px;
}

.original-coverage {
  margin: 12px 0 0;
  color: var(--ink);
  font-weight: 600;
}

.original-weakest {
  margin: 4px 0 0;
  color: #4f5b55;
}

.original-feedback-section {
  margin-top: 32px;
}

.original-checklist,
.original-dimensions,
.original-collocations {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.original-checklist li {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 4px;
}

.original-checklist li + li {
  margin-top: 16px;
}

.original-checklist > li > span {
  color: var(--gold);
  font-size: 14px;
}

.original-checklist .status-pass { color: var(--green); }
.original-checklist .status-gap { color: var(--red); }

.original-checklist p {
  margin: 0;
  line-height: 1.55;
}

.original-checklist small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.original-dimensions strong {
  font-weight: 600;
}

.original-dimensions ul {
  margin: 4px 0 0;
  padding: 0;
  color: #4f5b55;
  font-size: 14px;
  list-style: none;
}

.original-dimensions ul li + li {
  margin-top: 4px;
}

.original-collocations li + li {
  margin-top: 12px;
}

.original-collocations p,
.original-collocations em {
  display: block;
  margin: 0;
  line-height: 1.5;
}

.original-collocations p:nth-child(2) {
  color: #4f5b55;
  font-size: 14px;
}

.original-collocations span,
.original-collocations em {
  color: var(--muted);
}

.original-collocations em {
  font-size: 14px;
}

.original-feedback-section pre {
  margin: 12px 0 0;
  overflow: visible;
  white-space: pre-wrap;
  color: var(--ink);
  font-family: inherit;
  line-height: 1.7;
}

.original-next-nudge {
  margin: 16px 0 32px;
  color: var(--muted);
  font-size: 14px;
}

.agent-report {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 8px 6px 28px;
  color: #27322d;
}

.report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #cfdad5;
}

.report-header h2 {
  margin: 0;
  font-size: 21px;
}

.report-header p,
.report-header > span {
  margin: 5px 0 0;
  color: #718079;
  font-size: 11px;
}

.report-header > span {
  white-space: nowrap;
}

.report-section {
  margin-top: 28px;
}

.report-section > h3 {
  margin: 0 0 14px;
  color: #72817a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.trace-list {
  padding-left: 14px;
  border-left: 1px solid #d58d55;
}

.trace-item {
  margin-bottom: 12px;
}

.trace-item p {
  margin: 2px 0;
  color: #43524b;
  font-size: 12px;
  line-height: 1.55;
}

.trace-item b {
  color: #815539;
}

.trace-item code {
  padding: 0;
  background: transparent;
  color: #48685a;
  font-family: Consolas, monospace;
  font-size: 11px;
}

.coverage-line {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  color: #33473e;
  font-size: 12px;
}

.coverage-line strong {
  color: #264c3d;
}

.report-checklist article {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
}

.check-state {
  color: #d0602b;
  font-size: 12px;
  font-weight: 700;
}

.check-state.done { color: #20715a; }
.check-state.partial { color: #c06a2c; }
.check-state.gap { color: #aa4d42; }

.report-checklist strong,
.report-checklist small {
  display: block;
}

.report-checklist strong {
  font-size: 12px;
  line-height: 1.55;
}

.report-checklist small {
  margin-top: 3px;
  color: #84908a;
  font-size: 10px;
}

.report-criteria {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 44px;
}

.report-criteria article {
  min-width: 0;
}

.report-criteria strong {
  font-size: 12px;
}

.report-criteria p {
  margin: 5px 0 0;
  color: #47554e;
  font-size: 11px;
  line-height: 1.5;
}

.report-criteria small {
  display: block;
  margin-top: 5px;
  color: #87928d;
  font-size: 10px;
  line-height: 1.45;
}

.report-vocabulary article {
  margin-bottom: 14px;
}

.report-vocabulary strong,
.report-vocabulary span {
  font-size: 12px;
}

.report-vocabulary p,
.report-vocabulary em {
  display: block;
  margin: 3px 0 0;
  color: #536159;
  font-size: 11px;
  line-height: 1.5;
}

.report-vocabulary em {
  color: #7c8882;
}

.report-outline p {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  margin: 6px 0;
  font-size: 12px;
  line-height: 1.5;
}

.report-outline strong {
  color: #345747;
}

.report-finish {
  margin: 16px 0 0;
  color: #31483d;
  font-size: 12px;
}

.report-rationale {
  margin: 8px 0 0;
  color: #7d8983;
  font-size: 10px;
}

.agent-review-result {
  width: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.agent-review-header {
  align-items: flex-start;
}

.agent-review-header h2 {
  margin: 0;
  font-size: 20px;
}

.agent-review-header p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.agent-criteria-grid {
  margin-top: 20px;
}

.agent-criterion {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.agent-criterion:hover,
.agent-criterion[aria-expanded="true"] {
  border-color: #b8d1c8;
  background: var(--green-soft);
}

.agent-criterion small {
  display: block;
  min-height: 34px;
  margin-top: 7px;
  line-height: 1.45;
}

.criterion-detail {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.agent-criterion[aria-expanded="true"] .criterion-detail {
  display: block;
}

.criterion-detail b {
  display: block;
  color: var(--green);
  font-size: 11px;
}

.criterion-detail p {
  margin: 3px 0 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.agent-feedback-columns,
.agent-drill-panel,
.agent-revision-panel {
  margin-top: 14px;
}

.agent-drill-panel small {
  display: block;
  margin: 8px 0 16px;
  color: var(--green);
}

.agent-drill-panel textarea,
.agent-revision-panel textarea {
  width: 100%;
}

.agent-result-body {
  width: 100%;
}

.agent-decision {
  display: flex;
  align-items: center;
  gap: 10px;
}

.agent-decision span,
.next-action-card > span,
.agent-phrase span {
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
}

.next-action-card {
  margin-top: 16px;
  padding: 16px;
  border-left: 3px solid var(--green);
  background: var(--green-soft);
}

.next-action-card h3 {
  margin: 5px 0;
  font-size: 16px;
}

.next-action-card p {
  margin: 0;
}

.next-action-card small {
  display: block;
  margin-top: 10px;
  color: var(--green);
}

.agent-result details {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.agent-result summary {
  cursor: pointer;
  font-weight: 700;
}

.method-evidence {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.method-evidence li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.agent-phrase {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #ecd8aa;
  background: var(--gold-soft);
}

.agent-phrase strong,
.agent-phrase p,
.agent-phrase span {
  display: block;
}

.agent-phrase p {
  margin: 3px 0 0;
  font-size: 12px;
}

.agent-rationale {
  color: var(--muted) !important;
  font-size: 12px;
}

.agent-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 28px 0;
  background: white;
}

.agent-quick-actions button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-muted);
  color: var(--ink);
  font-size: 12px;
}

.agent-composer {
  padding: 14px 28px 24px;
  background: white;
}

.agent-composer-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: start;
}

.agent-composer textarea {
  width: 100%;
  resize: vertical;
  padding: 13px 14px;
  border: 1px solid #bfc8c3;
  border-radius: 4px;
  outline: none;
}

.agent-composer textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.agent-composer-input-row .voice-input-button {
  margin-top: 8px;
}

.agent-composer > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
}

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

.agent-memory {
  align-self: start;
  padding: 22px;
}

.agent-memory h2 {
  font-size: 20px;
}

.live-chip {
  padding: 4px 7px;
  border: 1px solid #c9ded6;
  background: var(--green-soft);
  color: var(--green);
}

.agent-memory-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 20px 0 24px;
  border: 1px solid var(--line);
}

.agent-memory-stats div {
  min-width: 0;
  padding: 12px 6px;
  text-align: center;
}

.agent-memory-stats div + div { border-left: 1px solid var(--line); }
.agent-memory-stats span,
.agent-memory-stats strong { display: block; }
.agent-memory-stats span { color: var(--muted); font-size: 10px; }
.agent-memory-stats strong { margin-top: 4px; font-size: 20px; }
.agent-memory section h3 { margin: 0 0 10px; font-size: 13px; }

.tool-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tool-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.tool-list span {
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
}

.agent-privacy {
  margin-top: 22px;
  padding: 14px;
  background: var(--surface-muted);
}

.agent-privacy strong { font-size: 12px; }
.agent-privacy p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }

@media (max-width: 860px) {
  .agent-shell {
    width: min(100% - 24px, 720px);
    grid-template-columns: 1fr;
    margin-top: 12px;
  }

  .agent-memory { grid-row: 1; width: 100%; }
  .agent-main { min-height: 600px; }
  .agent-header, .agent-conversation { padding-right: 18px; padding-left: 18px; }
  .agent-quick-actions { padding-right: 18px; padding-left: 18px; }
  .agent-composer { padding-right: 18px; padding-left: 18px; }
}

@media (max-width: 560px) {
  .agent-header { align-items: flex-start; }
  .agent-header h1 { font-size: 20px; }
  .agent-message, .agent-result { width: 100%; }
  .agent-message .coach-avatar { display: none; }
  .agent-composer > div { align-items: stretch; flex-direction: column; }
  .agent-composer .primary-button { width: 100%; }
  .method-evidence li { grid-template-columns: 1fr; gap: 3px; }
  .agent-phrase { align-items: stretch; flex-direction: column; }
  .agent-review-result { padding: 16px; }
  .agent-review-header { align-items: flex-start; flex-direction: column; }
  .agent-report { padding-right: 0; padding-left: 0; }
  .report-header { flex-direction: column; gap: 4px; }
  .report-checklist article { grid-template-columns: 1fr; gap: 4px; }
  .report-criteria { grid-template-columns: 1fr; gap: 16px; }
  .agent-original-feedback { padding-top: 24px; }
  .original-checklist li { grid-template-columns: 1fr; }
  .original-dimensions { grid-template-columns: 1fr; }
}

.header-status {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2e9b78;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.practice-layout {
  width: min(1380px, calc(100% - 40px));
  margin: 24px auto 48px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.workspace,
.coach-panel,
.page-view {
  border: 1px solid rgba(207, 218, 213, 0.95);
  background: var(--surface);
}

.workspace {
  min-height: 720px;
  padding: 30px 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.coach-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.coach-heading {
  justify-content: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.coach-content {
  min-height: 230px;
  padding: 20px 0;
}

.coach-content h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.coach-content p,
.coach-content li,
.coach-boundary p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.coach-content ol,
.coach-content ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

.coach-boundary {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.coach-boundary strong {
  font-size: 13px;
}

.coach-boundary p {
  margin: 8px 0 0;
  font-size: 12px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--green);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.22;
}

h2 {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 19px;
}

.icon-button:hover,
.secondary-button:hover,
.text-button:hover {
  border-color: #aeb9b4;
}

.icon-button.compact {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  font-size: 13px;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 28px 0 34px;
  padding: 0;
  list-style: none;
}

.stepper li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #90989d;
  font-size: 13px;
}

.stepper li::after {
  content: "";
  height: 1px;
  flex: 1;
  margin-right: 10px;
  background: var(--line);
}

.stepper li:last-child::after {
  display: none;
}

.stepper span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  font-size: 11px;
  font-weight: 800;
}

.stepper li.active,
.stepper li.done {
  color: var(--green);
  font-weight: 700;
}

.stepper li.active span,
.stepper li.done span {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.step-panel {
  display: none;
}

.step-panel.active {
  display: block;
}

.section-heading {
  align-items: flex-end;
  margin-bottom: 18px;
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.ontology-insight {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(160deg, #f7faf8 0%, #eef3f0 100%);
}

.compact-heading h2 {
  margin: 0;
  font-size: 1.05rem;
}

.ontology-insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.ontology-insight-grid article {
  padding: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
}

.ontology-insight-grid h3 {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.ontology-insight-grid p {
  margin: 0 0 6px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.ontology-method-list {
  margin: 0;
  padding-left: 1.1em;
  font-size: 0.9rem;
  line-height: 1.55;
}

@media (max-width: 860px) {
  .ontology-insight-grid {
    grid-template-columns: 1fr;
  }
}

.topic-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

button.topic-card {
  width: 100%;
  min-height: 152px;
  padding: 18px;
  text-align: left;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

button.topic-card:hover {
  transform: translateY(-2px);
  border-color: #c5cad3;
  box-shadow: 0 10px 22px rgba(32, 37, 41, 0.08);
}

button.topic-card:active {
  transform: translateY(-1px);
}

.topic-category,
.method-tag,
.source-chip,
.evidence-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
}

.topic-card h3 {
  margin-top: 16px;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

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

.topic-card-arrow {
  display: block;
  margin-top: 16px;
  color: var(--green);
  font-family: var(--font-ui);
  font-weight: 700;
}

.selected-topic-card {
  padding: 22px;
  background: var(--surface-muted);
}

.selected-topic-card h2 {
  margin-top: 10px;
}

.cue-card-prompts {
  margin-top: 16px;
}

.you-should-say {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.cue-bullet-list {
  margin: 8px 0 0;
  padding-left: 1.25em;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.7;
}

.cue-bullet-list li + li {
  margin-top: 2px;
}

.topic-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.prep-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 14px;
}

.timer {
  justify-content: flex-start;
  gap: 10px;
}

.timer-label {
  color: var(--muted);
  font-size: 13px;
}

.timer strong {
  min-width: 52px;
  font-variant-numeric: tabular-nums;
}

.text-button {
  padding: 5px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

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

.cue-field {
  min-height: 128px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.cue-index {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
}

.cue-field label {
  font-size: 13px;
  font-weight: 700;
}

.cue-field input {
  width: 100%;
  margin-top: 0;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.cue-field input:focus {
  border-color: var(--green);
}

.cue-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.cue-input-row input {
  flex: 1;
  min-width: 0;
}

.voice-input-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.voice-input-button:hover:not(:disabled) {
  border-color: var(--green);
  color: var(--green);
}

.voice-input-button.listening {
  background: rgba(22, 107, 89, 0.12);
  border-color: var(--green);
  color: var(--green);
}

.voice-input-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.expr-rail-entry {
  margin-top: 14px;
}

.expr-rail-trigger {
  width: 100%;
  justify-content: center;
}

.expr-rail-mobile {
  margin-top: 12px;
}

.expr-rail-mobile.is-open {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
}

.expr-rail-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.expr-rail-panel-head h3 {
  margin: 2px 0 0;
  font-size: 16px;
}

.expr-rail-note,
.expr-rail-teaser,
.expr-rail-missing {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.expr-rail-missing {
  padding: 8px 10px;
  border-left: 3px solid #c9b27a;
  background: rgba(201, 178, 122, 0.12);
}

.expr-rail-source,
.expr-rail-source-line {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  margin: 2px 0 8px;
}

.expr-rail-layer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e0ebe4;
}

.expr-rail-layer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.expr-rail-shown-tag {
  color: #2f5d4a;
  font-size: 12px;
  font-weight: 700;
}

.expr-rail-phrases {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.expr-rail-layer-body ol,
.expr-rail-layer-body ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.expr-rail-stuck-menu,
.expr-rail-idea-form {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.expr-rail-stuck-btn {
  justify-content: flex-start;
  text-align: left;
}

.expr-rail-idea-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: start;
}

.expr-rail-idea-input {
  width: 100%;
  min-height: 64px;
  resize: vertical;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  line-height: 1.5;
}

.expr-rail-idea-input-row .voice-input-button {
  margin-top: 4px;
}

.expr-rail-idea-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.expr-rail-stale {
  margin: 10px 0;
  padding: 10px 12px;
  border-left: 3px solid #c9b27a;
  background: rgba(201, 178, 122, 0.14);
}

.expr-rail-stale p {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
}

.expr-rail-report {
  margin: 12px 0;
  padding: 10px 12px;
  border-left: 3px solid #2f5d4a;
  background: rgba(47, 93, 74, 0.06);
}

.expr-rail-report h4 {
  margin: 0 0 6px;
  font-size: 14px;
}

.expr-rail-report ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.55;
}

.expr-rail-report-note {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.coach-content.expr-rail-active {
  min-height: 0;
}

.phrase-strip {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: start;
  gap: 12px;
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 3px solid var(--gold);
  background: var(--gold-soft);
}

.phrase-strip > span {
  color: #765616;
  font-size: 12px;
  font-weight: 800;
}

#phraseChips,
#part1PhraseChips,
#part3PhraseChips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.phrase-chip-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px 3px 7px;
  border: 1px solid rgba(118, 86, 22, 0.22);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.5);
  color: #604811;
  font-size: 12px;
}

.phrase-chip-wrap:hover {
  border-color: var(--gold);
  background: white;
}

.phrase-chip {
  cursor: text;
  user-select: text;
}

.phrase-save {
  min-width: 22px;
  min-height: 22px;
  padding: 0 4px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #765616;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.phrase-save:hover {
  background: rgba(118, 86, 22, 0.12);
}

.panel-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.primary-button,
.secondary-button {
  min-height: 42px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 13px;
  transition: background 160ms ease, border-color 160ms ease, transform 120ms ease, box-shadow 160ms ease;
}

.primary-button {
  border: 1px solid var(--green);
  background: var(--green);
  color: white;
  box-shadow: 0 4px 12px rgba(14, 107, 92, 0.18);
}

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

.primary-button:active,
.secondary-button:active {
  transform: translateY(1px);
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.secondary-button:hover {
  border-color: #a8c4b8;
  background: var(--surface-muted);
}

.answer-context {
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.field-label {
  display: block;
  margin: 20px 0 8px;
  font-size: 13px;
  font-weight: 800;
}

textarea {
  width: 100%;
  resize: vertical;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  color: var(--ink);
  line-height: 1.65;
}

textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 107, 89, 0.08);
}

.answer-input {
  min-height: 230px;
}

.input-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  color: var(--muted);
  font-size: 12px;
}

.notes-preview {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
}

.notes-preview dl {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 8px 16px;
  margin: 0;
  font-size: 13px;
}

.notes-preview dt {
  color: var(--muted);
}

.notes-preview dd {
  margin: 0;
  font-weight: 700;
}

.review-header {
  align-items: flex-start;
}

.evidence-badge {
  background: var(--gold-soft);
  color: var(--gold);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
}

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

.metric-card span,
.metric-card small {
  display: block;
}

.metric-card span {
  color: var(--muted);
  font-size: 12px;
}

.metric-card strong {
  display: block;
  margin: 6px 0 10px;
  font-size: 20px;
}

.metric-track {
  height: 5px;
  border-radius: 3px;
  background: #e8ecea;
  overflow: hidden;
}

.metric-track i {
  display: block;
  height: 100%;
  background: var(--green);
}

.feedback-columns {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 12px;
}

.feedback-section {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.feedback-section.priorities {
  border-color: #e4c682;
}

.feedback-list {
  margin-top: 14px;
}

.feedback-item {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.feedback-item:first-child {
  padding-top: 0;
  border-top: 0;
}

.feedback-item strong {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

.feedback-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.feedback-item .evidence {
  margin-top: 7px;
  padding-left: 10px;
  border-left: 2px solid var(--line);
  color: #545d62;
  font-style: italic;
}

.drill-panel,
.revision-panel {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
}

.drill-heading {
  align-items: flex-start;
}

.drill-panel > p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.compact-heading {
  margin-bottom: 12px;
}

.full-width {
  width: 100%;
  margin-top: 10px;
}

.comparison-result {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #a7cdbf;
  border-radius: 6px;
  background: var(--green-soft);
}

.comparison-result h4 {
  margin: 0 0 8px;
}

.comparison-result p {
  margin: 0;
  color: #355d51;
  font-size: 13px;
  line-height: 1.6;
}

.source-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
}

.source-chip {
  background: #edf0ef;
  color: #55605b;
}

.page-view {
  width: min(1080px, calc(100% - 40px));
  margin: 24px auto 48px;
  padding: 30px 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.page-heading {
  margin-bottom: 24px;
}

.page-heading-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.history-weekly-insight {
  margin-bottom: 18px;
  padding: 18px 18px 16px;
  border: 1px solid #b7d4c4;
  border-radius: 10px;
  background:
    radial-gradient(circle at top right, rgba(143, 191, 163, 0.22), transparent 40%),
    linear-gradient(160deg, #f3faf6, #ffffff 58%);
}

.history-weekly-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.history-weekly-topline h2 {
  margin: 4px 0 6px;
  font-size: 22px;
}

.history-weekly-range {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.history-weekly-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.history-weekly-chips span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #c5ddcf;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.history-weekly-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.history-weekly-grid section {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(183, 212, 196, 0.8);
  background: rgba(255, 255, 255, 0.78);
}

.history-weekly-grid h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.history-weekly-grid ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

.history-weekly-encourage {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--green);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.55;
}

@media (max-width: 720px) {
  .history-weekly-topline {
    flex-direction: column;
  }

  .history-weekly-chips {
    justify-content: flex-start;
  }

  .history-weekly-grid {
    grid-template-columns: 1fr;
  }
}

.history-list,
.history-structured {
  display: grid;
  gap: 14px;
}

.history-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.history-summary > div {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.history-summary span,
.history-summary strong {
  display: block;
}

.history-summary span {
  color: var(--muted);
  font-size: 12px;
}

.history-summary strong {
  margin-top: 4px;
  font-size: 22px;
}

.history-day-block {
  display: grid;
  gap: 10px;
}

.history-day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.history-day-head h2 {
  margin: 0;
  font-size: 18px;
}

.history-day-head span {
  color: var(--muted);
  font-size: 12px;
}

.history-part-stack {
  display: grid;
  gap: 8px;
}

.history-part-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.history-part-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  background: linear-gradient(180deg, #f7faf8, #fff);
}

.history-part-group > summary::-webkit-details-marker {
  display: none;
}

.history-part-group > summary::after {
  content: "鈻?;
  color: var(--muted);
  font-size: 12px;
  transition: transform 0.15s ease;
}

.history-part-group[open] > summary::after {
  transform: rotate(180deg);
}

.history-part-title {
  font-size: 14px;
  font-weight: 800;
}

.history-part-meta {
  color: var(--muted);
  font-size: 12px;
}

.history-part-items {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.history-item {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.history-item-compact {
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  background: #fff;
}

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

.history-item time,
.history-item p {
  color: var(--muted);
  font-size: 12px;
}

.history-item h3,
.history-item p {
  margin: 0;
}

.history-item h3 {
  font-size: 15px;
  line-height: 1.35;
}

.history-score {
  color: var(--green);
  font-weight: 800;
  white-space: nowrap;
}

.empty-state {
  padding: 54px 20px;
  border: 1px dashed #cbd2ce;
  text-align: center;
  color: var(--muted);
}

.source-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 30px;
}

.source-cover {
  margin: 0;
}

.source-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.source-cover figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.sources-search-shell {
  margin-bottom: 22px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(160deg, #f7faf8, #fff 55%);
}

.sources-search-bar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.sources-search-field {
  flex: 1;
}

.sources-search-field input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid #bfc8c3;
  border-radius: 8px;
  font-size: 15px;
}

.sources-search-field input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.sources-search-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.sources-tag {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #c5ddcf;
  background: #fff;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

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

.sources-search-status {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.sources-search-panel {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.sources-result-head h3 {
  margin: 4px 0 0;
  font-size: 16px;
}

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

.sources-hit-list li button {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.sources-hit-layer {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.sources-next {
  color: var(--ink) !important;
  padding-top: 4px;
  border-top: 1px dashed var(--line);
}

.sources-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.sources-result-empty {
  padding: 14px;
  border: 1px dashed #cbd2ce;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
}

.sources-book-list {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.sources-book-card,
.sources-chapter-hit {
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.sources-book-card {
  cursor: pointer;
}

.sources-book-card:hover,
.source-groups section[data-open-readable]:hover {
  border-color: #9ec7b3;
  background: #f7fbf8;
}

.sources-chapter-hit .compact-action {
  justify-self: start;
  margin-top: 4px;
}

.sources-hit-list li {
  list-style: none;
}

.sources-shelf[hidden],
.sources-reader[hidden],
.sources-search-panel[hidden] {
  display: none !important;
}

.sources-reader {
  display: grid;
  gap: 14px;
  position: relative;
  z-index: 5;
}

.sources-reader-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.sources-reader-toolbar h2 {
  margin: 0;
  flex: 1;
  font-size: 18px;
}

.sources-reader-nav {
  display: flex;
  gap: 8px;
}

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

.sources-chapter-toc {
  display: grid;
  gap: 8px;
  max-height: min(70vh, 720px);
  overflow: auto;
  padding-right: 4px;
  position: relative;
  z-index: 6;
  pointer-events: auto;
}

.sources-toc-item {
  display: grid;
  gap: 4px;
  padding: 12px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  pointer-events: auto;
  -webkit-user-select: none;
  user-select: none;
}

.sources-toc-item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.sources-toc-item.is-active {
  border-color: var(--green);
  background: var(--green-soft);
}

.sources-reader-article {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  min-height: 420px;
}

.sources-reader-article h3 {
  margin: 6px 0 12px;
  font-size: 22px;
  line-height: 1.35;
}

.sources-reader-guide {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-left: 3px solid var(--green);
  background: #f7faf8;
  display: grid;
  gap: 6px;
}

.sources-reader-guide p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
}

.sources-reader-body {
  white-space: pre-wrap;
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.8;
  color: #1c2c26;
  max-height: min(68vh, 760px);
  overflow: auto;
  padding-right: 6px;
}

.source-groups section.is-highlighted,
.study-plan-item.is-highlighted {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  background: var(--green-soft);
}

.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;
}

@media (max-width: 720px) {
  .sources-search-bar {
    flex-direction: column;
    align-items: stretch;
  }

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

  .sources-chapter-toc {
    max-height: 220px;
  }
}

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

.source-groups section {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.source-groups p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.source-meta {
  color: var(--green) !important;
  font-size: 12px !important;
  font-weight: 700;
}

.study-plan-block {
  margin-top: 28px;
  padding-top: 8px;
}

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

.study-plan-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.study-plan-item strong {
  color: var(--green);
  font-size: 13px;
}

.study-plan-item h3 {
  margin: 0;
  font-size: 14px;
}

.study-plan-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.lexicon-view {
  min-height: 720px;
}

.lexicon-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.lexicon-stats > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.lexicon-stats > div.is-pending {
  border-color: #d8b36a;
  background: linear-gradient(180deg, #fff9ef, #fff);
}

.lexicon-stats > div.is-clear {
  border-color: #b7d4c4;
  background: linear-gradient(180deg, #f3faf6, #fff);
}

.lexicon-stats span,
.lexicon-stats strong,
.lexicon-stats em {
  display: block;
}

.lexicon-stats span {
  color: var(--muted);
  font-size: 12px;
}

.lexicon-stats strong {
  margin-top: 6px;
  font-size: 23px;
}

.lexicon-stats em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  line-height: 1.4;
}

.lexicon-stats-clear > div.is-clear strong {
  color: var(--green);
}

.evidence-badge.is-pending {
  background: #fff4df;
  color: #8a5a12;
}

.evidence-badge.is-clear {
  background: var(--green-soft);
  color: var(--green);
}

.lexicon-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.lexicon-tab {
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.lexicon-tab.active {
  border-bottom-color: var(--green);
  color: var(--green);
}

.lexicon-pane {
  display: none;
  padding-top: 22px;
}

.lexicon-pane.active {
  display: block;
}

.review-card {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
}

.review-card-topline,
.lexicon-item-head,
.challenge-header,
.challenge-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.review-progress,
.review-instruction,
.challenge-header p,
.challenge-task > p {
  color: var(--muted);
  font-size: 13px;
}

.review-instruction {
  margin: 22px 0 8px;
}

.review-prompt-label {
  margin: 18px 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.review-meaning-prompt {
  margin: 0;
  font-size: 28px;
  line-height: 1.35;
}

.review-topic-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.review-hint-box,
.review-expression-box {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.review-hint-text {
  margin: 6px 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
  letter-spacing: 0.04em;
}

.review-expression-box h3 {
  margin: 4px 0 0;
  font-size: 22px;
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.review-actions .primary-button {
  flex: 1 1 180px;
}

.answer-grammar-panel .answer-grammar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.answer-grammar-hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: #5a6f64;
}

.answer-grammar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.answer-grammar-result {
  margin-top: 12px;
}

.review-correction {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #d5e4dc;
  border-radius: 8px;
  background: #f7fbf9;
}

.review-correction-status {
  margin: 6px 0 8px;
  font-size: 13px;
  font-weight: 700;
}

.review-correction-issues {
  margin: 0;
  padding-left: 1.2em;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.55;
}

.review-corrected-sentence {
  margin: 6px 0 10px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
}

.review-usage-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 6px;
  background: #f3f7f5;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}

.review-apply-btn {
  margin-top: 14px;
}

.lexicon-target-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid #c9ddd4;
  border-radius: 8px;
  background: linear-gradient(160deg, #f4faf7 0%, #eaf3ef 100%);
}

.lexicon-target-banner[hidden] {
  display: none;
}

.lexicon-target-banner .eyebrow {
  margin: 0 0 4px;
}

.lexicon-target-banner strong {
  display: inline;
  margin-right: 6px;
  font-size: 16px;
}

.lexicon-target-banner span {
  color: var(--muted);
  font-size: 13px;
}

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

.review-card h2 {
  font-size: 27px;
}

.review-answer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.review-answer dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.review-answer dl > div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 14px;
}

.review-answer dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.review-answer dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}

.rating-label {
  margin: 18px 0 8px;
  font-size: 12px;
  font-weight: 800;
}

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

.rating-buttons button {
  min-height: 42px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.rating-buttons button:hover {
  border-color: var(--green);
  color: var(--green);
}

.library-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  margin-bottom: 18px;
}

.challenge-incomplete-list {
  margin-top: 16px;
}

.challenge-incomplete-head h3 {
  margin: 4px 0 6px;
  font-size: 18px;
}

.challenge-incomplete-items {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.challenge-incomplete-items li button {
  width: 100%;
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid #e0c48a;
  border-radius: 8px;
  background: #fffaf0;
  text-align: left;
  cursor: pointer;
}

.challenge-incomplete-items strong {
  display: block;
  font-size: 15px;
}

.challenge-incomplete-items span {
  color: var(--muted);
  font-size: 12px;
}

.challenge-complete-banner {
  margin-top: 8px;
}

.review-hub {
  margin-bottom: 18px;
}

.review-mission {
  margin-bottom: 16px;
  padding: 16px 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.review-mission-pending {
  border-color: #e0c48a;
  background:
    linear-gradient(135deg, rgba(255, 244, 223, 0.95), rgba(255, 255, 255, 0.92)),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 10px,
      rgba(216, 179, 106, 0.06) 10px,
      rgba(216, 179, 106, 0.06) 20px
    );
}

.review-mission-done {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px 16px;
  align-items: start;
  border-color: #8fbfa3;
  background:
    radial-gradient(circle at top right, rgba(143, 191, 163, 0.28), transparent 42%),
    linear-gradient(160deg, #eef8f2, #ffffff 55%);
  animation: mission-clear-in 0.45s ease;
}

.review-mission-done-mark {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(47, 107, 74, 0.22);
}

.review-mission-copy h2 {
  margin: 4px 0 6px;
  font-size: 22px;
  line-height: 1.25;
}

.review-mission-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.review-mission-next {
  margin-top: 8px !important;
  color: var(--ink) !important;
}

.review-mission-done .primary-button {
  margin-top: 12px;
}

.review-mission-progress-row {
  margin-top: 12px;
  display: grid;
  gap: 6px;
}

.review-mission-meter {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.review-mission-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c9852f, #e0b35c);
  transition: width 0.45s ease;
}

.review-mission-meter.is-full i,
.review-mission-done .review-mission-meter i {
  background: linear-gradient(90deg, var(--green), #6cbc8d);
}

.review-mission-progress-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

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

.review-mission-list li button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.72);
  text-align: left;
  cursor: pointer;
}

.review-mission-list li.is-open button {
  border-color: #e2c48f;
}

.review-mission-list li.is-done button {
  border-color: #c5ddcf;
  opacity: 0.92;
}

.review-mission-list strong {
  font-size: 14px;
}

.review-mission-list span {
  color: var(--muted);
  font-size: 12px;
}

.review-mission-list li.is-done strong::after {
  content: " 鉁?;
  color: var(--green);
}

.review-mission.is-progressed {
  animation: mission-progress-flash 0.55s ease;
}

.review-mission-meter.is-pulse i {
  animation: mission-meter-pulse 0.6s ease;
}

@keyframes mission-clear-in {
  from { opacity: 0.35; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@keyframes mission-progress-flash {
  0% { box-shadow: 0 0 0 0 rgba(201, 133, 47, 0.35); }
  100% { box-shadow: 0 0 0 10px rgba(201, 133, 47, 0); }
}

@keyframes mission-meter-pulse {
  0% { filter: brightness(1); }
  40% { filter: brightness(1.15); }
  100% { filter: brightness(1); }
}

.review-hub-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.review-hub-toolbar .review-hub-note {
  margin: 0;
  flex: 1;
}

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

.review-caps-panel {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf8;
}

.review-caps-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.review-caps-header strong {
  display: block;
  margin-top: 2px;
  font-size: 16px;
}

.review-caps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 12px 0 14px;
}

.review-caps-field {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.review-caps-field input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #bfc8c3;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
}

.review-caps-field input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

@media (max-width: 560px) {
  .review-hub-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .review-caps-grid {
    grid-template-columns: 1fr;
  }

  .review-mission-done {
    grid-template-columns: 1fr;
  }

  .review-mission-list li button {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}

.review-hub-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
}

.review-hub-card.is-due {
  border-color: #d8b36a;
  background: linear-gradient(180deg, #fffaf0, #fff);
}

.review-hub-card.is-clear {
  border-color: #b7d4c4;
  background: linear-gradient(180deg, #f4faf7, #fff);
}

.review-hub-card-flag {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  color: #8a5a12;
}

.review-hub-card.is-clear .review-hub-card-flag {
  color: var(--green);
}

.review-hub-card.is-due:hover,
.review-hub-card.is-clear:hover {
  transform: translateY(-1px);
}

.review-hub-card:hover {
  border-color: var(--green);
  background: var(--green-soft);
}

.review-hub-card strong {
  font-size: 15px;
}

.review-hub-card span,
.review-hub-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.word-review-lemma {
  margin: 10px 0 6px;
  font-size: 28px;
  font-weight: 800;
}

.productive-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  margin: 20px 0;
  list-style: none;
}

.productive-steps li {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  border-bottom: 3px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.productive-steps li.active,
.productive-steps li.done {
  color: var(--green);
  border-color: var(--green);
}

.productive-steps li.active {
  background: #e7f3ef;
  font-weight: 700;
}

.productive-task {
  padding: 16px 20px;
  margin: 16px 0;
  background: #f3f7f6;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-wrap: anywhere;
}

.productive-task p:last-child {
  margin-bottom: 0;
  line-height: 1.7;
}

.productive-cue {
  margin: 10px 0;
  font-size: 26px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.productive-spoken {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 18px 0;
  line-height: 1.6;
  font-size: 14px;
}

.productive-spoken input {
  margin-top: 5px;
}

.productive-assist-note {
  color: #805b20;
  font-size: 13px;
}

@media (max-width: 560px) {
  .productive-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.word-review-sentence {
  margin: 0 0 12px;
  line-height: 1.6;
}

.word-review-sentence mark {
  background: #ffe8a3;
  padding: 0 2px;
}

.word-review-answer,
.word-review-ref {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.word-bank-optin {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  font-size: 13px;
  font-weight: 700;
}

.word-bank-suggest {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-left: 3px solid var(--gold);
  background: var(--gold-soft);
  font-size: 12px;
  color: #765616;
}

.library-category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.library-category-tab {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-muted);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.library-category-tab.active {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
}

.library-category-panel[hidden] {
  display: none !important;
}

.word-bank-intro,
.word-bank-count {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.word-bank-backup {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.word-bank-meta {
  margin: 0 0 6px !important;
  color: var(--muted) !important;
  font-size: 12px !important;
}

.word-bank-zh {
  margin: 0 0 8px !important;
  font-weight: 600;
}

.word-bank-edit {
  display: grid;
  gap: 6px;
  margin: 10px 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.word-bank-edit input {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.word-lookup-collect {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.word-lookup-manual-zh {
  display: grid;
  gap: 6px;
  margin: 8px 0 10px;
  font-size: 12px;
  color: var(--muted);
}

.word-lookup-manual-zh input {
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.search-field {
  width: min(420px, 100%);
}

.search-field span {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 800;
}

.search-field input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: 0;
}

.search-field input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 107, 89, 0.08);
}

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

.official-intro {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.official-count {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.official-meta {
  margin: 0 0 8px !important;
  color: var(--ink) !important;
  font-size: 12px !important;
  line-height: 1.5;
}

.official-item .primary-button {
  margin-top: auto;
}

.official-item .primary-button:disabled {
  opacity: 0.55;
  cursor: default;
}

.source-meta {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.library-grid > .empty-state {
  grid-column: 1 / -1;
}

.lexicon-item {
  min-height: 225px;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.lexicon-item h3 {
  margin-top: 18px;
  font-size: 16px;
}

.lexicon-item > p {
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.lexicon-item .secondary-button {
  margin-top: auto;
}

.mastery-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin: 0 0 14px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}

.challenge-workspace {
  width: min(760px, 100%);
  margin: 0 auto;
}

.challenge-header {
  align-items: flex-start;
}

.challenge-header p {
  margin: 5px 0 0;
}

.challenge-progress {
  margin: 22px 0;
}

#challengeDots {
  display: grid;
  grid-template-columns: repeat(7, 30px);
  gap: 8px;
}

#challengeDots i {
  height: 6px;
  border-radius: 3px;
  background: #dfe4e1;
}

#challengeDots i.active {
  background: var(--gold);
}

#challengeDots i.done {
  background: var(--green);
}

.challenge-progress strong {
  font-size: 13px;
}

.challenge-task {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
}

.challenge-task h3 {
  margin-top: 12px;
  font-size: 20px;
}

.challenge-task > p {
  margin: 8px 0 0;
  line-height: 1.65;
}

.challenge-guide {
  margin: 14px 0 16px;
  padding: 12px 14px;
  border-left: 3px solid var(--green);
  background: color-mix(in srgb, var(--green-soft) 70%, white);
}

.challenge-guide-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.challenge-guide-en {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.challenge-guide-zh {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.challenge-guide-hint {
  margin: 8px 0 0;
  color: var(--green);
  font-size: 12px;
  line-height: 1.45;
}

.saved-sentences {
  margin-top: 22px;
}

.saved-sentences ol {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.saved-sentences li {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.55;
}

.saved-sentences li span {
  color: var(--green);
  font-weight: 700;
}

.feedback-save {
  margin-top: 7px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  z-index: 20;
  padding: 10px 14px;
  border-radius: 5px;
  background: #252b28;
  color: white;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  font-size: 13px;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

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

  .coach-panel {
    position: static;
  }

  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (max-width: 720px) {
  .app-header {
    height: auto;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 12px 16px;
  }

  .view-tabs {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }

  .view-tab {
    flex: 1 0 auto;
    white-space: nowrap;
  }

  .header-status {
    grid-column: 2;
    grid-row: 1;
  }

  .practice-layout,
  .page-view {
    width: calc(100% - 20px);
    margin-top: 10px;
  }

  .workspace,
  .page-view {
    padding: 18px;
  }

  .stepper li {
    font-size: 0;
  }

  .stepper li span {
    font-size: 11px;
  }

  .topic-grid,
  .cue-fields,
  .feedback-columns,
  .source-layout,
  .source-groups {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-group {
    width: 100%;
    overflow-x: auto;
  }

  .filter-button {
    flex: 1 0 auto;
  }

  .prep-toolbar,
  .review-header,
  .answer-context {
    align-items: flex-start;
  }

  .phrase-strip {
    grid-template-columns: 1fr;
  }

  .history-item,
  .history-item-compact {
    grid-template-columns: 1fr;
  }

  .history-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-part-group > summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .source-cover {
    max-width: 260px;
  }

  .lexicon-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .library-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

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

  .rating-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .panel-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .review-answer dl > div,
  .saved-sentences li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  #challengeDots {
    grid-template-columns: repeat(7, 1fr);
    flex: 1;
  }

  .challenge-header {
    flex-direction: column;
  }
}

.inline-speak-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.inline-speak-row h2,
.inline-speak-row h3,
.inline-speak-row span,
.inline-speak-row em {
  flex: 1;
  min-width: 0;
}

.speak-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.speak-button:hover {
  border-color: var(--green);
}

.speak-button.active {
  background: rgba(22, 107, 89, 0.1);
  border-color: var(--green);
}

.recorder-actions [data-rec-action="dictate"].listening {
  background: rgba(22, 107, 89, 0.12);
  border-color: var(--green);
  color: var(--green);
}

.recorder-mount {
  margin: 10px 0 4px;
}

.recorder-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
}

.recorder-status {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.recorder-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.compact-action {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.cue-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.cue-label-row label {
  margin: 0;
}

.answer-context-actions,
.input-meta-actions,
.feedback-phrase-actions,
.audio-history-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.audio-history-heading {
  margin-top: 36px;
}

.audio-history-heading h2 {
  margin: 0;
  font-size: 22px;
}

.compact-empty {
  padding: 28px 16px;
}

.lexicon-example {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .recorder-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .recorder-actions {
    justify-content: flex-start;
  }

  .answer-context-actions {
    flex-wrap: wrap;
  }
}

.workspace-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.part-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.part-switch-btn {
  border: 0;
  background: transparent;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}

.part-switch-btn.active {
  background: var(--green);
  color: #fff;
}

.mock-progress {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  flex-wrap: wrap;
}

.mock-progress li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  color: var(--muted);
}

.mock-progress li span {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface-muted);
  font-weight: 700;
}

.mock-progress li.active {
  border-color: var(--green);
  color: var(--ink);
  font-weight: 700;
}

.mock-progress li.active span {
  background: var(--green);
  color: #fff;
}

.mock-progress li.done {
  opacity: 0.7;
}

.mock-bridge-text {
  margin: 16px 0 8px;
  padding: 16px;
  border-left: 3px solid var(--green);
  background: var(--surface-muted);
  line-height: 1.55;
  font-size: 15px;
}

.mock-cue-card {
  margin: 12px 0 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

#mockCueFields {
  margin: 0 0 8px;
}

.mock-notes-actions {
  display: flex;
  justify-content: flex-end;
  margin: 4px 0 8px;
}

.mock-cue-card.compact {
  padding: 12px 14px;
}

.mock-cue-card ul,
.mock-cue-card.compact ul {
  margin: 8px 0 0;
  padding-left: 1.2em;
}

.mock-you-should {
  margin: 12px 0 4px;
  font-weight: 700;
  font-size: 13px;
}

.mock-section-label {
  margin: 20px 0 8px;
  font-size: 15px;
}

.band-estimate {
  margin: 8px 0 4px;
  font-size: 1.05rem;
}

.band-estimate strong {
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

.band-disclaimer {
  display: inline;
  margin-left: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.part3-continue {
  margin: 12px 0 4px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.part3-continue p {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
}

.part3-question-item {
  display: flex;
  width: 100%;
  text-align: left;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.part3-question-item:hover {
  border-color: var(--green);
}

.part3-question-item .cue-index {
  font-weight: 700;
  color: var(--muted);
}

.part3-question-blind {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.part3-question-blind strong {
  font-size: 15px;
}

.part3-question-blind em {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

.part3-answer-preview {
  white-space: pre-wrap;
  color: var(--muted);
  font-size: 14px;
}

.part1-mode-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
}

.part3-mode-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin: 8px 0 0;
}

.part3-linked-part2 {
  flex: 0 0 auto;
  padding: 0;
  font-size: 13px;
}

.part1-mode-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 12px;
}

.part1-question-list {
  display: grid;
  gap: 10px;
  margin: 8px 0 18px;
}

.part1-question-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  cursor: pointer;
}

.part1-question-item:hover {
  border-color: var(--green);
}

.part1-question-item .cue-index {
  flex: 0 0 auto;
  margin-top: 1px;
}

.part1-question-blind {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.part1-question-blind strong {
  font-size: 15px;
}

.question-label-zh {
  margin-left: 6px;
  font-weight: 600;
  color: var(--muted);
  font-size: 13px;
}

.part3-question-blind .question-label-zh {
  margin-left: 6px;
  font-weight: 600;
  color: var(--muted);
  font-size: 13px;
}

.part1-question-blind em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.examiner-stage {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #f7faf8, #eef5f2);
  margin-bottom: 16px;
}

.examiner-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  font-weight: 800;
}

.part1-hidden-prompt,
.part1-progress,
.part1-peek-text {
  color: var(--muted);
  font-size: 14px;
}

.part1-peek-text {
  margin: 12px 0;
  padding: 12px;
  border-left: 3px solid var(--green);
  color: var(--ink);
  background: var(--surface-muted);
}

.part1-translate-text {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-left: 3px solid color-mix(in srgb, var(--green) 45%, transparent);
  color: var(--muted);
  background: color-mix(in srgb, var(--surface-muted) 70%, transparent);
  font-size: 13px;
  line-height: 1.5;
}

.part1-translate-text .translate-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--muted);
}

.soft-timer-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin: 8px 0 12px;
}

.soft-timer-value {
  font-size: 28px;
  letter-spacing: 0.04em;
}

.soft-timer-value.is-overtime {
  color: #b42318;
}

.overtime-banner {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 6px;
  background: #fff1f0;
  border: 1px solid #f3b0aa;
  color: #8a1f16;
  font-size: 13px;
  font-weight: 600;
}

.part1-answer-preview {
  white-space: pre-wrap;
  line-height: 1.55;
}

.distill-list {
  margin: 0;
}

.distill-list > div {
  margin-bottom: 10px;
}

.distill-list dt {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.distill-list dd {
  margin: 0;
}

.distill-list ul {
  margin: 0;
  padding-left: 18px;
}

.time-control-section {
  border-left: 3px solid var(--green);
  padding-left: 12px;
}

.time-peek-note {
  color: #8a5a00;
}

@media (max-width: 720px) {
  .workspace-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .part1-mode-actions {
    flex-direction: column;
  }

  .soft-timer-value {
    font-size: 22px;
  }
}

/* 鈥斺€?Word lookup popover 鈥斺€?*/
.word-lookup-root {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
}

.word-lookup-root.open {
  pointer-events: auto;
}

.word-lookup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 28, 24, 0.28);
}

.word-lookup-panel {
  position: absolute;
  z-index: 1;
  width: min(360px, calc(100vw - 24px));
  max-height: min(70vh, 520px);
  overflow: auto;
  background: #f7faf8;
  color: #1c2a24;
  border: 1px solid #c5d4cb;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(20, 40, 30, 0.18);
  outline: none;
}

.word-lookup-panel.sheet {
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  top: auto !important;
  width: 100% !important;
  max-height: min(78vh, 640px);
  border-radius: 16px 16px 0 0;
}

.word-lookup-panel-inner {
  padding: 14px 16px 16px;
}

.word-lookup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.word-lookup-head[data-word-lookup-drag] {
  cursor: grab;
  user-select: none;
  touch-action: none;
  margin: -6px -8px 8px;
  padding: 6px 8px;
  border-radius: 10px;
}

.word-lookup-head[data-word-lookup-drag]:active,
.word-lookup-panel.dragging .word-lookup-head[data-word-lookup-drag] {
  cursor: grabbing;
}

.word-lookup-panel.dragging {
  overflow: hidden;
  box-shadow: 0 22px 48px rgba(20, 40, 30, 0.28);
}

.word-lookup-panel.sheet .word-lookup-head[data-word-lookup-drag] {
  cursor: default;
  touch-action: auto;
}

.word-lookup-eyebrow {
  margin: 0;
  font-size: 12px;
  color: #5a6f64;
}

.word-lookup-head h2 {
  margin: 2px 0 0;
  font-size: 22px;
  line-height: 1.2;
  font-family: "Segoe UI", "PingFang SC", sans-serif;
}

.word-lookup-surface {
  font-size: 13px;
  font-weight: 500;
  color: #6a7f74;
}

.word-lookup-close {
  border: 0;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #4a5d54;
  padding: 0 4px;
}

.word-lookup-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 8px 0 10px;
  font-size: 13px;
  color: #3d5248;
}

.word-lookup-senses {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.word-lookup-sense-tab {
  border: 1px solid #b7c8be;
  background: #eef4f0;
  color: #2a3b33;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
}

.word-lookup-sense-tab.active {
  background: #2f5d4a;
  border-color: #2f5d4a;
  color: #f4faf6;
}

.word-lookup-pro-hint {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.word-lookup-pro-hint .pro-chip {
  margin-left: 0;
}

.word-lookup-ai-flag {
  margin: 0 0 8px;
  font-size: 12px;
  color: #5a6f64;
}

.word-lookup-block {
  margin: 0 0 10px;
}

.word-lookup-block h3 {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: #5a6f64;
  letter-spacing: 0.02em;
}

.word-lookup-block p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.word-lookup-zh-hint {
  color: var(--muted);
  font-size: 12px;
}

.word-lookup-sentence {
  background: #e8f0eb;
  border-radius: 8px;
  padding: 8px 10px;
}

.source-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  vertical-align: middle;
}

.source-tag.dictionary {
  background: #d9ebe1;
  color: #1f4d3a;
}

.source-tag.ai {
  background: #e7e0f4;
  color: #4a3870;
}

.source-tag.synth {
  background: #e4eaf2;
  color: #334766;
}

.word-lookup-status {
  margin: 12px 0;
  color: #3d5248;
}

.word-lookup-status.error {
  color: #8a2f2f;
}

.word-lookup-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.word-lookup-more-toggle {
  margin: 4px 0;
}

.word-lookup-more-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.word-lookup-more-item {
  width: 100%;
  text-align: left;
  border: 1px solid #c9d7ce;
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

.word-lookup-more-item strong {
  display: block;
  font-size: 12px;
  color: #5a6f64;
  margin-bottom: 2px;
}

.word-lookup-more-item span {
  font-size: 13px;
  color: #24352d;
}

.word-lookup-attribution {
  margin: 12px 0 0;
  font-size: 11px;
  color: #7a8d84;
  line-height: 1.35;
}

.adaptive-plan-float {
  position: fixed;
  left: 16px;
  bottom: 18px;
  z-index: 80;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  max-width: calc(100vw - 32px);
}

.adaptive-plan-close {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f8f7;
  color: var(--muted);
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.adaptive-plan-float[open] > .adaptive-plan-close {
  display: inline-flex;
}

.adaptive-plan-close:hover {
  background: #eef1ef;
  color: var(--ink);
}

.adaptive-plan-close:focus-visible {
  outline: 3px solid #b88b35;
  outline-offset: 2px;
}

/* 璧勬枡闃呰鏃跺乏涓嬭璁粌璁″垝浼氭尅浣忕珷鑺傜洰褰曪紝鎸埌鍙充笅骞堕伩寮€鏁欑粌鎸夐挳 */
body.sources-reading .adaptive-plan-float {
  left: auto;
  right: 16px;
  bottom: 88px;
}

.adaptive-plan-float summary {
  padding: 14px 44px 14px 18px;
  cursor: pointer;
  color: var(--green);
  font-weight: 700;
  list-style: none;
}

.adaptive-plan-float summary::-webkit-details-marker {
  display: none;
}

#adaptivePlanPanel {
  padding: 0 18px 18px;
  width: 420px;
  max-width: calc(100vw - 34px);
  box-sizing: border-box;
  max-height: 65vh;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.6;
}

#adaptivePlanPanel button {
  margin: 5px 6px 0 0;
}

.adaptive-plan-navigation {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.adaptive-plan-mode {
  margin: 16px 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f3f7f6;
}

.adaptive-plan-mode-status {
  display: block;
  color: var(--green);
  margin-bottom: 10px;
}

.adaptive-plan-mode-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#adaptivePlanPanel .adaptive-plan-mode-option {
  margin: 0;
  padding: 12px 8px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
  line-height: 1.5;
}

#adaptivePlanPanel .adaptive-plan-mode-option.is-selected {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

#adaptivePlanPanel .adaptive-plan-mode-option:focus-visible {
  outline: 3px solid #b88b35;
  outline-offset: 2px;
}

.teaching-panel {
  flex: 0 0 auto;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f3f7f6;
  overflow-wrap: anywhere;
}
.teaching-panel summary { cursor: pointer; font-weight: 700; color: var(--green); }
.teaching-panel label { display: block; margin: 12px 0; }
.teaching-panel textarea, .teaching-panel input, .teaching-panel select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: white;
}
.teaching-panel textarea { min-height: 76px; resize: vertical; }

.coach-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  flex: 0 0 auto;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.coach-mode-switch button {
  display: grid;
  gap: 3px;
  justify-items: start;
  min-height: 64px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 36, 28, 0.03);
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.coach-mode-switch button:hover {
  color: var(--ink);
  border-color: #c5d4cc;
  background: #f7faf8;
}

.coach-mode-switch button[aria-pressed="true"] {
  background: linear-gradient(180deg, #f3faf6, #eaf5ef);
  color: var(--ink);
  border-color: var(--green);
  box-shadow: 0 0 0 1px rgba(22, 107, 89, 0.18), 0 4px 12px rgba(15, 36, 28, 0.06);
}

.coach-mode-switch button[aria-pressed="false"] {
  background: #f4f6f5;
}

.coach-mode-label {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.coach-mode-switch button[aria-pressed="true"] .coach-mode-label {
  color: var(--green);
}

.coach-mode-desc {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--muted);
  opacity: 0.92;
}

.coach-mode-switch button[aria-pressed="true"] .coach-mode-desc {
  color: #5a6f64;
}
#agentLivePanel [hidden] { display: none !important; }
#coachChatPanel { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
#teachingProfile, #teachingOrigin { font-size: 13px; line-height: 1.6; }
#teachingFollowup { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
#teachingFollowup button { margin: 4px 0; }

.word-lookup-speak.active {
  outline: 2px solid #2f5d4a;
}

/* 鈥斺€?鍏ㄥ眬缇庡寲鏀跺熬锛氱劍鐐广€佸姩鏁堝厠鍒?鈥斺€?*/
:focus-visible {
  outline: 2px solid rgba(15, 92, 76, 0.45);
  outline-offset: 2px;
}

.app-header {
  animation: ui-rise 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.view.active .workspace,
.view.active .page-view,
.view.active .agent-shell {
  animation: ui-rise 480ms 40ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

/* 鈥斺€?鍏ㄧ珯缁勪欢缁熶竴锛氱粌涔?/ 璇嶅簱 / 鍘嗗彶 / 璧勬枡 / 鏁欑粌 鈥斺€?*/
textarea,
input[type="text"],
input[type="search"],
input[type="number"],
.answer-input {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea:focus,
input[type="text"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
.answer-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(15, 92, 76, 0.12);
  outline: none;
}

.part-switch {
  border-radius: 10px;
  background: var(--surface-muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.part-switch-btn {
  font-family: var(--font-ui);
  transition: background 160ms ease, color 160ms ease;
}

.part-switch-btn.active {
  background: var(--green);
  color: #fff;
  box-shadow: none;
}

.stepper li {
  font-family: var(--font-ui);
}

.stepper span {
  width: 26px;
  height: 26px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.stepper li.active span,
.stepper li.done span {
  box-shadow: 0 4px 10px rgba(15, 92, 76, 0.25);
}

.empty-state {
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.55);
  border-color: #c5d4cd;
}

.toast {
  border-radius: 10px;
  background: #1a2b25;
  box-shadow: 0 12px 28px rgba(15, 36, 28, 0.28);
  font-family: var(--font-ui);
  font-weight: 600;
}

.lexicon-stats > div,
.history-summary > div,
.agent-memory-stats div,
.history-weekly-grid section {
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px rgba(32, 37, 41, 0.04);
}

/* 恢复词库状态提示色：待办金 / 已清绿（勿被全局白底覆盖） */
.lexicon-stats > div.is-pending {
  border-color: #d8b36a !important;
  background: linear-gradient(180deg, #fff9ef, #fff) !important;
}

.lexicon-stats > div.is-clear {
  border-color: #b7d4c4 !important;
  background: linear-gradient(180deg, #f3faf6, #fff) !important;
}

.lexicon-stats-clear > div.is-clear strong,
.evidence-badge.is-clear {
  color: var(--green);
}

.evidence-badge.is-pending {
  background: #fff4df !important;
  color: #8a5a12 !important;
}

.evidence-badge.is-clear {
  background: var(--green-soft) !important;
  color: var(--green) !important;
}

.review-hub-card.is-due {
  border-color: #d8b36a !important;
  background: linear-gradient(180deg, #fffaf0, #fff) !important;
}

.review-hub-card.is-clear {
  border-color: #b7d4c4 !important;
  background: linear-gradient(180deg, #f4faf7, #fff) !important;
}

.review-hub-card.is-due .review-hub-card-flag {
  color: #8a5a12;
}

.review-hub-card.is-clear .review-hub-card-flag {
  color: var(--green);
}

.review-hub-card.is-due:hover,
.review-hub-card.is-clear:hover {
  border-color: inherit;
  background: inherit;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(32, 37, 41, 0.07);
}

#lexiconView .lexicon-stats > div:hover,
#historyView .history-summary > div:hover {
  transform: translateY(-1px);
}

#lexiconView .lexicon-stats > div.is-pending:hover {
  border-color: #c9a04e !important;
}

#lexiconView .lexicon-stats > div.is-clear:hover {
  border-color: #8fbfad !important;
}

.lexicon-stats strong,
.history-summary strong,
.agent-memory-stats strong {
  font-family: var(--font-ui);
  letter-spacing: -0.02em;
}

.lexicon-tab,
.library-category-tab {
  font-family: var(--font-ui);
}

.lexicon-item,
.review-card,
.review-hub-card,
.review-mission,
.challenge-task,
.challenge-workspace,
.history-day-block,
.history-part-group,
.history-item,
.history-weekly-insight,
.sources-search-shell,
.sources-book-card,
.sources-chapter-hit,
.sources-reader-article,
.sources-toc-item,
.source-groups section,
.study-plan-item,
.agent-main,
.agent-memory,
.agent-message-body,
.agent-criterion,
.notes-preview,
.selected-topic-card,
.cue-field,
.drill-panel {
  border-radius: var(--radius-sm) !important;
}

.lexicon-item,
.review-hub-card,
.review-mission,
.history-day-block,
.history-weekly-insight,
.agent-criterion {
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(32, 37, 41, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.lexicon-item:hover,
.review-hub-card:hover:not(.is-due):not(.is-clear),
.history-part-group:hover,
.agent-criterion:hover {
  border-color: #c5cad3;
  box-shadow: 0 10px 22px rgba(32, 37, 41, 0.07);
}

.review-mission-pending,
.review-mission-done {
  border-radius: var(--radius) !important;
}

.review-mission.review-mission-pending {
  border-color: #e0c48a !important;
  background:
    linear-gradient(135deg, rgba(255, 244, 223, 0.95), rgba(255, 255, 255, 0.92)),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 10px,
      rgba(216, 179, 106, 0.06) 10px,
      rgba(216, 179, 106, 0.06) 20px
    ) !important;
}

.review-mission.review-mission-done {
  border-color: #8fbfa3 !important;
  background:
    radial-gradient(circle at top right, rgba(143, 191, 163, 0.28), transparent 42%),
    linear-gradient(160deg, #eef8f2, #ffffff 55%) !important;
}

.review-mission-meter {
  border-radius: 999px;
  overflow: hidden;
  background: #e8ecef;
}

.review-mission-meter i {
  background: var(--green);
}

.agent-main,
.agent-memory {
  border-radius: var(--radius) !important;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.agent-conversation {
  background: var(--surface-muted) !important;
}

.agent-message-body {
  box-shadow: 0 4px 14px rgba(15, 36, 28, 0.04);
}

.agent-quick-actions button {
  border-radius: 8px !important;
  font-family: var(--font-ui);
  border: 1px solid var(--line);
  background: #fff;
  transition: border-color 160ms ease, background 160ms ease;
}

.agent-quick-actions button:hover {
  border-color: #c5cad3;
  background: var(--surface-muted);
}

.agent-composer textarea {
  border-radius: var(--radius-sm) !important;
}

.agent-float-btn {
  border-radius: 999px;
  background: #1f4d3a;
  color: #f4faf6;
  font-family: var(--font-ui);
  box-shadow: 0 12px 28px rgba(20, 40, 30, 0.22);
}

.agent-float-btn:hover {
  background: #2a6350;
}

.adaptive-plan-float {
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(15, 36, 28, 0.12);
  backdrop-filter: blur(8px);
}

.adaptive-plan-float summary {
  font-family: var(--font-ui);
}

.history-part-group > summary {
  font-family: var(--font-ui);
}

.sources-search-shell {
  background: var(--surface) !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 8px 20px rgba(26, 29, 36, 0.04);
}

.sources-tag {
  border-radius: 8px !important;
  font-family: var(--font-ui);
  transition: background 140ms ease, border-color 140ms ease;
}

.sources-book-card:hover,
.sources-toc-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 36, 28, 0.08);
}

.source-cover img {
  border-radius: 12px !important;
  box-shadow: var(--shadow);
}

.header-status {
  font-family: var(--font-ui);
  font-weight: 600;
  padding: 0;
  background: transparent;
  gap: 10px;
}

.header-part-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.status-dot {
  box-shadow: 0 0 0 3px rgba(46, 155, 120, 0.18);
}

.auth-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  box-shadow: 0 1px 2px rgba(15, 36, 28, 0.04);
}

.auth-user-chip[hidden] {
  display: none !important;
}

.auth-user-kicker {
  color: var(--muted);
  font-weight: 600;
}

.auth-user-name {
  font-weight: 700;
  max-width: 9em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-user-role {
  padding: 1px 6px;
  border-radius: 999px;
  background: #eef5f2;
  color: var(--green);
  font-weight: 700;
  font-size: 11px;
}

.auth-logout-btn {
  padding: 0 2px;
  font-size: 12px;
}

body.auth-locked main,
body.auth-locked .agent-float-btn,
body.auth-locked .agent-dock-root {
  visibility: hidden;
  pointer-events: none;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(245, 246, 247, 0.96);
}

.auth-gate[hidden] {
  display: none !important;
}

.auth-card {
  width: min(400px, 100%);
  padding: 28px 24px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.auth-card .primary-button {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: none;
}

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

.auth-card h1 {
  margin: 4px 0 8px;
  font-size: 26px;
}

.auth-card-note {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.auth-form {
  display: grid;
  gap: 8px;
}

.auth-form input,
.auth-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.auth-role-wrap {
  display: grid;
  gap: 8px;
}

.auth-status {
  min-height: 1.2em;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.auth-status.is-error {
  color: var(--red);
}

.auth-switch {
  display: block;
  margin: 14px auto 0;
}

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


