:root {
  --bg-1: #fff9ef;
  --bg-2: #f0f6ff;
  --paper: rgba(255, 255, 255, 0.88);
  --paper-strong: rgba(255, 255, 255, 0.96);
  --line: rgba(32, 63, 114, 0.12);
  --ink: #182536;
  --muted: #5f6f87;
  --accent: #235aa6;
  --accent-deep: #12396d;
  --warm: #f0a53b;
  --cool: #4f97eb;
  --green: #51b56f;
  --shadow: 0 24px 60px rgba(16, 40, 84, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(240, 165, 59, 0.18), transparent 28%),
    radial-gradient(circle at right 18%, rgba(79, 151, 235, 0.16), transparent 30%),
    linear-gradient(140deg, var(--bg-1) 0%, #f9fbff 45%, var(--bg-2) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(24, 37, 54, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 37, 54, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.78), transparent 92%);
}

.page-shell {
  width: min(100%, 1800px);
  margin: 0 auto;
  padding: 24px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  position: relative;
  z-index: 12;
  padding: 24px 28px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(248, 252, 255, 0.96));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero h1,
.hero p {
  margin: 0;
}

.hero__copy {
  display: grid;
  gap: 10px;
  max-width: 920px;
}

.hero__eyebrow,
.panel-card__eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__subtitle {
  margin-top: 10px;
  color: var(--muted);
}

.hero__side {
  display: grid;
  gap: 12px;
  min-width: 340px;
  position: relative;
  z-index: 13;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  position: relative;
  z-index: 14;
}

.hero__actions > button {
  position: relative;
  z-index: 15;
  pointer-events: auto;
}

.graph-mode-picker {
  position: relative;
  z-index: 16;
}

.graph-mode-picker__trigger {
  min-width: 178px;
  text-align: left;
}

.graph-mode-picker__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 178px;
  padding: 6px;
  border: 1px solid rgba(35, 90, 166, 0.14);
  border-radius: 16px;
  background: var(--paper-strong);
  box-shadow: 0 16px 34px rgba(16, 40, 84, 0.16);
}

.graph-mode-picker__option {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: transparent;
  color: var(--accent-deep);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.graph-mode-picker__option:hover,
.graph-mode-picker__option.is-active {
  color: #fff;
  background: linear-gradient(135deg, #2e66b4, #163f77);
}

.mode-btn,
.ghost-btn,
.primary-btn,
.tab-btn,
.resource-link {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font: inherit;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.mode-btn {
  color: var(--accent-deep);
  background: rgba(35, 90, 166, 0.1);
}

.mode-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, #2e66b4, #163f77);
  box-shadow: 0 14px 24px rgba(24, 63, 119, 0.2);
}

.ghost-btn {
  color: var(--accent-deep);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(35, 90, 166, 0.14);
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, #2e66b4, #163f77);
  box-shadow: 0 14px 24px rgba(24, 63, 119, 0.18);
}

.tab-btn {
  color: var(--muted);
  background: rgba(35, 90, 166, 0.08);
}

.tab-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, #2e66b4, #163f77);
}

.mode-btn:hover,
.ghost-btn:hover,
.primary-btn:hover,
.tab-btn:hover,
.resource-link:hover {
  transform: translateY(-1px);
}

.user-status {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(35, 90, 166, 0.08);
  color: var(--muted);
  line-height: 1.65;
}

.user-status:empty {
  display: none;
}

[hidden] {
  display: none !important;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(320px, 400px);
  gap: 22px;
  margin-top: 22px;
}

.workspace-main {
  display: grid;
  gap: 22px;
  align-content: start;
}

.graph-card,
.panel-card {
  border-radius: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.graph-card {
  overflow: hidden;
}

.graph-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 8px 18px 2px;
}

.graph-toolbar__block {
  display: grid;
  gap: 4px;
}

.graph-toolbar__block span {
  color: var(--muted);
  line-height: 1.6;
}

.graph-mode-toolbar {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px 18px 10px;
}

.graph-mode-group {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(35, 90, 166, 0.16);
  border-radius: 999px;
  background: rgba(245, 249, 254, 0.96);
  box-shadow: 0 8px 18px rgba(32, 67, 112, 0.08);
}

.graph-mode-group__button {
  border: 0;
  border-radius: 999px;
  padding: 9px 17px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.graph-mode-group__button:hover {
  color: var(--accent-deep);
  background: rgba(35, 90, 166, 0.08);
}

.graph-mode-group__button.is-active {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 6px 14px rgba(35, 90, 166, 0.22);
}

.graph-layout-reset {
  position: absolute;
  right: 18px;
  padding: 8px 14px;
  font-size: 13px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
  max-width: 540px;
}

.legend--stacked {
  display: grid;
  gap: 4px;
  max-width: none;
}

.legend__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 14px;
}

.legend__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.swatch,
.line-swatch {
  display: inline-block;
  flex: 0 0 auto;
}

.swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.45);
}

.swatch--l1 {
  background: radial-gradient(circle at 30% 30%, #ffd690, #f0a53b 72%);
}

.swatch--l2 {
  background: #a9c5f5;
  border-radius: 4px;
}

.swatch--l3 {
  background: radial-gradient(circle at 30% 30%, #d7f7d9, #51b56f 72%);
}

.line-swatch {
  width: 18px;
  height: 0;
  border-top: 2px solid currentColor;
}

.legend-badge {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.42);
}

.legend-badge--ppt {
  background: #ef9b2d;
}

.legend-badge--sim {
  background: #2e66b4;
}

.legend-badge--test {
  background: #39a96d;
}

.legend-badge--ideology {
  background: #d8677f;
}

.legend-badge--frontier {
  background: #7c69df;
}

.legend-badge--assignment {
  background: #f59e0b;
}

.line-swatch--pre {
  color: #ef9b2d;
}

.line-swatch--post {
  color: #3f87de;
}

.line-swatch--related {
  color: #39a96d;
  border-top-style: dashed;
}

.graph-stage {
  position: relative;
  padding: 0 10px 0;
  perspective: 1800px;
}

.graph-stage__viewport {
  border-radius: 24px;
  overflow: hidden;
  transform-style: preserve-3d;
  transform: perspective(1800px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 220ms ease;
  background:
    radial-gradient(circle at 20% 18%, rgba(240, 165, 59, 0.12), transparent 22%),
    radial-gradient(circle at 78% 22%, rgba(79, 151, 235, 0.16), transparent 24%),
    radial-gradient(circle at 55% 78%, rgba(81, 181, 111, 0.12), transparent 26%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    0 26px 46px rgba(21, 52, 96, 0.12);
}

.graph-stage__viewport.is-ring {
  width: min(100%, 1180px);
  aspect-ratio: 1600 / 1180;
  margin: 0 auto;
  background:
    linear-gradient(180deg, rgba(248, 250, 253, 0.98), rgba(243, 246, 251, 0.98)),
    radial-gradient(circle, rgba(123, 146, 189, 0.12) 1.2px, transparent 1.2px);
  background-size: auto, 30px 30px;
}

.graph-capability-map {
  min-height: 740px;
  margin: 0;
  border-radius: 24px;
  color: var(--ink);
  background:
    radial-gradient(circle at 70% 22%, rgba(69, 184, 131, 0.14), transparent 24%),
    radial-gradient(circle at 18% 78%, rgba(242, 168, 59, 0.14), transparent 24%),
    linear-gradient(135deg, rgba(248, 251, 255, 0.98), rgba(238, 247, 255, 0.94));
  box-shadow:
    inset 0 0 0 1px rgba(35, 90, 166, 0.08),
    0 26px 46px rgba(21, 52, 96, 0.1);
  overflow: hidden;
}

.graph-capability-map__inner {
  min-height: inherit;
}

.graph-capability-map__empty {
  min-height: 440px;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  color: var(--muted);
}

.graph-capability-map__empty h3 {
  margin: 0;
  color: var(--ink);
}

.capability-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.58fr) minmax(620px, 1.42fr);
  min-height: 740px;
}

.capability-layout__summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.48));
  border-right: 1px solid rgba(35, 90, 166, 0.1);
}

.capability-layout__summary h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.18;
}

.capability-layout__intro {
  margin: 0;
  color: var(--muted);
  line-height: 1.85;
}

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

.capability-objective-item {
  display: grid;
  gap: 6px;
  padding: 11px 13px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(35, 90, 166, 0.1);
}

.capability-objective-item span {
  color: var(--cool);
  font-size: 13px;
  font-weight: 800;
}

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

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

.capability-stat-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(35, 90, 166, 0.1);
  box-shadow: 0 12px 24px rgba(21, 52, 96, 0.08);
}

.capability-stat-card--wide {
  grid-column: 1 / -1;
}

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

.capability-stat-card strong {
  font-size: 32px;
  line-height: 1;
  color: var(--accent-deep);
}

.capability-list {
  display: grid;
  gap: 10px;
}

