/* [project]/src/app/globals.css [app-client] (css) */
:root, [data-theme="light"] {
  --bg-primary: #fff;
  --bg-secondary: #f9fafb;
  --bg-card: #fff;
  --bg-hover: #f3f4f6;
  --bg-input: #fff;
  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #9ca3af;
  --border-color: #e5e7eb;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-light: #eff6ff;
  --success: #22c55e;
  --success-light: #f0fdf4;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, .05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, .1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .1);
  --radius-sm: .375rem;
  --radius: .5rem;
  --radius-lg: .75rem;
  --radius-xl: 1rem;
  --background: #fff;
  --foreground: #0f172a;
  --primary-50: #eff6ff;
  --primary-100: #dbeafe;
  --primary-200: #bfdbfe;
  --primary-300: #93c5fd;
  --primary-400: #60a5fa;
  --primary-500: #3b82f6;
  --primary-600: #2563eb;
  --primary-700: #1d4ed8;
  --primary-800: #1e40af;
  --primary-900: #1e3a8a;
  --topic-info-bg: #fef3c7;
  --topic-info-border: #fcd34d;
  --topic-info-text: #92400e;
  --typing-dot: #9ca3af;
  --drag-border: #d1d5db;
  --success-dark: #16a34a;
  --success-border: #bbf7d0;
  --danger-dark: #dc2626;
  --danger-border: #fecaca;
  --warning-dark: #d97706;
  --warning-border: #fde68a;
  --purple-light: #f3e8ff;
  --purple: #7c3aed;
  --purple-text: #6d28d9;
  --suggestion-bg: #fff7ed;
  --suggestion-border: #fed7aa;
  --suggestion-text: #9a3412;
  --info-bg: #f0f9ff;
  --info-border: #bfdbfe;
}

[data-theme="dark"] {
  --bg-primary: #111827;
  --bg-secondary: #1f2937;
  --bg-card: #1f2937;
  --bg-hover: #374151;
  --bg-input: #374151;
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --border-color: var(--text-secondary);
  --accent: #60a5fa;
  --accent-hover: #3b82f6;
  --accent-light: #1e3a5f;
  --success: #4ade80;
  --success-light: #14532d;
  --warning: #fbbf24;
  --warning-light: #78350f;
  --danger: #f87171;
  --danger-light: #7f1d1d;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, .3);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, .3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .4);
  --topic-info-bg: #78350f;
  --topic-info-border: #92400e;
  --topic-info-text: #fef3c7;
  --typing-dot: #6b7280;
  --drag-border: #4b5563;
  --background: #111827;
  --foreground: #f9fafb;
  --primary-50: #172554;
  --primary-100: #1e3a5f;
  --primary-200: #1e40af;
  --primary-300: #1d4ed8;
  --primary-400: #2563eb;
  --primary-500: #3b82f6;
  --primary-600: #60a5fa;
  --primary-700: #93c5fd;
  --primary-800: #bfdbfe;
  --primary-900: #dbeafe;
  --success-dark: #22c55e;
  --success-border: #14532d;
  --danger-dark: #f87171;
  --danger-border: #7f1d1d;
  --warning-dark: #fbbf24;
  --warning-border: #78350f;
  --purple-light: #2e1065;
  --purple: #8b5cf6;
  --purple-text: #c4b5fd;
  --suggestion-bg: #431407;
  --suggestion-border: #9a3412;
  --suggestion-text: #fed7aa;
  --info-bg: #172554;
  --info-border: #1e40af;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  color: var(--text-primary);
  background: var(--bg-primary);
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans SC, sans-serif;
}

.app-container {
  background: var(--bg-secondary);
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem;
}

.header {
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
  z-index: 10;
  padding: 1rem;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
}

.header-content {
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
}

.logo {
  align-items: center;
  gap: .5rem;
  display: flex;
}

.logo-icon {
  background: var(--primary-500);
  color: #fff;
  border-radius: 8px;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  font-weight: bold;
  display: flex;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: bold;
}

.header-actions {
  align-items: center;
  gap: .5rem;
  display: flex;
}

.word-count {
  text-align: right;
}

.word-count-number {
  font-weight: 500;
}

.word-count-label {
  color: var(--text-muted);
  font-size: .75rem;
}

.button {
  cursor: pointer;
  border: none;
  border-radius: .5rem;
  padding: .5rem 1rem;
  font-size: .875rem;
  font-weight: 500;
  transition: all .2s;
}

.button-primary {
  background: var(--accent);
  color: #fff;
}

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

.button-secondary {
  background: var(--bg-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.button-secondary:hover {
  background: var(--border-color);
}

.button-small {
  padding: .375rem .75rem;
  font-size: .75rem;
}

.subject-toggle {
  justify-content: center;
  margin: 2rem 0;
  display: flex;
}

.toggle-group {
  background: var(--bg-hover);
  border-radius: .75rem;
  padding: .25rem;
  display: inline-flex;
}

.toggle-button {
  cursor: pointer;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: .5rem;
  padding: .5rem 1.5rem;
  font-weight: 500;
}

.toggle-button.active {
  background: var(--bg-card);
  color: var(--primary-600);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}

.topics-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
  display: grid;
}

.topic-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  cursor: pointer;
  border-radius: .75rem;
  padding: 1.25rem;
  transition: all .2s;
}

.topic-card:hover {
  border-color: var(--primary-300);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1);
}

.topic-type {
  background: var(--primary-50);
  color: var(--primary-600);
  border-radius: 9999px;
  margin-bottom: .5rem;
  padding: .125rem .5rem;
  font-size: .75rem;
  font-weight: 500;
  display: inline-block;
}

.topic-title {
  margin-bottom: .25rem;
  font-weight: 600;
}

.topic-description {
  color: var(--text-muted);
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  font-size: .875rem;
  display: -webkit-box;
  overflow: hidden;
}

.free-write-card {
  background: var(--bg-card);
  border: 2px dashed var(--drag-border);
  cursor: pointer;
  text-align: center;
  border-radius: .75rem;
  padding: 1.25rem;
  transition: all .2s;
}

.free-write-card:hover {
  border-color: var(--primary-400);
  background: var(--primary-50);
}

.writing-container {
  gap: 1rem;
  height: calc(100vh - 80px);
  display: flex;
}

.editor-area {
  background: var(--bg-secondary);
  flex: 1;
  padding: 1.5rem;
}

.editor-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: .75rem;
  height: 100%;
  overflow: hidden;
}

.editor {
  resize: none;
  background: var(--bg-input);
  width: 100%;
  height: 100%;
  color: var(--text-primary);
  border: none;
  border-color: var(--border-color);
  padding: 1.25rem;
  font-size: 1.125rem;
  line-height: 1.75;
}

.editor:focus {
  outline: none;
}

.topic-info {
  background: var(--topic-info-bg);
  border-bottom: 1px solid var(--topic-info-border);
  padding: .5rem 1.25rem;
}

.topic-info-text {
  color: var(--topic-info-text);
  font-size: .75rem;
}

.topic-info-label {
  font-weight: 600;
}

.assistant-panel {
  background: var(--bg-card);
  border-left: 1px solid var(--border-color);
  flex-direction: column;
  width: 350px;
  display: flex;
}

.assistant-header {
  border-bottom: 1px solid var(--border-color);
  padding: .75rem 1rem;
}

.assistant-title {
  font-size: .875rem;
  font-weight: 600;
}

.assistant-subtitle {
  color: var(--text-muted);
  font-size: .75rem;
}

.assistant-messages {
  background: var(--bg-secondary);
  flex-direction: column;
  flex: 1;
  gap: .75rem;
  padding: 1rem;
  display: flex;
  overflow-y: auto;
}

.chat-message {
  max-width: 85%;
}

.ai-message {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: .25rem 1rem 1rem;
  padding: .75rem;
}

.user-message {
  background: var(--primary-500);
  color: #fff;
  border-radius: 1rem .25rem 1rem 1rem;
  margin-left: auto;
  padding: .75rem;
}

.quick-questions {
  border-top: 1px solid var(--border-color);
  padding: .5rem 1rem;
}

.quick-questions-label {
  color: var(--text-muted);
  margin-bottom: .5rem;
  font-size: .75rem;
}

.quick-questions-buttons {
  flex-wrap: wrap;
  gap: .5rem;
  display: flex;
}

.quick-question-btn {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 9999px;
  padding: .375rem .75rem;
  font-size: .75rem;
}

.quick-question-btn:hover {
  background: var(--primary-50);
  border-color: var(--primary-300);
  color: var(--primary-600);
}

.assistant-input-area {
  border-top: 1px solid var(--border-color);
  padding: .75rem 1rem;
}

.assistant-input-wrapper {
  gap: .5rem;
  display: flex;
}

