:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --panel-alt: #f9fafb;
  --text: #1f2933;
  --muted: #667085;
  --line: #d7dde6;
  --primary: #1f5f68;
  --primary-soft: #e6f1f2;
  --danger: #a23b20;
  --ok: #247447;
  --warn: #9a6412;
  --shadow: 0 8px 22px rgba(18, 38, 63, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  overflow-y: scroll;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", Arial, sans-serif;
  line-height: 1.55;
  overflow-y: scroll;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  border: 1px solid var(--primary);
  border-radius: 6px;
  background: var(--primary);
  color: white;
  min-height: 38px;
  padding: 0 14px;
  cursor: pointer;
}

button.secondary {
  background: white;
  color: var(--primary);
}

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

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--text);
}

input,
select {
  height: 38px;
  padding: 0 10px;
}

textarea {
  min-height: 88px;
  padding: 10px;
  resize: vertical;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

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

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.brand strong {
  font-size: 18px;
  color: var(--primary);
  white-space: nowrap;
}

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

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

.nav a {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: white;
  color: var(--text);
  font-size: 14px;
}

.nav a.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
}

.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 22px 24px 42px;
}

.page.narrow {
  max-width: 1080px;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: stretch;
}

.hero-panel,
.panel,
.list,
.detail,
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 28px;
}

.hero-panel h1 {
  margin: 0 0 12px;
  font-size: 30px;
  letter-spacing: 0;
}

.hero-panel p {
  margin: 0 0 18px;
  color: var(--muted);
}

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

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

.metric {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.metric strong {
  display: block;
  color: var(--primary);
  font-size: 26px;
}

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

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 16px;
}

.panel {
  padding: 14px;
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.filters .wide {
  grid-column: 1 / -1;
}

.list {
  overflow: hidden;
}

.list-head,
.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-alt);
}

.list-head h2,
.detail-head h2,
.section-title {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0;
}

.passage-list {
  max-height: calc(100vh - 240px);
  overflow: auto;
}

.passage-item {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: white;
  color: var(--text);
  padding: 12px 14px;
  text-align: left;
}

.passage-item:hover,
.passage-item.active {
  background: var(--primary-soft);
}

.passage-item strong {
  font-size: 15px;
}

.meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  background: #eef2f6;
  color: #344054;
  font-size: 12px;
  white-space: nowrap;
}

.badge.ok {
  background: #e7f5ec;
  color: var(--ok);
}

.badge.warn {
  background: #fff2df;
  color: var(--warn);
}

.badge.danger {
  background: #fbe9e4;
  color: var(--danger);
}

.detail {
  min-height: calc(100vh - 112px);
  overflow: hidden;
}

.detail-body {
  padding: 16px;
}

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

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

.thesis-grid textarea {
  min-height: 96px;
}

.stack {
  display: grid;
  gap: 12px;
}

.section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.section h3 {
  margin: 0 0 8px;
  font-size: 15px;
  letter-spacing: 0;
}

.thesis-card ol {
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--text);
  line-height: 1.7;
}

.body-text {
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  color: #344054;
}

.paragraph {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.paragraph:last-child {
  border-bottom: 0;
}

.paragraph p {
  margin: 0;
}

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

.status-line {
  min-height: 22px;
  color: var(--muted);
  font-size: 13px;
}

.feedback {
  border-left: 4px solid var(--primary);
  background: var(--primary-soft);
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(80px, 1fr));
  gap: 8px;
}

.score {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 10px;
  position: relative;
}

.score.has-tooltip {
  cursor: help;
}

.score strong {
  display: block;
  color: var(--primary);
  font-size: 22px;
}

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