.capability-list__item {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(35, 90, 166, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.capability-list__item:hover,
.capability-list__item.is-active {
  transform: translateY(-1px);
  border-color: rgba(35, 90, 166, 0.32);
  background: rgba(245, 250, 255, 0.96);
  box-shadow: 0 14px 28px rgba(21, 52, 96, 0.12);
}

.capability-list__item span {
  color: var(--cool);
  font-size: 12px;
  font-weight: 800;
}

.capability-list__item strong {
  font-size: 16px;
}

.capability-list__item small {
  color: var(--muted);
  line-height: 1.5;
}

.capability-layout__visual {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 6px;
}

.capability-map-svg {
  width: 100%;
  max-width: 1040px;
  min-height: 680px;
  align-self: center;
  overflow: visible;
}

.capability-map-svg__orbit {
  fill: none;
  stroke: rgba(35, 90, 166, 0.1);
  stroke-width: 1.5;
}

.capability-map-svg__orbit--outer {
  stroke-dasharray: 8 10;
}

.capability-map-svg__branch path {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  opacity: 0.28;
}

.capability-map-svg__branch {
  cursor: pointer;
}

.capability-map-svg__branch circle {
  filter: drop-shadow(0 16px 22px rgba(30, 80, 146, 0.2));
}

.capability-map-svg__branch:not(.is-active) circle:first-of-type {
  opacity: 0.84;
}

.capability-map-svg__branch.is-active path {
  opacity: 0.66;
  stroke-width: 7;
}

.capability-map-svg__halo {
  fill: none;
  stroke-width: 3;
  opacity: 0.18;
}

.capability-map-svg__title,
.capability-map-svg__count,
.capability-map-svg__course,
.capability-map-svg__subtitle {
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}

.capability-map-svg__title {
  fill: #fff;
  font-size: 17px;
  font-weight: 800;
}

.capability-map-svg__count {
  fill: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 700;
}

.capability-map-svg__center circle {
  fill: url(#capability-center-gradient);
  stroke: rgba(255, 255, 255, 0.88);
  stroke-width: 10;
  filter: drop-shadow(0 18px 24px rgba(30, 94, 174, 0.28));
}

.capability-map-svg__course {
  fill: #fff;
  font-size: 25px;
  font-weight: 900;
}

.capability-map-svg__subtitle {
  fill: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  font-weight: 700;
}

.ideology-layout .capability-layout__summary {
  background: linear-gradient(180deg, rgba(255, 253, 247, 0.88), rgba(255, 246, 249, 0.58));
}

.ideology-map-svg {
  width: min(100%, 980px);
  height: auto;
  display: block;
  margin: 28px auto;
}

.ideology-map-svg__point path {
  fill: none;
  stroke: rgba(202, 84, 107, 0.54);
  stroke-width: 3;
}

.ideology-map-svg__point circle:first-of-type {
  fill: #c95d75;
  stroke: rgba(255, 255, 255, 0.82);
  stroke-width: 4;
  cursor: pointer;
}

.ideology-map-svg__point .capability-map-svg__halo {
  fill: none;
  stroke: rgba(201, 93, 117, 0.26);
  stroke-width: 2;
}

.ideology-map-svg__point:hover circle:first-of-type {
  fill: #a94663;
}

.ideology-map-svg__center circle {
  fill: url(#ideology-center-gradient);
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 5;
}

.ideology-focus-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 16px;
  color: #58313d;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(201, 93, 117, 0.18);
}

.ideology-focus-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.capability-focus-card {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 6;
  width: min(420px, calc(100% - 40px));
  max-height: min(360px, calc(100% - 40px));
  overflow: auto;
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(35, 90, 166, 0.1);
  box-shadow: 0 16px 30px rgba(21, 52, 96, 0.1);
}

.capability-focus-card h3 {
  margin: 2px 0 0;
  font-size: 20px;
}

.capability-focus-card__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.capability-focus-card__metrics span,
.capability-point-cloud__item {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.capability-focus-card__metrics span {
  color: var(--accent-deep);
  background: rgba(35, 90, 166, 0.08);
}

.capability-point-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.capability-point-cloud__item {
  color: #21334c;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(35, 90, 166, 0.08);
}

.capability-point-cloud__item.is-level-1 {
  background: rgba(242, 168, 59, 0.18);
}

.capability-point-cloud__item.is-level-2 {
  background: rgba(79, 151, 235, 0.16);
}

.capability-point-cloud__item.is-level-3 {
  background: rgba(69, 184, 131, 0.14);
}

.graph-relation-controls {
  position: absolute;
  left: 32px;
  bottom: 18px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(16, 36, 72, 0.92), rgba(22, 52, 102, 0.84));
  box-shadow: 0 12px 28px rgba(13, 31, 62, 0.24);
  backdrop-filter: blur(10px);
}

.graph-relation-controls__label {
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.graph-filter-btn {
  border: 0;
  min-width: 58px;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(129, 161, 233, 0.22);
  color: rgba(255, 255, 255, 0.74);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.graph-filter-btn__text {
  white-space: nowrap;
}

.graph-filter-btn__line {
  display: inline-block;
  width: 28px;
  height: 0;
  border-top-width: 2px;
  border-top-style: solid;
  opacity: 0.92;
}

.graph-filter-btn__line--hierarchy {
  border-top-color: rgba(198, 220, 255, 0.96);
}

.graph-filter-btn__line--sequence {
  border-top-color: rgba(255, 209, 130, 0.96);
  border-top-style: dashed;
}

.graph-filter-btn__line--related {
  border-top-color: rgba(168, 248, 201, 0.96);
  border-top-style: dotted;
}

.graph-filter-btn.is-active {
  background: linear-gradient(135deg, #5f82ec, #7b9cff);
  color: #fff;
  box-shadow: 0 8px 18px rgba(113, 145, 235, 0.34);
}

.graph-filter-btn:hover {
  transform: translateY(-1px);
}

#graphSvg {
  width: 100%;
  height: auto;
  min-height: 740px;
  display: block;
  border-radius: 24px;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.9), rgba(244, 249, 255, 0.96)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(238, 245, 255, 0.54));
}

#graphSvg.is-ring {
  height: 100%;
  min-height: 0;
  background: transparent;
}

.resource-badge {
  pointer-events: none;
}

.resource-badge circle {
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 2;
  filter: drop-shadow(0 5px 8px rgba(18, 57, 109, 0.18));
}

.resource-badge text {
  fill: #fff;
  font-size: 9px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: middle;
}

.resource-badge--ppt circle {
  fill: #ef9b2d;
}

.resource-badge--sim circle {
  fill: #2e66b4;
}

.resource-badge--test circle {
  fill: #39a96d;
}

.resource-badge--ideology circle {
  fill: #d8677f;
}

.resource-badge--frontier circle {
  fill: #7c69df;
}

.resource-badge--assignment circle {
  fill: #f59e0b;
}

.info-panel {
  display: grid;
  gap: 18px;
}

.panel-card {
  padding: 20px;
}

.panel-card__head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.panel-card__title {
  margin: 4px 0 0;
  font-size: 22px;
}

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

.detail-panel {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

.graph-metrics-panel {
  display: none;
}

.graph-metrics-panel__title {
  display: none;
}

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

.metric-widget {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 10px 10px 8px;
  border-radius: 20px;
  border: 1px solid rgba(95, 145, 229, 0.2);
  background: linear-gradient(180deg, rgba(28, 59, 122, 0.9), rgba(41, 77, 154, 0.86));
  color: #f7fbff;
  cursor: pointer;
  box-shadow: 0 20px 34px rgba(21, 52, 96, 0.18);
}

.metric-widget--compact {
  padding: 8px 8px 6px;
}

.metric-ring {
  --metric-fill: 0;
  width: 104px;
  height: 104px;
  padding: 6px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08), rgba(8, 20, 49, 0.08)),
    conic-gradient(from 210deg, #74d7ff, #87a5ff, #74d7ff);
  box-shadow:
    inset 0 0 0 2px rgba(189, 229, 255, 0.38),
    0 16px 28px rgba(9, 25, 63, 0.22);
  position: relative;
}

.metric-ring--green {
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08), rgba(8, 20, 49, 0.08)), conic-gradient(from 210deg, #89ffd0, #7af0ff, #89ffd0);
}

.metric-ring--blue {
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08), rgba(8, 20, 49, 0.08)), conic-gradient(from 210deg, #9ad7ff, #7fa3ff, #9ad7ff);
}

.metric-ring__shell {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.16), transparent 20%),
    linear-gradient(180deg, rgba(103, 125, 201, 0.88), rgba(86, 110, 188, 0.82));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.metric-ring__wave {
  position: absolute;
  inset: auto -14% calc(-24% + var(--metric-fill) * 64%) -14%;
  height: 58%;
  border-radius: 38% 62% 44% 56% / 51% 43% 57% 49%;
  background: linear-gradient(180deg, rgba(198, 246, 255, 0.94), rgba(125, 223, 255, 0.52));
  opacity: 0.96;
  animation: metricWaveFloat 5.2s ease-in-out infinite;
}

.metric-ring--green .metric-ring__wave {
  background: linear-gradient(180deg, rgba(216, 255, 242, 0.96), rgba(143, 255, 204, 0.58));
}

.metric-ring__value {
  position: relative;
  z-index: 1;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 5px 10px rgba(17, 27, 56, 0.32);
}

.metric-widget__label {
  width: 100%;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(53, 111, 213, 0.88);
  color: #eef7ff;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.metric-widget__label strong {
  color: #ff9d6d;
}

.knowledge-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.98), rgba(247, 242, 233, 0.96));
  color: var(--ink);
  border: 1px solid rgba(198, 170, 120, 0.18);
  box-shadow: 0 24px 40px rgba(19, 51, 101, 0.1);
}

.knowledge-card__hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.knowledge-card__eyebrow {
  margin: 0;
  color: #8d7754;
  font-size: 12px;
}

.knowledge-card__link {
  border: none;
  background: linear-gradient(135deg, #eab566, #d88f34);
  color: #fffdf8;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.resource-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  color: #5f5a52;
  font-size: 13px;
}

.resource-stat-row strong {
  color: #ff9d6d;
  font-size: 16px;
}

.node-equipment-links {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(53, 111, 213, 0.08);
  border: 1px solid rgba(53, 111, 213, 0.14);
}

.node-equipment-links > span {
  color: #52677a;
  font-size: 12px;
  font-weight: 700;
}

.node-equipment-links > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.node-equipment-popover {
  position: fixed;
  z-index: 1200;
  width: min(280px, calc(100vw - 24px));
  padding: 12px;
  border-radius: 12px;
  background: rgba(18, 32, 52, 0.94);
  color: #f7fbff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 18px 44px rgba(13, 28, 48, 0.28);
  backdrop-filter: blur(10px);
}

.node-equipment-popover[hidden] {
  display: none;
}

.node-equipment-popover strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.node-equipment-popover div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.node-equipment-popover button {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 6px 10px;
  color: #f7fbff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

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

.detail-tab {
  border: none;
  border-radius: 16px;
  padding: 14px 12px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.detail-tab.is-active {
  background: linear-gradient(135deg, #4b92ff, #3478e5);
  color: #fff;
  box-shadow: 0 16px 30px rgba(38, 88, 175, 0.2);
}

.detail-card-shell {
  display: grid;
  gap: 12px;
}

.node-extra-list {
  display: grid;
  gap: 12px;
}

.node-extra-item {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(35, 90, 166, 0.08);
}

.node-extra-item__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.node-extra-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.node-extra-item h4 {
  margin: 0;
  font-size: 17px;
  color: var(--accent-deep);
}

.node-extra-item__content {
  color: var(--ink);
  line-height: 1.65;
  white-space: pre-wrap;
  text-indent: 2em;
}

.node-extra-form textarea {
  min-height: 180px;
  line-height: 1.65;
  text-indent: 2em;
}

.node-extra-edit-form {
  margin-top: 12px;
}

.node-extra-edit-form textarea {
  min-height: 140px;
  line-height: 1.65;
  text-indent: 2em;
}

.detail-card-shell__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 4px 0;
}

.detail-card-shell__head h3 {
  margin: 0;
  font-size: 18px;
  color: var(--accent-deep);
}

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

.floating-ai-launcher {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 50;
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 116px;
  padding: 12px 10px 12px;
  border: none;
  border-radius: 30px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.72), transparent 32%),
    linear-gradient(180deg, rgba(232, 245, 255, 0.98), rgba(141, 191, 255, 0.98) 54%, rgba(65, 129, 224, 0.98));
  box-shadow: 0 22px 42px rgba(28, 49, 95, 0.24);
  cursor: grab;
  user-select: none;
}

.floating-ai-launcher.is-dragging {
  cursor: grabbing;
  transform: scale(1.03);
}

.floating-ai-launcher__brain {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(213, 236, 255, 0.86));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.82),
    0 10px 20px rgba(24, 63, 130, 0.14);
}

.floating-ai-launcher__brain svg {
  width: 54px;
  height: 54px;
  display: block;
  filter: drop-shadow(0 6px 12px rgba(33, 103, 190, 0.16));
}

.floating-ai-launcher__label {
  color: #11407d;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.analytics-page {
  min-height: 100vh;
  padding: 32px;
  background:
    radial-gradient(circle at 15% 18%, rgba(79, 151, 235, 0.18), transparent 24%),
    radial-gradient(circle at 78% 20%, rgba(240, 165, 59, 0.16), transparent 22%),
    linear-gradient(180deg, #eef4ff, #f7fbff);
}

.analytics-page__shell {
  max-width: 1380px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.analytics-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 18px;
}

.analytics-grid--bottom {
  grid-template-columns: 1fr 1fr;
}

.analytics-distribution-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.analytics-card {
  padding: 22px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 22px 40px rgba(18, 44, 88, 0.12);
}

.analytics-card h2,
.analytics-card h3 {
  margin: 0 0 14px;
  color: var(--accent-deep);
}

.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 16px;
}

.distribution-grid {
  display: grid;
  gap: 12px;
}

.analytics-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.analytics-filter-row label {
  display: grid;
  gap: 6px;
  min-width: 180px;
  color: var(--muted);
  font-size: 13px;
}

.analytics-filter-row--top {
  margin-bottom: 0;
  justify-content: flex-end;
}