.assistant-input {
  border: 1px solid var(--border-color);
  border-radius: .5rem;
  flex: 1;
  padding: .5rem .75rem;
  font-size: .875rem;
}

.assistant-input:focus {
  border-color: var(--primary-400);
  outline: none;
}

.typing-indicator {
  gap: 4px;
  display: flex;
}

.typing-dot {
  background: var(--typing-dot);
  border-radius: 50%;
  width: 8px;
  height: 8px;
  animation: 1.4s ease-in-out infinite bounce;
}

.typing-dot:nth-child(2) {
  animation-delay: .2s;
}

.typing-dot:nth-child(3) {
  animation-delay: .4s;
}

@keyframes bounce {
  0%, 60%, 100% {
    transform: translateY(0);
  }

  30% {
    transform: translateY(-6px);
  }
}

.results-container {
  grid-template-columns: 3fr 2fr;
  gap: 1.5rem;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem;
  display: grid;
}

.essay-preview {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: .75rem;
  padding: 1.5rem;
}

.essay-preview-title {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: .875rem;
  font-weight: 600;
}

.essay-content {
  white-space: pre-wrap;
  color: var(--text-secondary);
  line-height: 1.75;
}

.feedback-panel {
  flex-direction: column;
  gap: 1.5rem;
  display: flex;
}

.score-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  text-align: center;
  border-radius: .75rem;
  padding: 1.5rem;
}

.score-card-title {
  margin-bottom: 1rem;
  font-weight: 600;
}

.score-ring-container {
  justify-content: center;
  align-items: center;
  display: inline-flex;
  position: relative;
}

.score-ring-text {
  font-size: 1.5rem;
  font-weight: bold;
  position: absolute;
}

.score-grade {
  border-radius: 9999px;
  margin-top: .5rem;
  padding: .25rem .75rem;
  font-size: .875rem;
  font-weight: 600;
  display: inline-block;
}

.grade-a {
  background: var(--success-light);
  color: var(--success);
}

.grade-b {
  background: var(--topic-info-bg);
  color: var(--topic-info-text);
}

.grade-c {
  background: var(--danger-light);
  color: var(--danger);
}

.dimension-scores {
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
  display: grid;
}

.dimension-score {
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  display: flex;
}

.dimension-label {
  color: var(--text-muted);
  font-size: .75rem;
}

.dimension-number {
  font-size: .875rem;
  font-weight: 600;
}

.feedback-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: .75rem;
  padding: 1.25rem;
}

.feedback-section-title {
  margin-bottom: .75rem;
  font-size: .875rem;
  font-weight: 600;
}

.strengths-section .feedback-section-title {
  color: var(--success);
}

.weaknesses-section .feedback-section-title {
  color: var(--topic-info-text);
}

.feedback-item {
  align-items: flex-start;
  gap: .5rem;
  margin-bottom: .5rem;
  display: flex;
}

.feedback-icon {
  margin-top: .125rem;
  font-size: .75rem;
}

.feedback-text {
  color: var(--text-secondary);
  font-size: .875rem;
}

.suggestion-card {
  border: 1px solid var(--border-color);
  border-radius: .5rem;
  margin-bottom: .75rem;
  padding: .75rem;
}

.suggestion-header {
  gap: .5rem;
  margin-bottom: .5rem;
  display: flex;
}

.suggestion-type-tag {
  border-radius: 9999px;
  padding: .125rem .5rem;
  font-size: .75rem;
  font-weight: 500;
}

.type-content {
  background: var(--accent-light);
  color: var(--accent-hover);
}

.type-structure {
  background: var(--purple-light);
  color: var(--purple);
}

.type-language {
  background: var(--topic-info-bg);
  color: var(--topic-info-text);
}

.type-norm {
  background: var(--success-light);
  color: var(--success);
}

.suggestion-location {
  color: var(--text-muted);
  font-size: .75rem;
}

.suggestion-issue {
  color: var(--text-secondary);
  margin-bottom: .5rem;
  font-size: .875rem;
}

.suggestion-fix {
  background: var(--primary-50);
  color: var(--primary-700);
  border-radius: .375rem;
  padding: .5rem;
  font-size: .875rem;
}

.highlight-text {
  margin-bottom: .25rem;
  font-size: .875rem;
  font-weight: 600;
}

.highlight-comment {
  font-size: .75rem;
}

.highlight-praise {
  background: var(--success-light);
  border-left: 4px solid var(--success);
  border-radius: .5rem;
  margin-bottom: .75rem;
  padding: .75rem;
}

.highlight-praise .highlight-comment {
  color: var(--success);
}

.highlight-improve {
  background: var(--topic-info-bg);
  border-left: 4px solid var(--warning);
  border-radius: .5rem;
  margin-bottom: .75rem;
  padding: .75rem;
}

.highlight-improve .highlight-comment {
  color: var(--topic-info-text);
}

.rewrite-example {
  border: 1px solid var(--border-color);
  border-radius: .5rem;
  margin-bottom: 1rem;
  overflow: hidden;
}

.rewrite-original {
  background: var(--danger-light);
  padding: .75rem;
}

.rewrite-label {
  color: var(--danger);
  margin-bottom: .25rem;
  font-size: .75rem;
  font-weight: 600;
}

.rewrite-text {
  color: var(--text-secondary);
  font-size: .875rem;
}

.rewrite-improved {
  background: var(--success-light);
  padding: .75rem;
}

.rewrite-improved .rewrite-label {
  color: var(--success);
}

.rewrite-reason {
  background: var(--bg-secondary);
  color: var(--text-muted);
  padding: .5rem .75rem;
  font-size: .75rem;
}

.loading-container {
  text-align: center;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  display: flex;
}

.loading-spinner {
  border: 4px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  width: 64px;
  height: 64px;
  animation: 1s linear infinite spin;
}

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

