:root {
  color-scheme: light;
  --bg: #f6f3fa;
  --panel: #ffffff;
  --panel-soft: #faf8fd;
  --line: #e7deef;
  --line-strong: #d4c4e4;
  --text: #24192f;
  --muted: #6f6378;
  --purple: #6f2dbd;
  --purple-dark: #4b1687;
  --purple-soft: #f1e9fb;
  --ink-soft: #f8f7fb;
  --blue-soft: #eef3ff;
  --blue-line: #cbd8ff;
  --mint-soft: #edf9f5;
  --mint-line: #bde8d8;
  --teal: #168c7a;
  --danger: #c93535;
  --shadow: 0 18px 48px rgba(50, 31, 79, 0.08);
  --shadow-soft: 0 10px 24px rgba(50, 31, 79, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  height: 100%;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, #ffffff 0, var(--bg) 260px),
    var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 38px;
  border: 1px solid #d8cce4;
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  padding: 0 14px;
  font-weight: 800;
  box-shadow: 0 1px 0 rgba(36, 25, 47, 0.04);
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

button:hover:not(:disabled) {
  border-color: #b99bd6;
  box-shadow: 0 8px 18px rgba(75, 22, 135, 0.1);
  transform: translateY(-1px);
}

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

button.primary {
  color: #fff;
  border-color: var(--purple);
  background: linear-gradient(180deg, #7b38c8, var(--purple-dark));
  box-shadow: 0 10px 22px rgba(111, 45, 189, 0.22);
}

button.primary:hover:not(:disabled) {
  background: var(--purple-dark);
}

input,
select {
  width: 100%;
  height: 38px;
  border: 1px solid #d9cfe6;
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--text);
}

input:focus,
select:focus {
  outline: 0;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(111, 45, 189, 0.12);
}

.app-shell {
  min-height: 100vh;
  padding: 22px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 86px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(111, 45, 189, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 290px;
}

.brand-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(111, 45, 189, 0.18);
  box-shadow: var(--shadow-soft);
}

.brand-block h1 {
  margin: 0;
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: 0;
}

.brand-block p {
  display: inline-flex;
  margin: 6px 0 0;
  min-height: 24px;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  color: #4b1687;
  background: #f5f0fb;
  border: 1px solid #e4d8f0;
  font-size: 13px;
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.bu-field,
.password-field,
.api-field,
.duration-field {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.bu-field {
  width: 132px;
}

.password-field {
  width: 132px;
}

.api-field {
  width: min(280px, 28vw);
}

.duration-field {
  width: 118px;
}

.review-toggle {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.review-toggle input {
  width: 16px;
  height: 16px;
}

.home-return-btn {
  display: none;
  color: #4b1687;
  border-color: #d8c4ef;
  background:
    linear-gradient(180deg, #ffffff, #faf6ff);
  box-shadow: 0 8px 18px rgba(75, 22, 135, 0.08);
}

.home-return-btn::before {
  content: "‹";
  display: inline-block;
  margin-right: 6px;
  font-size: 19px;
  line-height: 1;
  transform: translateY(-1px);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(420px, 1fr) minmax(300px, 360px);
  gap: 16px;
  align-items: stretch;
}

.panel {
  min-height: 120px;
  border: 1px solid rgba(111, 45, 189, 0.12);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 16px 15px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.panel-heading h2 {
  margin: 2px 0 0;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
}

.eyebrow {
  color: #7a668f;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.hidden-field {
  display: none;
}

.is-hidden {
  display: none !important;
}

.login-screen {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
  overflow: hidden;
  padding: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(111, 45, 189, 0.14), transparent 28%),
    radial-gradient(circle at 76% 16%, rgba(34, 211, 238, 0.1), transparent 24%),
    linear-gradient(135deg, #ffffff 0%, #fbf9ff 42%, #f3edff 100%);
}

.login-screen::before,
.login-screen::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.login-screen::before {
  inset: 64px 0 0;
  opacity: 0.64;
  background:
    linear-gradient(90deg, rgba(111, 45, 189, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(111, 45, 189, 0.08) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: linear-gradient(110deg, #000 0%, transparent 66%);
}

.login-screen::after {
  left: -8vw;
  bottom: -22vh;
  width: 72vw;
  height: 52vh;
  border: 1px solid rgba(111, 45, 189, 0.12);
  border-radius: 50%;
  transform: rotate(-8deg);
  background:
    repeating-linear-gradient(96deg, rgba(111, 45, 189, 0.18) 0 1px, transparent 1px 24px);
  opacity: 0.42;
}

.login-topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 clamp(24px, 4vw, 56px);
  border-bottom: 1px solid rgba(111, 45, 189, 0.1);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #161020;
  font-size: 18px;
  font-weight: 900;
  white-space: nowrap;
}

.login-brand .brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  box-shadow: none;
}

.login-brand span {
  width: 1px;
  height: 20px;
  background: #d7cbe7;
}

.login-brand b {
  color: #2e2738;
  font-size: 16px;
  letter-spacing: 0;
}

.help-link {
  min-height: 36px;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--purple);
  font-size: 15px;
}

.help-link:hover:not(:disabled) {
  border-color: transparent;
  box-shadow: none;
  background: rgba(111, 45, 189, 0.06);
}

.login-layout {
  position: relative;
  z-index: 1;
  width: min(1500px, calc(100% - 72px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(540px, 1fr) minmax(420px, 520px);
  gap: clamp(36px, 6vw, 88px);
  align-items: center;
  padding: 28px 0 34px;
}

.login-panel {
  position: relative;
  min-height: 450px;
  display: grid;
  align-content: center;
  gap: 46px;
}

.tech-mark {
  position: absolute;
  left: -7%;
  top: 6%;
  width: 82%;
  aspect-ratio: 1.5;
  border: 1px solid rgba(111, 45, 189, 0.16);
  border-radius: 50%;
  transform: rotate(-13deg);
  opacity: 0.48;
  background:
    linear-gradient(90deg, transparent 0 23px, rgba(111, 45, 189, 0.13) 24px),
    linear-gradient(0deg, transparent 0 23px, rgba(111, 45, 189, 0.13) 24px);
  background-size: 24px 24px;
  mask-image: radial-gradient(circle at 45% 52%, #000 0%, transparent 70%);
}

.login-hero-copy,
.login-role-strip {
  position: relative;
  z-index: 1;
}

.login-hero-copy h1 {
  margin: 0;
  color: #241734;
  font-size: clamp(42px, 4vw, 68px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: 0;
  white-space: nowrap;
}

.login-hero-copy h1 span {
  color: var(--purple);
}

.login-hero-copy p {
  position: relative;
  margin: 26px 0 0;
  padding-left: 54px;
  color: #453a51;
  font-size: clamp(22px, 2.2vw, 34px);
  font-weight: 700;
  letter-spacing: 0;
}

.login-hero-copy p::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--purple), #a985ff);
  transform: translateY(-50%);
}

.login-card {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: clamp(28px, 2.8vw, 40px);
  border: 1px solid rgba(111, 45, 189, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 28px 70px rgba(52, 35, 78, 0.14);
  backdrop-filter: blur(18px);
}

.login-card h2 {
  margin: 0;
  color: #22172f;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: 0;
}

.login-card label {
  display: grid;
  gap: 9px;
  color: #4c405b;
  font-size: 14px;
  font-weight: 900;
}

.login-card input,
.login-card select {
  height: 52px;
  border-color: #dcd5e6;
  padding: 0 18px;
  background: rgba(255, 255, 255, 0.92);
  color: #23172e;
  font-size: 15px;
}

.login-card button {
  height: 52px;
  margin-top: 4px;
  font-size: 18px;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #70667b;
  font-size: 14px;
}

.login-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #51465e;
  font-size: 14px;
  font-weight: 800;
}

.login-options input {
  width: 18px;
  height: 18px;
  accent-color: var(--purple);
}

.login-hint {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #7a7186;
  font-size: 14px;
  font-weight: 700;
}

.login-hint span {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(111, 45, 189, 0.28);
  border-radius: 50%;
  background:
    linear-gradient(135deg, transparent 44%, var(--purple) 45% 55%, transparent 56%),
    linear-gradient(45deg, transparent 48%, var(--purple) 49% 59%, transparent 60%);
  opacity: 0.72;
}

.login-hint p {
  margin: 0;
}

.login-role-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 210px));
  gap: 22px;
}

.login-role-strip div {
  min-height: 124px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 22px;
  border: 1px solid rgba(111, 45, 189, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 16px 36px rgba(52, 35, 78, 0.07);
  backdrop-filter: blur(12px);
}

.login-role-strip i {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 6px;
  border: 2px solid rgba(111, 45, 189, 0.68);
  border-radius: 8px;
  color: var(--purple-dark);
  background: #f7f2ff;
  font-style: normal;
  font-size: 15px;
  font-weight: 950;
}

.login-role-strip strong {
  color: #20152c;
  font-size: 17px;
  line-height: 1.35;
}

.login-role-strip span {
  color: #7a7086;
  font-size: 13px;
  line-height: 1.5;
}

@media (prefers-reduced-motion: no-preference) {
  .tech-mark {
    animation: techDrift 12s ease-in-out infinite alternate;
  }
}

@keyframes techDrift {
  from {
    transform: rotate(-13deg) translate3d(0, 0, 0);
  }
  to {
    transform: rotate(-10deg) translate3d(18px, -8px, 0);
  }
}

.task-panel,
.report-panel {
  min-height: calc(100vh - 128px);
}

.scenario-intro {
  padding: 16px;
  color: var(--muted);
  line-height: 1.58;
}

.brief-title {
  margin-bottom: 12px;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.brief-grid {
  display: grid;
  gap: 10px;
}

.brief-grid div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.brief-grid strong {
  font-size: 12px;
  color: var(--purple);
}

.brief-grid span {
  color: var(--text);
  line-height: 1.5;
}

.brief-task {
  margin-top: 12px;
  padding: 12px;
  border-left: 3px solid var(--purple);
  border-radius: 8px;
  color: var(--purple-dark);
  background: var(--purple-soft);
  font-weight: 800;
}

.brief-task.compact {
  font-size: 13px;
  line-height: 1.55;
}

.bu-context {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.context-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.context-metrics div {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.context-metrics strong {
  display: block;
  color: var(--purple-dark);
  font-size: 18px;
  line-height: 1.2;
}

.context-metrics span,
.context-row {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.context-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  margin-top: 7px;
}

.context-row b {
  color: var(--purple);
}

.habit-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.session-timer {
  min-width: 82px;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--purple-dark);
  background: #fff;
  font-size: 20px;
  font-weight: 900;
}

.session-timer.warning {
  color: var(--danger);
  border-color: #f0b8b8;
  background: #fff4f4;
}

.dialogue-panel {
  min-height: calc(100vh - 128px);
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.dialogue-title {
  background: linear-gradient(180deg, #fff, #fcfaff);
}

.listening-pill {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--teal);
  background: var(--mint-soft);
  border: 1px solid var(--mint-line);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.transcript {
  padding: 16px;
  overflow-y: auto;
  max-height: calc(100vh - 268px);
}

.turn {
  margin-bottom: 14px;
  display: grid;
  gap: 5px;
}

.speaker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.bubble {
  border-radius: 8px;
  padding: 11px 13px;
  line-height: 1.6;
  border: 1px solid var(--line);
  background: #fbfcff;
  white-space: pre-wrap;
}

.turn.sales .bubble {
  background: var(--blue-soft);
  border-color: var(--blue-line);
}

.turn.ai .bubble {
  background: var(--mint-soft);
  border-color: var(--mint-line);
}

.event-line {
  margin: 9px 0;
  padding-left: 10px;
  border-left: 2px solid var(--line-strong);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.voice-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--panel-soft);
}

.voice-bar strong,
.voice-bar span {
  display: block;
}

.voice-bar strong {
  font-size: 13px;
}

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

.wave {
  display: flex;
  align-items: center;
  gap: 3px;
  width: 44px;
  height: 28px;
}

.wave span {
  width: 5px;
  border-radius: 999px;
  background: var(--purple);
}

.wave span:nth-child(1) { height: 10px; opacity: 0.45; }
.wave span:nth-child(2) { height: 18px; opacity: 0.7; }
.wave span:nth-child(3) { height: 26px; }
.wave span:nth-child(4) { height: 16px; opacity: 0.65; }
.wave span:nth-child(5) { height: 22px; opacity: 0.85; }

.report-panel .panel-heading {
  padding-bottom: 14px;
}

.report-empty {
  padding: 16px;
  color: var(--muted);
  line-height: 1.65;
}

.report-panel p {
  margin: 0 0 12px;
  line-height: 1.6;
}

.recording-link,
.sync-ok,
.sync-fail {
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.recording-link {
  color: var(--purple-dark);
  background: var(--purple-soft);
  border: 1px solid var(--line-strong);
}

.recording-link a {
  color: var(--purple);
}

.sync-ok {
  color: var(--teal);
  background: var(--mint-soft);
  border: 1px solid var(--mint-line);
}

.sync-fail {
  color: var(--danger);
  background: #fff4f4;
  border: 1px solid #f0b8b8;
}

.report-panel h2 {
  margin: 14px 0 8px;
  font-size: 16px;
  letter-spacing: 0;
}

.dimension {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  line-height: 1.5;
}

.report-context {
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--purple-soft);
}

.report-context p {
  margin: 8px 0 0;
  color: var(--purple-dark);
  font-size: 13px;
}

.report-context b {
  display: inline-block;
  min-width: 38px;
  margin-right: 6px;
}

.answer-key {
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid #d7c3ff;
  border-radius: 8px;
  background: #fbf8ff;
}

.answer-key p {
  margin: 8px 0 0;
  color: var(--text);
  font-size: 13px;
}

.answer-key b {
  display: inline-block;
  min-width: 86px;
  margin-right: 6px;
  color: var(--purple-dark);
}

.exam-report {
  display: grid;
  gap: 12px;
}

.exam-report-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid rgba(124, 58, 237, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(74, 29, 131, 0.96), rgba(32, 23, 43, 0.96)),
    var(--purple-dark);
  color: #fff;
}

.exam-report-hero.warning {
  background: linear-gradient(135deg, #5b3514, #25180f);
}

.exam-report-hero.danger {
  background: linear-gradient(135deg, #5b1720, #261015);
}

.exam-report-hero .eyebrow {
  color: rgba(255, 255, 255, 0.62);
}

.exam-report-hero h2 {
  margin: 4px 0 0;
  color: #fff;
  font-size: 44px;
  line-height: 1;
}

.exam-report-hero h2 small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 18px;
}

.exam-report-hero p {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
}

.exam-score-ring {
  --score: 0;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #20172b 58%, transparent 60%),
    conic-gradient(#c4b5fd calc(var(--score) * 1%), rgba(255, 255, 255, 0.14) 0);
}

.exam-score-ring span {
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.exam-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.exam-kpis div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.exam-kpis span,
.exam-dimension-row span,
.exam-detail-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.exam-kpis strong {
  color: var(--text);
  font-size: 18px;
}

.exam-insight {
  display: grid;
  gap: 7px;
  padding: 11px;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 8px;
  background: #fbfaff;
}

.exam-insight p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.exam-insight b {
  display: inline-block;
  min-width: 54px;
  color: var(--purple-dark);
}

.exam-section-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.exam-dimensions {
  display: grid;
  gap: 9px;
}

.exam-dimension-row {
  display: grid;
  gap: 6px;
}

.exam-dimension-row div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.exam-dimension-row strong {
  color: var(--text);
  font-size: 13px;
}

.exam-dimension-row i {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #eee8f6;
}

.exam-dimension-row em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple-dark), #8b5cf6);
}

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

.exam-question-nav button {
  min-height: 28px;
  padding: 0;
  border-color: var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
}

.exam-question-nav button.low {
  border-color: #f4b4b4;
  color: #a42525;
  background: #fff7f7;
}

.exam-question-nav button.active {
  border-color: var(--purple);
  color: #fff;
  background: var(--purple);
}

.exam-detail-pane {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.exam-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.exam-detail-head strong {
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 13px;
}

.exam-detail-head strong.good {
  color: #126b5f;
  background: var(--mint-soft);
}

.exam-detail-head strong.mid {
  color: #85550c;
  background: #fff7df;
}

.exam-detail-head strong.low {
  color: #a42525;
  background: #fff0f0;
}

.exam-detail-block {
  display: grid;
  gap: 5px;
}

.exam-detail-block b {
  color: var(--purple-dark);
  font-size: 12px;
}

.exam-detail-block p,
.exam-standard-answer p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
}

.exam-point-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.exam-point-list span {
  padding: 4px 7px;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 7px;
  color: var(--purple-dark);
  background: var(--purple-soft);
  font-size: 12px;
  font-weight: 800;
}

.exam-feedback {
  padding: 10px;
  border-left: 3px solid var(--purple);
  border-radius: 7px;
  color: var(--text);
  background: var(--panel-soft);
  font-size: 13px;
  line-height: 1.6;
}

.exam-standard-answer {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.exam-standard-answer summary {
  color: var(--purple-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.exam-standard-answer p {
  margin-top: 8px;
  color: var(--muted);
}

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

.dimension b {
  display: inline-block;
  min-width: 38px;
  margin-right: 6px;
  color: var(--purple-dark);
}

.score {
  float: right;
  color: var(--purple);
  font-weight: 900;
}

.annotation {
  border-top: 1px solid var(--line);
  padding: 10px 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}

.annotation-head {
  color: var(--purple);
  font-weight: 900;
}

.annotation-text {
  margin-top: 5px;
  padding: 8px;
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
}

.annotation-suggestion {
  margin-top: 6px;
  color: var(--muted);
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: minmax(260px, 320px) 1fr;
  }

  .report-panel {
    grid-column: 1 / -1;
    min-height: 260px;
  }
}

@media (max-width: 820px) {
  .app-shell {
    padding: 12px;
  }

  .app-header {
    align-items: stretch;
    flex-direction: column;
  }

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

  .brand-block h1 {
    font-size: 21px;
  }

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

  .api-field {
    width: auto;
    grid-column: 1 / -1;
  }

  .bu-field {
    width: auto;
  }

  .password-field {
    width: auto;
  }

  .review-toggle {
    justify-content: center;
  }

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

  .task-panel,
  .dialogue-panel,
  .report-panel {
    min-height: auto;
  }

  .transcript {
    min-height: 360px;
    max-height: 520px;
  }

  .voice-bar {
    grid-template-columns: auto 1fr;
  }

  .voice-bar button {
    grid-column: 1 / -1;
  }
}

.training-shell {
  display: grid;
  grid-template-rows: auto auto;
  gap: 18px;
  height: auto;
  min-height: 720px;
  overflow: visible;
}

.training-header {
  align-items: center;
  margin-bottom: 0;
}

.context-field {
  display: grid;
  gap: 5px;
  width: 158px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.homeroom-dashboard {
  position: relative;
  min-height: calc(100vh - 150px);
  display: none;
  place-items: center;
  overflow: hidden;
  padding: clamp(28px, 5vw, 72px);
  border: 1px solid rgba(111, 45, 189, 0.12);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 24%, rgba(111, 45, 189, 0.14), transparent 26%),
    radial-gradient(circle at 78% 16%, rgba(20, 184, 166, 0.1), transparent 22%),
    linear-gradient(135deg, #ffffff 0%, #fbf9ff 44%, #f2ecff 100%);
  box-shadow: var(--shadow);
}

.homeroom-dashboard::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(111, 45, 189, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(111, 45, 189, 0.06) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(120deg, #000 0%, transparent 70%);
  pointer-events: none;
}

.teacher-orb {
  position: absolute;
  left: 6%;
  bottom: -18%;
  width: min(520px, 42vw);
  aspect-ratio: 1;
  border: 1px solid rgba(111, 45, 189, 0.14);
  border-radius: 50%;
  opacity: 0.5;
  background:
    repeating-linear-gradient(105deg, rgba(111, 45, 189, 0.16) 0 1px, transparent 1px 22px);
}

.teacher-orb span {
  position: absolute;
  inset: 20%;
  border: 1px solid rgba(111, 45, 189, 0.14);
  border-radius: 50%;
}

.teacher-card {
  position: relative;
  z-index: 1;
  width: min(860px, 100%);
  display: grid;
  gap: 16px;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid rgba(111, 45, 189, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 28px 70px rgba(52, 35, 78, 0.14);
  backdrop-filter: blur(16px);
}

.teacher-dialog {
  display: grid;
  grid-template-rows: auto minmax(360px, 1fr) auto;
}

.teacher-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(111, 45, 189, 0.12);
}

.teacher-dialog-head strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.teacher-chat {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 360px;
  max-height: min(55vh, 520px);
  overflow-y: auto;
  padding: 8px 2px;
}

.teacher-message {
  display: grid;
  gap: 6px;
  max-width: min(680px, 88%);
}

.teacher-message span {
  color: #8a7a94;
  font-size: 12px;
  font-weight: 900;
}

.teacher-message p {
  margin: 0;
  white-space: pre-line;
  padding: 16px 18px;
  border-radius: 8px;
  color: #3b2d4a;
  background: #f8f4fd;
  border: 1px solid #e3d8ec;
  font-size: 16px;
  font-weight: 750;
  line-height: 1.75;
}

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

.teacher-message.user p {
  color: #fff;
  background: linear-gradient(180deg, #7b38c8, var(--purple-dark));
  border-color: transparent;
  box-shadow: 0 14px 28px rgba(111, 45, 189, 0.18);
}

.teacher-message.assistant p {
  box-shadow: 0 12px 30px rgba(52, 35, 78, 0.08);
}

.teacher-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.teacher-command input {
  height: 46px;
  padding: 0 14px;
  background: #fff;
}

.teacher-command button {
  height: 46px;
  min-width: 86px;
}

.training-shell.home-mode .homeroom-dashboard {
  display: grid;
}

.training-shell.home-mode .training-layout {
  display: none;
}

.training-shell.work-mode .homeroom-dashboard,
.training-shell.archive-mode .homeroom-dashboard {
  display: none;
}

.training-shell.work-mode .home-return-btn,
.training-shell.archive-mode .home-return-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.training-shell.work-mode .training-layout {
  grid-template-columns: minmax(0, 1120px);
  justify-content: center;
}

.training-shell.work-mode .plan-panel,
.training-shell.work-mode .record-panel {
  display: none;
}

.training-shell.work-mode .module-tabs {
  display: none;
}

.training-shell.archive-mode .training-layout {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
}

.training-shell.archive-mode .plan-panel,
.training-shell.archive-mode .training-main {
  display: none;
}

.training-shell.archive-mode .record-panel {
  display: flex;
}

.training-shell.home-mode .homeroom-dashboard,
.training-shell.work-mode .homeroom-dashboard,
.training-shell.archive-mode .homeroom-dashboard {
  display: none;
}

.training-shell.home-mode .training-layout,
.training-shell.work-mode .training-layout,
.training-shell.archive-mode .training-layout {
  display: grid;
  grid-template-columns: minmax(272px, 318px) minmax(580px, 1fr) minmax(310px, 368px);
  justify-content: stretch;
}

.training-shell.work-mode .plan-panel,
.training-shell.work-mode .record-panel,
.training-shell.archive-mode .plan-panel,
.training-shell.archive-mode .training-main,
.training-shell.archive-mode .record-panel {
  display: flex;
}

.training-shell.work-mode .module-tabs,
.training-shell.archive-mode .module-tabs {
  display: grid;
}

.training-shell.archive-mode .training-main {
  display: grid;
}

.training-shell .home-return-btn {
  display: none !important;
}

.training-layout {
  display: grid;
  grid-template-columns: minmax(272px, 318px) minmax(580px, 1fr) minmax(310px, 368px);
  gap: 18px;
  align-items: start;
  min-height: 0;
  overflow: visible;
}

.plan-panel,
.record-panel,
.training-main {
  min-height: 0;
  height: auto;
}

.plan-panel,
.record-panel {
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.plan-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  align-content: start;
}

.status-pill {
  padding: 6px 11px;
  border-radius: 999px;
  color: var(--purple-dark);
  background: #f6f0fb;
  border: 1px solid #dfd0eb;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.plan-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.plan-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e3d8ec;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, #fbf9fd),
    #fff;
  box-shadow: var(--shadow-soft);
}

.plan-overview div {
  display: grid;
  gap: 4px;
}

.plan-overview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.plan-overview strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.35;
}

.plan-overview em {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #d8c6e8;
  border-radius: 50%;
  color: var(--purple-dark);
  background: radial-gradient(circle at center, #fff 54%, #f0e7f8 56%);
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
}

.homeroom-card,
.profile-card {
  flex: 0 0 auto;
  display: grid;
  gap: 11px;
  margin: 0 14px 14px;
  padding: 15px;
  border: 1px solid rgba(111, 45, 189, 0.16);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  position: relative;
}

.homeroom-card::before,
.profile-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--purple), #a855f7);
}

.homeroom-card strong,
.profile-card strong {
  color: var(--purple-dark);
  font-size: 15px;
  line-height: 1.4;
}

.homeroom-card p,
.profile-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.homeroom-action {
  padding: 10px 11px;
  border: 1px solid #e4d8f0;
  border-radius: 6px;
  color: var(--purple-dark);
  background: #f8f5fb;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
}

.homeroom-meta {
  display: grid;
  gap: 8px;
}

.homeroom-meta div {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid #eee6f5;
  border-radius: 6px;
  background: #fbfafc;
}

.homeroom-meta span {
  color: #8a7a94;
  font-size: 11px;
  font-weight: 900;
}

.homeroom-meta b {
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}

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

.homeroom-roles span {
  min-width: 0;
  padding: 7px 4px;
  border-radius: 6px;
  color: #fff;
  background: linear-gradient(180deg, #7b38c8, var(--purple-dark));
  text-align: center;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.homeroom-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.homeroom-tags span {
  padding: 5px 8px;
  border: 1px solid #e2d7ed;
  border-radius: 999px;
  color: var(--purple-dark);
  background: #fbf9fd;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.profile-card {
  margin-top: 0;
  border-color: rgba(111, 45, 189, 0.14);
  background: #fff;
  max-height: none;
  overflow: visible;
}

.profile-card b {
  display: inline-block;
  min-width: 42px;
  margin-right: 6px;
  color: var(--text);
  font-size: 12px;
}

.profile-radar {
  display: grid;
  place-items: center;
  padding: 2px 0 0;
}

.profile-radar svg {
  width: min(100%, 168px);
  height: auto;
  overflow: visible;
}

.profile-radar text {
  fill: #7b6d86;
  font-size: 8px;
  font-weight: 800;
}

.radar-grid {
  fill: rgba(111, 45, 189, 0.04);
  stroke: rgba(111, 45, 189, 0.16);
  stroke-width: 1;
}

.radar-grid.inner {
  fill: rgba(111, 45, 189, 0.03);
}

.radar-fill {
  fill: rgba(111, 45, 189, 0.2);
  stroke: none;
}

.radar-line {
  fill: none;
  stroke: var(--purple);
  stroke-width: 2;
  stroke-linejoin: round;
}

.practice-session-grid {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(210px, 0.78fr) minmax(260px, 1fr);
  gap: 14px;
}

.practice-live-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #e2d8ec;
  border-radius: 8px;
  background: #fff;
}

.practice-live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #fbf9fd);
}

.practice-live-head strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 16px;
}

.practice-live-head > span {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 24px;
  border: 1px solid var(--mint-line);
  border-radius: 999px;
  color: var(--teal);
  background: var(--mint-soft);
  font-size: 11px;
  font-weight: 900;
}

.practice-live-log {
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
  background:
    linear-gradient(90deg, rgba(111, 45, 189, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(111, 45, 189, 0.035) 1px, transparent 1px),
    #fff;
  background-size: 34px 34px;
}

.live-turn {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.live-turn span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.live-turn p {
  width: fit-content;
  max-width: min(78%, 720px);
  margin: 0;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #fbfcff;
  line-height: 1.62;
  white-space: pre-wrap;
}

.live-turn.sales {
  justify-items: end;
}

.live-turn.sales p {
  border-color: var(--blue-line);
  background: var(--blue-soft);
}

.live-turn.ai p {
  border-color: var(--mint-line);
  background: var(--mint-soft);
}

.live-turn.pending p {
  box-shadow: inset 3px 0 0 rgba(111, 45, 189, 0.28);
}

.empty-state {
  padding: 15px;
  border: 1px dashed #d8c8e6;
  border-radius: 8px;
  color: var(--muted);
  background: #fbfafc;
  line-height: 1.6;
}

.plan-course {
  display: grid;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 13px;
  border: 1px solid #ebe3f1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(36, 25, 47, 0.03);
  cursor: pointer;
  font: inherit;
}

.plan-course.active {
  border-color: #c8a9e4;
  background: linear-gradient(90deg, #fbf8fe, #fff 72%);
  box-shadow: inset 4px 0 0 var(--purple), 0 10px 22px rgba(75, 22, 135, 0.06);
}

.plan-course:hover {
  border-color: #d6b8ee;
  box-shadow: 0 12px 24px rgba(75, 22, 135, 0.08);
}

.plan-course:focus-visible {
  outline: 2px solid rgba(118, 42, 198, 0.55);
  outline-offset: 2px;
}

.plan-course-head {
  display: grid;
  gap: 4px;
}

.plan-course-head strong {
  color: var(--text);
  line-height: 1.35;
}

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

.plan-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.plan-steps span {
  min-width: 0;
  padding: 5px 4px;
  border-radius: 6px;
  color: #786a83;
  background: #f6f2f8;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.plan-steps .now {
  color: #fff;
  background: linear-gradient(180deg, #7b38c8, var(--purple-dark));
}

.training-main {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: visible;
  border-color: rgba(111, 45, 189, 0.18);
}

.module-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: #fbfafc;
}

.module-tab {
  border-color: transparent;
  background: transparent;
  color: var(--purple-dark);
  box-shadow: none;
}

.module-tab.active {
  color: #fff;
  border-color: var(--purple);
  background: linear-gradient(180deg, #7b38c8, var(--purple-dark));
  box-shadow: 0 8px 18px rgba(111, 45, 189, 0.18);
}

.module-view {
  display: none;
  min-height: 0;
  padding: 16px;
  overflow: visible;
}

.module-view.active {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
}

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

.module-head h2 {
  margin: 2px 0 4px;
  font-size: 21px;
  line-height: 1.25;
}

.module-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.module-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.lecture-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  height: auto;
  min-height: 560px;
}

.course-frame-wrap {
  position: relative;
  min-height: 560px;
  height: auto;
  border: 1px solid #ded4e8;
  border-radius: 8px;
  overflow: hidden;
  background: #05060a;
  box-shadow: 0 18px 42px rgba(36, 25, 47, 0.12);
}

.course-frame-wrap iframe {
  display: block;
  width: 100%;
  height: 560px;
  min-height: 560px;
  border: 0;
  background: #05060a;
}

.caption-overlay {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: none;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: #fff;
  background: rgba(18, 10, 31, 0.78);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.caption-overlay.active {
  opacity: 1;
  transform: translateY(0);
}

.caption-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #e7d9ff;
  font-size: 12px;
  font-weight: 900;
}

#captionText {
  min-height: 24px;
  color: #fff;
  line-height: 1.6;
  font-weight: 700;
}

.caption-sentence {
  display: block;
}

#focusChip {
  max-width: 54%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff;
}

.exit-focus-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: none;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(18, 10, 31, 0.72);
}

body.lecture-focus {
  overflow: hidden;
  background: #05050a;
}

body.lecture-focus .app-shell {
  padding: 0;
  min-height: 100vh;
  overflow: hidden;
}

body.lecture-focus .app-header,
body.lecture-focus .plan-panel,
body.lecture-focus .record-panel,
body.lecture-focus .module-tabs,
body.lecture-focus .module-head,
body.lecture-focus .voice-side {
  display: none;
}

body.lecture-focus .training-layout {
  display: block !important;
  position: fixed;
  inset: 0;
  z-index: 9000;
  width: 100vw;
  height: 100vh;
  margin: 0;
  overflow: hidden;
  background: #05050a;
}

body.lecture-focus .training-main {
  position: fixed;
  inset: 0;
  z-index: 9001;
  display: block !important;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #05050a;
  box-shadow: none;
  overflow: hidden;
}

body.lecture-focus .module-view.active {
  display: block !important;
  width: 100vw;
  height: 100vh;
  padding: 0;
  overflow: hidden;
}

body.lecture-focus #examModule,
body.lecture-focus #practiceModule {
  display: none !important;
}

body.lecture-focus .lecture-grid {
  height: 100vh;
  display: block !important;
  width: 100vw;
  overflow: hidden;
}

body.lecture-focus .course-frame-wrap {
  position: fixed;
  inset: 0;
  z-index: 9002;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
  border: 0;
  border-radius: 0;
  background: #05050a;
  overflow: hidden;
}

body.lecture-focus .course-frame-wrap iframe {
  display: block;
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  border: 0;
}

body.lecture-focus .caption-overlay {
  left: 50%;
  right: auto;
  bottom: 28px;
  width: min(860px, calc(100vw - 48px));
  transform: translate(-50%, 10px);
}

body.lecture-focus .caption-overlay.active {
  transform: translate(-50%, 0);
}

body.lecture-focus .exit-focus-btn {
  display: inline-flex;
  align-items: center;
  z-index: 9004;
}

body.exam-focus {
  overflow: hidden;
}

body.exam-focus .app-shell {
  padding: 0;
}

body.exam-focus .app-header,
body.exam-focus .plan-panel,
body.exam-focus .record-panel,
body.exam-focus .module-tabs,
body.exam-focus .module-head {
  display: none;
}

body.exam-focus .training-layout {
  display: block;
}

body.exam-focus .training-main {
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.exam-focus .module-view.active {
  min-height: 100vh;
  padding: 0;
}

body.exam-focus .exam-area {
  min-height: 100vh;
}

body.exam-focus .voice-exam-panel {
  position: relative;
  min-height: 100vh;
  align-content: start;
  padding: 56px min(7vw, 88px);
  border: 0;
  border-radius: 0;
}

.practice-focus-exit { display: none; }

body.practice-focus { overflow: hidden; background: #f7f4fc; }
body.practice-focus .app-shell { padding: 0; min-height: 100vh; }
body.practice-focus .app-header,
body.practice-focus .plan-panel,
body.practice-focus .record-panel,
body.practice-focus .module-tabs,
body.practice-focus #lectureModule,
body.practice-focus #examModule { display: none !important; }
body.practice-focus .training-layout { display: block !important; width: 100vw; min-height: 100vh; margin: 0; }
body.practice-focus .training-main { display: block !important; width: 100vw; min-height: 100vh; padding: 0; border: 0; border-radius: 0; background: #f7f4fc; box-shadow: none; }
body.practice-focus #practiceModule {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 20px;
  height: 100vh;
  min-height: 100vh;
  padding: 38px min(6vw, 84px);
  background: #f7f4fc;
}
body.practice-focus #practiceModule .module-head { display: flex; color: var(--text); border-bottom-color: #dfd4ef; }
body.practice-focus #practiceModule .module-head h2 { color: var(--text); }
body.practice-focus #practiceModule .module-head p,
body.practice-focus #practiceModule .eyebrow { color: var(--muted); }
body.practice-focus .practice-session-grid {
  min-height: 0;
  height: 100%;
  grid-template-columns: minmax(310px, .82fr) minmax(0, 1.38fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 18px;
}
body.practice-focus .scenario-intro,
body.practice-focus .practice-live-panel {
  min-height: 0;
  height: 100%;
  border-color: #dfd4ef;
  background: #fff;
  box-shadow: 0 16px 38px rgba(52, 25, 86, 0.08);
}
body.practice-focus .scenario-intro { overflow-y: auto; }
body.practice-focus .practice-live-panel { overflow: hidden; }
body.practice-focus .practice-live-log { min-height: 0; max-height: none; }
body.practice-focus .practice-focus-exit { display: inline-flex; }
@media (max-width: 820px) {
  body.practice-focus { overflow: auto; }
  body.practice-focus #practiceModule { height: auto; min-height: 100vh; padding: 24px 18px; }
  body.practice-focus .practice-session-grid { grid-template-columns: 1fr; grid-template-rows: minmax(260px, auto) minmax(420px, 1fr); height: auto; min-height: 0; }
  body.practice-focus .scenario-intro { max-height: none; overflow: visible; }
}

.course-map-modal {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(22, 12, 36, 0.45);
  backdrop-filter: blur(12px);
}

.course-map-modal.is-hidden { display: none; }

.course-map-sheet {
  width: min(1120px, 100%);
  max-height: min(780px, calc(100vh - 56px));
  overflow: auto;
  padding: 28px;
  border: 1px solid #dfd2f3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(34, 16, 57, 0.28);
}

.course-map-head { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.course-map-head h2 { margin: 4px 0 0; font-size: 24px; }
.course-map-summary { margin: 14px 0 22px; color: var(--muted); }
.course-map-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.course-map-card { position: relative; display: grid; min-height: 180px; gap: 9px; padding: 18px; text-align: left; border: 1px solid #e6ddef; border-radius: 8px; background: #fff; }
.course-map-card:hover, .course-map-card.active { border-color: #7431c7; box-shadow: 0 12px 28px rgba(111, 45, 189, 0.12); }
.course-map-card strong { padding-right: 58px; color: var(--text); font-size: 16px; line-height: 1.4; }
.course-map-card p, .course-map-card small { margin: 0; color: var(--muted); line-height: 1.5; }
.course-map-index { color: #7b35c6; font-size: 12px; font-weight: 900; }
.course-map-status { position: absolute; top: 16px; right: 14px; padding: 4px 7px; border-radius: 99px; font-size: 11px; font-weight: 800; }
.course-map-status.done { color: #087b57; background: #e7f8f0; }
.course-map-status.active { color: #6c27b6; background: #f1e8ff; }
.course-map-status.pending { color: #756a82; background: #f5f2f7; }
.exam-drill-link { margin-top: 12px; padding: 12px; border-left: 3px solid #7837c6; color: #4a3a59; background: #f7f1ff; line-height: 1.6; }
.exam-drill-link b { display: block; color: #6c27b6; }

@media (max-width: 800px) { .course-map-grid { grid-template-columns: 1fr; } .course-map-sheet { padding: 20px; } }

.exam-focus-exit {
  position: absolute;
  top: 16px;
  right: 18px;
  z-index: 2;
}

.voice-side {
  display: none;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
}

.session-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.session-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.voice-bar.compact {
  grid-template-columns: auto 1fr;
  padding: 0;
  border: 0;
  background: transparent;
}

.voice-bar.compact button {
  grid-column: 1 / -1;
}

.mini-transcript {
  min-height: 168px;
  max-height: 220px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.mini-line {
  margin-bottom: 9px;
  padding-left: 10px;
  border-left: 2px solid var(--purple);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.exam-area {
  display: grid;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
}

.exam-prep-screen {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  padding: 40px;
  border: 1px solid #e4d8f0;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 245, 251, 0.98)),
    #fff;
  color: var(--text);
}

body.exam-focus .exam-prep-screen {
  min-height: 100vh;
  border: 0;
  border-radius: 0;
  padding: 56px min(7vw, 88px);
}

.exam-prep-screen::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  pointer-events: none;
  background: linear-gradient(90deg, var(--purple-dark), var(--purple), #14b8a6);
}

.exam-prep-brand {
  position: relative;
  z-index: 1;
  color: var(--purple-dark);
  font-size: 18px;
  font-weight: 900;
}

.prep-exit {
  border-color: #d9cfe6;
  background: #fff;
  color: var(--purple-dark);
}

.exam-prep-core {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
  gap: min(6vw, 72px);
  align-items: center;
  min-height: 440px;
}

body.exam-focus .exam-prep-core {
  min-height: calc(100vh - 128px);
}

.exam-prep-main {
  display: grid;
  gap: 20px;
  align-content: center;
}

.exam-prep-main .eyebrow,
.exam-prep-points .eyebrow {
  color: #7a668f;
}

.exam-prep-main h3 {
  margin: 0;
  color: var(--text);
  font-size: 48px;
  line-height: 1.08;
}

.exam-prep-main p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.prep-pipeline {
  display: grid;
  grid-template-columns: auto minmax(80px, 1fr) auto minmax(80px, 1fr) auto;
  gap: 14px;
  align-items: center;
  max-width: 720px;
  margin-top: 12px;
}

.prep-node {
  display: grid;
  gap: 10px;
  justify-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.prep-node span {
  width: 42px;
  height: 42px;
  border: 1px solid #e3d8ee;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 6px #f5f0fb;
}

.prep-node.active {
  color: var(--purple-dark);
}

.prep-node.active span {
  border-color: #bd9ee0;
  box-shadow: 0 0 0 5px rgba(111, 45, 189, 0.1), inset 0 0 0 6px #f1e9fb;
}

.prep-track {
  position: relative;
  height: 1px;
  overflow: hidden;
  background: #e4d8f0;
}

.prep-track i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 46%;
  background: linear-gradient(90deg, transparent, var(--purple), #14b8a6, transparent);
  animation: prepTrace 1.45s ease-in-out infinite;
}

.prep-batch {
  width: fit-content;
  padding: 8px 10px;
  border: 1px solid #e2d7ed;
  border-radius: 6px;
  color: var(--purple-dark);
  background: #fbf9fd;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.prep-wave {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 44px;
  max-width: 620px;
  margin-top: 8px;
}

.prep-wave span {
  width: 2px;
  height: 8px;
  border-radius: 99px;
  background: rgba(111, 45, 189, 0.34);
  animation: prepWave 1.3s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.035s);
}

.exam-prep-points {
  display: grid;
  gap: 12px;
  padding-left: min(4vw, 44px);
  border-left: 1px solid #e5daef;
}

.exam-prep-points h4 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
}

.exam-prep-points ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.exam-prep-points li {
  position: relative;
  padding: 11px 0 11px 18px;
  border-bottom: 1px solid #eee7f4;
  color: var(--muted);
  line-height: 1.55;
}

.exam-prep-points li::before {
  content: "";
  position: absolute;
  top: 19px;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #14b8a6;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

@keyframes prepTrace {
  0% {
    transform: translateX(-110%);
    opacity: 0;
  }
  18%,
  82% {
    opacity: 1;
  }
  100% {
    transform: translateX(230%);
    opacity: 0;
  }
}

@keyframes prepTraceVertical {
  0% {
    transform: translateY(-110%);
    opacity: 0;
  }
  18%,
  82% {
    opacity: 1;
  }
  100% {
    transform: translateY(230%);
    opacity: 0;
  }
}

@keyframes prepWave {
  0%,
  100% {
    height: 8px;
    opacity: 0.35;
  }
  50% {
    height: 30px;
    opacity: 0.9;
  }
}

.exam-form {
  display: grid;
  gap: 12px;
}

.exam-question {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.exam-question legend {
  padding: 0 4px;
  color: var(--text);
  font-weight: 900;
  line-height: 1.45;
}

.exam-option {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.exam-option input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.voice-exam-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid #e0d5ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.exam-progress-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.exam-progress-head h3 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 20px;
}

.exam-progress-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.exam-progress-head strong {
  color: var(--purple-dark);
  font-size: 18px;
  white-space: nowrap;
}

.exam-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #ede9fe;
}

.exam-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple-dark), var(--purple));
  transition: width 0.25s ease;
}

.voice-question {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid #e4d8f0;
  border-radius: 8px;
  background: #fbfafc;
}

.question-text {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.55;
}

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

.voice-answer-box {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 14px;
  border: 1px dashed #cdb9df;
  border-radius: 8px;
  background: #fff;
}

.voice-answer-box strong {
  color: var(--purple-dark);
}

.voice-answer-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.voice-exam-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.voice-exam-actions button {
  min-width: 104px;
}

.voice-exam-actions button.primary {
  min-width: 132px;
}

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

.answered-list span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.answered-list span.done {
  border-color: #c9b0e2;
  background: #f4eefb;
  color: var(--purple-dark);
}

.answered-list span.pending {
  opacity: 0.38;
  border-style: dashed;
}

.answered-list span.active {
  border-color: var(--purple-dark);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.practice-brief {
  min-height: 0;
  overflow-y: auto;
  border: 1px solid #e2d8ec;
  border-radius: 8px;
  background: #fbfafc;
}

.record-summary {
  flex: 0 0 auto;
  display: grid;
  gap: 10px;
  padding: 14px;
}

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

.record-kpis div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 11px 9px;
  border: 1px solid #e7dfef;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #fff, #fbf9fd),
    #fff;
}

.record-kpis span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.record-kpis strong {
  color: var(--text);
  font-size: 20px;
  line-height: 1.1;
  font-weight: 900;
}

.record-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #e7dfef;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(36, 25, 47, 0.03);
}

.record-item strong {
  color: var(--purple-dark);
}

.record-item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.inline-heading {
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
}

.training-transcript {
  flex: 0 0 132px;
  min-height: 0;
  max-height: none;
  border-bottom: 1px solid var(--line);
}

#report {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.exam-result h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

@media (max-width: 1220px) {
  .training-shell {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .training-layout {
    overflow: visible;
  }

  .plan-panel,
  .record-panel,
  .training-main {
    height: auto;
    min-height: 320px;
  }

  .training-layout {
    grid-template-columns: minmax(250px, 300px) 1fr;
  }

  .record-panel {
    grid-column: 1 / -1;
    min-height: 320px;
  }

  .training-shell.work-mode .training-layout,
  .training-shell.archive-mode .training-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .login-screen {
    overflow-y: auto;
  }

  .login-topbar {
    padding: 0 22px;
  }

  .login-layout {
    width: min(100% - 44px, 680px);
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: start;
    padding: 34px 0 48px;
  }

  .login-panel {
    min-height: auto;
    align-content: start;
    gap: 28px;
  }

  .login-hero-copy h1 {
    white-space: normal;
  }

  .tech-mark {
    width: 100%;
    left: -18%;
    top: -4%;
  }

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

  .training-layout,
  .lecture-grid {
    grid-template-columns: 1fr;
  }

  .training-actions {
    justify-content: start;
  }

  .homeroom-dashboard {
    min-height: auto;
    padding: 22px;
  }

  .teacher-card {
    padding: 26px;
  }

  .plan-panel,
  .record-panel,
  .training-main {
    min-height: auto;
  }

  .module-head {
    display: grid;
  }

  .module-actions {
    justify-content: start;
  }

  .course-frame-wrap,
  .course-frame-wrap iframe {
    min-height: 430px;
    height: 430px;
  }

  .voice-side {
    grid-template-columns: 1fr;
  }

  .exam-prep-core {
    grid-template-columns: 1fr;
    gap: 28px;
    min-height: auto;
    padding-top: 48px;
  }

  .exam-prep-points {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid rgba(221, 214, 254, 0.16);
    padding-top: 20px;
  }
}

@media (max-width: 620px) {
  .login-topbar {
    height: 64px;
    padding: 0 16px;
  }

  .login-brand {
    gap: 9px;
    font-size: 16px;
  }

  .login-brand b,
  .login-brand span {
    display: none;
  }

  .help-link {
    padding: 0 8px;
    font-size: 13px;
  }

  .login-layout {
    width: calc(100% - 32px);
    padding: 28px 0 36px;
  }

  .login-hero-copy h1 {
    font-size: 34px;
    white-space: nowrap;
  }

  .login-hero-copy p {
    margin-top: 18px;
    font-size: 20px;
  }

  .login-role-strip {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .login-role-strip div {
    min-height: 112px;
    grid-template-columns: 48px 1fr;
    align-items: center;
    align-content: center;
    column-gap: 14px;
  }

  .login-role-strip i {
    grid-row: span 2;
    margin-bottom: 0;
  }

  .login-card,
  .login-panel {
    padding: 0;
  }

  .login-card {
    padding: 24px;
  }

  .login-card h2 {
    font-size: 24px;
  }

  .login-card input,
  .login-card select,
  .login-card button {
    height: 52px;
  }

  .login-options {
    display: grid;
    justify-content: stretch;
    gap: 8px;
  }

  .training-actions,
  .module-tabs,
  .plan-steps {
    grid-template-columns: 1fr;
  }

  .teacher-command,
  .teacher-command button {
    width: 100%;
  }

  .teacher-chat {
    min-height: 320px;
    max-height: 52vh;
  }

  .teacher-message {
    max-width: 100%;
  }

  .teacher-command {
    grid-template-columns: 1fr;
  }

  .context-field {
    width: auto;
  }

  .module-actions,
  .module-actions button,
  .module-head > button,
  .voice-exam-actions button {
    width: 100%;
  }

  .exam-prep-screen,
  body.exam-focus .exam-prep-screen {
    padding: 24px 18px;
  }

  .exam-prep-main h3 {
    font-size: 34px;
  }

  .prep-pipeline {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .prep-track {
    width: 1px;
    height: 28px;
    margin-left: 20px;
  }

  .prep-track i {
    width: 100%;
    height: 46%;
    animation-name: prepTraceVertical;
  }

  .exam-kpis {
    grid-template-columns: 1fr;
  }

  .exam-question-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .exam-report-hero {
    align-items: flex-start;
  }

  .exam-score-ring {
    width: 62px;
    height: 62px;
  }
}