.analytics-filter-row select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(35, 90, 166, 0.16);
  background: #fff;
  color: var(--ink);
}

.distribution-bars {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  min-height: 240px;
}

.distribution-bar {
  display: grid;
  justify-items: center;
  align-content: end;
  gap: 10px;
}

.distribution-bar__outer {
  width: 100%;
  min-height: 170px;
  display: flex;
  align-items: flex-end;
  padding: 10px 0;
}

.distribution-bar__inner {
  width: 100%;
  border-radius: 18px 18px 8px 8px;
  background: linear-gradient(180deg, #69a9ff, #396fd8);
  box-shadow: 0 18px 24px rgba(41, 90, 182, 0.18);
}

.distribution-bar--sim .distribution-bar__inner {
  background: linear-gradient(180deg, #73e6b4, #35a56b);
  box-shadow: 0 18px 24px rgba(43, 140, 86, 0.18);
}

.distribution-bar--interaction .distribution-bar__inner {
  background: linear-gradient(180deg, #7bd7ff, #2395d6);
  box-shadow: 0 18px 24px rgba(35, 149, 214, 0.18);
}

.distribution-bar__label {
  color: var(--muted);
  font-size: 13px;
}

.distribution-bar__value {
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 700;
}

.analytics-table-wrap {
  max-height: 420px;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(35, 90, 166, 0.08);
  background: rgba(255, 255, 255, 0.9);
}

.analytics-student-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.analytics-student-table th,
.analytics-student-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(35, 90, 166, 0.1);
  text-align: left;
}

.analytics-student-table th {
  color: var(--accent-deep);
  font-weight: 700;
  background: rgba(244, 248, 255, 0.94);
  position: sticky;
  top: 0;
}

@keyframes metricWaveFloat {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(8px) rotate(-6deg);
  }
}

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

  .capability-layout__summary {
    border-right: 0;
    border-bottom: 1px solid rgba(35, 90, 166, 0.1);
  }

  .graph-metrics-panel {
    position: static;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 14px 14px;
  }

  .graph-metrics-panel__title {
    grid-column: 1 / -1;
  }

  .analytics-kpi-grid {
    grid-template-columns: repeat(5, minmax(110px, 1fr));
    gap: 10px;
  }
}

@media (max-width: 900px) {
  .overview-metrics,
  .analytics-distribution-grid,
  .analytics-kpi-grid,
  .analytics-grid,
  .analytics-grid--bottom,
  .detail-tabs {
    grid-template-columns: 1fr;
  }

  .distribution-bars {
    min-height: 180px;
  }

  .capability-stat-grid {
    grid-template-columns: 1fr;
  }

  .capability-layout__visual {
    padding: 14px;
  }

  .capability-map-svg {
    min-height: 320px;
  }
}

.detail-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(35, 90, 166, 0.08);
  color: var(--accent-deep);
  font-size: 12px;
}

.chip--muted {
  background: rgba(24, 37, 54, 0.06);
  color: var(--muted);
}

.detail-block {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(35, 90, 166, 0.08);
}

.detail-block h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.detail-block p,
.detail-block ul {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 13px;
}

.detail-block ul {
  padding-left: 16px;
}

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

.resource-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(240, 165, 59, 0.1), rgba(79, 151, 235, 0.1));
  text-decoration: none;
  color: var(--accent-deep);
  border: 1px solid rgba(35, 90, 166, 0.08);
  text-align: left;
}

.resource-link--doc {
  align-items: stretch;
}

.resource-link__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

.mini-btn {
  border: 1px solid rgba(35, 90, 166, 0.12);
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent-deep);
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.mini-btn:hover {
  transform: translateY(-1px);
}

.mini-btn--danger {
  color: #9d2c1d;
  border-color: rgba(157, 44, 29, 0.2);
}

.resource-link small {
  color: var(--muted);
}

.resource-link__meta {
  display: grid;
  gap: 4px;
}

.resource-link__meta strong {
  font-size: 15px;
}

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

.course-resource-card {
  display: grid;
  grid-template-columns: minmax(132px, 38%) 1fr;
  gap: 14px;
  align-items: stretch;
  padding: 12px;
  border: 1px solid rgba(35, 90, 166, 0.1);
  background: #fff;
  box-shadow: 0 10px 22px rgba(25, 58, 104, 0.08);
}

.course-resource-card__preview {
  position: relative;
  display: block;
  width: 100%;
  min-height: 108px;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(24, 55, 101, 0.92), rgba(41, 99, 176, 0.72));
  cursor: pointer;
}

.course-resource-card__media,
.course-resource-card__image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border: 0;
  pointer-events: none;
}

.course-resource-card iframe.course-resource-card__media {
  background: #f8fafc;
}

.course-resource-card__image {
  background: #f8fafc;
}

.course-resource-card__icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
}

.course-resource-card__icon--ppt {
  background: linear-gradient(135deg, #b84d2a, #e78c42);
}

.course-resource-card__icon--word {
  background: linear-gradient(135deg, #235aa6, #4f97eb);
}

.course-resource-card__icon--sheet {
  background: linear-gradient(135deg, #1d7a57, #45b883);
}

.course-resource-card__icon--file {
  background: linear-gradient(135deg, #536173, #8a98aa);
}

.course-resource-card__play {
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(11, 24, 45, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.course-resource-card__body {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 6px;
}

.course-resource-card__body strong {
  min-width: 0;
  color: #17233f;
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.course-resource-card__body span:not(.course-resource-card__type) {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.course-resource-card__type {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--accent-deep);
  background: rgba(35, 90, 166, 0.08);
  font-size: 12px;
  font-weight: 800;
}

.course-resource-card__actions {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.empty-state {
  color: var(--muted);
  line-height: 1.8;
}

.inline-message {
  min-height: 22px;
  color: var(--accent-deep);
  font-size: 13px;
  line-height: 1.6;
}

.inline-message[data-tone="error"] {
  color: #c0392b;
}

.reflection-form,
.teacher-panel,
.teacher-list,
.student-reflection-list,
.summary-grid,
.score-breakdown,
.field,
.form-grid,
.auth-form,
.ai-settings,
.ai-chat,
.ai-chat__composer {
  display: grid;
  gap: 12px;
}

.ai-chat__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.ai-mode-field {
  min-width: 220px;
  max-width: 280px;
}

.ai-mode-hint {
  margin: 0;
  flex: 1;
  min-width: 220px;
}

.field span,
.ai-settings h3 {
  font-weight: 700;
  color: var(--ink);
}

.field input,
.field select,
.field textarea,
.ai-chat__composer textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(35, 90, 166, 0.16);
  background: rgba(255, 255, 255, 0.92);
  font: inherit;
  color: var(--ink);
  resize: vertical;
}

.field-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.field-inline .ghost-btn {
  white-space: nowrap;
  padding-inline: 14px;
}

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

.field-hint,
.muted-note {
  color: var(--muted);
  line-height: 1.7;
  font-size: 13px;
}

.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.approval-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 247, 225, 0.9), rgba(255, 255, 255, 0.76));
  border: 1px solid rgba(230, 154, 45, 0.18);
}

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

.approval-section__head h3 {
  margin: 0;
  font-size: 17px;
}

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

.summary-card {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(35, 90, 166, 0.08);
}

.summary-card strong {
  display: block;
  font-size: 24px;
  margin-top: 6px;
}

.reflection-item,
.teacher-record {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(35, 90, 166, 0.08);
}

.reflection-item__head,
.teacher-record__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.reflection-item__meta,
.teacher-record__meta,
.score-breakdown {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.teacher-record__actions,
.row-actions,
.ai-chat__actions,
.tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.table-scroll {
  overflow: auto;
}

.score-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.score-table th,
.score-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(35, 90, 166, 0.08);
  text-align: left;
  vertical-align: top;
}

.score-table th {
  color: var(--accent-deep);
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: auto;
  padding: min(7vh, 48px) 16px 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 35, 64, 0.42);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  width: min(92vw, 680px);
  max-height: min(86vh, 960px);
  margin: 0;
  overflow: auto;
  padding: 24px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 30px 70px rgba(14, 35, 67, 0.24);
  border: 1px solid rgba(35, 90, 166, 0.12);
}

.modal-card--wide {
  width: min(94vw, 1120px);
}

.modal-card--course-info {
  width: min(96vw, 1240px);
  min-height: min(82vh, 720px);
}

.modal-card--ai {
  max-height: min(92vh, 900px);
  height: min(96vh, 980px);
  overflow: auto;
}

#aiModal.modal-shell {
  overflow: hidden;
}

.ai-workbench {
  width: min(1320px, calc(100vw - 28px));
  max-width: 1320px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f8fc 100%);
}

.modal-head__actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.modal-minimize {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: #1c3558;
  background: #eef4fb;
  cursor: pointer;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.modal-minimize:hover {
  background: #e2edf9;
}

.ai-workbench__layout {
  display: block;
}

.ai-workbench__chat,
.ai-workbench__tools {
  min-height: 560px;
  background: #ffffff;
  border: 1px solid #dde6f2;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 14px 34px rgba(26, 45, 78, 0.08);
}

.ai-workbench__tools {
  min-height: min(72vh, 720px);
}

.ai-workbench--chat .ai-workbench__tools {
  min-height: 0;
}

.ai-workbench__chat {
  display: flex;
  flex-direction: column;
}

.ai-workbench-panel .ai-workbench__chat {
  min-height: 520px;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
}

.ai-workbench-panel .ai-chat__log {
  min-height: 390px;
  max-height: none;
  overflow: visible;
}

.ai-workbench__tools-head h3 {
  margin: 0 0 4px;
  font-size: 18px;
  color: #172033;
}

.ai-workbench-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  padding: 12px 0 14px;
  position: sticky;
  top: 0;
  z-index: 2;
  background: #ffffff;
}

.ai-workbench-tab {
  border: 1px solid #dce5f1;
  background: #f7f9fd;
  color: #2b3950;
  border-radius: 8px;
  min-height: 48px;
  padding: 0 10px;
  white-space: nowrap;
  cursor: pointer;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.ai-workbench-tab.is-active {
  border-color: #1f7ae0;
  background: linear-gradient(180deg, #2d8cff, #176bd0);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(31, 122, 224, 0.22);
}

.ai-workbench-panel {
  overflow: visible;
  padding: 2px 0 4px;
}

.ai-workbench-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.ai-workbench-form .field--wide,
.ai-workbench-form .primary-btn,
.ai-workbench-form .ghost-btn {
  grid-column: 1 / -1;
}

.ai-workbench-form textarea {
  resize: vertical;
}

.ai-workbench-quiz-answer-area {
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
}

.ai-workbench-two-column {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(520px, 1.7fr);
  gap: 16px;
  align-items: stretch;
}

.ai-workbench-pane {
  min-width: 0;
  border: 1px solid #dfe8f3;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(28, 48, 82, 0.06);
}

.ai-workbench-pane--input {
  padding: 14px;
  align-self: start;
}

.ai-workbench-pane--result {
  padding: 16px;
  min-height: 480px;
}

.ai-workbench-pane__head {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.ai-workbench-pane__head strong {
  color: #172033;
  font-size: 18px;
}

.ai-workbench-pane__head span {
  color: #69788e;
  font-size: 13px;
  line-height: 1.5;
}

.ai-workbench-result-space {
  display: grid;
  gap: 12px;
}

.ai-workbench-launcher {
  display: grid;
  gap: 12px;
}

.ai-workbench-launcher article {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid #e2ebf6;
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdff, #f4f8fd);
}

.ai-workbench-launcher strong {
  color: #172033;
}

.ai-workbench-launcher p {
  margin: 0;
  color: #64748b;
  line-height: 1.6;
}

.ai-workbench-chat-guide {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 18px;
  border: 1px solid #dfe8f3;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f7fbff);
  box-shadow: 0 8px 20px rgba(32, 52, 86, 0.06);
}

.ai-workbench-chat-module {
  display: grid;
  gap: 12px;
}

.ai-workbench-chat-mount {
  min-width: 0;
}

.ai-workbench-mode-mount {
  display: grid;
  gap: 12px;
}

.ai-workbench-pane--input .ai-workbench__chat {
  min-height: 0;
}

.ai-workbench-mode-mount .ai-chat__toolbar {
  display: grid;
  gap: 8px;
}

.ai-workbench-chat-guide h4 {
  margin: 0;
  font-size: 20px;
  color: #172033;
}

.ai-workbench-chat-guide p {
  margin: 0;
  color: #536176;
  line-height: 1.7;
}

.ai-workbench-results {
  display: grid;
  gap: 10px;
}

.ai-workbench-result {
  display: grid;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #dfe8f3;
  border-radius: 8px;
  padding: 14px;
  box-shadow: 0 8px 20px rgba(32, 52, 86, 0.06);
}

.ai-workbench-result > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.ai-workbench-result p {
  margin: 0;
  color: #5d6778;
  line-height: 1.6;
}

.ai-workbench-result a {
  color: #1f7ae0;
  word-break: break-all;
}

.ai-workbench-result__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #7a8699;
  font-size: 13px;
}

.ai-workbench-result__links span {
  color: #8a5a16;
}

.ai-workbench-sim-preview {
  display: grid;
  gap: 12px;
}

.ai-workbench-sim-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 0.76fr) minmax(560px, 1.7fr);
  gap: 14px;
  align-items: start;
}

.ai-workbench-sim-builder,
.ai-workbench-sim-stage {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid #dfe8f3;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px;
  box-shadow: 0 10px 26px rgba(28, 48, 82, 0.06);
}

.ai-workbench-sim-builder__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.ai-workbench-sim-builder__head strong,
.ai-workbench-sim-preview__actions strong {
  color: #172033;
}

.ai-workbench-sim-builder__head span,
.ai-workbench-sim-preview__actions span {
  color: #6a7890;
  font-size: 12px;
}

.ai-workbench-form--sim {
  grid-template-columns: 1fr;
  margin-bottom: 0;
  max-height: none;
  overflow: visible;
}

.ai-workbench-form--sim textarea {
  min-height: 62px;
}

.ai-workbench-sim-progress {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dfe8f3;
  border-radius: 8px;
  background: #fff;
}

.ai-workbench-sim-progress__steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.ai-workbench-sim-progress__steps span {
  min-height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f1f5fa;
  color: #6b7890;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.ai-workbench-sim-progress__steps span.is-done,
.ai-workbench-sim-progress__steps span.is-current {
  background: #e7f1ff;
  color: #1f64bd;
}

.ai-workbench-sim-progress__log {
  display: grid;
  gap: 4px;
  color: #536176;
  font-size: 13px;
  line-height: 1.6;
}

.ai-workbench-sim-progress__log p {
  margin: 0;
}

.ai-workbench-sim-preview__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px;
  border: 1px solid #dfe8f3;
  border-radius: 8px;
  background: #ffffff;
}

.ai-workbench-sim-preview__actions > div {
  display: grid;
  gap: 3px;
}

.ai-workbench-sim-preview__buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ai-workbench-sim-frame {
  width: 100%;
  height: min(66vh, 620px);
  min-height: 520px;
  border: 1px solid #dfe6f0;
  border-radius: 8px;
  background: #ffffff;
}

.ai-workbench-sim-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  min-height: 520px;
  border: 1px dashed #cbd8e8;
  border-radius: 8px;
  background: #f8fbff;
  color: #536176;
  text-align: center;
  padding: 24px;
}