.loading-text {
  margin-top: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.loading-subtext {
  color: var(--text-muted);
  margin-top: .5rem;
  font-size: .875rem;
}

.floating-assistant-btn {
  background: var(--primary-500);
  color: #fff;
  cursor: pointer;
  z-index: 50;
  border: none;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  width: 56px;
  height: 56px;
  display: flex;
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  box-shadow: 0 4px 12px rgba(59, 130, 246, .4);
}

@media (max-width: 768px) {
  .assistant-panel {
    display: none;
  }

  .floating-assistant-btn {
    display: flex;
  }

  .results-container {
    grid-template-columns: 1fr;
  }
}

.mobile-assistant-overlay {
  z-index: 40;
  background: rgba(0, 0, 0, .3);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.mobile-assistant-drawer {
  background: var(--bg-card);
  z-index: 50;
  border-radius: 1.5rem 1.5rem 0 0;
  flex-direction: column;
  height: 70vh;
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
}

.mobile-assistant-handle {
  justify-content: center;
  padding: .75rem;
  display: flex;
}

.mobile-assistant-handle-bar {
  background: var(--border-color);
  border-radius: 2px;
  width: 40px;
  height: 4px;
}

.timer-container {
  font-variant-numeric: tabular-nums;
  border-radius: .5rem;
  align-items: center;
  gap: .375rem;
  padding: .25rem .625rem;
  font-size: .875rem;
  font-weight: 600;
  transition: color .3s, background .3s;
  display: inline-flex;
}

.timer-normal {
  color: var(--text-secondary);
  background: var(--bg-hover);
}

.timer-warning {
  color: var(--topic-info-text);
  background: var(--topic-info-bg);
}

.timer-danger {
  color: var(--danger);
  background: var(--danger-light);
}

.timer-pulse {
  animation: 1s ease-in-out infinite timerPulse;
}

@keyframes timerPulse {
  0%, 100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

.timer-icon {
  flex-shrink: 0;
}

.timer-display {
  letter-spacing: .05em;
}

.timer-paused-label {
  opacity: .7;
  font-size: .625rem;
}

.radar-chart-wrapper {
  justify-content: center;
  padding: 1rem 0;
  display: flex;
}

.radar-chart-svg {
  overflow: visible;
}

.training-home {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.stage-badge-bar {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  display: flex;
}

.stage-badge {
  background: var(--bg-card);
  border: 2px solid;
  border-radius: 9999px;
  align-items: center;
  gap: .5rem;
  padding: .375rem 1rem;
  display: inline-flex;
}

.stage-badge-icon {
  font-size: 1.125rem;
}

.stage-badge-label {
  font-size: .875rem;
  font-weight: 600;
}

.training-section {
  margin-bottom: 2rem;
}

.training-section-title {
  color: var(--text-primary);
  margin-bottom: .75rem;
  font-size: 1rem;
  font-weight: 600;
}

.recommend-cards {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: .75rem;
  display: grid;
}

.recommend-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  cursor: pointer;
  text-align: left;
  border-radius: .75rem;
  padding: 1rem 1.25rem;
  transition: all .2s;
  display: block;
}

.recommend-card:hover {
  border-color: var(--primary-300);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1);
}

.recommend-card-badge {
  background: var(--primary-50);
  color: var(--primary-600);
  border-radius: 9999px;
  margin-bottom: .5rem;
  padding: .125rem .5rem;
  font-size: .75rem;
  font-weight: 500;
  display: inline-block;
}

.recommend-card-title {
  margin-bottom: .375rem;
  font-size: .875rem;
  font-weight: 600;
}

.recommend-card-cta {
  color: var(--primary-500);
  font-size: .8125rem;
  font-weight: 500;
}

.progress-columns {
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  display: grid;
}

.progress-column {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: .75rem;
  padding: 1rem;
}

.progress-column-title {
  color: var(--text-secondary);
  margin-bottom: .75rem;
  font-size: .875rem;
  font-weight: 600;
}

.progress-list {
  flex-direction: column;
  gap: .25rem;
  display: flex;
}

.progress-row {
  background: var(--bg-card);
  border: none;
  border-color: var(--border-color);
  cursor: pointer;
  text-align: left;
  border-radius: .5rem;
  align-items: center;
  gap: .625rem;
  width: 100%;
  padding: .5rem .625rem;
  transition: background .15s;
  display: flex;
}

.progress-row:hover:not(:disabled) {
  background: var(--bg-hover);
}

.progress-row-active {
  background: var(--primary-50) !important;
}

.progress-row-locked {
  opacity: .5;
  cursor: not-allowed;
}

.level-icon {
  text-align: center;
  flex-shrink: 0;
  width: 1.25rem;
  font-size: .875rem;
}

.level-done {
  color: var(--success);
}

.level-current {
  color: var(--primary-500);
}

.level-locked, .level-pending {
  color: var(--text-muted);
}

.progress-row-info {
  flex: 1;
  min-width: 0;
}

.progress-row-label {
  color: var(--text-secondary);
  margin-bottom: .25rem;
  font-size: .8125rem;
  font-weight: 500;
  display: block;
}

.progress-bar-track {
  background: var(--border-color);
  border-radius: 2px;
  height: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  background: var(--border-color);
  border-radius: 2px;
  height: 100%;
  transition: width .5s;
}

.progress-bar-active {
  background: var(--primary-500);
}

.progress-bar-done {
  background: var(--success);
}

.progress-row-score {
  color: var(--text-muted);
  flex-shrink: 0;
  font-size: .75rem;
}

.radar-section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: .75rem;
  justify-content: center;
  padding: 1rem;
  display: flex;
}

.pre-assessment {
  flex-direction: column;
  max-width: 640px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
}

.pre-assessment-header {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  display: flex;
}

.pre-assessment-back {
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  font-size: .875rem;
}

.pre-assessment-title {
  font-size: 1rem;
  font-weight: 600;
}

.pre-assessment-progress {
  margin-bottom: 1.25rem;
}

.pre-assessment-progress-track {
  background: var(--border-color);
  border-radius: 3px;
  height: 6px;
  margin-bottom: .375rem;
  overflow: hidden;
}

.pre-assessment-progress-fill {
  background: var(--primary-500);
  border-radius: 3px;
  height: 100%;
  transition: width .4s;
}

.pre-assessment-progress-text {
  color: var(--text-muted);
  font-size: .75rem;
}

.pre-assessment-step-desc {
  margin-bottom: 1.25rem;
}

.pre-assessment-step-desc h3 {
  margin-bottom: .25rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.pre-assessment-step-desc p {
  color: var(--text-muted);
  font-size: .875rem;
}

.pre-assessment-content {
  flex: 1;
}

.pre-assessment-nav {
  align-items: center;
  gap: .75rem;
  padding: 1rem 0;
  display: flex;
}

.diagnostic-question-wrap {
  animation: .3s fadeInUp;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.diagnostic-q-counter {
  color: var(--text-muted);
  margin-bottom: .75rem;
  font-size: .75rem;
}

.diagnostic-q-text {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.6;
}

.diagnostic-options {
  flex-direction: column;
  gap: .5rem;
  display: flex;
}

.diagnostic-option {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  cursor: pointer;
  color: var(--text-secondary);
  text-align: left;
  border-radius: .5rem;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  font-size: .875rem;
  transition: all .15s;
  display: flex;
}

.diagnostic-option:hover:not(.diagnostic-option-selected) {
  border-color: var(--primary-300);
  background: var(--primary-50);
}

.diagnostic-option-selected {
  border-color: var(--primary-500);
  background: var(--primary-50);
}

.diagnostic-option-correct {
  border-color: var(--success) !important;
  background: var(--success-light) !important;
}

.diagnostic-option-letter {
  background: var(--bg-hover);
  border-radius: 50%;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 1.5rem;
  height: 1.5rem;
  font-size: .75rem;
  font-weight: 600;
  display: inline-flex;
}

.diagnostic-textarea {
  border: 1px solid var(--border-color);
  resize: vertical;
  background: var(--bg-input);
  width: 100%;
  color: var(--text-primary);
  border-radius: .5rem;
  padding: .75rem;
  font-family: inherit;
  font-size: .875rem;
  line-height: 1.6;
}

.diagnostic-textarea:focus {
  border-color: var(--primary-400);
  outline: none;
}

.drag-list {
  flex-direction: column;
  gap: .5rem;
  display: flex;
}

.drag-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  cursor: grab;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
  border-radius: .5rem;
  align-items: center;
  gap: .625rem;
  padding: .75rem 1rem;
  transition: box-shadow .15s, border-color .15s;
  display: flex;
}

.drag-item:active {
  cursor: grabbing;
  border-color: var(--primary-400);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
}

.drag-handle {
  color: var(--text-muted);
  font-size: 1rem;
}

.drag-number {
  background: var(--primary-50);
  width: 1.5rem;
  height: 1.5rem;
  color: var(--primary-600);
  border-radius: 50%;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  font-size: .75rem;
  font-weight: 600;
  display: inline-flex;
}

.drag-text {
  color: var(--text-secondary);
  font-size: .875rem;
}

.rewrite-prompt-badge {
  background: var(--purple-light);
  color: var(--purple);
  border-radius: 9999px;
  margin-bottom: .75rem;
  padding: .25rem .75rem;
  font-size: .75rem;
  font-weight: 500;
  display: inline-block;
}

.rewrite-original {
  color: var(--text-secondary);
  margin-bottom: .5rem;
  font-size: .9375rem;
  line-height: 1.6;
}

.rewrite-hint {
  color: var(--text-muted);
  margin-bottom: .75rem;
  font-size: .8125rem;
}

.error-sentence-card {
  background: var(--danger-light);
  border: 1px solid var(--danger);
  border-radius: .5rem;
  margin-bottom: .75rem;
  padding: 1rem;
}

.error-sentence-text {
  color: var(--text-primary);
  margin-bottom: .375rem;
  font-size: .9375rem;
  line-height: 1.6;
}

.error-hint-text {
  color: var(--danger);
  font-size: .8125rem;
}

.diagnostic-results {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1rem;
  animation: .4s fadeInUp;
}

.diagnostic-results-header h2 {
  margin-bottom: .5rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.diagnostic-total-score {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: .875rem;
}

.diagnostic-radar-section {
  margin-bottom: 1.5rem;
}

.diagnostic-step-scores {
  text-align: left;
  margin-bottom: 1.5rem;
}

.diagnostic-step-score-row {
  align-items: center;
  gap: .75rem;
  margin-bottom: .625rem;
  display: flex;
}

.diagnostic-step-score-label {
  width: 4rem;
  color: var(--text-secondary);
  flex-shrink: 0;
  font-size: .8125rem;
  font-weight: 500;
}

.diagnostic-step-score-bar-bg {
  background: var(--border-color);
  border-radius: 3px;
  flex: 1;
  height: 6px;
  overflow: hidden;
}

.diagnostic-step-score-bar-fill {
  background: var(--primary-500);
  border-radius: 3px;
  height: 100%;
  transition: width .8s;
}

.diagnostic-step-score-val {
  color: var(--text-secondary);
  text-align: right;
  flex-shrink: 0;
  width: 2.5rem;
  font-size: .8125rem;
  font-weight: 600;
}

.diagnostic-recommendation {
  color: var(--text-secondary);
  background: var(--primary-50);
  border-left: 4px solid var(--primary-500);
  text-align: left;
  border-radius: .5rem;
  padding: 1rem;
  font-size: .9375rem;
}

.l1-editor {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.l1-editor-header {
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
  display: flex;
}

.l1-back-btn {
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-size: .875rem;
}

.l1-editor-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.l1-topic-prompt {
  background: var(--topic-info-bg);
  border: 1px solid var(--topic-info-border);
  border-radius: .5rem;
  margin-bottom: 1.25rem;
  padding: .75rem 1rem;
  font-size: .875rem;
}

.l1-topic-prompt-label {
  color: var(--topic-info-text);
  font-weight: 600;
}

.l1-topic-prompt-text {
  color: var(--topic-info-text);
}

.l1-field {
  margin-bottom: 1.25rem;
}

.l1-label {
  color: var(--text-secondary);
  margin-bottom: .375rem;
  font-size: .875rem;
  font-weight: 600;
  display: block;
}

.l1-input {
  border: 1px solid var(--border-color);
  border-radius: .5rem;
  width: 100%;
  padding: .5rem .75rem;
  font-size: .875rem;
}

.l1-input:focus {
  border-color: var(--primary-400);
  outline: none;
}

.l1-tags {
  flex-wrap: wrap;
  gap: .375rem;
  margin-top: .5rem;
  display: flex;
}

.l1-tag {
  background: var(--primary-50);
  color: var(--primary-600);
  border-radius: 9999px;
  padding: .25rem .625rem;
  font-size: .8125rem;
  font-weight: 500;
  display: inline-block;
}

.l1-textarea {
  border: 1px solid var(--border-color);
  resize: vertical;
  border-radius: .5rem;
  width: 100%;
  padding: .75rem;
  font-family: inherit;
  font-size: .9375rem;
  line-height: 1.6;
}

.l1-textarea:focus {
  border-color: var(--primary-400);
  outline: none;
}

.l1-char-row {
  justify-content: space-between;
  margin-top: .375rem;
  display: flex;
}

.char-count {
  font-size: .75rem;
}

.char-count-low {
  color: var(--text-muted);
}

.char-count-high {
  color: var(--danger);
}

.char-count-ok {
  color: var(--success);
}

.l1-char-hint {
  color: var(--warning);
  font-size: .75rem;
}

.l1-actions {
  justify-content: flex-end;
  margin-top: 1.5rem;
  display: flex;
}

.l1-confirm-disabled {
  opacity: .5;
  cursor: not-allowed;
}

.l2-editor {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.l2-editor-header {
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
  display: flex;
}

.l2-hint {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: .875rem;
}

.l2-cards-list {
  flex-direction: column;
  gap: .625rem;
  display: flex;
}

.l2-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  cursor: grab;
  border-radius: .5rem;
  padding: .75rem;
  transition: box-shadow .15s, border-color .15s;
}

.l2-card:active {
  cursor: grabbing;
}

.l2-card-dragging {
  border-color: var(--primary-400);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}

.l2-card-header {
  align-items: center;
  gap: .5rem;
  margin-bottom: .5rem;
  display: flex;
}

.l2-card-drag-handle {
  color: var(--text-muted);
  cursor: grab;
}

.l2-card-label {
  color: var(--text-secondary);
  font-size: .8125rem;
  font-weight: 600;
}

.l2-card-count {
  color: var(--text-muted);
  margin-left: auto;
  font-size: .6875rem;
}

.l2-card-count-full {
  color: var(--danger);
}

.l2-card-textarea {
  border: 1px solid var(--border-color);
  resize: none;
  border-radius: .375rem;
  width: 100%;
  padding: .5rem;
  font-family: inherit;
  font-size: .875rem;
  line-height: 1.5;
}

.l2-card-textarea:focus {
  border-color: var(--primary-400);
  outline: none;
}

.l2-structure-visual {
  align-items: center;
  gap: .5rem;
  margin: 1.25rem 0;
  display: flex;
}

.l2-structure-line {
  background: var(--border-color);
  flex: 1;
  height: 2px;
}

.l2-structure-labels {
  gap: .625rem;
  display: flex;
}

.l2-structure-dot {
  background: var(--bg-hover);
  width: 1.75rem;
  height: 1.75rem;
  color: var(--text-muted);
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  font-size: .6875rem;
  font-weight: 600;
  display: inline-flex;
}

.l2-structure-dot-filled {
  background: var(--primary-100);
  color: var(--primary-600);
}

.para-editor {
  flex-direction: column;
  max-width: 640px;
  min-height: 80vh;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  display: flex;
}

.para-editor-header {
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
  display: flex;
}

.para-tip-card {
  background: var(--accent-light);
  border: 1px solid var(--accent);
  color: var(--accent-hover);
  border-radius: .5rem;
  align-items: flex-start;
  gap: .5rem;
  margin-bottom: 1rem;
  padding: .75rem 1rem;
  font-size: .8125rem;
  display: flex;
}

.para-tip-icon {
  flex-shrink: 0;
  font-size: 1rem;
}

.para-editor-body {
  flex: 1;
  display: flex;
}

.para-textarea {
  border: 1px solid var(--border-color);
  resize: vertical;
  border-radius: .5rem;
  width: 100%;
  min-height: 300px;
  padding: 1rem;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.75;
}

.para-textarea:focus {
  border-color: var(--primary-400);
  outline: none;
}

.para-footer {
  border-top: 1px solid var(--border-color);
  flex-direction: column;
  gap: .5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  display: flex;
}

.para-target-info {
  justify-content: space-between;
  font-size: .8125rem;
  display: flex;
}

.para-target-label {
  color: var(--text-muted);
}

.para-count {
  color: var(--text-secondary);
  font-weight: 600;
}

.para-count-near {
  color: var(--warning);
}

.para-count-reached {
  color: var(--success);
}

.para-progress-bar {
  background: var(--border-color);
  border-radius: 2px;
  height: 4px;
  overflow: hidden;
}

.para-progress-fill {
  background: var(--primary-500);
  border-radius: 2px;
  height: 100%;
  transition: width .3s;
}

.para-progress-done {
  background: var(--success);
}

.sr-editor {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.sr-editor-header {
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
  display: flex;
}

.sr-counter {
  color: var(--text-muted);
  margin-bottom: .75rem;
  font-size: .75rem;
}

.sr-original-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: .5rem;
  margin-bottom: .75rem;
  padding: .75rem 1rem;
}

.sr-original-label {
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  margin-bottom: .25rem;
  font-size: .6875rem;
  font-weight: 600;
}

.sr-original-text {
  color: var(--text-primary);
  font-size: .9375rem;
  line-height: 1.6;
}

.sr-pattern-badge {
  background: var(--purple-light);
  color: var(--purple);
  border-radius: 9999px;
  margin-bottom: .75rem;
  padding: .25rem .75rem;
  font-size: .75rem;
  font-weight: 500;
  display: inline-block;
}

.sr-hint-toggle {
  color: var(--primary-500);
  cursor: pointer;
  background: none;
  border: none;
  margin-bottom: .75rem;
  padding: 0;
  font-size: .8125rem;
  display: block;
}

.sr-hint-box {
  background: var(--accent-light);
  border: 1px solid var(--accent);
  color: var(--accent-hover);
  border-radius: .5rem;
  margin-bottom: .75rem;
  padding: .625rem .875rem;
  font-size: .8125rem;
  animation: .2s fadeInUp;
}

.sr-input-textarea {
  border: 1px solid var(--border-color);
  resize: vertical;
  border-radius: .5rem;
  width: 100%;
  margin-bottom: 1rem;
  padding: .75rem;
  font-family: inherit;
  font-size: .9375rem;
  line-height: 1.6;
}

.sr-input-textarea:focus {
  border-color: var(--primary-400);
  outline: none;
}

.sr-nav {
  align-items: center;
  gap: .75rem;
  display: flex;
}

.diff-view {
  max-width: 800px;
}

.diff-legend {
  color: var(--text-muted);
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: .75rem;
  display: flex;
}

.diff-legend-item {
  align-items: center;
  gap: .375rem;
  display: flex;
}

.diff-legend-swatch {
  border-radius: 2px;
  width: 12px;
  height: 12px;
}

.diff-legend-deleted {
  background: var(--danger-light);
  border: 1px solid var(--danger);
}

.diff-legend-added {
  background: var(--success-light);
  border: 1px solid var(--success);
}

.diff-legend-modified {
  background: var(--accent-light);
  border: 1px solid var(--accent);
}

.diff-segments {
  flex-direction: column;
  gap: .75rem;
  display: flex;
}

.diff-segment {
  border-radius: .5rem;
  padding: .75rem 1rem;
  transition: background .3s, box-shadow .3s;
}

.diff-unchanged {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.diff-deleted {
  background: var(--danger-light);
  border: 1px solid var(--danger);
}

.diff-added {
  background: var(--success-light);
  border: 1px solid var(--success);
}

.diff-modified {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.diff-segment-animate {
  animation: .3s diffPulse;
}

@keyframes diffPulse {
  0% {
    box-shadow: 0 0 rgba(59, 130, 246, .4);
  }

  100% {
    box-shadow: 0 0 rgba(59, 130, 246, 0);
  }
}

.diff-text {
  color: var(--text-secondary);
  font-size: .875rem;
  line-height: 1.6;
}

.diff-text-deleted {
  color: var(--danger);
  text-decoration: line-through;
}

.diff-text-added {
  color: var(--success);
}

.diff-side-by-side {
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  display: grid;
}

.diff-side {
  border-radius: .375rem;
  padding: .5rem;
}

.diff-side-original {
  background: var(--danger-light);
}

.diff-side-revised {
  background: var(--success-light);
}

.diff-side-label {
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  margin-bottom: .25rem;
  font-size: .625rem;
  font-weight: 600;
  display: block;
}

.diff-status-row {
  border-top: 1px solid rgba(0, 0, 0, .06);
  align-items: center;
  gap: .625rem;
  margin-top: .5rem;
  padding-top: .5rem;
  display: flex;
}

.diff-status-animate {
  animation: .3s diffPulse;
}

.diff-status-badge {
  border-radius: 9999px;
  flex-shrink: 0;
  padding: .125rem .5rem;
  font-size: .6875rem;
  font-weight: 600;
  display: inline-block;
}

.diff-status-actions {
  flex-wrap: wrap;
  gap: .375rem;
  display: flex;
}

.diff-status-action-btn {
  cursor: pointer;
  background: none;
  border: none;
  border-radius: .25rem;
  padding: .125rem .375rem;
  font-size: .6875rem;
  transition: background .15s;
}

.diff-status-action-btn:hover {
  background: var(--bg-hover);
}

.psc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: .75rem;
  padding: 1.5rem;
}

.psc-scores-row {
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
}

.psc-score-block {
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  display: flex;
}

.psc-score-label {
  color: var(--text-muted);
  font-size: .75rem;
}

.psc-score-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.psc-arrow {
  flex-shrink: 0;
}

.psc-improvement-badge {
  background: var(--success-light);
  color: var(--success);
  border-radius: 9999px;
  align-items: center;
  padding: .25rem .75rem;
  font-size: .875rem;
  font-weight: 700;
  display: inline-flex;
}

.psc-section {
  margin-bottom: 1rem;
}

.psc-section-title {
  margin-bottom: .5rem;
  font-size: .8125rem;
  font-weight: 600;
}

.psc-fixed .psc-section-title {
  color: var(--success);
}

.psc-remaining .psc-section-title {
  color: var(--topic-info-text);
}

.psc-list {
  padding: 0;
  list-style: none;
}

.psc-list-item {
  align-items: flex-start;
  gap: .5rem;
  margin-bottom: .375rem;
  font-size: .8125rem;
  line-height: 1.5;
  display: flex;
}

.psc-item-fixed {
  color: var(--success);
}

.psc-item-remaining {
  color: var(--topic-info-text);
}

.psc-item-icon {
  border-radius: 50%;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: .125rem;
  font-size: .625rem;
  font-weight: 700;
  display: inline-flex;
}

.psc-item-fixed .psc-item-icon {
  background: var(--success-light);
  color: var(--success);
}

.psc-item-remaining .psc-item-icon {
  background: var(--topic-info-bg);
  color: var(--topic-info-text);
}

.psc-ai-comment {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: .5rem;
  align-items: flex-start;
  gap: .5rem;
  padding: .75rem 1rem;
  display: flex;
}

.psc-ai-icon {
  flex-shrink: 0;
  font-size: 1rem;
}

.psc-ai-text {
  color: var(--text-secondary);
  font-size: .8125rem;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .progress-columns, .recommend-cards, .diff-side-by-side {
    grid-template-columns: 1fr;
  }

  .psc-scores-row {
    flex-wrap: wrap;
    gap: .75rem;
  }

  .psc-score-value {
    font-size: 1.5rem;
  }

  .diagnostic-option {
    padding: .625rem .75rem;
  }
}

.rubric-display {
  max-width: 600px;
  margin: 0 auto;
  padding: 1.5rem;
}

.rubric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  padding: 1.25rem;
}

.rubric-title {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.rubric-levels {
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 1rem;
  display: flex;
}

.rubric-level {
  border-radius: var(--radius-sm);
  align-items: center;
  gap: .75rem;
  padding: .5rem .75rem;
  font-size: .8rem;
  display: flex;
}

.rubric-level-name {
  min-width: 50px;
  color: var(--text-primary);
  font-weight: 600;
}

.rubric-level-range {
  color: var(--accent);
  min-width: 60px;
  font-weight: 500;
}

.rubric-level-desc {
  color: var(--text-secondary);
}

.rubric-dimensions {
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  display: grid;
}

.rubric-dim {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: .75rem;
}

.rubric-dim-name {
  margin-bottom: .25rem;
  font-size: .85rem;
  font-weight: 600;
}

.rubric-dim-desc {
  color: var(--text-muted);
  font-size: .75rem;
}

.self-assessment {
  max-width: 640px;
  margin: 0 auto 1.5rem;
}

.self-assessment-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.self-assessment-title {
  color: var(--text-primary);
  margin-bottom: .375rem;
  font-size: 1rem;
  font-weight: 600;
}

.self-assessment-desc {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: .8rem;
}

.self-assessment-content-preview {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  padding: .75rem 1rem;
}

.self-assessment-content-label {
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  margin-bottom: .375rem;
  font-size: .7rem;
  font-weight: 600;
}

.self-assessment-content-text {
  color: var(--text-secondary);
  white-space: pre-wrap;
  max-height: 120px;
  font-size: .8rem;
  line-height: 1.6;
  overflow-y: auto;
}

.self-assessment-issues {
  flex-direction: column;
  gap: .75rem;
  margin-bottom: 1rem;
  display: flex;
}

.self-assessment-row {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: .75rem;
}

.self-assessment-row-header {
  justify-content: space-between;
  align-items: center;
  margin-bottom: .5rem;
  display: flex;
}

.self-assessment-row-number {
  color: var(--text-muted);
  font-size: .75rem;
  font-weight: 600;
}

.self-assessment-remove-btn {
  color: var(--danger);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-size: 1.125rem;
  line-height: 1;
}

.self-assessment-fields {
  grid-template-columns: 1fr 1.5fr .7fr;
  gap: .5rem;
  display: grid;
}

.self-assessment-field {
  flex-direction: column;
  gap: .25rem;
  display: flex;
}

.self-assessment-field-label {
  color: var(--text-muted);
  font-size: .7rem;
  font-weight: 500;
}

.self-assessment-input, .self-assessment-select {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  padding: .375rem .5rem;
  font-size: .8rem;
}

.self-assessment-input:focus, .self-assessment-select:focus {
  border-color: var(--accent);
  outline: none;
}

.self-assessment-add-btn {
  border: 1px dashed var(--border-color);
  border-radius: var(--radius);
  width: 100%;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  margin-bottom: 1rem;
  padding: .5rem;
  font-size: .8rem;
  transition: all .15s;
  display: block;
}

.self-assessment-add-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

.self-assessment-actions {
  gap: .5rem;
  display: flex;
}

.self-assessment-submit-btn {
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  border: none;
  flex: 1;
  padding: .625rem 1rem;
  font-size: .875rem;
  font-weight: 500;
  transition: background .15s;
}

.self-assessment-submit-btn:hover {
  background: var(--accent-hover);
}

.self-assessment-skip-btn {
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  padding: .625rem 1rem;
  font-size: .875rem;
  transition: background .15s;
}

.self-assessment-skip-btn:hover {
  background: var(--bg-hover);
}

.training-report {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.tr-section {
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem;
}

.tr-section:last-child {
  border-bottom: none;
}

.tr-section-title {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: .875rem;
  font-weight: 600;
}

.tr-summary {
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  display: flex;
}

.tr-summary-main {
  align-items: center;
  gap: 1rem;
  display: flex;
}

.tr-summary-level {
  align-items: center;
  gap: .5rem;
  display: flex;
}

.tr-summary-level-badge {
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 9999px;
  padding: .25rem .625rem;
  font-size: .75rem;
  font-weight: 600;
}

.tr-summary-level-name {
  color: var(--text-secondary);
  font-size: .875rem;
  font-weight: 500;
}

.tr-summary-score {
  align-items: baseline;
  gap: .25rem;
  display: flex;
}

.tr-summary-score-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

.tr-summary-score-max {
  color: var(--text-muted);
  font-size: .875rem;
}

.tr-summary-status {
  align-items: center;
  gap: .5rem;
  display: flex;
}

.tr-pass-badge {
  border-radius: 9999px;
  padding: .25rem .75rem;
  font-size: .75rem;
  font-weight: 600;
}

.tr-pass {
  background: var(--success-light);
  color: var(--success);
}

.tr-fail {
  background: var(--danger-light);
  color: var(--danger);
}

.tr-score-diff {
  border-radius: 9999px;
  padding: .25rem .5rem;
  font-size: .8rem;
  font-weight: 600;
}

.tr-dimensions {
  flex-direction: column;
  gap: .625rem;
  display: flex;
}

.tr-dim-row {
  align-items: center;
  gap: .75rem;
  display: flex;
}

.tr-dim-label {
  color: var(--text-secondary);
  flex-shrink: 0;
  width: 3rem;
  font-size: .8rem;
  font-weight: 500;
}

.tr-dim-bar-track {
  background: var(--bg-secondary);
  border-radius: 4px;
  flex: 1;
  height: 8px;
  overflow: hidden;
}

.tr-dim-bar-fill {
  border-radius: 4px;
  height: 100%;
  transition: width .8s;
}

.tr-dim-score {
  color: var(--text-primary);
  text-align: right;
  flex-shrink: 0;
  width: 2rem;
  font-size: .8rem;
  font-weight: 600;
}

.tr-suggestion-grid {
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
  display: grid;
}

.tr-suggestion-item {
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  flex-direction: column;
  align-items: center;
  padding: .625rem .5rem;
  display: flex;
}

.tr-suggestion-count {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}

.tr-suggestion-label {
  color: var(--text-muted);
  margin-top: .125rem;
  font-size: .7rem;
}

.tr-suggestion-resolved .tr-suggestion-count {
  color: var(--success);
}

.tr-suggestion-unresolved .tr-suggestion-count {
  color: var(--warning);
}

.tr-suggestion-misdirected .tr-suggestion-count {
  color: var(--danger);
}

.tr-suggestion-new .tr-suggestion-count {
  color: var(--accent);
}

.tr-actions {
  flex-wrap: wrap;
  gap: .5rem;
  display: flex;
}

@media (max-width: 768px) {
  .self-assessment-fields {
    grid-template-columns: 1fr;
  }

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

  .tr-summary {
    flex-direction: column;
    align-items: flex-start;
  }
}

.writing-tip {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
}

.writing-tip-header {
  cursor: pointer;
  justify-content: space-between;
  align-items: center;
  padding: .75rem 1rem;
  display: flex;
}

.writing-tip-title {
  color: var(--text-secondary);
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  font-weight: 500;
  display: flex;
}

.writing-tip-body {
  color: var(--text-secondary);
  padding: 0 1rem 1rem;
  font-size: .8rem;
  line-height: 1.6;
}

.writing-tip-body ol, .writing-tip-body ul {
  margin: .5rem 0;
  padding-left: 1.25rem;
}

.writing-tip-body li {
  margin-bottom: .375rem;
}

.writing-tip-example {
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  margin-top: .5rem;
  padding: .5rem .75rem;
  font-size: .75rem;
}

.error-type-badge {
  border-radius: 9999px;
  padding: .125rem .375rem;
  font-size: .7rem;
  font-weight: 500;
  display: inline-block;
}

.error-type-logic {
  background: var(--danger-light);
  color: var(--danger);
}

.error-type-structure {
  background: var(--warning-light);
  color: var(--warning);
}

.error-type-language {
  background: var(--accent-light);
  color: var(--accent-hover);
}

.error-type-norms {
  background: var(--success-light);
  color: var(--success);
}

.model-essay-viewer {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
}

.model-essay-body {
  padding: 0 1rem 1rem;
}

.model-essay-card {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  margin-bottom: .75rem;
  padding: 1rem;
}

.model-essay-card:last-child {
  margin-bottom: 0;
}

.model-essay-card-header {
  justify-content: space-between;
  align-items: center;
  margin-bottom: .75rem;
  display: flex;
}

.model-essay-card-title {
  color: var(--text-primary);
  margin: 0;
  font-size: .85rem;
  font-weight: 600;
}

.model-essay-collect-btn {
  border: 1px solid var(--accent);
  color: var(--accent);
  cursor: pointer;
  background: none;
  border-radius: 9999px;
  padding: .25rem .75rem;
  font-size: .75rem;
  font-weight: 500;
  transition: all .2s;
}

.model-essay-collect-btn:hover:not(:disabled) {
  background: var(--accent);
  color: #fff;
}

.model-essay-collect-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.model-essay-card-content {
  color: var(--text-primary);
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  margin-bottom: .75rem;
  padding: .5rem .75rem;
  font-size: .85rem;
  line-height: 1.7;
}

.model-essay-card-analysis {
  color: var(--text-secondary);
  margin-bottom: .5rem;
  font-size: .8rem;
  line-height: 1.6;
}

.model-essay-analysis-label {
  color: var(--text-primary);
  font-weight: 600;
}

.model-essay-card-techniques {
  flex-wrap: wrap;
  gap: .375rem;
  display: flex;
}

.model-essay-technique-badge {
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 9999px;
  padding: .125rem .5rem;
  font-size: .7rem;
  font-weight: 500;
  display: inline-block;
}

.error-archive {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1rem;
}

.error-archive-title {
  color: var(--text-primary);
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
  font-size: .875rem;
  font-weight: 600;
  display: flex;
}

.error-archive-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 1rem;
  font-size: .875rem;
}

.error-archive-groups {
  flex-direction: column;
  gap: 1rem;
  display: flex;
}

.error-archive-group {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.error-archive-group-header {
  background: var(--bg-hover);
  align-items: center;
  gap: .5rem;
  padding: .5rem .75rem;
  display: flex;
}

.error-archive-group-count {
  color: var(--text-muted);
  margin-left: auto;
  font-size: .75rem;
}

.error-archive-group-items {
  padding: .5rem .75rem;
}

.error-archive-item {
  border-bottom: 1px solid var(--border-color);
  padding: .5rem 0;
}

.error-archive-item:last-child {
  border-bottom: none;
}

.error-archive-item-header {
  align-items: center;
  gap: .5rem;
  margin-bottom: .25rem;
  display: flex;
}

.error-archive-subtype {
  color: var(--text-primary);
  font-size: .8rem;
  font-weight: 500;
}

.error-archive-severity {
  font-size: .7rem;
  font-weight: 500;
}

.error-archive-count {
  color: var(--text-muted);
  background: var(--bg-hover);
  border-radius: 9999px;
  padding: .0625rem .375rem;
  font-size: .7rem;
  font-weight: 600;
}

.error-archive-item-location {
  color: var(--text-muted);
  margin-bottom: .125rem;
  font-size: .75rem;
}

.error-archive-item-explanation {
  color: var(--text-secondary);
  font-size: .8rem;
  line-height: 1.5;
}

.grade-selector {
  max-width: 480px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.grade-selector h2 {
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.grade-option {
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  cursor: pointer;
  text-align: left;
  width: 100%;
  margin-bottom: .75rem;
  padding: 1rem;
  transition: all .2s;
  display: block;
}

.grade-option:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.grade-option-title {
  margin-bottom: .25rem;
  font-size: 1rem;
  font-weight: 600;
}

.grade-option-desc {
  color: var(--text-muted);
  font-size: .8rem;
}

.streak-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-secondary);
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
  padding: .75rem 1rem;
  font-size: .8rem;
  display: flex;
}

.streak-bar strong {
  color: var(--warning);
}

.quick-stats-bar {
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
  margin-bottom: 1.25rem;
  display: grid;
}

.quick-stat-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  align-items: center;
  gap: .5rem;
  padding: .75rem;
  display: flex;
}

.quick-stat-icon {
  font-size: 1.25rem;
}

.quick-stat-info {
  flex-direction: column;
  display: flex;
}

.quick-stat-value {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.quick-stat-label {
  color: var(--text-muted);
  font-size: .6875rem;
}

.header-grade {
  color: var(--text-muted);
  font-size: .75rem;
  font-weight: 500;
}

.achievements-section {
  margin-bottom: 1rem;
}

.achievements-row {
  gap: .5rem;
  padding: .25rem 0;
  display: flex;
  overflow-x: auto;
}

.achievement-badge {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  white-space: nowrap;
  border-radius: 9999px;
  align-items: center;
  gap: .25rem;
  padding: .25rem .5rem;
  font-size: .75rem;
  display: flex;
}

.grade-label {
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 9999px;
  margin-left: .5rem;
  padding: .125rem .375rem;
  font-size: .7rem;
  font-weight: 500;
}

@media (max-width: 768px) {
  .app-container {
    padding: .75rem;
  }

  .progress-columns {
    flex-direction: column;
  }

  .header-content {
    padding: .75rem;
  }

  .logo-text {
    font-size: 1rem;
  }

  .training-home {
    padding: .75rem;
  }

  .quick-stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem;
  }

  .quick-stat-item {
    padding: .5rem;
  }

  .quick-stat-value {
    font-size: .875rem;
  }

  .recommend-cards {
    flex-direction: column;
  }

  .recommend-card {
    width: 100%;
  }

  .results-container > div {
    grid-template-columns: 1fr !important;
  }

  .radar-section-card {
    transform-origin: center;
    transform: scale(.85);
  }

  .diagnostic-step-scores {
    padding: 0 .5rem;
  }

  .editor {
    font-size: 16px;
  }

  .score-card, .feedback-section {
    padding: 1rem;
  }

  .button {
    padding: .625rem 1rem;
  }

  .progress-row {
    padding: .625rem .75rem;
  }

  .stage-badge {
    padding: .375rem .75rem;
  }

  .diagnostic-radar-section svg {
    max-width: 220px;
  }

  .essay-preview {
    padding: .75rem;
  }

  .essay-content {
    font-size: .9rem;
    line-height: 1.7;
  }

  .landing-cards {
    grid-template-columns: 1fr;
  }

  .landing-card {
    padding: 1.5rem 1rem;
  }

  .material-library, .error-case-library {
    padding: 1rem .75rem;
  }
}

.landing-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.landing-cards {
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
  display: grid;
}

.landing-card {
  text-align: center;
  border: 2px solid var(--border-color);
  background: var(--bg-card);
  cursor: pointer;
  border-radius: 1rem;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem;
  transition: all .2s;
  display: flex;
}

.landing-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.landing-card-icon {
  margin-bottom: .75rem;
  font-size: 2.5rem;
}

.landing-card-title {
  color: var(--text-primary);
  margin-bottom: .5rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.landing-card-level {
  color: var(--text-secondary);
  margin-bottom: .25rem;
  font-size: .875rem;
}

.landing-card-score {
  color: var(--accent);
  margin-top: .375rem;
  font-size: .8125rem;
  font-weight: 600;
}

.landing-card-current {
  color: var(--text-muted);
  margin-top: .25rem;
  font-size: .75rem;
}

.landing-card-progress {
  width: 100%;
}

.subject-home-header {
  justify-content: space-between;
  align-items: center;
  margin-bottom: .5rem;
  padding: .75rem 0;
  display: flex;
}

.subject-home-back {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  border-radius: .5rem;
  padding: .375rem .75rem;
  font-size: .8125rem;
  font-weight: 500;
  transition: all .15s;
}

.subject-home-back:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.subject-home-title {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
}

@media (max-width: 380px) {
  .header-content {
    gap: .5rem;
  }

  .logo-icon {
    width: 28px;
    height: 28px;
    font-size: .75rem;
  }

  .logo-text, .training-section-title {
    font-size: .875rem;
  }

  .header-grade {
    display: none;
  }

  .quick-stats-bar {
    grid-template-columns: 1fr 1fr;
  }
}

.app-layout {
  background: var(--bg-primary);
  flex-direction: column;
  min-height: 100vh;
  display: flex;
}

.app-container-with-nav {
  padding-bottom: 5rem;
}

.mobile-nav {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  z-index: 100;
  padding: .375rem 0;
  padding-bottom: env(safe-area-inset-bottom, .375rem);
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
}

.mobile-nav-item {
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  color: var(--text-muted);
  background: none;
  border: none;
  flex-direction: column;
  align-items: center;
  gap: .125rem;
  padding: .375rem 0;
  transition: color .15s;
  display: flex;
}

.mobile-nav-item:active {
  opacity: .7;
}

.mobile-nav-active {
  color: var(--accent) !important;
}

.mobile-nav-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.mobile-nav-label {
  font-size: .625rem;
  font-weight: 500;
}

@media (max-width: 768px) {
  .mobile-nav {
    justify-content: space-around;
    align-items: center;
    display: flex;
  }
}

.material-library {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.ml-header {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  display: flex;
}

.ml-title {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 700;
}

.ml-count {
  color: var(--text-muted);
  font-size: .8rem;
}

.ml-filters {
  margin-bottom: 1.25rem;
}

.ml-search-row {
  gap: .5rem;
  margin-bottom: .75rem;
  display: flex;
}

.ml-search-input {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-input);
  color: var(--text-primary);
  flex: 1;
  padding: .5rem .75rem;
  font-size: .875rem;
}

.ml-search-input:focus {
  border-color: var(--accent);
  outline: none;
}

.ml-sort-select {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-input);
  color: var(--text-primary);
  cursor: pointer;
  padding: .5rem .75rem;
  font-size: .875rem;
}

.ml-category-tabs {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: .375rem;
  display: flex;
  overflow-x: auto;
}

.ml-category-tabs::-webkit-scrollbar {
  display: none;
}

.ml-category-tab {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  border-radius: 9999px;
  padding: .375rem .75rem;
  font-size: .8125rem;
  font-weight: 500;
  transition: all .15s;
}

.ml-category-tab:active {
  opacity: .7;
}

.ml-category-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.ml-grid {
  grid-template-columns: repeat(1, 1fr);
  gap: .75rem;
  display: grid;
}

@media (min-width: 640px) {
  .ml-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .ml-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.ml-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  cursor: pointer;
  padding: 1rem;
  transition: all .15s;
}

.ml-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.ml-card-header {
  align-items: center;
  gap: .5rem;
  margin-bottom: .5rem;
  display: flex;
}

.ml-source-badge {
  border-radius: 9999px;
  padding: .125rem .5rem;
  font-size: .7rem;
  font-weight: 600;
  display: inline-block;
}

.ml-category-tag {
  color: var(--text-muted);
  font-size: .7rem;
}

.ml-card-content {
  color: var(--text-secondary);
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  margin-bottom: .5rem;
  font-size: .85rem;
  line-height: 1.6;
  display: -webkit-box;
  overflow: hidden;
}

.ml-card-expanded {
  -webkit-line-clamp: unset;
  display: block;
}

.ml-card-tags {
  flex-wrap: wrap;
  gap: .25rem;
  margin-bottom: .5rem;
  display: flex;
}

.ml-tag {
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 9999px;
  padding: .0625rem .375rem;
  font-size: .625rem;
  display: inline-block;
}

.ml-card-footer {
  border-top: 1px solid var(--border-color);
  justify-content: space-between;
  align-items: center;
  padding-top: .5rem;
  display: flex;
}

.ml-usage-count {
  color: var(--text-muted);
  font-size: .7rem;
}

.ml-card-actions {
  gap: .375rem;
  display: flex;
}

.ml-use-btn {
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  color: var(--accent);
  cursor: pointer;
  background: none;
  padding: .25rem .5rem;
  font-size: .7rem;
  font-weight: 500;
  transition: all .15s;
}

.ml-use-btn:hover {
  background: var(--accent);
  color: #fff;
}

.ml-use-btn.copied {
  color: #fff;
  background: #16a34a;
  border-color: #16a34a;
}

.ml-delete-btn {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  padding: .25rem .5rem;
  font-size: .7rem;
  font-weight: 500;
  transition: all .15s;
}

.ml-delete-btn:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.ml-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 1rem;
}

.ml-empty-icon {
  margin-bottom: .75rem;
  font-size: 2.5rem;
  display: block;
}

.ml-empty-text {
  font-size: .875rem;
}

.ml-loading-spinner {
  border: 3px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  margin: 0 auto .75rem;
  animation: 1s linear infinite spin;
}

.error-case-library {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.ecl-header {
  margin-bottom: 1rem;
}

.ecl-title {
  color: var(--text-primary);
  margin-bottom: .25rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.ecl-stats {
  color: var(--text-muted);
  font-size: .8rem;
}

.ecl-tabs {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: .375rem;
  margin-bottom: 1rem;
  display: flex;
  overflow-x: auto;
}

.ecl-tabs::-webkit-scrollbar {
  display: none;
}

.ecl-tab {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  min-height: 44px;
  padding: .5rem 1rem;
  font-size: .8125rem;
  font-weight: 500;
  transition: all .15s;
}

.ecl-tab:active {
  opacity: .7;
}

.ecl-tab-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.ecl-search {
  margin-bottom: 1rem;
}

.ecl-search-input {
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-input);
  width: 100%;
  color: var(--text-primary);
  padding: .5rem .75rem;
  font-size: .875rem;
}

.ecl-search-input:focus {
  border-color: var(--accent);
  outline: none;
}

.ecl-list {
  flex-direction: column;
  gap: 1rem;
  display: flex;
}

.ecl-case-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  transition: all .15s;
}

.ecl-case-mastered {
  opacity: .6;
  border-color: var(--success);
}

.ecl-case-header {
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-bottom: .75rem;
  display: flex;
}

.ecl-case-subtype {
  color: var(--text-primary);
  font-size: .9rem;
  font-weight: 600;
}

.ecl-severity-badge {
  border-radius: 9999px;
  padding: .125rem .5rem;
  font-size: .7rem;
  font-weight: 600;
  display: inline-block;
}

.ecl-master-btn {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  min-height: 32px;
  margin-left: auto;
  padding: .25rem .625rem;
  font-size: .7rem;
  font-weight: 500;
  transition: all .15s;
}

.ecl-mastered {
  background: var(--success-light);
  color: var(--success);
  border-color: var(--success);
}

.ecl-example {
  border-radius: var(--radius);
  margin-bottom: .5rem;
  padding: .75rem;
}

.ecl-example-label {
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: .25rem;
  font-size: .7rem;
  font-weight: 600;
  display: block;
}

.ecl-error {
  background: var(--danger-light);
  border: 1px solid var(--danger);
}

.ecl-error .ecl-example-label, .ecl-error-text {
  color: var(--danger);
}

.ecl-correct {
  background: var(--success-light);
  border: 1px solid var(--success);
}

.ecl-correct-label, .ecl-correct-text {
  color: var(--success);
}

.ecl-example-text {
  color: var(--text-primary);
  font-size: .85rem;
  line-height: 1.6;
}

.ecl-explanation {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  margin-bottom: .5rem;
  padding: .5rem .75rem;
}

.ecl-explanation-label {
  color: var(--text-muted);
  margin-bottom: .125rem;
  font-size: .7rem;
  font-weight: 600;
  display: block;
}

.ecl-explanation-text {
  color: var(--text-secondary);
  font-size: .8rem;
  line-height: 1.5;
}

.ecl-related {
  align-items: center;
  gap: .375rem;
  font-size: .75rem;
  display: flex;
}

.ecl-related-label {
  color: var(--text-muted);
}

.ecl-related-level {
  color: var(--accent);
  font-weight: 500;
}

.ecl-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 1rem;
}

.ecl-empty-icon {
  margin-bottom: .75rem;
  font-size: 2.5rem;
  display: block;
}

.ecl-empty-text {
  font-size: .875rem;
}

.ecl-loading-spinner {
  border: 3px solid var(--border-color);
  border-top-color: var(--accent);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  margin: 0 auto .75rem;
  animation: 1s linear infinite spin;
}

.diff-mobile-tabs {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  gap: 0;
  margin-bottom: .75rem;
  padding: .25rem;
  display: none;
}

.diff-mobile-tab {
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  flex: 1;
  min-height: 44px;
  padding: .5rem 1rem;
  font-size: .8125rem;
  font-weight: 500;
  transition: all .15s;
}

.diff-mobile-tab-active {
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.diff-mobile-single {
  display: none;
}

@media (max-width: 768px) {
  .diff-mobile-tabs {
    display: flex;
  }

  .diff-side-by-side {
    display: none !important;
  }

  .diff-mobile-single {
    display: block;
  }

  .diff-view {
    padding: 0 .5rem;
  }

  .diff-segment {
    padding: .625rem .75rem;
  }

  .app-layout {
    min-height: 100dvh;
  }

  .button {
    min-width: 44px;
    min-height: 44px;
  }

  .progress-row, .recommend-card {
    min-height: 44px;
  }

  .para-editor {
    padding: 1rem .75rem 6rem;
  }

  .para-textarea {
    min-height: 200px;
    font-size: 16px;
  }

  .para-submit-btn {
    z-index: 10;
    width: 100%;
    min-height: 48px;
    position: -webkit-sticky;
    position: sticky;
    bottom: 4rem;
  }

  .training-home {
    padding: .75rem;
  }

  .training-home-quick-actions {
    grid-template-columns: 1fr !important;
  }

  .radar-section-card {
    transform-origin: center;
    transform: scale(.8);
  }

  .tr-summary {
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
  }

  .tr-summary-main {
    flex-wrap: wrap;
    gap: .5rem;
  }

  .tr-summary-score-value {
    font-size: 1.5rem;
  }

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

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

  .ml-card-header {
    flex-wrap: wrap;
  }

  .ml-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
  }

  .ml-card-actions {
    justify-content: flex-end;
    width: 100%;
  }

  .ecl-case-header {
    flex-wrap: wrap;
  }

  .ecl-master-btn {
    margin-left: 0;
  }

  html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
  }

  body {
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
}

@media (max-width: 380px) {
  .ml-search-row {
    flex-direction: column;
  }

  .ml-sort-select {
    width: 100%;
  }

  .ecl-tab {
    padding: .375rem .75rem;
    font-size: .75rem;
  }
}

/* [project]/src/styles/design-tokens.css [app-client] (css) */
:root {
  --color-navy-900: #181d26;
  --color-navy-800: #1f2533;
  --color-navy-700: #2d3548;
  --color-blue-600: #1b61c9;
  --color-blue-500: #2563eb;
  --color-blue-400: #3b82f6;
  --color-blue-300: #60a5fa;
  --color-blue-200: #93c5fd;
  --color-blue-100: #dbeafe;
  --color-blue-50: #eff6ff;
  --color-white: #fff;
  --color-gray-50: #f8fafc;
  --color-gray-100: #f1f5f9;
  --color-gray-200: #e2e8f0;
  --color-gray-300: #cbd5e1;
  --color-gray-400: #94a3b8;
  --color-gray-500: #64748b;
  --color-gray-600: #475569;
  --color-gray-700: #334155;
  --color-gray-800: #1e293b;
  --color-gray-900: #0f172a;
  --color-success: #006400;
  --color-success-light: #dcfce7;
  --color-warning: #b45309;
  --color-warning-light: #fef3c7;
  --color-error: #dc2626;
  --color-error-light: #fee2e2;
  --border-color: #e0e2e6;
  --border-color-hover: #1b61c9;
  --theme_text: #181d26;
  --theme_text-weak: rgba(4, 14, 32, .69);
  --theme_text-muted: rgba(4, 14, 32, .45);
  --theme_bg: #fff;
  --theme_bg-subtle: #f8fafc;
  --theme_bg-muted: #f1f5f9;
  --theme_button-primary: #1b61c9;
  --theme_button-text: #fff;
  --theme_button-text-spotlight: rgba(249, 252, 255, .97);
  --theme_button-secondary-bg: #fff;
  --theme_button-secondary-border: #e0e2e6;
  --theme_button-secondary-text: #181d26;
  --theme_button-text-secondary-active: rgba(7, 12, 20, .82);
  --theme_success-text: #006400;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
  --shadow-md: rgba(0, 0, 0, .32) 0px 0px 1px, rgba(0, 0, 0, .08) 0px 0px 2px, rgba(45, 127, 249, .28) 0px 1px 3px, rgba(0, 0, 0, .06) 0px 0px 0px .5px inset;
  --shadow-lg: rgba(0, 0, 0, .32) 0px 0px 1px, rgba(0, 0, 0, .08) 0px 0px 2px, rgba(45, 127, 249, .28) 0px 2px 6px, rgba(0, 0, 0, .06) 0px 0px 0px .5px inset;
  --shadow-soft: rgba(15, 48, 106, .05) 0px 0px 20px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;
  --font-family: Haas, -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --font-display: "Haas Groot Disp", Haas, sans-serif;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --transition-fast: .15s ease;
  --transition-normal: .2s ease;
  --transition-slow: .3s ease;
}

[data-theme="dark"] {
  --theme_text: #f1f5f9;
  --theme_text-weak: rgba(241, 245, 249, .69);
  --theme_text-muted: rgba(241, 245, 249, .45);
  --theme_bg: #0f172a;
  --theme_bg-subtle: #1e293b;
  --theme_bg-muted: #334155;
  --theme_button-primary: #3b82f6;
  --theme_button-secondary-bg: #1e293b;
  --theme_button-secondary-border: #334155;
  --theme_button-secondary-text: #f1f5f9;
  --border-color: #334155;
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .3), 0 2px 4px -2px rgba(0, 0, 0, .2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .3), 0 4px 6px -4px rgba(0, 0, 0, .2);
  --color-blue-50: #1e3a5f;
  --color-success-light: #14532d;
  --color-warning-light: #451a03;
  --color-error-light: #450a0a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--theme_bg);
  color: var(--theme_text);
  letter-spacing: .08px;
  line-height: 1.5;
}

.button {
  letter-spacing: .08px;
  cursor: pointer;
  transition: all var(--transition-normal);
  border-radius: 12px;
  justify-content: center;
  align-items: center;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  display: inline-flex;
}

.button-primary {
  background: var(--theme_button-primary);
  color: var(--theme_button-text);
  border: none;
}

.button-primary:hover {
  box-shadow: var(--shadow-md);
  background: #1558b0;
}

.button-secondary {
  background: var(--theme_button-secondary-bg);
  color: var(--theme_button-secondary-text);
  border: 1px solid var(--theme_button-secondary-border);
}

.button-secondary:hover {
  border-color: var(--theme_button-primary);
}

.card {
  background: var(--theme_bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
}

a {
  color: var(--theme_button-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/*# sourceMappingURL=src_91a28723._.css.map*/