.score.score-high { border-color: #22c55e; background: #f0fdf4; }
.score.score-high strong { color: #16a34a; }
.score.score-mid { border-color: #f59e0b; background: #fffbeb; }
.score.score-mid strong { color: #d97706; }
.score.score-low { border-color: #ef4444; background: #fef2f2; }
.score.score-low strong { color: #dc2626; }

.score-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #f8fafc;
  font-size: 12px;
  line-height: 1.5;
  padding: 9px 12px;
  border-radius: 7px;
  width: 200px;
  text-align: center;
  z-index: 200;
  pointer-events: none;
  white-space: normal;
}

.score-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1e293b;
}

.score.has-tooltip:hover .score-tooltip,
.score.has-tooltip:focus .score-tooltip,
.score.has-tooltip.touched .score-tooltip {
  display: block;
}

.feedback-section {
  margin-top: 4px;
}

.feedback-section h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.feedback-list {
  margin: 0;
  padding: 0 0 0 18px;
}

.feedback-list li {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 4px;
}

.feedback-strengths li { color: #16a34a; }
.feedback-improvements li { color: #b45309; }

.feedback-summary-box {
  background: var(--primary-soft);
  border-radius: 8px;
  padding: 12px 14px;
}

.feedback-summary-box p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
}

.grade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
}

.grade-card {
  border-radius: 14px;
  padding: 16px 10px 12px;
  text-align: center;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.grade-card .grade-icon {
  font-size: 30px;
  line-height: 1;
}

.grade-card .grade-label {
  font-size: 13px;
  font-weight: 700;
}

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

.grade-top { background: #fffbeb; border-color: #f59e0b; }
.grade-top .grade-label { color: #b45309; }

.grade-mid { background: #f0fdf4; border-color: #22c55e; }
.grade-mid .grade-label { color: #16a34a; }

.grade-low { background: #eff6ff; border-color: #60a5fa; }
.grade-low .grade-label { color: #2563eb; }

@keyframes confetti-fall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

.confetti-piece {
  position: fixed;
  top: -16px;
  z-index: 9999;
  pointer-events: none;
  will-change: transform, opacity;
  animation: confetti-fall linear forwards;
}

.feedback-praise {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #f0fdf4;
  border-left: 4px solid #22c55e;
  border-radius: 6px;
  padding: 12px 14px;
}

.feedback-praise-icon {
  color: #16a34a;
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.feedback-praise p {
  margin: 0;
  color: #166534;
  font-size: 14px;
  line-height: 1.6;
}

.feedback-red-item {
  background: #fff5f5;
  border-left: 4px solid #ef4444;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.feedback-red-header {
  font-size: 13px;
  font-weight: 700;
  color: #dc2626;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.feedback-red-missing {
  background: #fecaca;
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 12px;
  font-weight: 600;
  color: #991b1b;
}

.feedback-red-guide {
  background: white;
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 13px;
  color: #374151;
  line-height: 1.7;
}

.hidden {
  display: none !important;
}

@media (max-width: 960px) {
  .hero,
  .workspace,
  .grid-2,
  .grid-3,
  .form-row {
    grid-template-columns: 1fr;
  }

  .passage-list {
    max-height: 360px;
  }

  .detail {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 14px;
  }

  .page {
    padding: 16px 12px 32px;
  }

  .filters,
  .metrics,
  .score-grid {
    grid-template-columns: 1fr;
  }
}

/* Dark analysis dashboard, inspired by the TQ report reference */
.admin-dashboard {
  --bg: #030716;
  --panel: #111a30;
  --panel-alt: #161f36;
  --text: #f5f7fb;
  --muted: #99a4ba;
  --line: #2c3857;
  --primary: #8b5cf6;
  --primary-soft: #1c143a;
  --ok: #21d19f;
  --warn: #f2c94c;
  --danger: #ff5a5f;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 12%, rgba(72, 52, 141, 0.28), transparent 26%),
    linear-gradient(180deg, #020615 0%, #060a1a 58%, #071020 100%);
}

.admin-dashboard .dashboard-topbar {
  min-height: 40px;
  background: #040817;
  border-bottom: 1px solid #7047d7;
  color: #eef2ff;
  padding: 0 16px;
}

.admin-dashboard .brand strong {
  color: #ffffff;
  font-size: 14px;
}

.admin-dashboard .brand span {
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.admin-dashboard .nav a {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #cfd6e6;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 22px;
  font-weight: 700;
}

.admin-dashboard .nav a.active {
  border-bottom: 2px solid #a16eff;
  background: #19103d;
  color: #ffffff;
}

.dashboard-page {
  max-width: 1600px;
  min-height: calc(100vh - 80px);
  padding: 22px 24px 40px;
}

/* ── Admin gate (로그인) ── */
.admin-gate {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #0a1628;
}

.admin-gate-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-gate-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: #111d35;
  border: 1px solid #1e3a5f;
  border-radius: 14px;
  padding: 36px 40px;
  width: 100%;
  max-width: 400px;
  color: #d7deeb;
}

.admin-gate-form h2 {
  color: #fff;
  font-size: 22px;
  margin: 0 0 6px;
}

.admin-gate-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #9ca9c5;
}

.admin-gate-form input,
.admin-gate-form select {
  background: #0d1a2e;
  border: 1px solid #1e3a5f;
  border-radius: 7px;
  color: #d7deeb;
  padding: 10px 12px;
  font-size: 15px;
}

.admin-gate-form button[type="submit"] {
  background: #1d6fa3;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
}

.admin-gate-form button[type="submit"]:hover { background: #1a5f8e; }

.link-btn {
  background: none;
  border: 0;
  color: #5b9bd5;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  padding: 0;
}

.link-btn:hover { text-decoration: underline; }

/* ── Admin layout ── */
.admin-layout {
  display: grid;
  grid-template-columns: 300px 1fr 300px;
  gap: 16px;
  height: calc(100vh - 130px);
}

.admin-left,
.admin-center,
.admin-right {
  background: #111d35;
  border: 1px solid #1e3a5f;
  border-radius: 12px;
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid #1e3a5f;
  flex-shrink: 0;
}

.admin-panel-head h2 {
  color: #d7deeb;
  font-size: 15px;
  margin: 0;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 우측 학생 목록 ── */
.admin-student-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  flex: 1;
}

.admin-student-btn {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: left;
  color: #d7deeb;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.admin-student-btn:hover { background: rgba(30, 100, 160, 0.2); border-color: #1e3a5f; }
.admin-student-btn.selected { background: rgba(30, 100, 160, 0.35); border-color: #1d6fa3; }
.admin-student-btn strong { font-size: 15px; color: #fff; }
.admin-student-btn span, .admin-student-btn small { font-size: 12px; color: #9ca9c5; }

/* ── 좌측 전체 요약 ── */
.left-summary {
  background: #0d1a2e;
  border: 1px solid #1e3a5f;
  border-radius: 10px;
  padding: 14px;
  flex-shrink: 0;
}

.left-summary-label {
  margin: 0 0 10px;
  font-size: 13px;
  color: #9ca9c5;
}

.left-summary-label strong { color: #d7deeb; font-size: 16px; }

.score-high-text { color: #22c55e; }
.score-mid-text  { color: #f59e0b; }
.score-low-text  { color: #ef4444; }

.session-list-head h3 {
  color: #9ca9c5;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.session-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.session-row {
  background: #0d1a2e;
  border: 1px solid #1e3a5f;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.session-row-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.session-no { font-size: 13px; font-weight: 700; color: #d7deeb; }
.session-date { font-size: 12px; color: #9ca9c5; flex: 1; }
.session-course { font-size: 12px; color: #9ca9c5; }

/* ── 점수 그리드 (admin용) ── */
.admin-score-grid {
  grid-template-columns: repeat(5, minmax(44px, 1fr));
}

.admin-score-grid-mini {
  display: grid;
  grid-template-columns: repeat(5, minmax(36px, 1fr));
  gap: 4px;
}

.score-mini { padding: 5px 4px; }
.score-mini strong { font-size: 13px; }
.score-mini span { font-size: 10px; }

/* ── 제출 카드 (admin) ── */
.submission-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.submission-course { font-weight: 700; color: #d7deeb; font-size: 14px; }
.submission-meta { font-size: 12px; color: #9ca9c5; white-space: nowrap; }
.submission-transcript { margin: 0; font-size: 13px; color: #9ca9c5; line-height: 1.6; }
.submission-feedback { margin: 0; font-size: 13px; color: #7ec8e3; line-height: 1.6; }

.section-head-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-head-row h3 { margin: 0; }

/* ── Admin cumul bars (dark theme) ── */
.admin-cumul-section,
.admin-trend-section {
  background: #0d1a2e;
  border: 1px solid #1e3a5f;
  border-radius: 10px;
  padding: 12px 14px;
  flex-shrink: 0;
}

.admin-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 11px;
  color: #9ca9c5;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.admin-overall-score {
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.admin-cumul-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-cumul-bar-row {
  display: grid;
  grid-template-columns: 68px 1fr 30px;
  align-items: center;
  gap: 10px;
}

.admin-cumul-label {
  font-size: 11px;
  color: #9ca9c5;
  font-weight: 700;
  text-align: right;
}

.admin-cumul-track {
  height: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.admin-cumul-score {
  font-size: 13px;
  font-weight: 900;
  color: #d7deeb;
  text-align: right;
}

/* ── Admin trend chart ── */
.admin-trend-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.trend-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: #9ca9c5;
}

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

.admin-trend-svg {
  display: block;
  overflow: visible;
}

/* ── Admin session list (clickable) ── */
.admin-session-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-session-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 8px 12px;
  text-align: left;
  color: #9ca9c5;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.admin-session-btn:hover {
  background: rgba(30, 100, 160, 0.18);
  border-color: #1e3a5f;
  color: #d7deeb;
}

.admin-session-btn.selected {
  background: rgba(30, 100, 160, 0.35);
  border-color: #1d6fa3;
  color: #fff;
  font-weight: 700;
}

.session-today {
  color: #d7deeb;
  font-weight: 700;
}

.session-today-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
}

/* ── Session detail (center panel) ── */
#centerPanelBody {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-section {
  background: #0d1a2e;
  border: 1px solid #1e3a5f;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #e8edf5;
  padding-bottom: 10px;
  border-bottom: 1px solid #1e3a5f;
  margin-bottom: 2px;
}

.detail-section-dim {
  opacity: 0.45;
}

.detail-subsection {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-sub-label {
  font-size: 13px;
  font-weight: 700;
  color: #5bb8d4;
  border-left: 3px solid #5bb8d4;
  padding-left: 8px;
  letter-spacing: 0.01em;
}

.detail-sub-body {
  margin: 0;
  font-size: 13px;
  color: #d7deeb;
  line-height: 1.65;
}

.guide-para-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.guide-para-table th {
  background: #0a1525;
  color: #7ec8e3;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid #1e3a5f;
}

.guide-para-table td {
  padding: 8px 10px;
  color: #c8d4e8;
  line-height: 1.6;
  vertical-align: top;
  border-bottom: 1px solid #0f1e33;
}

.guide-para-table td:first-child {
  color: #7ec8e3;
  font-weight: 700;
  white-space: nowrap;
  width: 52px;
}

.guide-para-table tr:last-child td {
  border-bottom: none;
}

.phrase-tag {
  display: inline-block;
  background: #112240;
  border: 1px solid #1e3a5f;
  color: #93c5fd;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  margin: 2px 2px 2px 0;
}

.session-avg-line {
  margin: 4px 0 0;
  font-size: 12px;
  color: #9ca9c5;
  text-align: right;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 330px minmax(520px, 1fr) 330px;
  gap: 42px;
  align-items: start;
}

.dashboard-left,
.dashboard-right {
  padding-top: 18px;
}

.diagnosis-card,
.insight-card {
  border: 1px solid #33415f;
  border-radius: 12px;
  background: rgba(18, 27, 49, 0.96);
  box-shadow: var(--shadow);
}

.diagnosis-card {
  padding: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: #9ca9c5;
  font-size: 12px;
  font-weight: 700;
}

.diagnosis-card h1 {
  margin: 0 0 18px;
  font-size: 38px;
  line-height: 1;
  color: white;
  letter-spacing: 0;
}

.ability-pill {
  border: 1px solid #5d6579;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #a779ff;
  padding: 15px 18px;
  font-size: 20px;
  font-weight: 800;
}

.ability-pill small {
  color: #c7ccda;
  font-size: 11px;
  font-weight: 700;
}

.profile-list {
  margin: 22px 0 16px;
}

.profile-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid #30384f;
}

.profile-list dt {
  color: #7c879d;
  font-weight: 700;
}

.profile-list dd {
  margin: 0;
  color: #f8fafc;
  font-weight: 800;
}

.profile-list dd.good {
  color: #21d19f;
}

.admin-dashboard .filters {
  grid-template-columns: 1fr;
  gap: 9px;
}

.admin-dashboard label {
  color: #9ca9c5;
}

.admin-dashboard input,
.admin-dashboard select,
.admin-dashboard textarea {
  border-color: #33415f;
  background: #0b1224;
  color: #f8fafc;
}

.admin-dashboard input::placeholder,
.admin-dashboard textarea::placeholder {
  color: #66728d;
}

.dashboard-list {
  background: rgba(18, 27, 49, 0.96);
  border-color: #33415f;
}

.admin-dashboard .list-head,
.admin-dashboard .detail-head {
  background: #111a30;
  border-color: #2c3857;
}

.admin-dashboard .passage-list {
  max-height: 360px;
}

.admin-dashboard .passage-item {
  background: transparent;
  border-color: #27334f;
  color: #f8fafc;
}

.student-result-list {
  max-height: 260px;
  overflow: auto;
}

.student-item-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.student-meta-inline {
  flex: 1;
  font-size: 11px;
  color: #7a90aa;
  text-align: right;
  margin-right: 2px;
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  box-shadow: 0 0 6px #22c55e;
}

.online-label {
  font-size: 11px;
  font-weight: 700;
  color: #22c55e !important;
  background: rgba(34, 197, 94, 0.15);
  border-radius: 99px;
  padding: 1px 7px;
}

.student-result-item.student-online {
  border-left: 3px solid #22c55e;
  background: rgba(34, 197, 94, 0.06);
}

.admin-student-item.student-online .admin-student-btn,
.admin-student-item.student-online .admin-student-btn.expanded {
  border-left: 3px solid #22c55e !important;
  background: rgba(34, 197, 94, 0.10) !important;
}

.admin-student-item.student-online .admin-student-btn strong {
  color: #22c55e;
}

.student-result-item {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #27334f;
  border-radius: 0;
  background: transparent;
  color: #f8fafc;
  padding: 12px 14px;
  text-align: left;
}

.student-result-item:hover {
  background: rgba(33, 209, 159, 0.1);
}

.student-result-item strong {
  font-size: 15px;
}

.student-result-item span,
.student-result-item small {
  color: #9ca9c5;
  font-size: 13px;
}

.profile-list.compact {
  margin: 0;
}

.submission-card {
  display: grid;
  gap: 12px;
  border: 1px solid #33415f;
  border-radius: 8px;
  background: #0b1224;
  padding: 14px;
}

.submission-card > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.submission-card > div:first-child span {
  color: #9ca9c5;
  font-size: 13px;
}

.submission-card p {
  margin: 0;
  color: #d7deeb;
}

.score-grid.mini {
  grid-template-columns: repeat(4, minmax(72px, 1fr));
}

.admin-dashboard .passage-item:hover,
.admin-dashboard .passage-item.active {
  background: #20164d;
}

.dashboard-report {
  overflow: visible;
  min-height: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.dashboard-report .detail-head {
  border: 1px solid #33415f;
  border-radius: 12px 12px 0 0;
}

.dashboard-report .detail-body {
  padding: 0;
}

.report-paper {
  background: #ffffff;
  color: #314054;
  border-radius: 0 0 18px 18px;
  padding: 46px 36px 30px;
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.28);
}

.report-score {
  text-align: center;
}

.report-score p {
  margin: 0 0 4px;
  color: #64748b;
  font-size: 20px;
  font-weight: 700;
}

.report-score p span {
  color: #94a3b8;
  font-size: 14px;
}

.report-score p b {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid #8ee7b8;
  border-radius: 999px;
  background: #e8fff2;
  color: #20b96f;
  padding: 0 12px;
  font-size: 12px;
}

.report-score strong {
  display: block;
  color: #22c55e;
  font-size: 124px;
  line-height: 0.92;
  letter-spacing: 0;
}

.report-score em {
  display: block;
  color: #2f3b4f;
  font-style: normal;
  font-size: 92px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
}

.score-bar {
  display: grid;
  grid-template-columns: 1fr minmax(120px, 190px) 36px;
  gap: 10px;
  align-items: center;
  max-width: 360px;
  margin: 12px auto 30px;
  color: #94a3b8;
  font-size: 13px;
}

.score-bar i {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6 0%, #84cc16 100%);
}

.report-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid #dce3ee;
  text-align: left;
}

.report-columns h3 {
  margin: 0 0 10px;
  color: #64748b;
  font-size: 14px;
}

.report-columns ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.muted-dot::before,
.hot-dot::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 8px;
  border: 1px solid #aeb9ca;
}

.hot-dot::before {
  background: #ef4444;
  border-color: #ef4444;
}

.dashboard-editor {
  margin-top: 18px;
  border-color: #33415f;
  background: rgba(18, 27, 49, 0.96);
}

.admin-dashboard .section {
  border-color: #33415f;
  background: rgba(18, 27, 49, 0.96);
  color: #e5e7eb;
}

.admin-dashboard .body-text,
.admin-dashboard .paragraph p {
  color: #cbd5e1;
}

.insight-card {
  padding: 18px 20px;
  border-left: 3px solid #21d19f;
}

.insight-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #394663;
  color: #e5e7eb;
  font-size: 15px;
}

.insight-card h3 span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: rgba(33, 209, 159, 0.18);
  color: #21d19f;
  font-size: 12px;
}

.insight-card p {
  margin: 10px 0;
  color: #d7deea;
  font-size: 13px;
  font-weight: 700;
}

.insight-card b {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-right: 8px;
  border: 1px solid rgba(33, 209, 159, 0.5);
  border-radius: 999px;
  color: #21d19f;
  padding: 0 9px;
  font-size: 11px;
}

@media (max-width: 1180px) {
  .dashboard-grid {
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 18px;
  }

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

@media (max-width: 820px) {
  .dashboard-grid,
  .dashboard-right,
  .report-columns {
    grid-template-columns: 1fr;
  }

  .report-score strong {
    font-size: 84px;
  }

  .report-score em {
    font-size: 64px;
  }
}

/* Student PPT-style learning flow */
.student-experience {
  --student-bg: #0a1628;
  --student-panel: #111d35;
  --student-ink: #d7deeb;
  --student-muted: #9ca9c5;
  --student-line: #1e3a5f;
  --student-blue: #4d9fd6;
  --student-navy: #d7deeb;
  background: #0a1628;
  min-height: 100vh;
  color: #d7deeb;
}

/* ── 다크 테마 공통 오버라이드 ── */
.student-experience input,
.student-experience textarea,
.student-experience select {
  background: #0d1a2e;
  border-color: #1e3a5f;
  color: #d7deeb;
}

.student-experience input::placeholder,
.student-experience textarea::placeholder {
  color: #4a5a72;
}

.student-experience .student-topbar {
  background: rgba(10, 22, 40, 0.96);
  border-bottom-color: #1e3a5f;
}

.student-experience .student-topbar .brand strong { color: #4d9fd6; }
.student-experience .student-topbar .brand span   { color: #9ca9c5; }
.student-experience .student-topbar .nav a        { color: #9ca9c5; }
.student-experience .student-topbar .nav a:hover  { color: #d7deeb; }

.student-experience .course-button {
  background: #111d35;
  border-color: #1e3a5f;
  color: #9ca9c5;
}

.student-experience .course-button.active {
  background: rgba(77, 159, 214, 0.15);
  border-color: #4d9fd6;
  color: #4d9fd6;
  box-shadow: 0 0 0 4px rgba(77, 159, 214, 0.1);
}

.student-experience .lesson-picker,
.student-experience .student-card,
.student-experience .student-detail {
  background: #111d35;
  border-color: #1e3a5f;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.student-experience .student-card h2,
.student-experience .student-card h3 { color: #d7deeb; }

.student-experience .lesson-tab {
  background: #0d1a2e;
  border-color: #1e3a5f;
  color: #9ca9c5;
}

.student-experience .lesson-tab.active {
  background: #1d6fa3;
  color: #fff;
  border-color: #1d6fa3;
}

.student-experience .passage-item {
  background: #0d1a2e;
  border-color: #1e3a5f;
  color: #d7deeb;
}

.student-experience .passage-item:hover { background: #162540; }
.student-experience .passage-item.active {
  background: rgba(29, 111, 163, 0.2);
  border-color: #1d6fa3;
}

.student-experience .body-text { color: #c8d4e8; }
.student-experience .muted-text { color: #9ca9c5; }
.student-experience .badge { background: #1e3a5f; color: #9ca9c5; }

.student-experience button:not(.banner-btn):not(.lesson-tab):not(.course-button):not(.secondary):not(.admin-student-btn) {
  background: #1d6fa3;
  color: #fff;
  border: 0;
}

.student-experience button.secondary {
  background: #111d35;
  color: #4d9fd6;
  border: 1px solid #1e3a5f;
}

.student-experience button.secondary:hover { background: #162540; }

.student-experience .score {
  background: #0d1a2e;
  border-color: #1e3a5f;
}

.student-experience .score strong { color: #4d9fd6; }
.student-experience .score span   { color: #9ca9c5; }

.student-experience .feedback-section h4   { color: #9ca9c5; }
.student-experience .feedback-summary-box  { background: #0d1a2e; }
.student-experience .feedback-summary-box h4 { color: #facc15; }
.student-experience .feedback-summary-box p { color: #c8d4e8; }

.student-experience .feedback-praise       { background: #0a1f12; border-color: #22c55e; }
.student-experience .feedback-praise p     { color: #86efac; }
.student-experience .feedback-red-item     { background: #1a0808; border-color: #ef4444; }
.student-experience .feedback-red-header   { color: #f87171; }
.student-experience .feedback-red-missing  { background: #450a0a; color: #fca5a5; }
.student-experience .feedback-red-guide    { background: #0d1117; color: #facc15; }
.student-experience .feedback-improvements li { color: #facc15; }

.student-experience .grade-top  { background: #1a1000; border-color: #f59e0b; }
.student-experience .grade-top .grade-label  { color: #fbbf24; }
.student-experience .grade-mid  { background: #001a0a; border-color: #22c55e; }
.student-experience .grade-mid .grade-label  { color: #4ade80; }
.student-experience .grade-low  { background: #000f1a; border-color: #60a5fa; }
.student-experience .grade-low .grade-label  { color: #93c5fd; }
.student-experience .grade-card .grade-category { color: #6b7a99; }

.student-experience .result-entry      { border-color: #1e3a5f; }
.student-experience .result-transcript { background: #0d1a2e; border-color: #1e3a5f; }
.student-experience .result-transcript p { color: #c8d4e8; }
.student-experience .score-tooltip     { background: #0d1a2e; border: 1px solid #1e3a5f; }

.student-topbar {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--student-line);
  display: none;
}

.student-topbar .brand {
  padding: 0;
}

.student-topbar .brand strong {
  color: #0b6170;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.3px;
}

.student-topbar .brand span {
  color: #697789;
  font-size: 13px;
  font-weight: 700;
}

/* 로그인 후 nav 학생 정보 */
.nav-student-info {
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.nav button.ghost {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--text);
  font-size: 14px;
  padding: 8px 10px;
  height: 36px;
}

/* 학원 배너 */
.student-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0a3d55 0%, #0b6170 45%, #1a4a7a 100%);
  padding: 22px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.student-banner::before {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.student-banner::after {
  content: '';
  position: absolute;
  right: 80px;
  bottom: -60px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.banner-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  color: rgba(255, 255, 255, 0.85);
}

.banner-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.banner-text strong {
  color: #ffffff;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.3px;
}

.banner-text span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 500;
}

.banner-badge {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.banner-student-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.banner-student-info strong {
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
}

.banner-student-info span {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  font-weight: 500;
}

.banner-divider {
  color: rgba(255, 255, 255, 0.35) !important;
  font-weight: 300 !important;
  font-size: 16px !important;
}

.banner-actions {
  display: flex;
  gap: 8px;
}

.banner-btn {
  display: inline-flex;
  align-items: center;
  height: 28px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

.student-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  max-width: 1230px;
  margin: 0 auto;
  padding: 18px 24px 60px;
}

.course-rail {
  display: none;
}

.course-rail-hidden {
  position: sticky;
  top: 78px;
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 690px;
  border: 0;
  border-radius: 8px;
  background: var(--student-panel);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
  padding: 16px 12px;
}

.rail-title {
  color: var(--student-navy);
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 8px;
}

.course-button {
  justify-content: center;
  border: 1px solid var(--student-line);
  background: #f8fafc;
  color: var(--student-ink);
  min-height: 28px;
  border-radius: 5px;
  font-weight: 800;
  font-size: 14px;
  padding: 0 10px;
}

.course-button.active {
  border: 2px solid var(--student-blue);
  background: #eaf1ff;
  color: var(--student-blue);
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.08);
}

.student-main {
  min-width: 0;
}

.student-login-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 320px;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--student-line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.student-login-hero {
  position: relative;
  display: grid;
  align-content: center;
  overflow: hidden;
  border-right: 28px solid #ff8b26;
  background:
    linear-gradient(rgba(174, 130, 76, 0.25), rgba(80, 52, 29, 0.28)),
    linear-gradient(135deg, #d5c0a1 0%, #91745a 42%, #e6d9c2 100%);
}

.student-login-hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0 -8%;
  height: 46%;
  background:
    radial-gradient(ellipse at center, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.15) 54%, transparent 68%),
    repeating-linear-gradient(96deg, rgba(98, 73, 53, 0.3) 0 2px, transparent 2px 18px);
  filter: blur(1px);
  opacity: 0.9;
}

.student-login-panel {
  display: grid;
  align-content: start;
  gap: 20px;
  background: #59646d;
  color: #f8fafc;
  padding: 34px 34px;
}

.student-login-panel .login-box {
  width: 100%;
  margin-bottom: 0;
}

.student-login-panel .login-box h2 {
  font-size: 15px;
}

.student-login-panel .register-box {
  border-top: 1px dotted rgba(255, 255, 255, 0.35);
  padding-top: 16px;
}

.student-login-panel .register-box button {
  width: 100%;
  margin-top: 6px;
}

.student-login-panel .register-box .ghost {
  border-color: transparent;
  background: transparent;
  color: #ffd89e;
}

.student-login-panel .training-icons {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
}

.student-login-panel .always {
  opacity: 0.95;
}

.student-login-shell {
  display: grid;
  grid-template-columns: minmax(450px, 1fr) 360px;
  min-height: 470px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(24, 40, 64, 0.12);
}

.student-login-shell .student-login-hero {
  border-right: 0;
  background:
    linear-gradient(90deg, rgba(13, 20, 32, 0.78), rgba(29, 39, 53, 0.5)),
    linear-gradient(135deg, #d7c4a7 0%, #94775d 44%, #f1e4cf 100%);
}

.student-login-shell .student-login-hero::before {
  height: 42%;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 500px;
  margin: 0 36px;
  color: #ffffff;
}

.hero-copy span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.hero-copy h1 {
  margin: 16px 0 12px;
  font-size: 42px;
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 16px;
  font-weight: 700;
}

.student-login-shell .today-callout {
  max-width: 330px;
  margin: 32px 36px 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #ffffff;
  padding: 15px 18px;
  font-size: 16px;
  line-height: 1.55;
}

.student-login-shell .today-callout p {
  margin: 0;
}

.student-login-shell .student-login-panel {
  gap: 12px;
  background:
    linear-gradient(180deg, #5b6872 0%, #3e4b55 100%);
  padding: 22px 16px;
}

.student-login-card {
  display: grid;
  gap: 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  padding: 16px 14px;
}

.login-title span {
  color: #d7e1ec;
  font-size: 13px;
  font-weight: 800;
}

.login-title h2 {
  margin: 4px 0 0;
  color: #ffffff;
  font-size: 18px;
  letter-spacing: 0;
}

.student-login-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 58px;
  gap: 7px;
  align-items: end;
}

.student-login-row label {
  color: #f1f5f9;
  font-size: 13px;
  font-weight: 800;
}

.student-login-row input,
.register-grid input,
.register-grid select {
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #eef4ff;
  color: #0f172a;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 800;
}

.student-login-row button {
  height: 38px;
  min-height: 38px;
  padding: 0 8px;
  border: 0;
  background: #ff8b26;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 900;
}

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

.remember-fixed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 800;
}

.remember-fixed::before {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: #ff8b26;
  box-shadow: inset 0 0 0 3px #fff4e8;
}

.login-tools button {
  border: 0;
  background: #26323e;
  color: #ffc078;
  min-height: 34px;
  font-size: 13px;
  font-weight: 900;
}

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

.training-launcher {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 0;
  border-radius: 0;
  padding: 0;
  background: #5a656c;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.24);
}

.training-title {
  display: block;
  min-height: 240px;
  padding: 13px 10px 0 14px;
  border-right: 0;
}

.training-title strong {
  color: #ffffff;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 950;
  text-shadow:
    1px 1px 0 rgba(0, 0, 0, 0.38),
    0 2px 4px rgba(0, 0, 0, 0.24);
}

.training-title span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

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

.training-item {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 60px;
  border: 0;
  border-bottom: 1px dotted rgba(22, 28, 32, 0.95);
  border-radius: 0;
  background: transparent;
  color: #202b32;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
}

.training-item b {
  display: grid;
  place-items: center;
}

.training-item svg {
  width: 48px;
  height: 48px;
  fill: none;
  stroke: #2b353b;
  stroke-width: 4.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter:
    drop-shadow(1px 1px 0 rgba(255, 255, 255, 0.13))
    drop-shadow(-1px -1px 0 rgba(0, 0, 0, 0.24));
}

.training-item svg text {
  fill: #2b353b;
  stroke: none;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 900;
}

.training-item span {
  position: absolute;
  inset: 8px 7px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  background: #ff8b26;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.training-item:hover,
.training-item:focus-visible {
  background: transparent;
  transform: none;
}

.training-item:hover span,
.training-item:focus-visible span {
  opacity: 1;
  transform: translateY(0);
}

.student-landing,
.student-detail {
  display: grid;
  gap: 18px;
}

.page-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 300px;
  color: var(--muted);
  font-size: 14px;
}

.page-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.landing-card {
  min-height: 460px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  border: 1px solid var(--student-line);
  border-radius: 24px;
  background: var(--student-panel);
  box-shadow: var(--shadow);
  padding: 54px 36px;
}

.student-mark {
  color: var(--student-blue);
  font-size: 15px;
  font-weight: 900;
  margin-bottom: 24px;
}

.student-label {
  margin: 0 0 12px;
  color: var(--student-muted);
  font-size: 30px;
  font-weight: 800;
}

.landing-card h1 {
  margin: 0;
  color: var(--student-ink);
  font-size: 42px;
  line-height: 1.28;
  letter-spacing: 0;
}

.landing-card h1 strong {
  color: var(--student-blue);
}

.landing-sub {
  max-width: 560px;
  margin: 18px 0 24px;
  color: var(--student-muted);
  font-size: 16px;
  font-weight: 700;
}

.landing-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}

.lesson-picker,
.student-card,
.student-detail {
  border: 1px solid var(--student-line);
  border-radius: 16px;
  background: var(--student-panel);
  box-shadow: var(--shadow);
}

.lesson-picker {
  padding: 22px;
}

.picker-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}

.picker-head p {
  margin: 0 0 4px;
  color: var(--student-muted);
  font-weight: 800;
}

.picker-head h2 {
  margin: 0;
  color: var(--student-ink);
  font-size: 24px;
  letter-spacing: 0;
}

.picker-head span {
  color: var(--student-blue);
  font-weight: 900;
}

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

.lesson-tile {
  display: grid;
  gap: 4px;
  min-height: 88px;
  border-color: var(--student-line);
  background: #f8fafc;
  color: var(--student-ink);
  text-align: left;
  padding: 12px;
}

.lesson-tile b {
  color: var(--student-blue);
  font-size: 20px;
}

.lesson-tile span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--student-muted);
  font-size: 13px;
  line-height: 1.45;
}

.student-detail {
  overflow: visible;
}

.student-detail .detail-body {
  padding: 0 16px 16px;
}

.student-detail .body-text {
  max-height: none;
  overflow: visible;
}

.lesson-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--student-line);
  margin: 16px 16px 0;
}

.lesson-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: none;
  background: #ffffff;
}

.lesson-head p {
  display: none;
}

.lesson-head h1 {
  margin: 0;
  color: var(--student-ink);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
}

.lesson-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 8px 12px 12px;
  border-bottom: none;
  background: #ffffff;
}

.lesson-tabs button {
  border: none;
  background: #f0f4f8;
  color: var(--student-muted);
  font-weight: 900;
}

.lesson-tabs button.active {
  border: none;
  background: var(--student-blue);
  color: #ffffff;
}

.student-card {
  padding: 22px;
}

.student-card h2,
.student-card h3 {
  margin: 0 0 12px;
  color: var(--student-ink);
  letter-spacing: 0;
}

.passage-card h2 {
  font-size: 30px;
}

.lesson-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.lesson-meta span {
  border: 1px solid var(--student-line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--student-muted);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

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

.record-panel {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hanja-section-head {
  padding: 8px 0 4px;
}

.hanja-section-head h2 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 900;
  color: var(--student-ink);
  letter-spacing: 0;
}

.hanja-section-head p {
  margin: 0;
  color: var(--student-muted);
  font-size: 13px;
}

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

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

.hanja-row {
  width: 100%;
  min-height: 112px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid var(--student-line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--student-ink);
  padding: 12px 10px;
  text-align: center;
}

.hanja-row:hover,
.hanja-row:focus-visible {
  border-color: var(--student-blue);
  background: #eef5ff;
}

.hanja-word-text {
  color: var(--student-ink) !important;
  font-size: 22px !important;
  font-weight: 900;
  line-height: 1.2;
}

.hanja-row span {
  color: var(--student-muted);
  font-size: 14px;
  font-style: normal;
}

.hanja-script-text {
  min-height: 22px;
  word-break: keep-all;
}

.hanja-order {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #eaf1ff;
  color: var(--student-blue) !important;
  font-weight: 900;
}

.hanja-card {
  min-height: 150px;
  display: grid;
  align-content: center;
  gap: 8px;
  border-color: var(--student-line);
  background: #f8fafc;
  color: var(--student-ink);
  text-align: center;
}

.hanja-card b {
  font-size: 24px;
}

.hanja-card span,
.hanja-card small {
  color: var(--student-muted);
}

.hanja-detail-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 29px;
  line-height: 1.15;
  margin: 0 0 14px;
}

.hanja-title-word {
  font-size: 29px;
  font-weight: 900;
}

.hanja-title-reading {
  color: inherit;
  font-size: 24px;
  font-weight: 400;
}

.reading-hun {
  font-weight: 400;
}

.reading-eum {
  font-weight: 900;
}

.hanja-char-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.hanja-char-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 184px;
  padding: 12px;
  border: 1px solid var(--student-line);
  border-radius: 8px;
  background: #f8fafc;
  text-align: center;
}

.hanzi-target {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font-size: 56px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 0 0 1px #dbeafe;
}

.hanzi-fallback-char {
  display: block;
  font-size: 58px;
  font-weight: 900;
  line-height: 1;
}

.hanzi-target.is-writing .hanzi-fallback-char {
  animation: hanzi-fallback-write 1.4s steps(12, end) both;
}

@keyframes hanzi-fallback-write {
  0% {
    clip-path: inset(0 100% 0 0);
    opacity: 0.2;
  }
  60% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
  100% {
    clip-path: inset(0 0 0 0);
    opacity: 1;
  }
}

.hanja-char-card span {
  color: var(--student-muted);
  font-size: 16px;
  font-weight: 800;
}

.stroke-play-button {
  min-height: 34px;
  border: 1px solid var(--student-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--student-blue);
  font-weight: 800;
  padding: 6px 10px;
  cursor: pointer;
}

.stroke-play-button:hover,
.stroke-play-button:focus-visible {
  border-color: var(--student-blue);
  background: #eef5ff;
}

.stroke-play-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.result-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cumul-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.cumul-header h2 {
  margin: 0 0 4px;
}

.cumul-overall {
  flex-shrink: 0;
  min-width: 68px;
  text-align: center;
}

.cumul-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cumul-bar-row {
  display: grid;
  grid-template-columns: 80px 1fr 36px;
  align-items: center;
  gap: 12px;
}

.cumul-bar-label {
  font-size: 13px;
  color: var(--student-muted);
  font-weight: 700;
  text-align: right;
}

.cumul-bar-track {
  height: 14px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.cumul-bar-fill {
  height: 100%;
  border-radius: 7px;
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.bar-excellent { background: #4ade80; }
.bar-good      { background: var(--student-blue); }
.bar-ok        { background: #f59e0b; }

.cumul-bar-score {
  font-size: 15px;
  font-weight: 900;
  color: var(--student-ink);
  text-align: right;
}

.result-card-empty {
  min-height: 320px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.result-steps {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px;
}

.result-steps span {
  border-radius: 999px;
  background: #eaf1ff;
  color: var(--student-blue);
  padding: 8px 12px;
  font-weight: 900;
}

.result-entry {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.result-entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.result-attempt {
  font-weight: 700;
  font-size: 15px;
  color: var(--primary);
}

.result-date {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.result-avg {
  min-width: 62px;
  text-align: center;
  flex-shrink: 0;
}

.result-score-grid {
  grid-template-columns: repeat(5, minmax(70px, 1fr));
}

.result-transcript {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
}

.result-transcript summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
  font-size: 13px;
  list-style: none;
}

.result-transcript summary::-webkit-details-marker { display: none; }

.result-transcript summary::before {
  content: '▶ ';
  font-size: 10px;
}

details[open].result-transcript summary::before {
  content: '▼ ';
}

.result-transcript p {
  margin: 10px 0 0;
  line-height: 1.7;
  font-size: 14px;
  color: #374151;
  white-space: pre-wrap;
}

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

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

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

  .student-login-shell {
    grid-template-columns: 1fr;
  }

  .student-login-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .lesson-tabs,
  .student-two,
  .hanja-grid {
    grid-template-columns: 1fr;
  }

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

  .student-page {
    padding: 14px;
  }

  .landing-card h1 {
    font-size: 30px;
  }
}

/* Training-center style login */
.login-experience {
  min-height: 100vh;
  background: #ffffff;
  color: #111827;
}

.login-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  min-height: 160px;
  border-bottom: 1px solid #d6d6d6;
  background: #ffffff;
}

.training-logo {
  display: grid;
  line-height: 1;
}

.training-logo span {
  color: #6b7280;
  font-weight: 900;
  font-size: 18px;
}

.training-logo strong {
  color: #222;
  font-size: 32px;
  letter-spacing: -1px;
}

.login-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0;
}

.login-layout {
  display: grid;
  grid-template-columns: 335px minmax(400px, 1fr) 470px;
  min-height: calc(100vh - 160px);
}

.login-course-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: #111d35;
  padding: 26px 20px;
  border-right: 1px solid #1e3a5f;
}

.login-course-menu h2 {
  width: 100%;
  margin: 0 0 8px;
  padding-bottom: 14px;
  border-bottom: 2px solid #1e3a5f;
  color: #d7deeb;
  text-align: center;
  font-size: 26px;
  letter-spacing: 0;
}

.login-course-menu button {
  width: 128px;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9ca9c5;
  font-size: 16px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}

.login-course-menu button:hover {
  background: rgba(77, 159, 214, 0.12);
  color: #4d9fd6;
}

.login-course-menu button.active {
  border: 2px solid #4d9fd6;
  border-radius: 8px;
  background: rgba(77, 159, 214, 0.22);
  color: #7ecfff;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(77, 159, 214, 0.25), inset 0 0 6px rgba(77, 159, 214, 0.1);
}

.login-hero {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 560px;
  overflow: hidden;
  border-right: 32px solid #ff8b26;
  background:
    linear-gradient(rgba(174, 130, 76, 0.25), rgba(80, 52, 29, 0.28)),
    linear-gradient(135deg, #d5c0a1 0%, #91745a 42%, #e6d9c2 100%);
}

.login-hero::before {
  content: "";
  position: absolute;
  inset: auto 0 0 -8%;
  height: 46%;
  background:
    radial-gradient(ellipse at center, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.15) 54%, transparent 68%),
    repeating-linear-gradient(96deg, rgba(98, 73, 53, 0.3) 0 2px, transparent 2px 18px);
  filter: blur(1px);
  opacity: 0.9;
}

.book-scene {
  position: relative;
  z-index: 1;
  margin-left: 48px;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
}

.book-scene p {
  margin: 0;
  font-size: 42px;
  font-weight: 900;
}

.book-scene strong {
  display: block;
  color: #ffd200;
  font-size: 46px;
  line-height: 1.18;
}

.today-callout {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 36px 34px;
  color: #000;
  font-size: 26px;
}

.today-callout span {
  color: #0c6796;
  font-size: 54px;
}

.today-callout p {
  margin: 0;
}

.today-callout strong {
  font-weight: 500;
}

.student-login-shell .today-callout strong {
  font-weight: 900;
}

.login-actions {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 30px;
}

.login-actions button {
  min-width: 154px;
  min-height: 60px;
  border: 2px solid #092032;
  background: #0c6691;
  color: #ffffff;
  font-size: 18px;
}

.login-actions button.secondary {
  background: #0c6691;
  color: #ffffff;
}

.login-panel {
  background: #59646d;
  color: #f8fafc;
  padding: 32px 40px;
}

.login-box {
  width: 190px;
  margin-bottom: 36px;
}

.login-box h2 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #f8fafc;
}

.login-box input[type="text"],
.login-box input[type="password"],
.login-box input:not([type]) {
  height: 26px;
  margin-bottom: 4px;
  border-radius: 3px;
  background: #e6eef9;
  color: #111827;
}

.login-row {
  display: grid;
  grid-template-columns: 1fr 56px;
  gap: 6px;
  align-items: center;
}

.login-row button {
  min-height: 52px;
  background: #ff8b26;
  border-color: #ff8b26;
  border-radius: 3px;
  font-weight: 900;
}

.remember {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #e5e7eb;
  font-size: 12px;
}

.remember input {
  width: auto;
  height: auto;
}

.parent-link {
  width: 100%;
  min-height: 24px;
  margin-top: 6px;
  border: 0;
  border-radius: 3px;
  background: #38424b;
  color: #ffb05f;
  font-size: 12px;
  font-weight: 900;
}

.login-message {
  min-height: 20px;
  margin: 8px 0 0;
  color: #ffd89e;
  font-size: 12px;
}

.student-login-panel .login-message {
  min-height: 20px;
  margin: 0;
  color: #ffd89e;
  font-size: 13px;
  font-weight: 800;
}

.training-icons {
  display: grid;
  grid-template-columns: repeat(3, 60px);
  gap: 12px 18px;
  width: 230px;
  color: rgba(14, 21, 30, 0.55);
}

.training-icons h3 {
  grid-column: 1 / -1;
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.32);
  color: #ffffff;
  font-size: 16px;
}

.training-icons span {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.24);
  font-size: 26px;
  font-weight: 900;
}

@media (max-width: 1120px) {
  .login-layout {
    grid-template-columns: 240px minmax(360px, 1fr);
  }

  .login-panel {
    grid-column: 1 / -1;
    display: flex;
    gap: 40px;
  }
}

@media (max-width: 780px) {
  .login-header,
  .login-layout,
  .login-panel {
    display: grid;
    grid-template-columns: 1fr;
  }

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

  .login-course-menu h2 {
    grid-column: 1 / -1;
  }

  .login-course-menu button {
    width: 100%;
  }

  .book-scene {
    margin: 34px 24px 0;
  }

  .book-scene p,
  .book-scene strong {
    font-size: 34px;
  }
}

/* Home / login refinement */
.home-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 52px;
}

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 22px;
  align-items: stretch;
}

.home-copy,
.home-board,
.home-flow article {
  border: 1px solid var(--student-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 44px rgba(16, 38, 70, 0.1);
}

.home-copy {
  min-height: 430px;
  display: grid;
  align-content: center;
  padding: 46px;
}

.eyebrow {
  width: fit-content;
  margin: 0 0 18px;
  border: 1px solid rgba(11, 45, 66, 0.16);
  border-radius: 999px;
  background: #eef7f8;
  color: #0b6170;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 900;
}

.home-copy h1 {
  margin: 0;
  color: var(--student-navy);
  font-size: 46px;
  line-height: 1.16;
  letter-spacing: 0;
}

.home-lead {
  max-width: 620px;
  margin: 20px 0 26px;
  color: var(--student-muted);
  font-size: 18px;
  font-weight: 750;
}

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

.home-actions button {
  min-height: 46px;
  border-radius: 7px;
  font-weight: 900;
}

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

.home-board div {
  display: grid;
  align-content: center;
  min-height: 160px;
  border: 1px solid #dce5ef;
  border-radius: 12px;
  background: #f8fbff;
  padding: 20px;
}

.home-board span {
  color: var(--student-muted);
  font-size: 15px;
  font-weight: 900;
}

.home-board strong {
  color: #0b6170;
  font-size: 42px;
  line-height: 1;
}

.home-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.home-flow article {
  padding: 22px;
}

.home-flow article b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #0b6170;
  color: #ffffff;
}

.home-flow article h2 {
  margin: 18px 0 8px;
  color: var(--student-navy);
  font-size: 22px;
  letter-spacing: 0;
}

.home-flow article p {
  margin: 0;
  color: var(--student-muted);
  font-size: 15px;
  font-weight: 750;
}

.login-stage {
  display: grid;
  grid-template-columns: 180px minmax(420px, 1fr) 360px;
  column-gap: 10px;
  max-width: 1230px;
  min-height: 650px;
  margin: 0 auto;
  padding: 18px 24px 44px;
  border-radius: 16px;
  overflow: hidden;
}

.login-course-menu.refined {
  border-right: 0;
  border-radius: 14px;
  box-shadow: 0 16px 34px rgba(16, 38, 70, 0.08);
}

.login-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 32px solid #ff8b26;
  border-radius: 10px 14px 14px 10px;
  background:
    url('/assets/classroom.jpg') center center / cover no-repeat;
}

.login-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.5);
  pointer-events: none;
  z-index: 0;
}

.login-visual > * {
  position: relative;
  z-index: 1;
}

.login-visual::before {
  display: none;
}

.book-scene.refined {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin: 30px 42px 30px 42px;
}

.book-scene.refined span {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  border: 1px solid rgba(12, 59, 94, 0.4);
  border-radius: 999px;
  padding: 0 10px;
  color: #0c3b5e;
  background: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 900;
}

.book-scene.refined h1 {
  margin: 18px 0 20px;
  color: #0c2d4a;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: 0;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

.course-intro-box {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(12, 59, 94, 0.18);
  border-radius: 10px;
  padding: 20px 24px 24px;
  margin-top: auto;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.course-intro-box strong {
  display: block;
  color: #0c4a7a;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 10px;
}

.course-intro-box p,
.course-intro-box div {
  margin: 0;
  color: #183352;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.85;
  word-break: keep-all;
}

.course-grade {
  display: inline-flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(12, 59, 94, 0.12);
  border: 1px solid rgba(12, 59, 94, 0.2);
  color: #0c4a7a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.course-points {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.course-points li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(29, 111, 163, 0.1);
  border: 1px solid rgba(29, 111, 163, 0.25);
  color: #0c4a7a;
  font-size: 12px;
  font-weight: 700;
}

.course-points li::before {
  content: '✓';
  color: #1d6fa3;
  font-size: 11px;
}

.login-actions.refined {
  justify-content: flex-start;
  margin-left: 42px;
}

.login-actions.refined button {
  min-height: 54px;
  border-radius: 7px;
  font-weight: 900;
}

.login-side {
  display: grid;
  align-content: start;
  gap: 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #111d35 0%, #0d1a2e 100%);
  border-left: 1px solid #1e3a5f;
  padding: 22px 16px;
}

.login-box.refined {
  width: 100%;
  display: grid;
  gap: 9px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  padding: 16px 14px;
}

.login-box.refined h2 {
  margin: 0;
  color: #d7e1ec;
  font-size: 13px;
  line-height: 1.45;
}

.login-box.refined h2 strong {
  color: #fff;
  font-size: 18px;
}

.login-box.refined label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #f1f5f9;
  font-size: 13px;
  font-weight: 850;
}

.login-box.refined input,
.login-box.refined select {
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  background: #eef4ff;
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
}

.login-box.refined > button {
  min-height: 40px;
  border: 0;
  border-radius: 4px;
  background: #ff8b26;
  font-size: 15px;
  font-weight: 950;
}

/* Logged-in card on login page */
.logged-in-card {
  text-align: center;
}

.logged-in-card .li-greeting {
  color: #aec6de;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.logged-in-card .li-name {
  color: #fff;
  font-size: 26px;
  font-weight: 950;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}

.logged-in-card .li-meta {
  color: #8faec8;
  font-size: 13px;
  margin-bottom: 6px;
}

.logged-in-card > button {
  width: 100%;
  min-height: 42px;
  font-size: 15px;
  font-weight: 900;
  border: 0;
  border-radius: 6px;
}

.logged-in-card #btnStartDirectly {
  background: #ff8b26;
}

.logged-in-card .li-btn-secondary {
  background: #1e3a5f;
  color: #aed0ef;
}

.logged-in-card .li-btn-logout {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #8faec8;
  font-size: 13px;
  min-height: 34px;
}

/* Autocomplete dropdown on login ID field */
.autocomplete-wrapper {
  position: relative;
  display: block;
}

.autocomplete-wrapper input {
  width: 100%;
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: #1a2e45;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
}

.account-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  gap: 8px;
  color: #d7e1ec;
  font-size: 14px;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

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

.account-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.account-id {
  flex: 1;
}

.login-tools.refined button {
  min-height: 34px;
  border: 0;
  background: #26323e;
  color: #ffc078;
  font-size: 13px;
  font-weight: 900;
}

.training-launcher.refined .training-item b {
  color: #2b353b;
  font-size: 28px;
  font-weight: 950;
  filter:
    drop-shadow(1px 1px 0 rgba(255, 255, 255, 0.13))
    drop-shadow(-1px -1px 0 rgba(0, 0, 0, 0.24));
}

.training-launcher.two-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 16px 18px;
  border-radius: 12px;
}

.training-header {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #e8eef5;
  white-space: nowrap;
  letter-spacing: 0;
}

.training-launcher.two-items .training-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.training-launcher.two-items .training-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 8px 14px;
  min-height: 100px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.training-launcher.two-items .training-item:hover,
.training-launcher.two-items .training-item:active {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}

.training-icon {
  width: 44px;
  height: 44px;
}

.training-launcher.two-items .training-item span {
  position: static;
  opacity: 1;
  transform: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  inset: unset;
  border-radius: 0;
  padding: 0;
}

@media (max-width: 1040px) {
  .home-hero,
  .home-flow,
  .login-stage {
    grid-template-columns: 1fr;
  }

  .login-visual,
  .login-side {
    border-radius: 10px;
  }
}

@media (max-width: 640px) {
  .home-copy {
    min-height: 0;
    padding: 26px;
  }

  .home-copy h1 {
    font-size: 34px;
  }

  .home-board {
    grid-template-columns: 1fr;
  }
}

/* 녹음 팝업 오버레이 */
.recording-popup {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 20, 40, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: popup-fade-in 0.2s ease;
}

@keyframes popup-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.recording-modal {
  background: #ffffff;
  border-radius: 24px;
  padding: 40px 48px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 420px;
  max-width: calc(100vw - 32px);
}

.recording-pulse-ring {
  position: relative;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recording-pulse-ring::before,
.recording-pulse-ring::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(220, 38, 38, 0.2);
  animation: ring-pulse 1.6s ease-out infinite;
}

.recording-pulse-ring::before {
  width: 80px;
  height: 80px;
}

.recording-pulse-ring::after {
  width: 80px;
  height: 80px;
  animation-delay: 0.6s;
}

@keyframes ring-pulse {
  0%   { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.8); opacity: 0; }
}

.recording-dot {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: dot-beat 1.2s ease-in-out infinite;
  z-index: 1;
}

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

.recording-dot svg {
  width: 24px;
  height: 24px;
  color: #ffffff;
}

.recording-timer {
  font-size: 42px;
  font-weight: 800;
  color: #1f2933;
  letter-spacing: 2px;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.recording-label {
  font-size: 15px;
  color: #667085;
  margin: 0;
}

.recording-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.recording-modal .stop-btn {
  flex: 1;
  min-width: 120px;
  background: #dc2626;
  border-color: #dc2626;
  font-size: 15px;
  font-weight: 700;
}

.recording-modal .stop-btn:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.recording-modal .restart-btn {
  flex: 1;
  min-width: 120px;
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #374151;
  font-size: 15px;
  font-weight: 600;
}

.recording-modal .restart-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.recording-live-text {
  width: 100%;
  height: 210px;
  overflow-y: auto;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 14px;
  line-height: 1.7;
  text-align: left;
  word-break: keep-all;
  box-sizing: border-box;
}

.transcript-final {
  color: #1f2933;
}

.transcript-interim {
  color: #94a3b8;
}

.transcript-save-status {
  font-size: 12px;
  color: #22c55e;
  margin: 0;
  height: 16px;
}

/* 지문 하단 버튼 간격 */
.passage-bottom-actions {
  margin-top: 40px;
}

/* 과정 선택 탭 (피커 내부) */
.picker-course-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--student-line);
  background: #f8fafc;
}

.picker-course-tab {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 20px;
  border-color: var(--student-line);
  background: #ffffff;
  color: var(--student-muted);
  font-size: 13px;
  font-weight: 700;
}

.picker-course-tab.active {
  border-color: var(--student-blue);
  background: var(--student-blue);
  color: #ffffff;
}

/* 발문하기 탭 */
.question-intro .passage-title-ref {
  font-weight: 700;
  font-size: 17px;
  color: var(--primary);
  margin: 8px 0 0;
}

.muted-text {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

/* ── Admin 학생 카드 확장 ── */
.admin-student-item {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
}

.admin-student-btn {
  text-align: left;
}

.admin-student-btn .expand-arrow {
  margin-left: auto;
  font-size: 10px;
  color: #4a6080;
}

.admin-student-btn.expanded {
  background: rgba(30, 100, 160, 0.25);
  border-color: #1d6fa3;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.admin-student-actions {
  display: flex;
  flex-direction: row;
  gap: 1px;
  background: #1e3a5f;
  border: 1px solid #1d6fa3;
  border-top: none;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

.admin-action-btn {
  flex: 1;
  border-radius: 0;
  border: none;
  padding: 10px 6px;
  font-size: 13px;
  font-weight: 700;
  min-height: 38px;
  text-align: center;
  cursor: pointer;
}
.admin-action-btn:last-child {
  border-radius: 0 0 8px 8px;
}

.admin-action-session {
  background: #1d6fa3;
  color: #fff;
}

.admin-action-session:hover { background: #1558a0; }

.admin-action-result {
  background: #0d1a2e;
  color: #9ca9c5;
}

.admin-action-result:hover { background: #162035; color: #d7deeb; }

/* ── Admin 발문 세션 오버레이 ── */
.admin-session-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: #0a1020;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  animation: popup-fade-in 0.18s ease;
}

.admin-session-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  background: #111d35;
  border-bottom: 1px solid #1e3a5f;
}

.admin-session-student-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-sess-badge {
  background: #1d6fa3;
  color: #fff;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
}

.admin-sess-name {
  color: #ffffff;
  font-size: 18px;
}

.admin-sess-pace {
  color: #9ca9c5;
  font-size: 13px;
}

.admin-sess-close {
  background: transparent;
  border: 1px solid #1e3a5f;
  color: #9ca9c5;
  font-size: 13px;
  border-radius: 6px;
  padding: 6px 14px;
  min-height: 34px;
  white-space: nowrap;
}

.admin-sess-close:hover { background: rgba(255,255,255,0.06); color: #fff; }

.admin-session-body {
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  padding: 28px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-sess-card {
  background: #111d35;
  border: 1px solid #1e3a5f;
  border-radius: 12px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-sess-card h3 {
  color: #d7deeb;
  font-size: 15px;
  margin: 0;
}

.admin-sess-passage-title {
  color: #60a5fa;
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.admin-sess-muted {
  color: #6b7fa0;
  font-size: 14px;
  margin: 0;
}

.admin-sess-card select,
.admin-sess-card textarea {
  background: #0d1a2e;
  border-color: #1e3a5f;
  color: #d7deeb;
}

.admin-sess-card select option { background: #111d35; }

.admin-sess-course-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.admin-sess-course-btn {
  background: #0d1a2e;
  border: 1px solid #1e3a5f;
  color: #9ca9c5;
  border-radius: 16px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.admin-sess-course-btn:hover {
  background: rgba(30,100,160,0.2);
  border-color: #1d6fa3;
  color: #d7deeb;
}

.admin-sess-course-btn.active {
  background: #1d6fa3;
  border-color: #1d6fa3;
  color: #fff;
  font-weight: 700;
}

.admin-sess-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.admin-sess-left-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-sess-guide-card {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.guide-block {
  margin-bottom: 16px;
}

.guide-block-title {
  font-size: 12px;
  font-weight: 700;
  color: #7ec8e3;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.guide-block-body {
  font-size: 13px;
  color: #c8d4e8;
  line-height: 1.7;
  margin: 0;
  white-space: pre-wrap;
}

@media (max-width: 700px) {
  .admin-sess-two-col { grid-template-columns: 1fr; }
  .admin-sess-guide-card { position: static; max-height: none; }
}

.admin-sess-feedback-result {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid #1e3a5f;
}

.admin-sess-feedback-result h4 {
  color: #d7deeb;
  font-size: 14px;
  margin: 0;
}

/* 녹음 팝업 — admin 발문 세션용 버튼 (연보라) */
.admin-sess-restart-btn {
  flex: 1;
  min-width: 120px;
  background: #8b5cf6 !important;
  border-color: #8b5cf6 !important;
  color: #fff !important;
  font-size: 15px;
  font-weight: 700;
}

.admin-sess-restart-btn:hover {
  background: #7c3aed !important;
  border-color: #7c3aed !important;
}

.admin-sess-stop-btn {
  flex: 1;
  min-width: 120px;
  background: #8b5cf6 !important;
  border-color: #8b5cf6 !important;
  color: #fff !important;
  font-size: 15px;
  font-weight: 700;
}

.admin-sess-stop-btn:hover {
  background: #7c3aed !important;
  border-color: #7c3aed !important;
}

.admin-sess-sync-note {
  color: #4ade80;
  font-size: 13px;
  margin: 0;
  padding: 8px 12px;
  background: rgba(74, 222, 128, 0.08);
  border-radius: 6px;
  border: 1px solid rgba(74, 222, 128, 0.2);
}

/* ── 학생 화면: 새 피드백 알림 배너 ── */
.new-feedback-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1500;
  background: #0f172a;
  border: 1px solid #4ade80;
  border-radius: 12px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: popup-fade-in 0.2s ease;
  white-space: nowrap;
  max-width: calc(100vw - 32px);
}

.new-feedback-banner span {
  color: #4ade80;
  font-size: 14px;
  font-weight: 700;
}

.new-feedback-banner #viewFeedbackBtn {
  background: #4ade80;
  border-color: #4ade80;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  min-height: 32px;
  padding: 0 14px;
}

.new-feedback-banner #dismissFeedbackBtn {
  background: transparent;
  border: 1px solid #1e3a5f;
  color: #9ca9c5;
  font-size: 13px;
  min-height: 32px;
  padding: 0 10px;
}

/* ── 한자 퀴즈 (학생) ─────────────────────────────────────── */

/* 시작 버튼 카드 */
.quiz-start-card { padding: 16px 20px !important; }
.quiz-start-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.quiz-start-info { display: flex; flex-direction: column; gap: 3px; }
.quiz-start-info strong { font-size: 16px; font-weight: 700; color: var(--student-ink); }
.quiz-start-info span   { font-size: 13px; color: #64748b; }
.quiz-start-btn {
  flex-shrink: 0;
  padding: 10px 22px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.quiz-start-btn:hover { background: #2563eb; }

/* 퀴즈 페이지 헤더 */
.quiz-header-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.quiz-back-btn {
  padding: 6px 12px;
  background: transparent;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
}
.quiz-back-btn:hover { background: #f1f5f9; }
.quiz-header-title { margin: 0; font-size: 20px; font-weight: 900; color: var(--student-ink); }
.quiz-header-sub   { margin: 0 0 16px; font-size: 14px; color: #64748b; }

.quiz-result-actions { display: flex; gap: 8px; align-items: center; }
.quiz-back-hanja-btn {
  padding: 9px 16px;
  background: transparent;
  border: 1.5px solid #3b82f6;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #3b82f6;
  cursor: pointer;
}
.quiz-back-hanja-btn:hover { background: #eff6ff; }

.quiz-loading { padding: 20px 0; color: var(--muted); text-align: center; }

.quiz-list { display: flex; flex-direction: column; gap: 20px; padding: 4px 0 16px; }

.quiz-question {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  background: #fff;
  transition: border-color 0.2s;
}
.quiz-q-wrong { border-color: #fca5a5; background: #fff8f8; }

.quiz-q-num {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.quiz-sentence {
  font-size: 17px;
  line-height: 1.6;
  color: #1e293b;
  margin-bottom: 12px;
  font-weight: 500;
}
.quiz-blank {
  display: inline-block;
  min-width: 56px;
  border-bottom: 2.5px solid #3b82f6;
  color: #3b82f6;
  font-weight: 700;
  text-align: center;
  padding: 0 4px;
}

.quiz-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.quiz-choice {
  flex: 1 1 calc(50% - 4px);
  min-width: 80px;
  padding: 9px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, border-color 0.15s;
}
.quiz-choice:last-child { color: #94a3b8; border-style: dashed; }
.quiz-choice:hover:not(:disabled) { background: #e0f2fe; border-color: #7dd3fc; }
.quiz-choice.selected { background: #dbeafe; border-color: #3b82f6; color: #1d4ed8; }
.quiz-choice.correct  { background: #dcfce7; border-color: #22c55e; color: #15803d; }
.quiz-choice.wrong    { background: #fee2e2; border-color: #ef4444; color: #b91c1c; }
.quiz-choice:disabled { cursor: default; }

.quiz-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 4px;
  border-top: 1px solid #e2e8f0;
  margin-top: 8px;
  gap: 12px;
}
.quiz-progress { font-size: 14px; color: #64748b; }

.quiz-submit-btn {
  padding: 10px 24px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.quiz-submit-btn:disabled { background: #cbd5e1; cursor: not-allowed; }
.quiz-submit-btn:not(:disabled):hover { background: #2563eb; }

.quiz-result-score {
  display: flex;
  align-items: center;
  gap: 8px;
}
.quiz-score-icon { font-size: 28px; }
.quiz-score-num  { font-size: 22px; font-weight: 900; color: #1e293b; }
.quiz-score-pct  { font-size: 15px; color: #64748b; }

.quiz-retry-btn {
  padding: 9px 20px;
  background: transparent;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
}
.quiz-retry-btn:hover { background: #f1f5f9; }

/* 다크모드 (학생) */
.student-experience .quiz-start-info strong { color: #d0daf0; }
.student-experience .quiz-start-info span   { color: #6b7a99; }
.student-experience .quiz-back-btn { border-color: #1e3a5f; color: #9ca9c5; }
.student-experience .quiz-back-btn:hover { background: #12192b; }
.student-experience .quiz-header-title { color: #d0daf0; }
.student-experience .quiz-header-sub   { color: #6b7a99; }
.student-experience .quiz-back-hanja-btn { border-color: #3b82f6; color: #60a5fa; }
.student-experience .quiz-back-hanja-btn:hover { background: #1e3a5f; }
.student-experience .quiz-question  { background: #12192b; border-color: #1e3a5f; }
.student-experience .quiz-q-wrong   { background: #1a0808; border-color: #7f1d1d; }
.student-experience .quiz-q-num     { color: #6b7a99; }
.student-experience .quiz-sentence  { color: #d0daf0; }
.student-experience .quiz-blank     { border-color: #60a5fa; color: #60a5fa; }
.student-experience .quiz-choice    { background: #0e172a; border-color: #1e3a5f; color: #c8d4e8; }
.student-experience .quiz-choice:last-child { color: #4a5568; }
.student-experience .quiz-choice:hover:not(:disabled) { background: #1e3a5f; border-color: #3b82f6; }
.student-experience .quiz-choice.selected { background: #1e3a6e; border-color: #3b82f6; color: #93c5fd; }
.student-experience .quiz-choice.correct  { background: #052e16; border-color: #22c55e; color: #86efac; }
.student-experience .quiz-choice.wrong    { background: #450a0a; border-color: #ef4444; color: #fca5a5; }
.student-experience .quiz-footer    { border-color: #1e3a5f; }
.student-experience .quiz-progress  { color: #6b7a99; }
.student-experience .quiz-score-num { color: #d0daf0; }
.student-experience .quiz-score-pct { color: #6b7a99; }
.student-experience .quiz-retry-btn { border-color: #1e3a5f; color: #9ca9c5; }
.student-experience .quiz-retry-btn:hover { background: #12192b; }

/* ── 한자 퀴즈 결과 (어드민) ─────────────────────────────── */
.quiz-admin-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0 6px;
}
.quiz-admin-icon  { font-size: 22px; }
.quiz-admin-score { font-size: 16px; font-weight: 700; color: #1e293b; }
.quiz-admin-time  { font-size: 12px; color: #94a3b8; margin-left: auto; }

.quiz-admin-wrongs { margin-top: 6px; }
.quiz-admin-wrong-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  padding: 5px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}
.quiz-admin-sentence { color: #334155; flex: 1 1 200px; }
.quiz-admin-given    { color: #ef4444; font-weight: 600; white-space: nowrap; }

/* ── 한자 퀴즈 v2 ──────────────────────────────────────────── */
.quiz-page-title { font-size: 20px; font-weight: 900; margin: 0 0 4px; color: var(--student-ink); }
.quiz-page-sub   { font-size: 14px; color: #64748b; margin: 0 0 20px; }

.quiz-fixed-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px;
  background: #fff; border-top: 1px solid #e2e8f0;
  box-shadow: 0 -2px 12px rgba(0,0,0,.08);
}
.quiz-fixed-back-btn {
  font-size: 14px; color: #475569; background: none;
  border: 1px solid #cbd5e1; border-radius: 8px;
  padding: 6px 14px; cursor: pointer; white-space: nowrap;
}
.quiz-fixed-back-btn:hover { background: #f8fafc; }
.quiz-fixed-score { font-size: 15px; font-weight: 700; color: #1e293b; }

#quizContainer { padding-bottom: 72px; }

.quiz-question { padding: 18px 0 14px; border-bottom: 1px solid #e2e8f0; text-align: left; }
.quiz-sentence-line {
  font-size: 16px; line-height: 1.9; color: var(--student-ink);
  margin-bottom: 14px; word-break: keep-all; text-align: left;
}
.quiz-q-label {
  display: inline-block; font-weight: 700;
  position: relative; margin-right: 6px; white-space: nowrap;
}
.q-circle-svg {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 145%; height: 250%;
  pointer-events: none; overflow: visible;
}
.q-circle-svg path {
  stroke-dasharray: 1000; stroke-dashoffset: 1000;
}
.quiz-q-label.is-correct .q-circle-svg path {
  animation: qCircleDraw 0.65s cubic-bezier(.3,0,.2,1) forwards;
}
@keyframes qCircleDraw {
  from { stroke-dashoffset: 1000; }
  to   { stroke-dashoffset: 0; }
}

.quiz-drop-zone {
  display: inline-block; min-width: 72px;
  padding: 1px 12px;
  border: 1.5px solid #94a3b8; border-radius: 6px;
  text-align: center; vertical-align: middle;
  transition: border-color .2s, background .2s;
  cursor: default; line-height: 1.6;
}
.quiz-drop-zone.dz-hover  { border-color: #3b82f6; background: #eff6ff; }
.quiz-drop-zone.ans-ok    { border-color: #22c55e; color: #15803d; background: #f0fdf4; }
.quiz-drop-zone.ans-wrong { border-color: #ef4444; color: #b91c1c; background: #fef2f2; }

.quiz-choices-row { display: flex; flex-wrap: wrap; gap: 8px; }
.quiz-choice-item {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1.5px solid #94a3b8; border-radius: 20px;
  padding: 5px 14px;
  cursor: grab; -webkit-user-select: none; user-select: none; touch-action: none;
  font-size: 15px; color: var(--student-ink); background: #fff;
  transition: border-color .15s, background .15s;
}
.quiz-choice-item:hover:not(.ch-done) { border-color: #3b82f6; background: #eff6ff; }
.quiz-choice-item.ch-active  { border-color: #3b82f6; background: #dbeafe; }
.quiz-choice-item.ch-done    { cursor: default; }
.quiz-choice-item.ch-correct { border-color: #22c55e; }
.quiz-choice-item.ch-wrong   { border-color: #ef4444; }
.ch-num  { font-weight: 600; color: #475569; font-size: 14px; }
.ch-mark { font-size: 17px; margin-left: 1px; }
.quiz-choice-item.ch-correct .ch-mark { color: #dc2626; }
.quiz-choice-item.ch-wrong   .ch-mark { color: #3b82f6; }

.quiz-drag-ghost {
  position: fixed; z-index: 9999;
  padding: 4px 14px;
  border: 2px solid #3b82f6; border-radius: 20px;
  background: #dbeafe; color: #1d4ed8;
  font-size: 15px; font-weight: 600;
  pointer-events: none; transform: rotate(-3deg);
  box-shadow: 0 4px 16px rgba(59,130,246,.25);
}

/* dark mode overrides */
.student-experience .quiz-fixed-bar      { background: #0e172a; border-color: #1e3a5f; box-shadow: 0 -2px 12px rgba(0,0,0,.4); }
.student-experience .quiz-fixed-back-btn { border-color: #1e3a5f; color: #9ca9c5; }
.student-experience .quiz-fixed-back-btn:hover { background: #12192b; }
.student-experience .quiz-fixed-score    { color: #d0daf0; }
.student-experience .quiz-question       { border-color: #1e3a5f; }
.student-experience .quiz-sentence-line  { color: #d0daf0; }
.student-experience .quiz-drop-zone      { border-color: #334155; color: #94a3b8; }
.student-experience .quiz-drop-zone.dz-hover  { border-color: #3b82f6; background: #1e3a5f; }
.student-experience .quiz-drop-zone.ans-ok    { border-color: #22c55e; color: #86efac; background: #052e16; }
.student-experience .quiz-drop-zone.ans-wrong { border-color: #ef4444; color: #fca5a5; background: #450a0a; }
.student-experience .quiz-choice-item    { border-color: #1e3a5f; color: #c8d4e8; background: #0e172a; }
.student-experience .quiz-choice-item:hover:not(.ch-done) { border-color: #3b82f6; background: #1e3a5f; }
.student-experience .quiz-choice-item.ch-active  { border-color: #3b82f6; background: #1e3a6e; }
.student-experience .quiz-choice-item.ch-correct { border-color: #22c55e; }
.student-experience .quiz-choice-item.ch-wrong   { border-color: #ef4444; }
.student-experience .ch-num { color: #6b7a99; }

/* ── 한자 퀴즈 결과 팝업 모달 ───────────────────────────────── */
.quiz-modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
}
.quiz-modal-box {
  background: #fff; border-radius: 20px;
  padding: 36px 28px 24px;
  width: 300px; max-width: 90vw;
  text-align: center; position: relative;
  box-shadow: 0 24px 64px rgba(0,0,0,.22);
  animation: modalPop .25s cubic-bezier(.4,0,.2,1);
}
@keyframes modalPop {
  from { transform: scale(.88); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.quiz-modal-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; font-size: 20px;
  color: #94a3b8; cursor: pointer; line-height: 1; padding: 2px 4px;
}
.quiz-modal-close:hover { color: #475569; }
.quiz-modal-icon  { font-size: 52px; margin-bottom: 6px; }
.quiz-modal-score { font-size: 40px; font-weight: 900; color: #1e293b; line-height: 1.1; }
.quiz-modal-pct   { font-size: 18px; font-weight: 700; color: #64748b; margin: 4px 0 6px; }
.quiz-modal-msg   { font-size: 15px; color: #475569; margin-bottom: 22px; }
.quiz-modal-result-btn {
  display: block; width: 100%; padding: 13px;
  background: #3b82f6; color: #fff;
  border: none; border-radius: 12px;
  font-size: 15px; font-weight: 700; cursor: pointer;
}
.quiz-modal-result-btn:hover { background: #2563eb; }

.student-experience .quiz-modal-box     { background: #0e172a; border: 1px solid #1e3a5f; }
.student-experience .quiz-modal-score   { color: #d0daf0; }
.student-experience .quiz-modal-pct    { color: #6b7a99; }
.student-experience .quiz-modal-msg     { color: #9ca9c5; }
.student-experience .quiz-modal-close   { color: #334155; }
.student-experience .quiz-modal-close:hover { color: #9ca9c5; }

/* ── 결과탭 한자 퀴즈 카드 (학생) ───────────────────────────── */
.quiz-result-student-title { font-size: 15px; font-weight: 800; margin: 0 0 10px; }
.quiz-result-student-empty { font-size: 14px; color: #94a3b8; text-align: center; padding: 8px 0; }