.ai-workbench-sim-empty strong {
  color: #172033;
}

.ai-workbench-sim-empty p {
  margin: 0;
}

.ai-workbench-sim-refine {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #dfe8f3;
  border-radius: 8px;
  background: #ffffff;
}

.ai-workbench-chart {
  background: #ffffff;
  border: 1px solid #dfe8f3;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(32, 52, 86, 0.06);
}

.ai-workbench-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 16px;
  align-items: start;
}

.ai-workbench-chart h4 {
  margin: 0 0 12px;
}

.ai-workbench-chart .learning-radar {
  width: min(100%, 560px);
  max-width: 560px;
  overflow: visible;
}

.ai-workbench-path {
  display: grid;
  gap: 12px;
}

.ai-workbench-path__node {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 8px 12px;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e1e7f0;
  border-radius: 8px;
  padding: 12px;
}

.ai-workbench-path__node span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #1f7ae0;
  color: #ffffff;
}

.ai-workbench-path__node p {
  grid-column: 2 / -1;
  margin: 0;
  color: #5d6778;
}

.ai-workbench-note {
  margin: 12px 0 0;
  color: #384253;
  line-height: 1.7;
}

@media (max-width: 900px) {
  .ai-workbench__layout {
    grid-template-columns: 1fr;
  }

  .ai-workbench-two-column,
  .ai-workbench-profile-grid,
  .ai-workbench-sim-workspace,
  .ai-workbench-sim-refine {
    grid-template-columns: 1fr;
  }

  .ai-workbench-sim-frame,
  .ai-workbench-sim-empty {
    min-height: 420px;
  }

  .ai-workbench__chat,
  .ai-workbench__tools {
    min-height: auto;
  }

  .ai-workbench-form {
    grid-template-columns: 1fr;
  }
}

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

.modal-card--wide .modal-head {
  position: sticky;
  top: -24px;
  z-index: 6;
  margin: -24px -24px 18px;
  padding: 18px 24px 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(35, 90, 166, 0.08);
}

.modal-title {
  margin: 4px 0 0;
  font-size: 26px;
}

.modal-close {
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(35, 90, 166, 0.08);
  color: var(--accent-deep);
  font-size: 22px;
  cursor: pointer;
}

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

.ai-grid--chat-only {
  grid-template-columns: minmax(0, 1fr);
}

.ai-grid--chat-only .ai-chat__log {
  min-height: 220px;
  max-height: 34vh;
}

.ai-chat__log {
  min-height: 360px;
  max-height: 52vh;
  overflow: auto;
  padding: 16px;
  border-radius: 22px;
  background: rgba(245, 249, 255, 0.92);
  border: 1px solid rgba(35, 90, 166, 0.08);
}

.ai-grid--chat-only .ai-chat__composer textarea {
  min-height: 92px;
}

.ai-grid--chat-only .ai-chat {
  gap: 10px;
}

.ai-status {
  display: grid;
  align-content: start;
  gap: 12px;
}

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

.ai-config-section {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 16px;
  border: 1px solid rgba(31, 73, 125, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.ai-config-section__head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.ai-config-section__head h3 {
  margin: 0;
  font-size: 16px;
}

.ai-config-source {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.ai-config-source.is-inherited {
  color: #46607f;
  background: rgba(102, 132, 170, 0.12);
}

.ai-config-source.is-direct {
  color: #0f6b5a;
  background: rgba(20, 151, 119, 0.14);
}

.ai-config-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

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

.ai-reasoning {
  margin-bottom: 10px;
  border-radius: 14px;
  border: 1px solid rgba(35, 90, 166, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.ai-reasoning summary {
  cursor: pointer;
  list-style: none;
  padding: 10px 12px;
  font-weight: 700;
  color: var(--accent-deep);
}

.ai-reasoning summary::-webkit-details-marker {
  display: none;
}

.ai-reasoning__body {
  padding: 0 12px 12px;
  color: var(--muted);
  line-height: 1.75;
}

.quiz-runtime {
  margin-top: 14px;
}

.quiz-form {
  display: grid;
  gap: 14px;
}

.quiz-question {
  border: 1px solid rgba(35, 90, 166, 0.12);
  border-radius: 16px;
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.68);
  min-width: 0;
}

.quiz-question__title {
  font-weight: 700;
  color: var(--ink);
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.quiz-question.is-correct {
  border-color: rgba(57, 169, 109, 0.28);
  background: rgba(57, 169, 109, 0.07);
}

.quiz-question.is-wrong {
  border-color: rgba(214, 72, 72, 0.28);
  background: rgba(214, 72, 72, 0.07);
}

.quiz-review,
.quiz-review__list,
.quiz-review__options {
  display: grid;
  gap: 10px;
}

.quiz-review__options {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.quiz-option {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 8px 0;
  color: var(--muted);
}

.learning-section,
.analytics-card {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(35, 90, 166, 0.08);
}

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

.analytics-card--full {
  margin-top: 14px;
}

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

.analytics-card__head select {
  max-width: 180px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(35, 90, 166, 0.16);
}

.analytics-bars {
  display: grid;
  gap: 10px;
}

.analytics-bar {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 2fr) 48px 44px 74px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.analytics-bar--count {
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 2fr) 64px;
}

.analytics-bar em {
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
}

.standalone-page {
  display: grid;
  gap: 16px;
}

.course-profile-layout {
  display: grid;
  grid-template-columns: 186px minmax(0, 1fr);
  gap: 28px;
  min-height: 560px;
}

.course-profile-nav {
  align-self: start;
  display: grid;
  gap: 5px;
  padding: 12px 0;
  border: 1px solid rgba(35, 90, 166, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.course-profile-nav__item {
  position: relative;
  border: 0;
  background: transparent;
  padding: 13px 18px 13px 24px;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}

.course-profile-nav__item:hover,
.course-profile-nav__item.is-active {
  color: var(--accent);
  background: rgba(35, 90, 166, 0.06);
}

.course-profile-nav__item.is-active::before {
  content: "";
  position: absolute;
  inset: 9px auto 9px 0;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: #6b5cff;
}

.course-profile-main {
  min-width: 0;
}

.course-profile-panel,
.course-profile-supplement {
  padding: 10px 8px 20px;
}

.course-profile-panel__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.course-profile-panel__head h3 {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 27px;
}

.course-profile-prose {
  min-height: 106px;
  margin-bottom: 18px;
  padding: 18px 20px;
  border-radius: 16px;
  color: var(--ink);
  line-height: 1.85;
  background: rgba(247, 249, 253, 0.82);
}

.course-profile-editor {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(35, 90, 166, 0.045);
  border: 1px solid rgba(35, 90, 166, 0.08);
}

.course-profile-editor textarea {
  min-height: 142px;
  resize: vertical;
}

.course-profile-material-files {
  margin: 16px 0 20px;
}

.course-profile-supplement {
  margin-top: 20px;
  padding-top: 22px;
  border-top: 1px solid rgba(35, 90, 166, 0.1);
}

.course-profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 24px;
}

.course-profile-stat {
  min-height: 168px;
  display: grid;
  align-content: space-between;
  padding: 16px 14px;
  border-radius: 15px;
  background: #eff2fc;
  color: var(--ink);
}

.course-profile-stat span {
  font-weight: 700;
}

.course-profile-stat strong {
  font-size: 44px;
  line-height: 1;
}

.course-profile-stat.is-primary {
  color: #fff;
  background: linear-gradient(150deg, #249af0, #167dd3);
}

.course-profile-stat.is-indigo {
  background: #eef0fb;
}

.course-profile-stat.is-green {
  background: #e6f7f1;
}

.course-profile-stat.is-light {
  background: #fff;
  border: 1px solid rgba(35, 90, 166, 0.12);
}

@media (max-width: 760px) {
  .course-profile-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

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

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

.analytics-bar__label {
  color: var(--ink);
  font-weight: 700;
}

.analytics-bar__track {
  height: 12px;
  border-radius: 999px;
  background: rgba(35, 90, 166, 0.1);
  overflow: hidden;
}

.analytics-bar__track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f7ec8, #f0a83a);
}

.ai-summary-box {
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(245, 249, 255, 0.94), rgba(255, 247, 225, 0.72));
  border: 1px solid rgba(35, 90, 166, 0.1);
  color: var(--ink);
  line-height: 1.8;
  white-space: pre-wrap;
}

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

.learning-dashboard--home {
  min-height: auto;
  grid-template-rows: auto auto;
}

#analyticsModal .modal-card--wide {
  width: min(94vw, 1180px);
  max-height: min(94vh, 980px);
  background:
    linear-gradient(135deg, rgba(235, 242, 255, 0.72), rgba(255,255,255,0) 38%),
    #f5f7fb;
}

#analyticsPageContent.standalone-page {
  gap: 0;
}

.learning-dash-card {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 16px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(46, 85, 137, 0.09);
  box-shadow: 0 14px 34px rgba(36, 55, 89, 0.065);
}

.learning-dashboard--home .learning-dash-card {
  overflow: visible;
}

.learning-dashboard--home .learning-dash-card--observation,
.learning-dashboard--home .learning-dash-card--portrait {
  min-height: 388px;
}

.learning-dashboard--home .learning-dash-card--usage,
.learning-dashboard--home .learning-dash-card--ai {
  min-height: 294px;
}

.learning-dash-card__head,
.analytics-dialogue__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.learning-dash-card__head h4,
.analytics-dialogue__head h4 {
  margin: 0;
  color: #17253b;
  font-size: 17px;
  line-height: 1.25;
}

.learning-dash-card__head h4::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 8px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px #6254f4;
}

.learning-dash-card__head p,
.learning-dash-card__head span {
  margin: 4px 0 0;
  color: #7d8798;
  font-size: 13px;
}

.learning-dash-card .mini-btn {
  border-radius: 999px;
  border-color: transparent;
  color: #5c50e6;
  background: #f3f1ff;
  min-height: 34px;
  padding: 7px 14px;
}

.learning-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 8px;
  font-size: 11px;
  color: #637083;
}

.learning-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.learning-legend span::before {
  content: "";
  width: 12px;
  height: 7px;
  border-radius: 2px;
  background: #cdd3dc;
}

.learning-legend .is-great::before { background: #58d37c; }
.learning-legend .is-good::before { background: #4bb7e2; }
.learning-legend .is-mid::before { background: #f6c759; }
.learning-legend .is-weak::before { background: #f3dc86; }
.learning-legend .is-empty::before { background: #cfd3d8; }

.learning-heatmap {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
  grid-auto-rows: 50px;
  justify-content: start;
  align-content: start;
  gap: 6px;
  overflow: visible;
  padding: 2px 4px 2px 0;
}

.learning-heatmap--compact {
  grid-template-columns: repeat(auto-fill, minmax(66px, 1fr));
  grid-auto-rows: 48px;
}

.learning-heat-cell {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  align-content: space-between;
  padding: 6px 6px 5px;
  border: 0;
  border-radius: 5px;
  color: #17304d;
  text-align: left;
  cursor: pointer;
  background: #d2d7de;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.22);
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.learning-heat-cell:hover {
  transform: translateY(-1px);
  filter: saturate(1.04);
  box-shadow: 0 8px 18px rgba(41, 62, 95, 0.13);
}

.learning-heat-cell[aria-disabled="true"] {
  cursor: default;
}

.learning-heat-cell[aria-disabled="true"]:hover {
  transform: none;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.22);
}

.learning-heat-cell span,
.learning-heat-cell strong {
  display: block;
}

.learning-heat-cell span {
  height: 26px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.24;
  overflow: hidden;
  word-break: break-all;
}

.learning-heat-cell strong {
  font-size: 12px;
  line-height: 1;
}

.learning-heat-cell.is-great { background: #58d37c; }
.learning-heat-cell.is-good { background: #4bb7e2; }
.learning-heat-cell.is-mid { background: #f6c759; }
.learning-heat-cell.is-weak { background: #f3dc86; }
.learning-heat-cell.is-empty { background: #d0d4da; color: #5b6574; }

.learning-portrait-metrics {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(52px, 9vw, 132px);
  padding: 0 0 4px;
}

.learning-mini-ring {
  --metric-fill: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #14243c;
}

.learning-mini-ring__chart {
  width: 148px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 56%, transparent 57%),
    conic-gradient(#5860f4 calc(var(--metric-fill) * 1turn), #eef2fb 0);
  box-shadow: 0 18px 34px rgba(67, 86, 190, 0.13);
}

.learning-mini-ring--dark .learning-mini-ring__chart {
  background:
    radial-gradient(circle at center, #fff 0 56%, transparent 57%),
    conic-gradient(#28a8ee calc(var(--metric-fill) * 1turn), #e8f4fd 0);
  box-shadow: 0 18px 34px rgba(40, 168, 238, 0.13);
}

.learning-mini-ring span {
  display: block;
  color: #5860f4;
  font-size: 34px;
  font-weight: 900;
  line-height: 1;
}

.learning-mini-ring--dark span {
  color: #249ce4;
}

.learning-mini-ring em {
  display: block;
  margin-top: 6px;
  color: #1a2b46;
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
}

.learning-mini-ring small {
  max-width: 132px;
  color: #4a5870;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.learning-usage-preview,
.learning-split,
.learning-profile-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 12px;
}

.learning-ai-avatar {
  min-height: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 18%, rgba(78, 149, 255, 0.14), transparent 34%),
    linear-gradient(180deg, #eef3ff, #fbfcff 58%, #ffffff);
  color: #1f2d44;
}

.learning-ai-avatar__bot {
  position: relative;
  width: 88px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 22%, rgba(255,255,255,0.86), transparent 20%),
    linear-gradient(145deg, #eaf1ff, #c7dcff);
  box-shadow: 0 16px 34px rgba(80, 117, 194, 0.22);
}

.learning-ai-avatar__bot::before {
  content: "";
  width: 52px;
  height: 34px;
  border-radius: 14px;
  background: linear-gradient(180deg, #16325c, #0a1d3a);
  box-shadow: 0 0 0 8px rgba(66, 142, 255, 0.16);
}

.learning-ai-avatar__bot::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 12px;
  top: 15px;
  border-radius: 999px;
  background: #fff;
}

.learning-ai-avatar__bot i {
  position: absolute;
  width: 6px;
  height: 6px;
  top: 43px;
  left: 35px;
  border-radius: 50%;
  background: #4ff0ff;
  box-shadow: 18px 0 0 #4ff0ff;
  z-index: 1;
}

.learning-ai-avatar__count {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.learning-ai-avatar strong {
  font-size: 36px;
  line-height: 1;
}

.learning-ai-avatar__count em,
.learning-ai-avatar__split em {
  color: #60708a;
  font-style: normal;
}

.learning-ai-avatar small {
  color: #7d8798;
}

.learning-ai-avatar__split {
  width: min(100%, 240px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(35, 90, 166, 0.1);
}

.learning-ai-avatar__split span {
  display: grid;
  justify-items: center;
  gap: 4px;
  color: #223553;
}

.learning-ai-avatar__split span + span {
  border-left: 1px solid rgba(35, 90, 166, 0.1);
}

.learning-ai-avatar__split b {
  color: #74849c;
  font-size: 12px;
  font-weight: 700;
}

.learning-ai-avatar__split strong {
  font-size: 22px;
}

.learning-ai-map {
  position: relative;
  flex: 1;
  min-height: 284px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  color: #17253b;
  background:
    radial-gradient(circle at 50% 50%, rgba(45, 154, 234, 0.08), transparent 24%),
    #fff;
  overflow: hidden;
}

.learning-ai-map::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(78%, 520px);
  height: 188px;
  transform: translate(-50%, -50%);
  border: 1px dashed rgba(70, 151, 236, 0.22);
  border-radius: 50%;
}

.learning-ai-map::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(52%, 340px);
  height: 112px;
  transform: translate(-50%, -50%);
  border: 1px dashed rgba(70, 151, 236, 0.24);
  border-radius: 50%;
}

.learning-ai-map__core {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 118px;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  color: #2196e8;
  background:
    radial-gradient(circle at 38% 30%, #fff, #eff9ff 58%, #dcefff);
  border: 1px solid rgba(73, 160, 238, 0.24);
  box-shadow: 0 22px 42px rgba(76, 141, 206, 0.18);
}

.learning-ai-map__core b {
  font-size: 34px;
  line-height: 1;
}

.learning-ai-map__core em {
  color: #1f3b5e;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}

.learning-ai-map__node {
  position: absolute;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 4px;
  color: #1b2d48;
  font-size: 13px;
  font-weight: 800;
  min-width: 104px;
}

.learning-ai-map__node i {
  position: relative;
  width: 68px;
  aspect-ratio: 1;
  display: block;
  border-radius: 50%;
  margin-bottom: 3px;
  background: #eef6ff;
  box-shadow: 0 16px 30px rgba(56, 107, 174, 0.12);
}

.learning-ai-map__node i::before,
.learning-ai-map__node i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
}

.learning-ai-map__node em {
  color: #40536f;
  font-style: normal;
  font-weight: 700;
}

.learning-ai-map__node.is-completion {
  left: 22%;
  top: 24px;
  transform: translateX(-50%);
}

.learning-ai-map__node.is-completion i {
  background: #e2f7ec;
}

.learning-ai-map__node.is-completion i::before {
  width: 31px;
  height: 31px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #20bd71;
}

.learning-ai-map__node.is-completion i::after {
  width: 14px;
  height: 8px;
  transform: translate(-50%, -62%) rotate(-45deg);
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
}

.learning-ai-map__node.is-mastery {
  right: 22%;
  top: 24px;
  transform: translateX(50%);
}

.learning-ai-map__node.is-mastery i {
  background: #e5f5ff;
}

.learning-ai-map__node.is-mastery i::before {
  width: 8px;
  height: 30px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  background: #25a8ef;
  box-shadow: -16px 10px 0 -1px #25a8ef, 16px -8px 0 -1px #25a8ef;
}

.learning-ai-map__node.is-weak {
  left: 22%;
  bottom: 34px;
  transform: translateX(-50%);
}

.learning-ai-map__node.is-weak i {
  background: #fff1d9;
}

.learning-ai-map__node.is-weak i::before {
  width: 34px;
  height: 30px;
  transform: translate(-50%, -46%);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
  background: #f4b23b;
}

.learning-ai-map__node.is-weak i::after {
  width: 4px;
  height: 14px;
  transform: translate(-50%, -48%);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 17px 0 -1px #fff;
}

.learning-ai-map__node.is-usage {
  right: 22%;
  bottom: 34px;
  transform: translateX(50%);
}

.learning-ai-map__node.is-usage i {
  background: #f0e8ff;
}

.learning-ai-map__node.is-usage i::before {
  width: 31px;
  height: 36px;
  transform: translate(-50%, -50%);
  border-radius: 48% 52% 56% 44% / 62% 58% 42% 38%;
  background: linear-gradient(180deg, #9a79f2, #7853e8);
}

.learning-ai-map__caption {
  position: absolute;
  left: 50%;
  bottom: 11px;
  transform: translateX(-50%);
  padding: 6px 18px;
  border-radius: 999px;
  color: #65758e;
  background: #f5f8fc;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.learning-ai-orbit {
  position: relative;
  flex: 1;
  min-height: 162px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  color: #fff;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(135deg, #1f94a6, #2f5fbd 58%, #32353a);
  background-size: 28px 28px, 28px 28px, auto;
}

.learning-ai-orbit::before,
.learning-ai-orbit::after {
  content: "";
  position: absolute;
  inset: 26px 76px;
  border: 1px solid rgba(255,255,255,0.26);
  border-radius: 50%;
}

.learning-ai-orbit::after {
  inset: 44px 118px;
  opacity: 0.62;
}

.learning-ai-orbit__core {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 76px;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255,255,255,0.36);
  box-shadow: 0 16px 30px rgba(12, 22, 45, 0.16);
}

.learning-ai-orbit__core b,
.learning-ai-orbit__core em {
  display: block;
  font-style: normal;
  line-height: 1.1;
}

.learning-ai-orbit__core b {
  font-size: 24px;
}

.learning-ai-orbit__core em {
  font-size: 13px;
  color: rgba(255,255,255,0.82);
}

.learning-ai-orbit__node {
  position: absolute;
  z-index: 1;
  min-width: 68px;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 7px 9px;
  border-radius: 8px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.24);
  backdrop-filter: blur(5px);
}

.learning-ai-orbit__node strong {
  font-size: 18px;
  line-height: 1;
}

.learning-ai-orbit__node small {
  color: rgba(255,255,255,0.82);
}

.learning-ai-orbit__node.is-top { left: 50%; top: 20px; transform: translateX(-50%); }
.learning-ai-orbit__node.is-right { right: 24px; top: 50%; transform: translateY(-50%); }
.learning-ai-orbit__node.is-bottom { left: 50%; bottom: 20px; transform: translateX(-50%); }
.learning-ai-orbit__node.is-left { left: 24px; top: 50%; transform: translateY(-50%); }

.learning-detail-view {
  display: grid;
  gap: 14px;
}

.analytics-back-icon {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  justify-self: start;
  border: 1px solid rgba(35, 90, 166, 0.12);
  border-radius: 50%;
  color: #355071;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(36, 55, 89, 0.08);
}

.analytics-back-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.analytics-back-icon:hover {
  color: #5147dd;
  transform: translateX(-1px);
}

.learning-profile-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(35, 90, 166, 0.1);
}

.learning-profile-subject {
  display: grid;
  align-content: center;
  gap: 3px;
  min-height: 58px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #17253b;
  background: linear-gradient(135deg, #eef6ff, #f8fbff);
}

.learning-profile-subject strong {
  font-size: 18px;
  line-height: 1.2;
}

.learning-profile-subject span {
  color: #718098;
  font-size: 12px;
  font-weight: 700;
}

.learning-profile-grid {
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
  align-items: stretch;
}

.learning-profile-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.learning-profile-toolbar select,
.analytics-dialogue__input input {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(35, 90, 166, 0.16);
  background: #fff;
}

.learning-radar {
  width: min(100%, 560px);
  display: block;
  margin: 0 auto 8px;
  overflow: visible;
}

.learning-radar__grid {
  fill: rgba(70, 149, 224, 0.035);
  stroke: rgba(71, 104, 152, 0.18);
}

.learning-radar__axis {
  stroke: rgba(71, 104, 152, 0.18);
}

.learning-radar__shape {
  fill: rgba(75, 190, 144, 0.34);
  stroke: #20a974;
  stroke-width: 2.6;
}

.learning-radar__dot {
  fill: #fff;
  stroke: #20a974;
  stroke-width: 2.2;
}

.learning-radar text {
  font-size: 12px;
  font-weight: 700;
  fill: #657286;
  dominant-baseline: middle;
}

.learning-capability-list {
  display: grid;
  gap: 8px;
  font-size: 13px;
}

.learning-capability-list span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 8px;
  background: #f6f8fc;
}

.analytics-dialogue {
  display: grid;
  gap: 12px;
}

.analytics-dialogue__messages {
  max-height: 320px;
  overflow: auto;
  display: grid;
  gap: 10px;
}

.analytics-dialogue__bubble {
  padding: 12px 14px;
  border-radius: 8px;
  white-space: pre-wrap;
  line-height: 1.75;
  background: #f2f5fb;
  color: var(--ink);
}

.analytics-dialogue__bubble.is-user {
  background: #e6f4ed;
}

.analytics-dialogue__input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.learning-ai-analysis-panel {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.learning-ai-analysis-visual {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  min-height: 320px;
  border-radius: 8px;
  color: #fff;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(145deg, #214f77, #2d9c83);
  background-size: 32px 32px, 32px 32px, auto;
}

.learning-ai-analysis-visual::before {
  content: "";
  position: absolute;
  width: 220px;
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 50%;
}

.learning-ai-analysis-visual span {
  position: relative;
  width: 92px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 28px;
  font-weight: 900;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.28);
}

.learning-ai-analysis-visual strong,
.learning-ai-analysis-visual small {
  position: relative;
}

@media (max-width: 900px) {
  .learning-dashboard,
  .learning-usage-preview,
  .learning-split,
  .learning-profile-grid,
  .learning-ai-analysis-panel {
    grid-template-columns: 1fr;
  }

  .learning-profile-toolbar {
    grid-template-columns: 1fr;
  }

  .learning-portrait-metrics {
    flex-wrap: wrap;
  }
}

.chat-bubble {
  max-width: 88%;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.math-formula {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0 3px;
  padding: 1px 5px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--accent-deep);
  font-family: "Cambria Math", "Times New Roman", serif;
  white-space: nowrap;
}

.math-strong {
  font-weight: 800;
}

.math-frac {
  display: inline-grid;
  grid-template-rows: auto auto;
  align-items: center;
  text-align: center;
  line-height: 1.05;
  vertical-align: middle;
}

.math-frac span:first-child {
  border-bottom: 1px solid currentColor;
  padding: 0 3px 1px;
}

.math-frac span:last-child {
  padding: 1px 3px 0;
}

.math-sqrt {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
}

.math-sqrt span {
  border-top: 1px solid currentColor;
  padding: 0 3px;
}

.chat-code {
  display: block;
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(18, 37, 68, 0.08);
  overflow-x: auto;
  white-space: pre-wrap;
  font-family: Consolas, "Courier New", monospace;
}

.chat-heading {
  margin: 8px 0 6px;
  font-weight: 800;
  color: var(--ink);
}

.ai-thinking-indicator {
  margin-bottom: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(35, 90, 166, 0.12);
}

.chat-bubble--assistant {
  background: rgba(35, 90, 166, 0.08);
}

.chat-bubble--user {
  margin-left: auto;
  background: rgba(240, 165, 59, 0.14);
}

.config-lock {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(35, 90, 166, 0.08);
}

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

.score-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(35, 90, 166, 0.08);
  color: var(--accent-deep);
  font-size: 12px;
}

#graphSvg .edge {
  fill: none;
  stroke-linecap: round;
  opacity: 0.9;
  transition: opacity 180ms ease, stroke-width 180ms ease, filter 180ms ease;
}

#graphSvg .edge--hierarchy {
  stroke: rgba(67, 100, 148, 0.78);
  stroke-width: 1.35;
}

#graphSvg .edge--prerequisite {
  stroke: rgba(240, 166, 52, 0.92);
  stroke-width: 1.55;
  stroke-dasharray: 8 8;
}

#graphSvg .edge--postrequisite {
  stroke: rgba(56, 125, 224, 0.92);
  stroke-width: 1.55;
  stroke-dasharray: 10 8;
}

#graphSvg .edge--related {
  stroke: rgba(64, 182, 125, 0.92);
  stroke-width: 1.6;
  stroke-dasharray: 7 7;
}

#graphSvg .edge--ring-hierarchy {
  fill: none;
  stroke: rgba(221, 111, 148, 0.72);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.88;
}

#graphSvg .edge--ring-branch-0 {
  stroke: rgba(229, 107, 150, 0.82);
}

#graphSvg .edge--ring-branch-1 {
  stroke: rgba(235, 118, 104, 0.82);
}

#graphSvg .edge--ring-branch-2 {
  stroke: rgba(149, 109, 232, 0.82);
}

#graphSvg .edge--ring-branch-3 {
  stroke: rgba(87, 124, 231, 0.82);
}

#graphSvg .edge--ring-branch-4 {
  stroke: rgba(55, 156, 230, 0.82);
}

#graphSvg .edge--ring-branch-5 {
  stroke: rgba(44, 182, 168, 0.82);
}

#graphSvg .edge--ring-branch-6 {
  stroke: rgba(39, 181, 74, 0.82);
}

#graphSvg .edge--ring-branch-7 {
  stroke: rgba(226, 134, 53, 0.82);
}

#graphSvg .edge.is-active {
  opacity: 1;
  stroke-width: 2.4;
  filter: drop-shadow(0 0 7px rgba(77, 145, 224, 0.35));
}

#graphSvg .edge.is-faded {
  opacity: 0.1;
}

#graphSvg .edge-flow {
  stroke: none;
  pointer-events: none;
  opacity: 0.96;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.22));
}

#graphSvg .edge-flow--hierarchy {
  fill: rgba(67, 100, 148, 0.94);
}

#graphSvg .edge-flow--prerequisite {
  fill: rgba(240, 166, 52, 0.98);
}

#graphSvg .edge-flow--postrequisite {
  fill: rgba(56, 125, 224, 0.98);
}

#graphSvg .edge-flow--related {
  fill: rgba(64, 182, 125, 0.98);
}

#graphSvg .edge-flow.is-faded {
  opacity: 0.12;
}

#graphSvg .node-group {
  cursor: pointer;
  transition: opacity 180ms ease;
}

#graphSvg .node-group.is-draggable {
  cursor: pointer;
}

#graphSvg .node-group.is-dragging {
  cursor: grabbing;
}

#graphSvg .node-group.is-faded {
  opacity: 0.22;
}

#graphSvg .node-group.is-filter-muted {
  opacity: 0.28;
}

#graphSvg .node-circle {
  stroke-width: 4;
  filter: drop-shadow(0 10px 18px rgba(37, 63, 118, 0.16));
  transition: transform 160ms ease, filter 160ms ease;
}

#graphSvg .node-pill {
  filter: drop-shadow(0 12px 22px rgba(37, 63, 118, 0.16));
}

#graphSvg .node-square {
  filter: drop-shadow(0 12px 20px rgba(37, 63, 118, 0.16));
}

#graphSvg .node-pill-glow {
  fill: rgba(255, 255, 255, 0.18);
  filter: blur(6px);
}

#graphSvg .node-square-glow {
  fill: rgba(255, 255, 255, 0.18);
  filter: blur(6px);
}

#graphSvg .node-group--ring-l1 .node-circle,
#graphSvg .node-group--ring-l1 .node-pill,
#graphSvg .node-group--ring-l1 .node-square {
  filter: drop-shadow(0 16px 28px rgba(34, 57, 118, 0.16));
}

#graphSvg .node-group--ring-l2 .node-circle,
#graphSvg .node-group--ring-l2 .node-square {
  stroke-width: 3.4;
}

#graphSvg .node-group--ring-l3 .node-circle {
  filter: drop-shadow(0 8px 14px rgba(37, 63, 118, 0.14));
  stroke-width: 2.2;
}

#graphSvg .node-ring-halo {
  stroke: none;
  filter: blur(2px);
}

#graphSvg .node-group.is-selected .node-circle {
  stroke: rgba(20, 50, 92, 0.88);
  stroke-width: 6;
  filter: drop-shadow(0 16px 24px rgba(24, 63, 119, 0.26));
}

#graphSvg .node-group.is-related .node-circle {
  stroke: rgba(34, 76, 134, 0.72);
  stroke-width: 5;
  filter: drop-shadow(0 16px 24px rgba(24, 63, 119, 0.2));
}

#graphSvg .node-group:hover .node-circle {
  filter: drop-shadow(0 14px 22px rgba(37, 63, 118, 0.2));
}

#graphSvg .course-hub-edge {
  fill: none;
  stroke: rgba(147, 167, 244, 0.38);
  stroke-width: 2.4;
  stroke-linecap: round;
  opacity: 0.82;
}

#graphSvg .course-hub-edge--0 {
  stroke: rgba(229, 107, 150, 0.52);
}

#graphSvg .course-hub-edge--1 {
  stroke: rgba(235, 118, 104, 0.52);
}

#graphSvg .course-hub-edge--2 {
  stroke: rgba(149, 109, 232, 0.52);
}

#graphSvg .course-hub-edge--3 {
  stroke: rgba(87, 124, 231, 0.52);
}

#graphSvg .course-hub-edge--4 {
  stroke: rgba(55, 156, 230, 0.52);
}

#graphSvg .course-hub-edge--5 {
  stroke: rgba(44, 182, 168, 0.52);
}

#graphSvg .course-hub-edge--6 {
  stroke: rgba(39, 181, 74, 0.52);
}

#graphSvg .course-hub-edge--7 {
  stroke: rgba(226, 134, 53, 0.52);
}

#graphSvg .course-hub__glow {
  fill: rgba(116, 136, 238, 0.2);
}

#graphSvg .course-hub__text {
  fill: #ffffff;
  text-anchor: middle;
  dominant-baseline: middle;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.02em;
  paint-order: stroke;
  stroke: rgba(35, 56, 166, 0.28);
  stroke-width: 4;
}

#graphSvg .node-text {
  fill: #173054;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
  font-weight: 700;
}

#graphSvg .node-text--l1 {
  font-size: 20px;
}

#graphSvg .node-text--l2 {
  font-size: 16px;
}

#graphSvg .node-text--l3 {
  font-size: 16px;
}

#graphSvg .node-text--ring-l1 {
  font-size: 16px;
}

#graphSvg .node-text--ring-l2 {
  font-size: 14px;
}

#graphSvg .node-text--ring-l3 {
  font-size: 13px;
  font-weight: 600;
}

#graphSvg .node-label-line {
  stroke: rgba(91, 124, 160, 0.62);
  stroke-width: 1.4;
  stroke-linecap: round;
}

#graphSvg .expand-badge {
  fill: rgba(17, 45, 86, 0.9);
  stroke: rgba(17, 45, 86, 0.45);
  stroke-width: 2;
}

#graphSvg .expand-text {
  fill: #fff;
  text-anchor: middle;
  dominant-baseline: middle;
  font-size: 14px;
  font-weight: 700;
  pointer-events: none;
}

#graphSvg .node-shine {
  fill: rgba(255, 255, 255, 0.24);
  pointer-events: none;
}

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

  .hero {
    flex-direction: column;
  }

  .hero__side {
    min-width: 0;
    width: 100%;
  }

  .graph-toolbar {
    flex-direction: column;
  }

  .legend {
    justify-content: flex-start;
  }

  .legend__row {
    justify-content: flex-start;
  }

  .panel-card__head,
  .reflection-item__head,
  .teacher-record__head {
    flex-direction: column;
  }

  .resource-link,
  .resource-link--doc {
    flex-direction: column;
    align-items: flex-start;
  }

  .resource-link__actions {
    width: 100%;
    justify-content: flex-start;
  }

  .course-resource-card {
    grid-template-columns: 1fr;
  }

  .course-resource-card__preview {
    min-height: 150px;
  }

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

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

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

@media (max-width: 760px) {
  .page-shell {
    padding: 14px;
  }

  .hero__actions {
    justify-content: flex-start;
  }

  #graphSvg {
    min-height: 560px;
  }

  .graph-capability-map,
  .capability-layout {
    min-height: 0;
  }

  .capability-layout__summary {
    padding: 22px 16px;
  }

  .capability-layout__summary h2 {
    font-size: 23px;
  }

  .capability-layout__visual {
    grid-template-rows: auto auto;
  }

  .form-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .modal-card {
    width: min(96vw, 680px);
    margin-top: 3vh;
    padding: 18px;
  }
}

.review-dashboard-head {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

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

.review-summary-card {
  border: 1px solid rgba(40, 80, 150, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
  padding: 16px 18px;
  display: grid;
  gap: 6px;
  text-align: left;
  color: #1f3762;
  box-shadow: 0 10px 24px rgba(30, 72, 140, 0.08);
}

.review-summary-card strong {
  font-size: 28px;
  line-height: 1;
}

.review-summary-card small {
  color: #6b7b95;
}

.review-summary-card.is-active {
  border-color: rgba(48, 107, 210, 0.42);
  box-shadow: 0 14px 28px rgba(49, 109, 212, 0.16);
}

.review-summary-card__title {
  font-size: 15px;
  font-weight: 700;
}

.review-task-table td:nth-child(2) {
  min-width: 180px;
}

.review-task-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.review-task-page {
  max-width: 1440px;
}

.review-task-detail-table td:last-child {
  white-space: nowrap;
}

.review-task-detail-row td {
  background: rgba(35, 90, 166, 0.035);
}

.review-task-answer {
  display: grid;
  gap: 8px;
  padding: 14px 8px;
}

.review-task-answer h4,
.review-task-answer p {
  margin: 0;
}

.review-task-answer pre {
  margin: 0;
  padding: 12px;
  border-radius: 12px;
  background: rgba(35, 90, 166, 0.06);
  font: inherit;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-tabs--cards {
  flex-wrap: wrap;
}

.resource-link--stack {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.quiz-resource-card {
  align-items: stretch;
  gap: 12px;
}

.quiz-resource-card__meta {
  min-width: 0;
}

.quiz-resource-card__teacher-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.quiz-resource-card__student-action {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
}

.quiz-resource-card__student-action .mini-btn {
  min-width: 72px;
}

@media (max-width: 720px) {
  .quiz-resource-card__student-action {
    justify-content: flex-start;
  }
}

.activity-qr-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(9, 22, 42, 0.48);
  backdrop-filter: blur(8px);
}

.activity-qr-card {
  width: min(92vw, 430px);
  max-height: min(86vh, 760px);
  overflow: auto;
  position: relative;
  display: grid;
  gap: 12px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(219, 228, 240, 0.9);
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 40, 84, 0.28);
}

.activity-qr-card--wide {
  width: min(94vw, 760px);
}

.activity-qr-card h3 {
  margin: 0;
  color: var(--accent-deep);
}

.activity-qr-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.activity-qr-image {
  width: 260px;
  height: 260px;
  justify-self: center;
  border: 1px solid rgba(35, 90, 166, 0.12);
  border-radius: 16px;
  padding: 10px;
  background: #fff;
}

.activity-qr-link {
  word-break: break-all;
  color: var(--accent);
  font-size: 13px;
}

.accuracy-chart {
  display: grid;
  gap: 12px;
}

.accuracy-row {
  display: grid;
  grid-template-columns: minmax(64px, 86px) 1fr 52px 54px;
  align-items: center;
  gap: 10px;
}

.accuracy-bar {
  height: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(35, 90, 166, 0.11);
}

.accuracy-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f80ed, #39a96d);
}

.accuracy-row strong {
  color: var(--accent-deep);
}

.accuracy-row small {
  color: var(--muted);
}

.field--inline-check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.review-editor__meta-card {
  padding-bottom: 10px;
}

.review-editor__workspace {
  position: relative;
}

.review-editor__floating {
  position: sticky;
  top: 12px;
  z-index: 24;
  margin: -4px 0 16px;
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(36, 78, 148, 0.12);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(18px);
}

.review-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}

.review-toolbar .mini-btn.is-active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border-color: transparent;
}

.review-toolbar__divider {
  width: 1px;
  height: 22px;
  background: #c7d5ea;
  margin: 0 4px;
}

.review-canvas-wrap {
  position: relative;
  min-height: 720px;
  border: 1px solid #d9e4f2;
  border-radius: 20px;
  overflow: auto;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
  padding: 6px;
}

.review-preview {
  min-height: 720px;
}

.review-preview--pages {
  display: grid;
  gap: 20px;
}

.review-page {
  position: relative;
  width: min(100%, 1500px);
  margin: 0 auto;
  border-radius: 20px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.review-page--embed {
  width: 100%;
  max-width: none;
}

.review-page__image {
  display: block;
  width: 100%;
  height: auto;
}

.review-preview__frame {
  display: block;
  width: 100%;
  min-height: 1400px;
  height: calc(100vh - 220px);
  border: 0;
  background: #fff;
}

.review-preview__notice {
  width: min(100%, 1500px);
  margin: 14px auto 0;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(191, 90, 36, 0.22);
  background: rgba(255, 247, 237, 0.95);
  color: #9a3412;
  line-height: 1.75;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.review-page__text {
  min-height: 720px;
  padding: 28px;
  white-space: pre-wrap;
  line-height: 1.9;
  font-size: 15px;
  color: #243b53;
}

.review-page__overlay {
  position: absolute;
  inset: 0;
  cursor: crosshair;
  user-select: none;
}

.review-score-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 0;
}

.review-score-chip {
  min-width: 170px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(36, 78, 148, 0.12);
  background: rgba(255, 255, 255, 0.86);
}

.review-score-chip span {
  display: block;
  font-size: 12px;
  color: #6b7b95;
}

.review-score-chip strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
  color: #153d77;
}

.review-score-chip--highlight {
  background: linear-gradient(135deg, rgba(46, 102, 180, 0.14), rgba(22, 63, 119, 0.15));
}

.review-editor__head-actions {
  align-items: end;
}

.review-editor__floating-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

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

.review-editor__score-input {
  display: grid;
  gap: 6px;
  color: #6b7b95;
  font-size: 12px;
}

.review-editor__score-input input {
  min-width: 180px;
}

.review-mark {
  position: absolute;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #f59e0b;
  border-radius: 999px;
  min-width: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #b45309;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
  cursor: move;
}

.review-mark small {
  font-size: 11px;
}

.review-line {
  position: absolute;
  border-bottom: 3px solid #ef4444;
  min-width: 8px;
  cursor: move;
}

.review-line__handle {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #ef4444;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);
  transform: translate(-50%, -50%);
}

.review-line__handle--start {
  left: 0;
}

.review-line__handle--end {
  left: 100%;
}

.review-hint {
  margin-top: 12px;
}

.review-editor__feedback {
  margin-bottom: 14px;
}

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

.usage-summary-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 8px;
  background: #f6f8fc;
  border: 1px solid rgba(36, 78, 148, 0.08);
}

.usage-summary-item__index {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e7f0ff;
  color: #2559a8;
  font-weight: 700;
}

.usage-summary-item__body {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: #1f2f46;
  font-size: 13px;
}

.usage-summary-item__body strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 920px) {
  .review-editor__floating {
    top: 8px;
    padding: 12px;
  }

  .review-editor__floating-row,
  .review-editor__floating-actions {
    display: grid;
    justify-content: stretch;
  }

  .review-preview__frame {
    min-height: 900px;
    height: calc(100vh - 160px);
  }

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

/* ===== 课堂互动 ===== */

.interaction-page-body {
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(180deg, #f7faff 0%, #eef5ff 100%);
}

.interaction-page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 36px;
}

.interaction-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.interaction-page-head h1 {
  margin: 4px 0 6px;
  font-size: 28px;
}

.interaction-page-card {
  padding: 18px;
  border: 1px solid rgba(35, 90, 166, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 44px rgba(28, 54, 94, 0.08);
}

.interaction-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-color, #e0e0e0);
  margin-bottom: 1.25rem;
}

.interaction-tab {
  padding: 0.6rem 1.25rem;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  color: #666;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}

.interaction-tab:hover { color: #333; }

.interaction-tab.is-active {
  color: var(--primary-color, #1a73e8);
  border-bottom-color: var(--primary-color, #1a73e8);
  font-weight: 600;
}

.interaction-panel { min-height: 240px; }

.interaction-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.interaction-row--stack {
  flex-direction: column;
  align-items: stretch;
}

.interaction-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 18px;
}

.interaction-column {
  display: grid;
  gap: 16px;
  align-content: start;
}

.interaction-column--wide {
  min-width: 0;
}

.interaction-stage-actions {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}

.interaction-stage-actions + .interaction-stage-actions {
  border-top: 1px solid rgba(35, 90, 166, 0.12);
}

.interaction-stage-actions strong {
  display: block;
}

.interaction-stage-actions .ghost-btn.is-rolling {
  background: #1f5fae;
  border-color: #1f5fae;
  color: #fff;
  box-shadow: 0 0 0 6px rgba(31, 95, 174, 0.12);
}

.draw-roller {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  min-height: 64px;
  margin: 2px 0 10px;
  padding: 10px 14px;
  border: 1px dashed rgba(35, 90, 166, 0.28);
  border-radius: 8px;
  background: #f7fbff;
}

.draw-roller__label {
  color: #45607f;
  font-size: 13px;
}

.draw-roller strong {
  min-width: 0;
  overflow: hidden;
  color: #12345f;
  font-size: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.draw-roller small {
  grid-column: 2;
  color: #64748b;
}

.draw-roller.is-rolling {
  border-color: rgba(31, 95, 174, 0.58);
  background: #eef6ff;
}

.draw-roller.is-rolling strong {
  color: #1f5fae;
}

.deadline-status {
  align-self: center;
  color: #45607f;
  font-size: 13px;
  white-space: nowrap;
}

.submission-deadline-overlay {
  position: fixed;
}

.submission-deadline-dialog {
  max-width: 520px;
  text-align: left;
}

.interaction-state {
  margin: 10px 0 0;
  color: #45607f;
  font-size: 14px;
}

.interaction-workbench {
  display: grid;
  gap: 14px;
}

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

.interaction-stage {
  min-height: 120px;
  padding: 14px;
  border: 1px solid rgba(35, 90, 166, 0.12);
  border-radius: 8px;
  background: rgba(247, 250, 255, 0.9);
}

.interaction-stage h4,
.interaction-stage p,
.interaction-segment-list p {
  margin: 0;
}

.interaction-stage h4 {
  margin-bottom: 8px;
}

.interaction-stage p,
.interaction-segment-list p {
  overflow-wrap: break-word;
}

.interaction-segment-list {
  display: grid;
  gap: 6px;
}

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

.interaction-record-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(35, 90, 166, 0.14);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.interaction-record-item.is-active {
  border-color: rgba(48, 107, 210, 0.48);
  background: rgba(237, 244, 255, 0.92);
}

.interaction-record-item span,
.interaction-record-item small {
  color: #63748b;
}

.batch-qr-panel {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.batch-qr-panel img {
  display: block;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(35, 90, 166, 0.14);
  border-radius: 8px;
  background: #fff;
}

.batch-qr-panel p {
  margin: 10px 0;
}

.batch-qr-panel a {
  display: block;
  margin-bottom: 12px;
  color: #235aa6;
  overflow-wrap: anywhere;
}

.batch-round-status {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(48, 107, 210, 0.12);
  color: #235aa6;
  font-size: 13px;
  font-weight: 600;
}

.batch-round-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.batch-round-summary > div,
.batch-score-band {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(35, 90, 166, 0.12);
  border-radius: 8px;
  background: rgba(247, 250, 255, 0.9);
}

.batch-round-summary span,
.batch-score-band span,
.batch-student-row span,
.batch-student-meta {
  color: #63748b;
  font-size: 13px;
}

.batch-round-summary strong,
.batch-score-band strong {
  font-size: 20px;
}

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

.group-discussion-panel {
  align-items: start;
}

.group-round-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 16px;
  align-items: start;
}

.group-round-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.group-score-bands {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.group-card {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(35, 90, 166, 0.12);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  text-align: left;
}

.group-list {
  display: grid;
  gap: 10px;
}

.group-list-item {
  cursor: pointer;
}

.group-list-item.is-active {
  border-color: rgba(48, 107, 210, 0.48);
  background: rgba(237, 244, 255, 0.92);
}

.group-member-list,
.group-score-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.group-member-list span {
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(48, 107, 210, 0.1);
  color: #235aa6;
  font-size: 13px;
}

.group-chat-log {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.group-chat-message {
  border-left: 3px solid #2563eb;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 6px;
}

.group-chat-message p {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.group-chat-message.is-ai {
  border-left-color: #7c3aed;
  background: #faf5ff;
}

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

.review-detail-summary {
  display: grid;
  gap: 6px;
}

.review-detail-summary__scores {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.review-feedback-block {
  display: grid;
  gap: 4px;
}

.review-feedback-block pre {
  margin: 0;
  color: inherit;
  font: inherit;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.mobile-group-chat {
  display: grid;
  gap: 14px;
}

.mobile-group-messages {
  display: grid;
  gap: 10px;
  max-height: 48vh;
  overflow: auto;
  padding-right: 4px;
}

.mobile-group-message {
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.mobile-group-message.is-ai {
  background: #f5f3ff;
  border-color: #ddd6fe;
}

.group-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.group-input-row textarea {
  width: 100%;
  resize: vertical;
}

.batch-student-list {
  display: grid;
  gap: 10px;
}

.batch-student-row {
  border: 1px solid rgba(35, 90, 166, 0.12);
  border-radius: 8px;
  background: #fff;
}

.batch-student-row__main {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.batch-student-row__main > div:first-child {
  display: grid;
  gap: 3px;
}

.batch-student-status {
  display: inline-flex;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(48, 107, 210, 0.1);
}

.batch-student-details {
  display: grid;
  gap: 12px;
  padding: 0 12px 12px;
  border-top: 1px solid rgba(35, 90, 166, 0.1);
}

.batch-student-details p {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
}

/* 班级选择 chips */

.class-select-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.class-chip {
  padding: 0.35rem 0.85rem;
  border: 1px solid #ccc;
  border-radius: 20px;
  background: #f8f8f8;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  user-select: none;
}

.class-chip.is-selected {
  background: var(--primary-color, #1a73e8);
  border-color: var(--primary-color, #1a73e8);
  color: #fff;
}

/* 录音按钮 */

.record-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid #e53935;
  background: #fff;
  color: #e53935;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
}

.record-btn:hover { transform: scale(1.06); box-shadow: 0 0 0 6px rgba(229, 57, 53, 0.15); }

.record-btn.is-recording {
  animation: recordPulse 1.2s ease-in-out infinite;
}

@keyframes recordPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.45); }
  50% { box-shadow: 0 0 0 14px rgba(229, 57, 53, 0); }
}

.record-btn .record-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e53935;
}

.record-btn.is-recording .record-icon {
  animation: iconBlink 0.9s ease-in-out infinite;
}

@keyframes iconBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.record-label {
  font-size: 0.85rem;
  color: #888;
}

.record-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 抽查结果 */

.pick-result {
  text-align: center;
  padding: 1.5rem;
  animation: pickReveal 0.45s ease-out;
}

@keyframes pickReveal {
  0% { opacity: 0; transform: translateY(-12px); }
  100% { opacity: 1; transform: translateY(0); }
}

.pick-result__name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color, #1a73e8);
  margin: 0.5rem 0;
}

.pick-result__info {
  font-size: 0.9rem;
  color: #666;
}

/* 评分卡片 */

.score-card {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  background: #f9f9f9;
  border-left: 4px solid #ccc;
}

.score-card.is-independent { border-left-color: #4caf50; }
.score-card.is-prompted { border-left-color: #ff9800; }
.score-card.is-unable { border-left-color: #f44336; }
.score-card.is-no-answer { border-left-color: #9e9e9e; }

.score-card__score {
  font-size: 2rem;
  font-weight: 700;
  margin: 0.25rem 0;
}

.score-card__status {
  font-size: 0.8rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.score-card__comment {
  font-size: 0.9rem;
  color: #555;
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* 对话列表 */

.dialogue-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 320px;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.dialogue-item {
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  max-width: 85%;
  font-size: 0.9rem;
  line-height: 1.45;
}

.dialogue-item.is-ai {
  align-self: flex-start;
  background: #e8f0fe;
  color: #1a3a5c;
}

.dialogue-item.is-student {
  align-self: flex-end;
  background: #e8f5e9;
  color: #1b3a1f;
  text-align: right;
}

.dialogue-item__role {
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.65;
  margin-bottom: 0.15rem;
}

/* 二维码区域 */

.qr-section {
  text-align: center;
  padding: 1rem;
}

.qr-section img {
  max-width: 220px;
  height: auto;
  border: 1px solid #eee;
  border-radius: 6px;
}

.qr-section__url {
  font-size: 0.78rem;
  color: #999;
  margin-top: 0.4rem;
  word-break: break-all;
}

@media (max-width: 900px) {
  .interaction-layout,
  .interaction-stage-grid {
    grid-template-columns: 1fr;
  }

  .interaction-stage-actions {
    grid-template-columns: 64px 1fr;
  }

  .interaction-stage-actions .ghost-btn,
  .interaction-stage-actions .primary-btn {
    grid-column: 1 / -1;
  }

  .batch-qr-panel,
  .batch-round-summary,
  .batch-score-bands,
  .group-round-grid,
  .group-round-summary,
  .group-score-bands,
  .batch-student-row__main {
    grid-template-columns: 1fr;
  }

  .batch-qr-panel img {
    width: min(220px, 100%);
    height: auto;
    aspect-ratio: 1;
  }
}

/* 录音遮罩 */

.recording-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.recording-overlay__inner {
  text-align: center;
  color: #fff;
}

.recording-pulse {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(229, 57, 53, 0.3);
  margin: 0 auto 1rem;
  animation: overlayPulse 1.2s ease-in-out infinite;
}

@keyframes overlayPulse {
  0%, 100% { transform: scale(1); opacity: 0.55; }
  50% { transform: scale(1.18); opacity: 1; }
}

.recording-timer {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.recording-hint {
  font-size: 0.95rem;
  opacity: 0.8;
  margin-bottom: 1.25rem;
}

.recording-stop-btn {
  padding: 0.6rem 1.8rem;
  border: 2px solid #fff;
  border-radius: 24px;
  background: transparent;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.recording-stop-btn:hover { background: rgba(255, 255, 255, 0.2); }

/* 互动回答表格 */

.interaction-answer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.interaction-answer-table th,
.interaction-answer-table td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border-color, #e0e0e0);
  text-align: left;
}

.interaction-answer-table th {
  font-weight: 600;
  color: #555;
  background: #fafafa;
  position: sticky;
  top: 0;
}

@media (prefers-reduced-motion: reduce) {
  .record-btn.is-recording,
  .record-btn.is-recording .record-icon,
  .pick-result,
  .recording-pulse {
    animation: none;
  }
}
