:root {
  --bg-main: #060818;
  --bg-panel: rgba(13, 20, 44, 0.7);
  --border-glass: rgba(255, 255, 255, 0.08);
  --color-primary-glow: #8a46ff;
  --color-success-glow: #1fd1ad;
  --color-warning-glow: #ff9f43;
  --color-danger-glow: #ff4d4d;
  --line-purple: rgba(138, 70, 255, 0.4);
  --text-main: #ffffff;
  --text-muted: #7c8ba1;
  --bg: #050817;
  --bg-2: #080d20;
  --panel: rgba(15, 22, 45, 0.86);
  --panel-2: rgba(18, 27, 55, 0.78);
  --panel-3: rgba(24, 35, 68, 0.78);
  --line: rgba(125, 141, 255, 0.16);
  --line-strong: rgba(133, 104, 255, 0.5);
  --text: #f5f6ff;
  --muted: #9aa6c6;
  --soft: #707a9a;
  --violet: #7c53ff;
  --violet-2: #a348ff;
  --blue: #4f8dff;
  --cyan: #46d9ff;
  --jade: #42deb7;
  --pink: #ff73b2;
  --amber: #ffb65c;
  --red: #ff5d6e;
  --radius: 8px;
  --sidebar: 282px;
  --shadow: 0 22px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  height: 100%;
  background: var(--bg);
  overflow: hidden;
}

body {
  width: 100%;
  height: 100%;
  margin: 0;
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 21% 7%, rgba(124, 83, 255, 0.18), transparent 25%),
    radial-gradient(circle at 77% 18%, rgba(69, 217, 255, 0.12), transparent 25%),
    radial-gradient(circle at 52% 80%, rgba(66, 222, 183, 0.08), transparent 28%),
    linear-gradient(135deg, #050817 0%, #070b1c 46%, #040615 100%);
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(126, 104, 255, 0.9);
  outline-offset: 2px;
}

.stars,
.stars::before,
.stars::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.68) 1px, transparent 1px),
    radial-gradient(circle, rgba(93, 156, 255, 0.6) 1px, transparent 1px);
  background-size: 92px 92px, 147px 147px;
  background-position: 0 0, 48px 38px;
  opacity: 0.16;
}

.stars::before,
.stars::after {
  content: "";
}

.stars::before {
  transform: translate(33px, 21px);
  opacity: 0.18;
}

.stars::after {
  transform: translate(-16px, 47px);
  opacity: 0.12;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.app-content {
  display: contents;
}

.sidebar {
  position: relative;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 26px 17px 20px;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(circle at 42% 0%, rgba(124, 83, 255, 0.18), transparent 30%),
    rgba(6, 9, 22, 0.84);
  backdrop-filter: blur(22px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 58px;
  min-width: 0;
}

.brand > div:last-child {
  min-width: 0;
  max-width: 100%;
}

.brand strong {
  display: block;
  max-width: 100%;
  font-size: 22px;
  line-height: 1.04;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.brand small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}

.brand-orbit {
  position: relative;
  width: 52px;
  height: 42px;
  flex: 0 0 auto;
}

.brand-orbit::before,
.brand-orbit::after,
.brand-orbit span {
  content: "";
  position: absolute;
  inset: 8px 4px;
  border-radius: 50%;
}

.brand-orbit::before {
  background: radial-gradient(circle at 34% 30%, #9bb0ff, #6549ff 58%, #30167f);
  box-shadow: 0 0 26px rgba(116, 82, 255, 0.8);
}

.brand-orbit::after {
  border: 2px solid rgba(160, 142, 255, 0.82);
  transform: rotate(-25deg) scaleX(1.35);
}

.brand-orbit span {
  width: 7px;
  height: 7px;
  inset: auto 0 10px auto;
  background: #ff76a8;
  box-shadow: 0 0 12px rgba(255, 118, 168, 0.8);
}

.deepseek-logo {
  position: relative;
  width: 116px;
  height: 92px;
  flex: 0 0 auto;
  pointer-events: none;
}

.deepseek-logo::before,
.deepseek-logo::after,
.deepseek-logo span {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.deepseek-logo::before {
  inset: 20px 12px;
  background:
    radial-gradient(circle at 34% 30%, #ffd7e7 0 8%, #bd62ff 24%, #764bff 58%, #31147e 100%);
  box-shadow:
    0 0 30px rgba(255, 95, 143, 0.46),
    0 0 42px rgba(124, 83, 255, 0.66);
}

.deepseek-logo::after {
  inset: 22px 2px;
  border: 4px solid rgba(255, 109, 145, 0.82);
  transform: rotate(-24deg) scaleX(1.38);
  box-shadow: 0 0 18px rgba(255, 103, 151, 0.34);
}

.deepseek-logo span {
  width: 12px;
  height: 12px;
  right: 4px;
  bottom: 23px;
  background: #ff618f;
  box-shadow: 0 0 18px rgba(255, 97, 143, 0.82);
}

.deepseek-logo.large {
  width: 178px;
  height: 140px;
}

.deepseek-logo.large::before {
  inset: 34px 18px;
}

.deepseek-logo.large::after {
  inset: 36px 0;
  border-width: 5px;
}

.deepseek-logo.large span {
  width: 16px;
  height: 16px;
  right: 2px;
  bottom: 38px;
}

.deepseek-logo.small {
  width: 74px;
  height: 66px;
}

.deepseek-logo.small::before {
  inset: 18px 9px;
}

.deepseek-logo.small::after {
  inset: 20px 1px;
  border-width: 3px;
}

.deepseek-logo.small span {
  width: 8px;
  height: 8px;
  right: 2px;
  bottom: 20px;
}

.nav {
  display: grid;
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 4px 4px 0;
}

.nav-item {
  width: 100%;
  min-height: 51px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  color: #b9c1df;
  text-align: left;
  border-radius: var(--radius);
  background: transparent;
  transition: transform 160ms ease, color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(124, 141, 255, 0.08);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(124, 83, 255, 0.74), rgba(77, 93, 214, 0.28));
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.08), 0 0 28px rgba(124, 83, 255, 0.22);
}

.nav-icon {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(213, 219, 255, 0.62);
  border-radius: 8px;
  font-size: 12px;
}

.nav-label {
  font-size: 16px;
  font-weight: 700;
  min-width: 0;
  line-height: 1.2;
}

.nav-item em {
  margin-left: 8px;
  max-width: 72px;
  justify-self: end;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #8467ff;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  text-shadow: 0 0 14px rgba(124, 83, 255, 0.8);
}

.mobile-only-nav-item {
  display: none;
}

.profile,
.panel,
.hero-card,
.chat-panel,
.mentor-hero,
.case-summary,
.metric-strip {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(20, 29, 58, 0.88), rgba(11, 17, 36, 0.82)),
    rgba(11, 17, 36, 0.86);
  box-shadow: var(--shadow);
}

.profile {
  padding: 16px;
  background:
    radial-gradient(circle at 8% 10%, rgba(124, 83, 255, 0.28), transparent 38%),
    rgba(11, 17, 36, 0.85);
}

.profile-top {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.profile strong {
  display: block;
  font-size: 16px;
}

.profile small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.profile-id {
  display: block;
  margin-top: 5px;
  color: #8edcff;
  font-size: 12px;
  font-style: normal;
  overflow-wrap: anywhere;
}

.avatar,
.msg-avatar,
.whale-mark {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
}

.avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 42% 35%, #1c1d33 0 7px, transparent 8px),
    radial-gradient(circle at 60% 35%, #1c1d33 0 7px, transparent 8px),
    radial-gradient(circle at 50% 56%, #ffdccb 0 23px, transparent 24px),
    linear-gradient(150deg, #ffe9db, #8d69ff 56%, #1b2f64);
  border: 2px solid rgba(255, 255, 255, 0.62);
  box-shadow: 0 0 28px rgba(124, 83, 255, 0.5);
}

.avatar::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 2px solid rgba(16, 18, 42, 0.7);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.avatar:has(img)::after {
  border-color: rgba(255, 255, 255, 0.28);
}

.avatar.tiny {
  width: 42px;
  height: 42px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid rgba(125, 141, 255, 0.13);
}

.profile-stats div {
  text-align: center;
}

.profile-stats strong {
  color: #ffb45f;
  font-size: 17px;
}

.profile-stats span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.main {
  position: relative;
  min-width: 0;
  height: 100%;
  min-height: 0;
  padding: 20px 22px 26px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.page-route-video {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0.9;
  filter: saturate(1.08) contrast(1.08) brightness(0.54);
  pointer-events: none;
  z-index: 0;
}

.app-content > .sidebar,
.app-content > .main {
  position: relative;
  z-index: 1;
}

.main > .content {
  position: relative;
  z-index: 1;
}

.main > .topbar {
  position: relative;
  z-index: 20;
}

.app-shell:has(.page-route-video) .main::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(5, 8, 23, 0.08) 0%, rgba(5, 8, 23, 0.02) 18%, rgba(5, 8, 23, 0.06) 56%, rgba(5, 8, 23, 0.12) 100%),
    radial-gradient(circle at 18% 26%, rgba(66, 222, 183, 0.06), transparent 24%),
    radial-gradient(circle at 55% 58%, rgba(138, 70, 255, 0.08), transparent 30%),
    radial-gradient(circle at 83% 18%, rgba(79, 141, 255, 0.06), transparent 22%);
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-height: 84px;
}

.title-block h1 {
  margin: 0;
  font-size: 31px;
  line-height: 1.1;
}

.title-block p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.top-actions {
  position: relative;
  z-index: 21;
  display: flex;
  align-items: center;
  gap: 14px;
}

.search {
  position: relative;
  z-index: 22;
  width: min(440px, 34vw);
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-radius: 26px;
  color: var(--muted);
  border: 1px solid rgba(125, 141, 255, 0.14);
  background: rgba(18, 25, 48, 0.86);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.03);
}

.search input {
  width: 100%;
  min-width: 0;
  color: var(--text);
  border: 0;
  background: transparent;
  outline: 0;
}

.search input::placeholder {
  color: #75809e;
}

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 80;
  width: min(500px, calc(100vw - var(--sidebar) - 72px));
  max-width: 500px;
  padding: 12px;
  color: var(--text);
  border: 1px solid rgba(125, 141, 255, 0.28);
  border-radius: 10px;
  background: #080d1f;
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.58);
  isolation: isolate;
}

.search-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.search-panel-head button {
  color: #aeb7dd;
  background: transparent;
}

.search-result-list {
  display: grid;
  gap: 8px;
  max-height: min(430px, calc(100vh - 190px));
  overflow: auto;
}

.search-result-list button {
  min-height: 68px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  padding: 10px;
  color: var(--text);
  text-align: left;
  border: 1px solid rgba(125, 141, 255, 0.12);
  border-radius: 8px;
  background: #111936;
}

.search-result-list button:hover,
.search-result-list button:focus-visible {
  border-color: rgba(142, 220, 255, 0.42);
  background: rgba(32, 43, 82, 0.92);
}

.search-result-list span {
  grid-row: 1 / span 2;
  width: 42px;
  min-height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #d7cfff;
  background: rgba(124, 83, 255, 0.22);
  font-size: 12px;
  font-weight: 800;
}

.search-result-list strong,
.search-result-list small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-list small,
.search-empty span {
  color: var(--muted);
}

.search-empty {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius);
  background: rgba(16, 24, 50, 0.78);
}

.round-btn {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #f0f3ff;
  border-radius: 50%;
  border: 1px solid rgba(224, 230, 255, 0.76);
  background: rgba(9, 14, 31, 0.62);
}

.notice i {
  position: absolute;
  top: -7px;
  right: -4px;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: #ff4d71;
  font-style: normal;
  font-size: 11px;
}

.content {
  min-width: 0;
}

.dashboard-layout,
.mentor-layout,
.quiz-layout,
.clinical-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
}

.main-stack,
.side-stack,
.chat-stack,
.quiz-stack,
.case-stack {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
}

.dashboard-layout .main-stack {
  gap: 12px;
}

.dashboard-layout {
  gap: 18px;
}

.dashboard-layout .side-stack {
  gap: 12px;
}

.hero-card {
  position: relative;
  min-height: 352px;
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(360px, 1fr);
  gap: 16px;
  padding: 26px 32px 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 75% 44%, rgba(124, 83, 255, 0.32), transparent 34%),
    radial-gradient(circle at 56% 75%, rgba(69, 217, 255, 0.14), transparent 30%),
    linear-gradient(135deg, rgba(18, 24, 56, 0.94), rgba(10, 15, 34, 0.92));
}

.hero-card::before,
.learning-map::before,
.galaxy-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,.75) 1px, transparent 1px);
  background-size: 58px 58px;
  opacity: 0.1;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-copy p {
  margin: 0 0 22px;
  color: #c7cee7;
  font-size: 17px;
}

.hero-copy h2 {
  margin: 0 0 25px;
  font-size: 31px;
  line-height: 1.35;
}

.dashboard-layout .hero-card {
  min-height: 260px;
  padding: 18px 28px 14px;
  grid-template-columns: minmax(330px, 0.95fr) minmax(280px, 0.8fr);
  align-items: center;
}

.dashboard-layout .hero-copy p {
  margin-bottom: 14px;
  font-size: 15px;
}

.dashboard-layout .hero-copy h2 {
  margin-bottom: 16px;
  font-size: 28px;
}

.dashboard-layout .hero-progress {
  margin-bottom: 12px;
}

.dashboard-layout .meta-pills {
  margin-bottom: 12px;
  gap: 8px;
}

.dashboard-layout .meta-pills span {
  min-height: 32px;
  padding: 6px 11px;
}

.dashboard-layout .primary {
  min-height: 40px;
  padding-inline: 24px;
}

.hero-progress {
  width: min(410px, 100%);
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  color: #d9e0f8;
  margin-bottom: 19px;
}

.hero-progress strong {
  font-size: 20px;
}

.progress {
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #835aff, #a24dff);
  box-shadow: 0 0 16px rgba(124, 83, 255, 0.58);
}

.progress.green span {
  background: linear-gradient(90deg, #42deb7, #46d9ff);
}

.progress.violet span {
  background: linear-gradient(90deg, #835aff, #a24dff);
}

.meta-pills,
.quick-actions,
.prompt-tags,
.tabs,
.sub-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.planet-track-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.planet-track-bar .seg {
  color: var(--track-pill-ink, #dce3ff);
  border-color: var(--track-pill-border, rgba(125, 141, 255, 0.14));
  background: var(--track-pill-bg, rgba(20, 29, 58, 0.72));
  box-shadow: 0 0 0 1px rgba(255,255,255,.02);
}

.planet-track-bar .seg:hover {
  background: var(--track-pill-hover, rgba(255,255,255,.08));
}

.planet-track-bar .seg.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--track-pill-active-start, #8b5cff), var(--track-pill-active-end, #7b5dff));
  box-shadow: 0 0 18px var(--track-pill-shadow, rgba(124,83,255,.28));
}

.meta-pills {
  margin-bottom: 16px;
}

.meta-pills span,
.quick-actions button,
.prompt-tags button,
.tabs button,
.select-like,
.seg,
.ghost-link,
.soft-btn {
  min-height: 36px;
  padding: 8px 14px;
  color: #dce3ff;
  border: 1px solid rgba(125, 141, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(20, 29, 58, 0.72);
}

.primary {
  min-height: 45px;
  padding: 0 30px;
  color: #fff;
  border-radius: 24px;
  background: linear-gradient(90deg, #7f4dff, #7b32df);
  box-shadow: 0 10px 30px rgba(124, 83, 255, 0.28);
  font-weight: 800;
}

.primary.compact {
  min-height: 41px;
  padding: 0 22px;
  border-radius: var(--radius);
}

.markmap-state-btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  color: #dce3ff;
  text-decoration: none;
  border: 1px solid rgba(125, 141, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(20, 29, 58, 0.72);
  box-shadow: 0 0 0 1px rgba(255,255,255,.02);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.markmap-state-btn.compact {
  min-height: 41px;
  padding: 0 22px;
}

.markmap-state-btn:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.08);
}

.markmap-state-btn.is-open {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(90deg, #7f4dff, #7b32df);
  box-shadow: 0 10px 30px rgba(124, 83, 255, 0.28);
}

.quiz-shortcut {
  min-width: 92px;
  justify-content: center;
  font-weight: 700;
}

.primary.full,
.soft-btn.full {
  width: 100%;
}

.soft-btn {
  color: #e8ecff;
  background: rgba(31, 39, 72, 0.8);
}

.ghost-link {
  color: #aeb7dd;
  background: transparent;
  border-color: transparent;
}

.anatomy-stage {
  position: relative;
  min-height: 270px;
}

.heart-stage {
  z-index: 1;
}

.organ {
  position: relative;
  display: grid;
  place-items: center;
}

.organ.heart {
  width: 190px;
  height: 225px;
  filter: drop-shadow(0 0 32px rgba(255, 112, 199, 0.75));
}

.heart-stage .heart {
  position: absolute;
  right: 90px;
  top: 24px;
}

.organ.heart::before {
  content: "";
  width: 142px;
  height: 154px;
  border-radius: 48% 52% 55% 45% / 42% 38% 62% 58%;
  transform: rotate(-20deg);
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,.55), transparent 10%),
    radial-gradient(circle at 62% 67%, rgba(112, 66, 255, .7), transparent 34%),
    linear-gradient(135deg, #ff8ecb, #b352ff 42%, #402a91 78%);
  box-shadow: inset 0 0 28px rgba(255,255,255,.18), 0 0 46px rgba(177, 83, 255, .72);
}

.organ.heart::after {
  content: "";
  position: absolute;
  top: 17px;
  width: 128px;
  height: 74px;
  border-radius: 44px 44px 16px 16px;
  border-top: 15px solid #ff98d6;
  border-left: 14px solid transparent;
  border-right: 11px solid #8b6cff;
  transform: rotate(8deg);
  opacity: 0.9;
}

.organ.heart span {
  position: absolute;
  width: 112px;
  height: 18px;
  border-radius: 18px;
  background: linear-gradient(90deg, #8368ff, #c983ff);
  transform: translate(44px, -24px);
  box-shadow: 0 0 20px rgba(124, 83, 255, 0.85);
}

.organ.heart.mini {
  width: 118px;
  height: 120px;
}

.organ.heart.small,
.heart-diagram .organ.heart,
.planet-avatar .organ.heart {
  width: 76px;
  height: 76px;
  transform: scale(.42);
  transform-origin: center;
}

.organ.lung {
  width: 170px;
  height: 150px;
}

.organ.lung::before,
.organ.lung::after {
  content: "";
  position: absolute;
  width: 72px;
  height: 118px;
  border-radius: 46% 54% 40% 60%;
  background:
    linear-gradient(145deg, rgba(97, 132, 255, 0.85), rgba(255, 100, 173, 0.7)),
    rgba(97, 132, 255, 0.3);
  box-shadow: inset 0 0 22px rgba(255,255,255,.2), 0 0 35px rgba(124,83,255,.65);
}

.organ.lung::before {
  left: 22px;
  transform: rotate(10deg);
}

.organ.lung::after {
  right: 22px;
  transform: rotate(-10deg);
}

.organ.lung span {
  width: 15px;
  height: 115px;
  border-radius: 12px;
  background: #cc81ff;
  box-shadow: 0 0 16px rgba(204,129,255,.72);
}

.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(126, 111, 255, 0.45);
  transform: rotate(-10deg);
  pointer-events: none;
}

.orbit-a {
  right: 52px;
  bottom: 15px;
  width: 310px;
  height: 86px;
}

.orbit-b {
  right: 95px;
  bottom: 42px;
  width: 210px;
  height: 58px;
  border-color: rgba(69, 217, 255, 0.36);
}

.float-label {
  position: absolute;
  z-index: 2;
  padding: 9px 14px;
  border-radius: 20px;
  color: #dfe4ff;
  background: rgba(90, 67, 173, 0.68);
  border: 1px solid rgba(174, 151, 255, 0.28);
  box-shadow: 0 0 22px rgba(124, 83, 255, 0.32);
  font-size: 13px;
}

.label-a { right: 300px; top: 70px; }
.label-b { right: 34px; top: 118px; }
.label-c { right: 300px; top: 158px; }
.label-d { right: 28px; bottom: 98px; }

.panel {
  min-width: 0;
  padding: 18px;
}

.dashboard-layout .panel {
  padding-top: 14px;
  padding-bottom: 14px;
}

.dashboard-layout > .main-stack > .panel {
  padding: 12px 16px;
}

.dashboard-layout > .side-stack > .panel {
  padding: 12px 16px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head h2,
.panel-head h3 {
  margin: 0;
  font-size: 18px;
}

.panel-head span,
.panel-head small {
  color: var(--muted);
}

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

.tool-card,
.task-card,
.knowledge-card,
.recommend-card,
.study-list article,
.related-clinical article,
.placeholder-grid article {
  border: 1px solid rgba(125, 141, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(22, 31, 59, 0.8);
  box-shadow: inset 0 0 22px rgba(255, 255, 255, 0.03);
}

.tool-card {
  min-height: 156px;
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.dashboard-layout .tool-grid {
  gap: 10px;
}

.dashboard-layout .tool-card {
  min-height: 118px;
  padding: 10px;
  gap: 6px;
}

.dashboard-layout .tool-icon {
  width: 32px;
  height: 32px;
}

.dashboard-layout .tool-card h3 {
  font-size: 15px;
}

.dashboard-layout .tool-card p {
  font-size: 13px;
  line-height: 1.35;
}

.dashboard-layout .tool-card .soft-btn {
  min-height: 30px;
  padding: 5px 10px;
}

.tool-icon,
.task-icon,
.study-thumb,
.knowledge-visual {
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,.35), transparent 14%),
    linear-gradient(135deg, rgba(66, 222, 183, 0.75), rgba(124, 83, 255, 0.82));
  box-shadow: 0 0 22px rgba(124, 83, 255, 0.36);
}

.tool-icon {
  width: 38px;
  height: 38px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.tool-card h3,
.task-card h3,
.knowledge-card h3 {
  margin: 0;
  font-size: 16px;
}

.tool-card p,
.task-card p,
.knowledge-card p,
.muted {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

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

.task-card {
  padding: 18px;
}

.dashboard-layout .task-grid {
  gap: 12px;
}

.dashboard-layout .task-card {
  padding: 12px;
}

.dashboard-layout .task-top {
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
}

.dashboard-layout .task-icon {
  width: 40px;
  height: 40px;
}

.dashboard-layout .task-card h3 {
  font-size: 15px;
}

.dashboard-layout .task-card p {
  font-size: 13px;
  line-height: 1.35;
}

.dashboard-layout .task-meta {
  margin: 10px 0 6px;
}

.task-top {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 13px;
}

.task-icon {
  width: 48px;
  height: 48px;
}

.chev {
  color: var(--soft);
  background: transparent;
  font-size: 24px;
}

.task-meta {
  display: flex;
  justify-content: space-between;
  margin: 18px 0 8px;
  color: #e6ebff;
}

.donut-block {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 16px;
  align-items: center;
}

.donut-block.slim {
  grid-template-columns: 118px 1fr;
}

.donut {
  width: 126px;
  height: 126px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, #10172e 0 54%, transparent 55%),
    conic-gradient(#8b5cff 0 35%, #4b8cff 35% 62%, #ff9f51 62% 100%);
  box-shadow: 0 0 28px rgba(124, 83, 255, 0.28);
}

.donut.small,
.donut.multi {
  width: 112px;
  height: 112px;
}

.donut strong {
  display: block;
  font-size: 28px;
}

.donut span,
.ring span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.legend {
  display: grid;
  gap: 13px;
}

.legend-row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.legend-row i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 12px currentColor;
}

.legend-row strong {
  color: #edf1ff;
}

.chart-card {
  position: relative;
}

.chart-card svg {
  width: 100%;
  height: 138px;
}

.dashboard-layout .donut-block {
  grid-template-columns: 108px 1fr;
  gap: 12px;
}

.dashboard-layout .donut {
  width: 104px;
  height: 104px;
}

.dashboard-layout .donut strong {
  font-size: 24px;
}

.dashboard-layout .legend {
  gap: 9px;
}

.dashboard-layout .chart-card svg {
  height: 104px;
}

.dashboard-layout .chart-card > strong {
  right: 10px;
  top: 14px;
  font-size: 14px;
}

.chart-card > strong {
  position: absolute;
  right: 20px;
  top: 20px;
}

.axis {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.mentor-mini {
  position: relative;
  min-height: 230px;
}

.dashboard-layout .mentor-mini {
  min-height: 178px;
}

.dashboard-layout .mentor-mini .mentor-orbit {
  width: 88px;
  height: 72px;
  right: 4px;
  top: 10px;
}

.dashboard-layout .mentor-mini p,
.dashboard-layout .mentor-mini ul {
  width: 66%;
}

.dashboard-layout .mentor-mini li {
  margin: 4px 0;
}

.dashboard-layout .mentor-mini .primary.full {
  margin-top: 10px;
}

@media (min-width: 1381px) and (min-height: 760px) {
  .app-shell:has(.page-route-video) .main {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .app-shell:has(.page-route-video) .topbar {
    min-height: 70px;
  }

  .app-shell:has(.page-route-video) .title-block h1 {
    font-size: 28px;
  }

  .app-shell:has(.page-route-video) .title-block p {
    margin-top: 7px;
    font-size: 15px;
  }

  .app-shell:has(.page-route-video) .dashboard-layout {
    align-items: start;
  }
}

.mentor-mini .mentor-orbit {
  position: absolute;
  right: 10px;
  top: 6px;
}

.robot {
  position: relative;
  width: 116px;
  height: 116px;
  border-radius: 28px 28px 40px 40px;
  background:
    radial-gradient(circle at 39% 39%, #8d7fff 0 7px, transparent 8px),
    radial-gradient(circle at 61% 39%, #8d7fff 0 7px, transparent 8px),
    radial-gradient(circle at 50% 48%, #111832 0 37%, transparent 38%),
    linear-gradient(145deg, #e8eaff, #7a69ff 58%, #2b1c83);
  box-shadow: 0 0 34px rgba(124,83,255,.55);
  pointer-events: none;
}

.robot::before {
  content: "";
  position: absolute;
  inset: 26px 17px 36px;
  border-radius: 24px;
  background: linear-gradient(180deg, #111831, #090e20);
  box-shadow: inset 0 0 16px rgba(255,255,255,.13);
}

.robot::after {
  content: "";
  position: absolute;
  width: 88px;
  height: 16px;
  left: 18px;
  bottom: -18px;
  border-radius: 50%;
  background: rgba(124,83,255,.42);
  filter: blur(8px);
}

.robot.large {
  width: 170px;
  height: 150px;
  border-radius: 50px;
}

.robot.small {
  width: 74px;
  height: 74px;
  border-radius: 20px;
}

.mentor-hero .deepseek-logo.large {
  justify-self: center;
}

.heart-diagram .deepseek-logo.small {
  align-self: center;
  justify-self: center;
}

.mentor-mini p,
.mentor-mini ul {
  width: 62%;
  color: var(--muted);
}

.mentor-mini li {
  margin: 7px 0;
}

.badge-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.medal {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.medal span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  clip-path: polygon(50% 0, 89% 20%, 100% 62%, 72% 100%, 28% 100%, 0 62%, 11% 20%);
  color: white;
  background: linear-gradient(135deg, #725bff, #30146e);
  box-shadow: 0 0 24px rgba(124,83,255,.46);
}

.m1 span { background: linear-gradient(135deg, #ffd070, #7c3c16); }
.m2 span { background: linear-gradient(135deg, #6de0ff, #174b85); }

.sub-toolbar {
  min-height: 55px;
  margin-bottom: 16px;
}

.map-top-toolbar {
  justify-content: space-between;
}

.map-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.map-toolbar-left {
  justify-content: flex-start;
}

.map-toolbar-right {
  justify-content: flex-end;
  margin-left: auto;
}

.sub-toolbar > span {
  flex: 1 1 auto;
}

.sub-toolbar label {
  color: var(--muted);
}

.planet-track-bar + .sub-toolbar {
  justify-content: flex-start;
}

.map-stage {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(125, 141, 255, 0.14);
  border-radius: 12px;
  background:
    radial-gradient(circle at 72% 20%, rgba(124, 83, 255, 0.1), transparent 26%),
    radial-gradient(circle at 20% 76%, rgba(70, 217, 255, 0.08), transparent 24%),
    radial-gradient(circle at 56% 52%, rgba(255, 182, 92, 0.05), transparent 30%),
    linear-gradient(160deg, rgba(6, 10, 28, 0.42), rgba(7, 11, 31, 0.26) 52%, rgba(4, 8, 23, 0.46));
  box-shadow: var(--shadow);
  isolation: isolate;
  backdrop-filter: blur(10px);
}

.map-stage::before,
.map-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.map-stage::before {
  background: transparent;
}

.map-stage::after {
  background: transparent;
}

.map-stage-video {
  position: absolute;
  inset: -4%;
  width: 108%;
  height: 108%;
  object-fit: cover;
  object-position: center center;
  opacity: 0.96;
  filter: saturate(1.12) contrast(1.04) brightness(0.66);
  pointer-events: none;
  z-index: 0;
}

.map-stage-shell {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 16px;
  padding: 18px;
}

.app-shell:has(.page-route-video) .search,
.app-shell:has(.page-route-video) .round-btn,
.app-shell:has(.page-route-video) .map-stage .sub-toolbar,
.app-shell:has(.page-route-video) .map-stage .learning-map,
.app-shell:has(.page-route-video) .map-stage .side-stack > .panel {
  backdrop-filter: none;
}

.app-shell:has(.page-route-video) {
  --video-surface: rgba(7, 12, 28, 0.08);
  --video-surface-strong: rgba(7, 12, 28, 0.12);
  --video-surface-active: rgba(124, 83, 255, 0.2);
  --video-border: rgba(184, 201, 255, 0.14);
  --video-shadow:
    inset 0 0 0 1px rgba(255,255,255,.02),
    0 12px 36px rgba(0, 0, 0, 0.14);
}

.app-shell:has(.page-route-video) .sidebar {
  border-right-color: rgba(184, 201, 255, 0.12);
  background: var(--video-surface);
  box-shadow: inset -1px 0 0 rgba(255,255,255,.02);
  backdrop-filter: none;
}

.app-shell:has(.page-route-video) .brand small,
.app-shell:has(.page-route-video) .nav-label,
.app-shell:has(.page-route-video) .profile small,
.app-shell:has(.page-route-video) .profile-note,
.app-shell:has(.page-route-video) .profile-stats span {
  color: rgba(232, 238, 255, 0.88);
}

.app-shell:has(.page-route-video) .nav {
  gap: 6px;
}

.app-shell:has(.page-route-video) .nav-item {
  background: rgba(255,255,255,.015);
  border: 1px solid transparent;
}

.app-shell:has(.page-route-video) .nav-item:hover {
  background: rgba(255,255,255,.03);
  border-color: rgba(184, 201, 255, 0.08);
}

.app-shell:has(.page-route-video) .nav-item.active {
  background: rgba(124, 83, 255, 0.1);
  box-shadow:
    inset 0 0 0 1px rgba(184, 201, 255, 0.14),
    0 10px 24px rgba(0, 0, 0, 0.08);
}

.app-shell:has(.page-route-video) .nav-icon {
  border-color: rgba(184, 201, 255, 0.22);
  background: rgba(255,255,255,.02);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.015);
}

.app-shell:has(.page-route-video) .brand-orbit::before {
  box-shadow: 0 0 18px rgba(116, 82, 255, 0.42);
}

.app-shell:has(.page-route-video) .profile {
  background: var(--video-surface);
  border-color: var(--video-border);
  box-shadow: var(--video-shadow);
}

.app-shell:has(.page-route-video) .panel,
.app-shell:has(.page-route-video) .hero-card,
.app-shell:has(.page-route-video) .chat-panel,
.app-shell:has(.page-route-video) .mentor-hero,
.app-shell:has(.page-route-video) .case-summary,
.app-shell:has(.page-route-video) .metric-strip {
  background: var(--video-surface);
  border-color: var(--video-border);
  box-shadow: var(--video-shadow);
  backdrop-filter: none;
}

.app-shell:has(.page-route-video) .tool-card,
.app-shell:has(.page-route-video) .task-card,
.app-shell:has(.page-route-video) .knowledge-card,
.app-shell:has(.page-route-video) .recommend-card,
.app-shell:has(.page-route-video) .study-list article,
.app-shell:has(.page-route-video) .related-clinical article,
.app-shell:has(.page-route-video) .placeholder-grid article,
.app-shell:has(.page-route-video) .module-markmap-card,
.app-shell:has(.page-route-video) .quiz-module-grid button,
.app-shell:has(.page-route-video) .quiz-set-list button,
.app-shell:has(.page-route-video) .tcm-chapter-grid button,
.app-shell:has(.page-route-video) .tcm-chapter-summary div,
.app-shell:has(.page-route-video) .tcm-chapter-summary button,
.app-shell:has(.page-route-video) .quiz-card-empty,
.app-shell:has(.page-route-video) .mistake-card,
.app-shell:has(.page-route-video) .library-card,
.app-shell:has(.page-route-video) .mistake-answer-row,
.app-shell:has(.page-route-video) .library-answer-row,
.app-shell:has(.page-route-video) .mistake-empty,
.app-shell:has(.page-route-video) .casebase-empty,
.app-shell:has(.page-route-video) .library-empty,
.app-shell:has(.page-route-video) .note-list button,
.app-shell:has(.page-route-video) .casebase-card-grid button,
.app-shell:has(.page-route-video) .body-part-grid button {
  background: var(--video-surface);
  border-color: var(--video-border);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.02),
    0 12px 32px rgba(0, 0, 0, 0.12);
}

.app-shell:has(.page-route-video) .soft-btn,
.app-shell:has(.page-route-video) .body-viewer-actions .primary.compact,
.app-shell:has(.page-route-video) .markmap-state-btn {
  border-color: var(--video-border);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}

.app-shell:has(.page-route-video) .soft-btn {
  background: var(--video-surface-strong);
}

.app-shell:has(.page-route-video) .markmap-state-btn {
  background: var(--video-surface-strong);
}

.app-shell:has(.page-route-video) .dashboard-layout .meta-pills span,
.app-shell:has(.page-route-video) .dashboard-layout .tool-card,
.app-shell:has(.page-route-video) .dashboard-layout .task-card,
.app-shell:has(.page-route-video) .dashboard-layout .soft-btn,
.app-shell:has(.page-route-video) .dashboard-layout .ghost-link {
  background: var(--video-surface);
  border-color: var(--video-border);
  box-shadow: var(--video-shadow);
}

.app-shell:has(.page-route-video) .dashboard-layout .tool-card .soft-btn,
.app-shell:has(.page-route-video) .dashboard-layout .task-card .ghost-link {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(184, 201, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}

.app-shell:has(.page-route-video) .body-viewer-actions .primary.compact {
  background: var(--video-surface-active);
}

.app-shell:has(.page-route-video) .seg,
.app-shell:has(.page-route-video) .select-like,
.app-shell:has(.page-route-video) .auth-tabs button,
.app-shell:has(.page-route-video) .question-tabs button,
.app-shell:has(.page-route-video) .timeline i,
.app-shell:has(.page-route-video) .more-card,
.app-shell:has(.page-route-video) .case-count-list button,
.app-shell:has(.page-route-video) .clinical-answer-panel,
.app-shell:has(.page-route-video) .ask-list button,
.app-shell:has(.page-route-video) .subjective-input,
.app-shell:has(.page-route-video) .subjective-pending,
.app-shell:has(.page-route-video) .analysis,
.app-shell:has(.page-route-video) .note-editor-body,
.app-shell:has(.page-route-video) .review-plan article,
.app-shell:has(.page-route-video) .casebase-hero-stats,
.app-shell:has(.page-route-video) .mentor-config-form input,
.app-shell:has(.page-route-video) .mentor-config-form select,
.app-shell:has(.page-route-video) .auth-form input,
.app-shell:has(.page-route-video) .auth-form select,
.app-shell:has(.page-route-video) .mentor-runtime-list div,
.app-shell:has(.page-route-video) .mentor-context-bar span,
.app-shell:has(.page-route-video) .mentor-inline-state,
.app-shell:has(.page-route-video) .mentor-status-chip,
.app-shell:has(.page-route-video) .mistake-card-head span,
.app-shell:has(.page-route-video) .library-card-head span,
.app-shell:has(.page-route-video) .mistake-card-head strong,
.app-shell:has(.page-route-video) .library-card-head strong,
.app-shell:has(.page-route-video) .mistake-card-head em,
.app-shell:has(.page-route-video) .library-card-head em,
.app-shell:has(.page-route-video) .mistake-tags span,
.app-shell:has(.page-route-video) .formula-card em,
.app-shell:has(.page-route-video) .case-head span,
.app-shell:has(.page-route-video) .clinical-answer-preview,
.app-shell:has(.page-route-video) .clinical-collected-group,
.app-shell:has(.page-route-video) .deepseek-tip,
.app-shell:has(.page-route-video) .info-timeline div.draft,
.app-shell:has(.page-route-video) .settings-hero,
.app-shell:has(.page-route-video) .library-hero,
.app-shell:has(.page-route-video) .casebase-hero,
.app-shell:has(.page-route-video) .report-hero,
.app-shell:has(.page-route-video) .study-map-panel {
  border-color: var(--video-border);
  background: var(--video-surface);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}

.app-shell:has(.page-route-video) .seg.active,
.app-shell:has(.page-route-video) .auth-tabs .active,
.app-shell:has(.page-route-video) .question-tabs .active,
.app-shell:has(.page-route-video) .timeline .active i,
.app-shell:has(.page-route-video) .case-count-list button.active,
.app-shell:has(.page-route-video) .ask-list button.done,
.app-shell:has(.page-route-video) .clinical-answer-toggle.active,
.app-shell:has(.page-route-video) .body-viewer-actions .primary.compact,
.app-shell:has(.page-route-video) .primary.compact,
.app-shell:has(.page-route-video) .markmap-state-btn.is-open {
  background: var(--video-surface-active);
}

.app-shell:has(.page-route-video) .seg:not(.active):hover,
.app-shell:has(.page-route-video) .select-like:hover,
.app-shell:has(.page-route-video) .markmap-state-btn:hover,
.app-shell:has(.page-route-video) .auth-tabs button:hover,
.app-shell:has(.page-route-video) .question-tabs button:hover,
.app-shell:has(.page-route-video) .ask-list button:hover,
.app-shell:has(.page-route-video) .note-list button:hover,
.app-shell:has(.page-route-video) .note-list button.active,
.app-shell:has(.page-route-video) .quiz-module-grid button:hover,
.app-shell:has(.page-route-video) .quiz-module-grid button.active,
.app-shell:has(.page-route-video) .quiz-set-list button.active,
.app-shell:has(.page-route-video) .tcm-chapter-grid button:hover,
.app-shell:has(.page-route-video) .tcm-chapter-grid button.active,
.app-shell:has(.page-route-video) .tcm-chapter-summary button:hover,
.app-shell:has(.page-route-video) .tcm-chapter-summary button.active,
.app-shell:has(.page-route-video) .casebase-card-grid button:hover,
.app-shell:has(.page-route-video) .casebase-card-grid button.active {
  background: var(--video-surface-strong);
}

.app-shell:has(.page-route-video) .search input,
.app-shell:has(.page-route-video) .chat-input input,
.app-shell:has(.page-route-video) .subjective-input,
.app-shell:has(.page-route-video) .mentor-config-form input,
.app-shell:has(.page-route-video) .mentor-config-form select,
.app-shell:has(.page-route-video) .auth-form input,
.app-shell:has(.page-route-video) .auth-form select {
  background: var(--video-surface-strong);
  border-color: var(--video-border);
}

.app-shell:has(.page-route-video) .clinical-work,
.app-shell:has(.page-route-video) .mistake-empty,
.app-shell:has(.page-route-video) .library-empty,
.app-shell:has(.page-route-video) .clinical-empty-panel,
.app-shell:has(.page-route-video) .quiz-empty,
.app-shell:has(.page-route-video) .placeholder,
.app-shell:has(.page-route-video) .latest-mistake,
.app-shell:has(.page-route-video) .formula-card,
.app-shell:has(.page-route-video) .case-focus-list,
.app-shell:has(.page-route-video) .tutor-card,
.app-shell:has(.page-route-video) .plan-card {
  background: transparent;
}

.app-shell:has(.page-route-video) .body-viewer-shell,
.app-shell:has(.page-route-video) .body-viewer-head {
  background: var(--video-surface);
  border-color: var(--video-border);
  box-shadow: var(--video-shadow);
}

.app-shell:has(.page-route-video) .body-viewer-head {
  border-bottom-color: rgba(184, 201, 255, 0.1);
}

.app-shell:has(.page-route-video) .map-stage {
  border-color: rgba(184, 201, 255, 0.08);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.app-shell:has(.page-route-video) .map-stage::before,
.app-shell:has(.page-route-video) .map-stage::after {
  background: none;
}

.app-shell:has(.page-route-video) .map-stage-shell {
  padding: 0;
}

.app-shell:has(.page-route-video) .body-viewer-frame {
  background: transparent;
}

.app-shell:has(.page-route-video) .body-part-grid button:hover {
  background: var(--video-surface-strong);
  border-color: rgba(142, 220, 255, .46);
}

.app-shell:has(.page-route-video) .profile-stats {
  border-top-color: rgba(184, 201, 255, 0.1);
}

.map-stage .sub-toolbar {
  margin-bottom: 0;
  padding: 8px 10px;
  border: 1px solid var(--video-border);
  border-radius: 18px;
  background: rgba(7, 12, 28, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}

.map-stage .learning-map {
  background: transparent;
  border-color: rgba(160, 176, 255, 0.06);
}

.map-stage .learning-map::before,
.map-stage .learning-map::after {
  display: none;
}

.map-stage .side-stack > .panel {
  background: rgba(7, 12, 28, 0.18);
  border-color: var(--video-border);
  box-shadow: var(--video-shadow);
}

.app-shell:has(.page-route-video) .search {
  border-color: var(--video-border);
  background: var(--video-surface-strong);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.02),
    0 8px 24px rgba(0,0,0,.12);
}

.app-shell:has(.page-route-video) .map-stage .seg,
.app-shell:has(.page-route-video) .map-stage .select-like,
.app-shell:has(.page-route-video) .map-stage .markmap-state-btn,
.app-shell:has(.page-route-video) .map-stage .primary.compact {
  border: 1px solid var(--video-border);
  background: var(--video-surface-strong);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.02);
}

.app-shell:has(.page-route-video) .map-stage .seg:not(.active),
.app-shell:has(.page-route-video) .map-stage .select-like,
.app-shell:has(.page-route-video) .map-stage .markmap-state-btn {
  color: rgba(235, 240, 255, 0.92);
}

.app-shell:has(.page-route-video) .map-stage .seg.active,
.app-shell:has(.page-route-video) .map-stage .markmap-state-btn.is-open,
.app-shell:has(.page-route-video) .map-stage .primary.compact {
  border-color: rgba(172, 135, 255, 0.32);
  background: var(--video-surface-active);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.04),
    0 0 24px rgba(124,83,255,.12);
}

.seg.active,
.tabs .active,
.question-tabs .active {
  color: #fff;
  background: linear-gradient(90deg, rgba(124,83,255,.82), rgba(151,69,255,.7));
}

.map-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: start;
}

.map-page-layout.progress-collapsed {
  grid-template-columns: minmax(0, 1fr);
}

.map-page-layout > .map-stage {
  min-width: 0;
}

.map-page-layout > .map-progress-panel {
  min-width: 0;
  position: sticky;
  top: 0;
  outline: none;
}

.map-progress-jump {
  min-width: 112px;
}

.map-progress-jump.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(124,83,255,.82), rgba(151,69,255,.7));
  border-color: rgba(172, 135, 255, 0.32);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.04),
    0 0 24px rgba(124,83,255,.12);
}

.map-progress-pulse > .panel {
  animation: mapProgressPulse 760ms ease;
}

@keyframes mapProgressPulse {
  0%,
  100% {
    border-color: var(--video-border);
    box-shadow: var(--video-shadow);
  }

  45% {
    border-color: rgba(127, 216, 255, 0.46);
    box-shadow:
      inset 0 0 0 1px rgba(255,255,255,.06),
      0 0 0 1px rgba(127, 216, 255, 0.18),
      0 18px 42px rgba(0, 0, 0, 0.18);
  }
}

.map-left {
  min-height: 480px;
}

.map-left h2 {
  margin: 0 0 15px;
  font-size: 16px;
}

.mini-orbit {
  position: relative;
  height: 100px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(125,141,255,.1);
}

.mini-orbit::before,
.mini-orbit::after {
  content: "";
  position: absolute;
  inset: 28px 18px;
  border: 1px solid rgba(124,83,255,.42);
  border-radius: 50%;
  transform: rotate(-15deg);
}

.mini-orbit::after {
  inset: 36px 42px;
  border-color: rgba(69,217,255,.38);
}

.mini-orbit span {
  position: absolute;
  left: 50%;
  top: 47%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #995dff;
  box-shadow: 0 0 24px #995dff;
}

.zoom-tools,
.canvas-tools {
  display: grid;
  gap: 9px;
}

.zoom-tools {
  margin-top: 28px;
}

.zoom-tools button,
.canvas-tools button {
  min-height: 34px;
  color: #dce3ff;
  border-radius: var(--radius);
  border: 1px solid rgba(125,141,255,.14);
  background: rgba(12, 18, 39, 0.78);
}

.zoom-tools small {
  color: var(--muted);
  text-align: center;
}

.learning-map,
.galaxy-stage {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  border-radius: var(--radius);
}

.learning-map {
  background:
    radial-gradient(circle at 50% 48%, rgba(138,70,255,.36), transparent 23%),
    radial-gradient(circle at 18% 28%, rgba(31,209,173,.16), transparent 20%),
    radial-gradient(circle at 78% 76%, rgba(255,159,67,.12), transparent 22%),
    radial-gradient(circle at 88% 92%, rgba(79,141,255,.13), transparent 28%),
    var(--bg-main);
  border: 1px solid var(--border-glass);
}

.learning-map::before,
.learning-map::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.learning-map::before {
  background:
    radial-gradient(circle, rgba(255,255,255,.78) 1px, transparent 1.5px),
    radial-gradient(circle, rgba(86,147,255,.7) 1px, transparent 1.5px);
  background-size: 92px 92px, 136px 136px;
  background-position: 18px 22px, 54px 41px;
  opacity: .18;
}

.learning-map::after {
  background:
    radial-gradient(circle at 17% 63%, rgba(139,92,255,.48), transparent 2.4%),
    radial-gradient(circle at 77% 18%, rgba(69,92,255,.44), transparent 2.2%),
    radial-gradient(circle at 84% 74%, rgba(126,83,255,.4), transparent 2.8%);
  opacity: .75;
}

.map-lines,
.galaxy-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.map-planet-lines {
  opacity: .92;
  filter: drop-shadow(0 0 12px var(--line-purple));
}

.map-spoke {
  fill: none;
  stroke: var(--line-purple);
  stroke-width: .42;
  stroke-linecap: round;
  opacity: .74;
}

.map-spoke.strong {
  stroke: var(--color-primary-glow);
  stroke-width: .54;
  opacity: .92;
}

.map-spoke.warning {
  stroke: var(--color-warning-glow);
  stroke-width: .5;
  opacity: .88;
}

.map-spoke.tone-success {
  stroke: rgba(31,209,173,.62);
}

.map-spoke.tone-warning {
  stroke: rgba(255,159,67,.7);
}

.map-spoke.tone-danger {
  stroke: rgba(255,77,77,.74);
}

.map-spoke.tone-blue {
  stroke: rgba(79,141,255,.62);
}

.map-spoke.tone-muted {
  stroke: rgba(124,139,161,.36);
}

.map-relation-tags span {
  position: absolute;
  z-index: 3;
  padding: 6px 9px;
  border-radius: 13px;
  color: var(--text-main);
  background: rgba(13, 20, 44, .82);
  border: 1px solid var(--border-glass);
  box-shadow: 0 0 18px var(--line-purple);
  font-size: 11px;
  font-weight: 800;
  transform: translate(-50%, -50%);
}

.map-core,
.map-node,
.galaxy-node {
  position: absolute;
  z-index: 2;
  color: #fff;
  text-align: center;
  border: 1px solid rgba(156, 143, 255, 0.36);
  background: rgba(16, 24, 49, 0.86);
  box-shadow: 0 0 34px rgba(124,83,255,.3);
}

.map-node b,
.galaxy-node b {
  display: none;
}

.map-core {
  left: 50%;
  top: 50%;
  width: 230px;
  aspect-ratio: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  padding: 28px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 35% 26%, rgba(255,255,255,.42), transparent 15%),
    radial-gradient(circle at 64% 65%, rgba(31,209,173,.18), transparent 26%),
    radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--color-primary-glow) 92%, #fff 8%), rgba(69,31,165,.9) 58%, rgba(14,18,42,.97));
  box-shadow:
    inset 0 0 32px rgba(255,255,255,.12),
    inset 0 -24px 44px rgba(23, 12, 78, .56),
    0 0 58px color-mix(in srgb, var(--color-primary-glow) 70%, transparent),
    0 0 104px rgba(31,209,173,.16);
  animation: map-core-drift 9s ease-in-out infinite;
  will-change: transform, box-shadow, filter;
}

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

.map-core::before {
  left: 50%;
  top: 50%;
  width: 305px;
  height: 78px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--color-primary-glow) 62%, transparent);
  border-top-color: rgba(255,255,255,.18);
  border-bottom-color: rgba(31,209,173,.24);
  transform: translate(-50%, -48%) rotate(-10deg);
  box-shadow: 0 0 28px color-mix(in srgb, var(--color-primary-glow) 58%, transparent);
}

.map-core::after {
  inset: 11%;
  border-radius: 50%;
  background:
    linear-gradient(115deg, transparent 18%, rgba(255,255,255,.2) 19%, transparent 25%),
    radial-gradient(circle at 42% 24%, rgba(255,255,255,.24), transparent 11%);
  mix-blend-mode: screen;
  opacity: .62;
}

.map-core strong {
  position: relative;
  z-index: 1;
  display: block;
  margin: 0;
  font-size: 27px;
  text-shadow: 0 0 18px rgba(255,255,255,.38);
}

.map-core span {
  position: relative;
  z-index: 1;
  color: #cfd5ff;
}

.map-core .progress {
  position: relative;
  z-index: 1;
  width: 76%;
}

.map-node {
  width: 124px;
  aspect-ratio: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  align-content: center;
  justify-items: center;
  gap: 4px;
  padding: 12px 8px 10px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 22%, rgba(255,255,255,.06), transparent 12%),
    radial-gradient(circle at 50% 54%, rgba(8,12,28,0), rgba(8,12,28,.04) 88%, rgba(7,10,26,.08));
  border: 0;
  box-shadow:
    inset 0 0 2px rgba(255,255,255,.01),
    0 0 22px var(--planet-shadow, rgba(79,141,255,.24));
  animation: map-node-float 9.4s ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
  will-change: transform, filter;
}

.map-node b {
  position: relative;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.12);
  box-shadow: 0 0 12px rgba(124,83,255,.28);
  font-size: 18px;
}

.map-node strong {
  position: relative;
  z-index: 2;
  max-width: 108px;
  font-size: 14px;
  line-height: 1.18;
  text-shadow: 0 0 14px rgba(255,255,255,.24);
}

.map-node span {
  position: relative;
  z-index: 2;
  color: #d7defd;
  font-size: 12px;
}

.map-node.tone-success {
  --planet-glow: color-mix(in srgb, var(--color-success-glow) 72%, #fff 6%);
  --planet-glow-soft: rgba(31,209,173,.28);
  --planet-shadow: rgba(31,209,173,.48);
}

.map-node.tone-blue {
  --planet-glow: rgba(79,141,255,.76);
  --planet-glow-soft: rgba(79,141,255,.28);
  --planet-shadow: rgba(79,141,255,.5);
}

.map-node.tone-warning {
  --planet-glow: color-mix(in srgb, var(--color-warning-glow) 78%, #fff 4%);
  --planet-glow-soft: rgba(255,159,67,.28);
  --planet-shadow: rgba(255,159,67,.5);
}

.map-node.tone-danger {
  --planet-glow: color-mix(in srgb, var(--color-danger-glow) 76%, #fff 4%);
  --planet-glow-soft: rgba(255,77,77,.26);
  --planet-shadow: rgba(255,77,77,.5);
}

.map-node.tone-muted {
  --planet-glow: rgba(124,139,161,.48);
  --planet-glow-soft: rgba(124,139,161,.14);
  --planet-shadow: rgba(124,139,161,.28);
}

.map-node.active {
  box-shadow:
    inset 0 0 22px rgba(255,255,255,.08),
    0 0 24px rgba(124,83,255,.34);
}

.planet-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
  transform: scale(1.72);
  transform-origin: center center;
  filter: saturate(1.1) contrast(1.12) brightness(1.02);
  animation: map-planet-surface 12s ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
  will-change: transform, filter;
  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  outline: 1px solid transparent;
}

.map-node.has-video-ready {
  background: transparent;
}

@keyframes map-core-drift {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow:
      inset 0 0 32px rgba(255,255,255,.12),
      inset 0 -24px 44px rgba(23, 12, 78, .56),
      0 0 58px rgba(124,83,255,.58),
      0 0 104px rgba(70,217,255,.16);
    filter: brightness(1);
  }

  26% {
    transform: translate(calc(-50% - 18px), calc(-50% - 20px)) scale(1.053) rotate(-2deg);
    filter: brightness(1.05);
  }

  44% {
    transform: translate(calc(-50% - 33px), calc(-50% - 27px)) scale(1.084);
    box-shadow:
      inset 0 0 38px rgba(255,255,255,.16),
      inset 0 -24px 46px rgba(23, 12, 78, .5),
      0 0 102px rgba(124,83,255,.78),
      0 0 144px rgba(70,217,255,.26);
    filter: brightness(1.08);
  }

  69% {
    transform: translate(calc(-50% + 24px), calc(-50% - 11px)) scale(1.039) rotate(1.5deg);
  }

  86% {
    transform: translate(calc(-50% - 8px), calc(-50% - 21px)) scale(1.054) rotate(-1deg);
  }
}

@keyframes map-node-float {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    filter: brightness(1);
  }

  23% {
    transform: translate(calc(-50% + (var(--float-x, 10px) * .9)), calc(-50% + (var(--float-y, -10px) * .72))) scale(1.03) rotate(calc(var(--float-tilt, 3deg) * -.99));
    filter: brightness(1.03);
  }

  49% {
    transform: translate(calc(-50% + var(--float-x, 10px) * 2.37), calc(-50% + var(--float-y, -10px) * 2.37)) scale(1.072) rotate(calc(var(--float-tilt, 3deg) * 1.68));
    filter: brightness(1.08);
  }

  73% {
    transform: translate(calc(-50% - 12px), calc(-50% - 11px)) scale(1.035) rotate(calc(var(--float-tilt, 3deg) * -.72));
  }

  88% {
    transform: translate(calc(-50% + 9px), calc(-50% - 17px)) scale(1.047) rotate(calc(var(--float-tilt, 3deg) * .44));
  }
}

@keyframes map-planet-surface {
  0%,
  100% {
    transform: scale(1.72) translate3d(0, 0, 0) rotate(0deg);
    filter: saturate(1.1) contrast(1.12) brightness(1.02);
  }

  28% {
    transform: scale(1.78) translate3d(-3px, 2px, 0) rotate(-1.8deg);
    filter: saturate(1.16) contrast(1.14) brightness(1.06);
  }

  56% {
    transform: scale(1.74) translate3d(4px, -2px, 0) rotate(2.2deg);
    filter: saturate(1.12) contrast(1.16) brightness(1.04);
  }

  82% {
    transform: scale(1.8) translate3d(-2px, -3px, 0) rotate(.8deg);
  }
}

.related-tabs {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 26px;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 28px;
  background: rgba(16, 24, 49, 0.86);
  transform: translateX(-50%);
  white-space: nowrap;
}

.related-tabs span {
  display: none;
}

.related-tabs button {
  color: white;
  border-radius: 20px;
  padding: 7px 14px;
  background: rgba(124,83,255,.28);
}

.ring {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, #111832 0 54%, transparent 55%),
    conic-gradient(#7c53ff 0 var(--angle), rgba(255,255,255,.08) var(--angle) 360deg);
}

.ring.green {
  background:
    radial-gradient(circle, #111832 0 54%, transparent 55%),
    conic-gradient(#42deb7 0 var(--angle), rgba(255,255,255,.08) var(--angle) 360deg);
}

.ring strong {
  display: block;
  font-size: 27px;
}

.path-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.path-item {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.path-item i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--blue);
}

.path-item.done i { background: var(--jade); }
.path-item.weak i { background: var(--amber); }
.path-item strong { color: #dce5ff; font-size: 12px; }

.recommend-card {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 10px;
}

.thumb,
.heart-thumb {
  width: 76px;
  height: 76px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 52% 44%, rgba(255,122,198,.8), transparent 28%),
    linear-gradient(145deg, rgba(124,83,255,.7), rgba(26,35,72,.88));
}

.recommend-card span,
.study-list span,
.related-clinical span,
.related-clinical small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
  font-size: 12px;
}

.mentor-layout {
  grid-template-columns: minmax(0, 1fr) 500px;
}

.mentor-hero {
  min-height: 186px;
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 12% 42%, rgba(124,83,255,.34), transparent 28%),
    rgba(15, 22, 45, 0.82);
}

.mentor-hero h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

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

.chat-panel {
  padding: 18px 20px;
}

.messages {
  display: grid;
  gap: 18px;
  min-height: 520px;
  align-content: end;
  padding: 10px 0;
}

.mentor-layout-upgraded {
  grid-template-columns: minmax(0, 1fr) 520px;
  grid-template-areas:
    "hero side"
    "chat chat";
  align-items: start;
}

.mentor-layout-upgraded > .mentor-hero {
  grid-area: hero;
}

.mentor-layout-upgraded > .chat-panel {
  grid-area: chat;
}

.mentor-layout-upgraded > .side-stack {
  grid-area: side;
  min-height: 0;
  height: 100%;
  align-content: stretch;
}

.mentor-layout-upgraded .chat-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto;
  min-height: 0;
}

.mentor-layout-upgraded .messages {
  min-height: 0;
  max-height: none;
  padding-right: 0;
  overflow: visible;
  overscroll-behavior: auto;
  scrollbar-width: auto;
}

.mentor-empty-state {
  min-height: 150px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(174, 188, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(8, 14, 31, 0.18);
}

.mentor-empty-state strong {
  color: #eef2ff;
  font-size: 18px;
}

.mentor-empty-state span {
  font-size: 13px;
}

.message {
  display: grid;
  gap: 12px;
  align-items: start;
}

.message.user {
  grid-template-columns: minmax(0, 1fr) 42px;
}

.message.ai {
  grid-template-columns: 42px minmax(0, 1fr);
}

.message.user .avatar {
  grid-column: 2;
}

.message.user .bubble {
  grid-column: 1;
  justify-self: end;
  max-width: 72%;
  background: linear-gradient(90deg, #7f3cff, #5b22be);
}

.message.ai .bubble {
  max-width: 92%;
}

.bubble {
  padding: 15px 17px;
  border-radius: 18px;
  color: #dce5ff;
  background: rgba(17, 25, 51, 0.8);
}

.bubble p {
  margin: 0;
  line-height: 1.8;
}

.mentor-markdown {
  display: grid;
  gap: 12px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.mentor-markdown p,
.mentor-markdown h3,
.mentor-markdown ol {
  margin: 0;
}

.mentor-markdown h3 {
  color: #ffffff;
  font-size: 17px;
  line-height: 1.35;
}

.mentor-markdown ol {
  padding-left: 22px;
}

.mentor-markdown li + li {
  margin-top: 6px;
}

.mentor-markdown strong {
  color: #ffffff;
  font-weight: 800;
}

.mentor-markdown code {
  padding: 1px 5px;
  border-radius: 6px;
  color: #d7f9ff;
  background: rgba(127, 216, 255, 0.1);
}

.mentor-markdown hr {
  width: 100%;
  height: 1px;
  margin: 2px 0;
  border: 0;
  background: rgba(184, 201, 255, 0.12);
}

.mentor-table {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(184, 201, 255, 0.12);
  border-radius: 8px;
}

.mentor-table table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.mentor-table th,
.mentor-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(184, 201, 255, 0.1);
  text-align: left;
  vertical-align: top;
}

.mentor-table th {
  color: #ffffff;
  background: rgba(124, 83, 255, 0.14);
}

.bubble time {
  display: block;
  margin-top: 8px;
  color: #8b94b3;
  font-size: 11px;
  text-align: right;
}

.msg-avatar,
.whale-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: white;
  background: linear-gradient(145deg, #7c53ff, #5120b8);
  box-shadow: 0 0 22px rgba(124,83,255,.48);
  font-size: 13px;
  font-weight: 800;
}

.answer-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  margin-top: 18px;
  padding: 18px;
  border-radius: var(--radius);
  background: rgba(7, 12, 28, 0.48);
}

.answer-card ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 24px;
}

.answer-card li {
  line-height: 1.55;
}

.heart-diagram {
  position: relative;
  min-height: 170px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: radial-gradient(circle, rgba(124,83,255,.16), rgba(4,8,20,.64));
}

.heart-diagram em {
  position: absolute;
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
}

.heart-diagram em:nth-child(2) { left: 12px; top: 42px; }
.heart-diagram em:nth-child(3) { right: 12px; top: 48px; }
.heart-diagram em:nth-child(4) { left: 18px; bottom: 28px; }

.prompt-tags {
  margin-top: 8px;
}

.prompt-tags-mentor .refresh-chip {
  color: #f2f5ff;
  border-color: rgba(132, 197, 255, 0.22);
  background: rgba(10, 22, 48, 0.88);
}

.prompt-tags-mentor .refresh-chip:hover {
  background: rgba(18, 34, 72, 0.92);
}

.chat-input {
  min-height: 70px;
  display: grid;
  grid-template-columns: 1fr 42px 54px;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  margin-top: 15px;
  border: 1px solid rgba(125,141,255,.14);
  border-radius: 24px;
  background: rgba(14, 22, 46, 0.94);
}

.chat-input input {
  min-width: 0;
  color: #eef2ff;
  border: 0;
  background: transparent;
  outline: 0;
}

.send {
  width: 50px;
  height: 50px;
  color: white;
  border-radius: 50%;
  background: linear-gradient(135deg, #8a5cff, #5426ca);
}

.disclaimer {
  display: block;
  color: var(--soft);
  margin-top: 10px;
}

.tutor-card {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: center;
}

.tutor-card h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.tutor-card h3 span {
  padding: 3px 8px;
  margin-left: 8px;
  color: #b9a8ff;
  border-radius: 20px;
  background: rgba(124,83,255,.16);
  font-size: 12px;
}

.tutor-card p,
.split-metrics span {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.split-metrics {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 25px;
}

.split-metrics strong {
  color: #eef2ff;
}

.plan-card {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 15px;
}

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

.plan-list div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  color: var(--muted);
}

.plan-list .progress {
  grid-column: 1 / -1;
}

.mentor-hero-upgraded {
  gap: 18px;
}

.mentor-suggest-stack {
  min-width: 0;
}

.mentor-suggest-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  min-height: 100%;
}

.mentor-suggest-panel .panel-head {
  margin-bottom: 0;
}

.mentor-suggest-panel h2 {
  margin: 0;
  font-size: 20px;
}

.mentor-suggest-head {
  align-items: flex-start;
}

.mentor-direct-scroll {
  max-height: 62vh;
  padding-right: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.mentor-direct-head {
  align-items: flex-start;
}

.mentor-direct-head small {
  display: block;
  margin-top: 6px;
  max-width: 62ch;
  line-height: 1.6;
}

.mentor-direct-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.mentor-direct-group {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(174, 188, 255, 0.1);
  border-radius: 16px;
  background: rgba(9, 16, 34, 0.24);
}

.mentor-direct-label {
  display: grid;
  gap: 0;
}

.mentor-direct-label-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mentor-direct-label strong {
  color: #f5f7ff;
  font-size: 14px;
  line-height: 1.25;
}

.mentor-question-grid {
  align-content: start;
}

.mentor-context-bar,
.mentor-head-actions,
.mentor-config-row,
.mentor-config-actions,
.mentor-runtime-list div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mentor-context-bar {
  flex-wrap: wrap;
  margin: 0 0 18px;
}

.mentor-context-bar span,
.mentor-inline-state,
.mentor-status-chip {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: #dce5ff;
}

.mentor-status-chip.ready {
  background: rgba(67, 222, 195, 0.18);
  color: #8ef4df;
}

.mentor-status-chip.pending {
  background: rgba(75, 140, 255, 0.18);
  color: #9bc1ff;
}

.mentor-status-chip.error {
  background: rgba(255, 107, 107, 0.18);
  color: #ffb0b0;
}

.mentor-status-chip.idle {
  background: rgba(255, 180, 92, 0.18);
  color: #ffd39a;
}

.mentor-head-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

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

.mentor-config-form label {
  display: grid;
  gap: 6px;
}

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

.mentor-config-form input,
.mentor-config-form select {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  color: #eef2ff;
  border: 1px solid rgba(125, 141, 255, 0.14);
  border-radius: 14px;
  background: rgba(14, 22, 46, 0.94);
  outline: 0;
}

.mentor-config-row {
  align-items: stretch;
}

.mentor-config-row label {
  flex: 1 1 0;
}

.mentor-config-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.mentor-config-hint {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.mentor-config-hint p {
  margin: 0 0 8px;
}

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

.mentor-runtime-list div {
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

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

.mentor-runtime-list strong {
  color: #eef2ff;
  text-align: right;
}

.mentor-layout-upgraded .panel,
.mentor-layout-upgraded .side-stack > .panel,
.mentor-layout-upgraded .mentor-hero,
.mentor-layout-upgraded .chat-panel {
  background: rgba(8, 14, 31, 0.16);
  border-color: rgba(174, 188, 255, 0.12);
  box-shadow: none;
}

.mentor-layout-upgraded .quick-actions button,
.mentor-layout-upgraded .question-grid button,
.mentor-layout-upgraded .prompt-tags button,
.mentor-layout-upgraded .mentor-context-bar span,
.mentor-layout-upgraded .mentor-inline-state,
.mentor-layout-upgraded .mentor-status-chip {
  background: rgba(11, 18, 39, 0.32);
  border: 1px solid rgba(174, 188, 255, 0.12);
  box-shadow: none;
}

.mentor-layout-upgraded .mentor-status-chip.ready {
  background: rgba(67, 222, 195, 0.12);
}

.mentor-layout-upgraded .mentor-status-chip.pending {
  background: rgba(75, 140, 255, 0.12);
}

.mentor-layout-upgraded .mentor-status-chip.error {
  background: rgba(255, 107, 107, 0.12);
}

.mentor-layout-upgraded .mentor-status-chip.idle {
  background: rgba(255, 180, 92, 0.12);
}

.mentor-layout-upgraded .message.ai .bubble {
  background: rgba(13, 21, 45, 0.34);
  border: 1px solid rgba(174, 188, 255, 0.12);
}

.mentor-layout-upgraded .message.user .bubble {
  background: linear-gradient(90deg, rgba(127, 60, 255, 0.7), rgba(91, 34, 190, 0.66));
  border: 1px solid rgba(214, 199, 255, 0.18);
}

.mentor-layout-upgraded .answer-card,
.mentor-layout-upgraded .heart-diagram {
  background: rgba(5, 10, 23, 0.24);
  border: 1px solid rgba(174, 188, 255, 0.1);
}

.mentor-layout-upgraded .chat-input {
  background: rgba(9, 16, 34, 0.38);
  border-color: rgba(174, 188, 255, 0.14);
}

.mentor-layout-upgraded .round-btn {
  background: rgba(17, 26, 53, 0.48);
  border-color: rgba(174, 188, 255, 0.14);
}

.mentor-layout-upgraded .plan-list div {
  background: transparent;
}

.app-shell:has(.page-route-video) .mentor-layout-upgraded .panel,
.app-shell:has(.page-route-video) .mentor-layout-upgraded .side-stack > .panel,
.app-shell:has(.page-route-video) .mentor-layout-upgraded .mentor-hero,
.app-shell:has(.page-route-video) .mentor-layout-upgraded .chat-panel {
  background: rgba(8, 14, 31, 0.12);
  border-color: rgba(184, 201, 255, 0.1);
  box-shadow: none;
}

.app-shell:has(.page-route-video) .mentor-layout-upgraded .quick-actions button,
.app-shell:has(.page-route-video) .mentor-layout-upgraded .question-grid button,
.app-shell:has(.page-route-video) .mentor-layout-upgraded .prompt-tags button,
.app-shell:has(.page-route-video) .mentor-layout-upgraded .mentor-context-bar span,
.app-shell:has(.page-route-video) .mentor-layout-upgraded .mentor-inline-state,
.app-shell:has(.page-route-video) .mentor-layout-upgraded .mentor-status-chip {
  background: rgba(9, 16, 34, 0.24);
  border-color: rgba(184, 201, 255, 0.1);
  box-shadow: none;
}

.app-shell:has(.page-route-video) .mentor-layout-upgraded .message.ai .bubble {
  background: rgba(10, 17, 38, 0.26);
  border-color: rgba(184, 201, 255, 0.1);
}

.app-shell:has(.page-route-video) .mentor-layout-upgraded .message.user .bubble {
  background: linear-gradient(90deg, rgba(127, 60, 255, 0.58), rgba(91, 34, 190, 0.54));
  border-color: rgba(214, 199, 255, 0.16);
}

.app-shell:has(.page-route-video) .mentor-layout-upgraded .answer-card,
.app-shell:has(.page-route-video) .mentor-layout-upgraded .heart-diagram,
.app-shell:has(.page-route-video) .mentor-layout-upgraded .chat-input,
.app-shell:has(.page-route-video) .mentor-layout-upgraded .round-btn {
  background: rgba(5, 10, 23, 0.2);
  border-color: rgba(184, 201, 255, 0.1);
  box-shadow: none;
}

.advice {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 17px;
  padding: 16px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(124,83,255,.44), rgba(87,39,161,.62));
}

.advice p {
  grid-column: 1 / -1;
  margin: 0;
  color: #dce5ff;
  line-height: 1.7;
}

.advice button {
  grid-column: 2;
  color: white;
  border-radius: var(--radius);
  background: rgba(80,38,168,.8);
  padding: 9px 18px;
}

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

.study-list article {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
}

.study-thumb {
  width: 58px;
  height: 58px;
}

.study-thumb.grid::before,
.study-thumb.beaker::before,
.study-thumb.heart::before,
.knowledge-visual::before {
  content: "";
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,.38);
}

.study-list article button {
  color: white;
  border-radius: var(--radius);
  background: rgba(124,83,255,.54);
  padding: 9px 15px;
}

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

.question-grid button {
  min-height: 40px;
  padding: 10px 12px;
  color: #d7defa;
  border-radius: var(--radius);
  background: rgba(20,29,58,.7);
  text-align: left;
  line-height: 1.55;
}

.planet-layout {
  display: grid;
  grid-template-columns: minmax(620px, 1fr) 400px;
  gap: 18px;
}

.module-page-layout {
  grid-template-columns: minmax(0, 1fr);
}

.module-page-hero {
  min-height: 260px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(180px, .8fr);
  gap: 24px;
  align-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 84% 18%, rgba(124, 83, 255, .24), transparent 28%),
    radial-gradient(circle at 18% 82%, rgba(66, 222, 183, .16), transparent 24%),
    rgba(11, 17, 36, .9);
}

.module-page-copy {
  display: grid;
  gap: 12px;
}

.module-page-copy > p:first-child {
  margin: 0;
  color: #8edcff;
  font-size: 13px;
  letter-spacing: .06em;
}

.module-page-copy h2 {
  margin: 0;
  font-size: 34px;
}

.module-page-copy > span {
  color: var(--muted);
  line-height: 1.8;
}

.module-page-orb {
  display: grid;
  justify-items: center;
}

.module-page-stats {
  margin-top: 6px;
}

.module-entry-card {
  min-height: 132px !important;
}

.module-directory-card {
  min-height: 220px;
}

.module-focus-head {
  margin-top: 18px;
}

.study-module-grid.compact {
  margin-top: 12px;
}

.planet-placeholder {
  display: grid;
  place-items: center;
  min-height: 420px;
  padding: 28px;
  background:
    radial-gradient(circle at 18% 22%, rgba(66, 222, 183, 0.16), transparent 22%),
    radial-gradient(circle at 82% 76%, rgba(124, 83, 255, 0.18), transparent 24%),
    rgba(9, 14, 30, 0.9);
}

.planet-placeholder-copy {
  width: min(560px, 100%);
}

.planet-placeholder-copy > p:first-child {
  margin: 0 0 12px;
  color: #8aa3ff;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.planet-placeholder-copy h2 {
  margin: 0 0 14px;
  font-size: 34px;
}

.planet-placeholder-copy p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.8;
}

.galaxy-stage {
  min-height: 690px;
  background:
    radial-gradient(circle at 49% 46%, rgba(124,83,255,.22), transparent 28%),
    rgba(4, 8, 20, 0.3);
}

.galaxy-node {
  display: grid;
  place-items: center;
  gap: 6px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
}

.galaxy-node.dynamic-galaxy-node {
  animation: none !important;
}

.galaxy-node.core {
  width: 210px;
  height: 210px;
  background:
    radial-gradient(circle at 35% 35%, var(--galaxy-node-light, rgba(201, 172, 255, .9)), var(--galaxy-node-accent, rgba(163, 72, 255, .8)) 42%, var(--galaxy-node-deep, rgba(18, 20, 56, .94)) 78%);
  animation: galaxy-core-drift 9s ease-in-out infinite;
  will-change: transform, box-shadow, filter;
}

.galaxy-node:not(.core) {
  width: 132px;
  height: 132px;
  background: radial-gradient(circle at 34% 34%, var(--galaxy-node-light, rgba(181, 212, 255, .88)), var(--galaxy-node-accent, rgba(73,108,255,.65)) 44%, var(--galaxy-node-deep, rgba(16,24,49,.9)) 82%);
  animation: galaxy-node-float 9.4s ease-in-out infinite;
  animation-delay: var(--orbit-delay, 0s);
  will-change: transform, filter;
}

.galaxy-node.blue {
  --galaxy-node-light: rgba(178, 206, 255, .9);
  --galaxy-node-accent: rgba(72, 133, 255, .72);
  --galaxy-node-deep: rgba(12, 26, 64, .92);
  --galaxy-node-glow: rgba(72, 133, 255, .28);
}

.galaxy-node.amber {
  --galaxy-node-light: rgba(255, 214, 157, .9);
  --galaxy-node-accent: rgba(255, 182, 92, .72);
  --galaxy-node-deep: rgba(67, 35, 12, .92);
  --galaxy-node-glow: rgba(255, 182, 92, .28);
}

.galaxy-node.jade {
  --galaxy-node-light: rgba(170, 243, 220, .88);
  --galaxy-node-accent: rgba(66, 222, 183, .7);
  --galaxy-node-deep: rgba(13, 57, 54, .92);
  --galaxy-node-glow: rgba(66, 222, 183, .28);
}

.galaxy-node.pink {
  --galaxy-node-light: rgba(255, 187, 220, .9);
  --galaxy-node-accent: rgba(255, 115, 178, .72);
  --galaxy-node-deep: rgba(64, 18, 52, .92);
  --galaxy-node-glow: rgba(255, 115, 178, .28);
}

.galaxy-node.cyan {
  --galaxy-node-light: rgba(171, 239, 255, .88);
  --galaxy-node-accent: rgba(70, 217, 255, .7);
  --galaxy-node-deep: rgba(13, 50, 64, .92);
  --galaxy-node-glow: rgba(70, 217, 255, .28);
}

.galaxy-node.purple {
  --galaxy-node-light: rgba(210, 191, 255, .9);
  --galaxy-node-accent: rgba(124, 83, 255, .72);
  --galaxy-node-deep: rgba(45, 23, 97, .92);
  --galaxy-node-glow: rgba(124, 83, 255, .28);
}

.galaxy-node strong {
  font-size: 20px;
}

.galaxy-node:not(.core) strong {
  font-size: 16px;
}

.galaxy-node span,
.galaxy-node b,
.galaxy-node em {
  color: #d4dcff;
  font-size: 12px;
  font-style: normal;
}

.galaxy-node em {
  position: absolute;
  top: 45%;
  right: -42px;
  padding: 5px 8px;
  border-radius: 12px;
  background: rgba(32, 26, 70, .8);
}

.galaxy-link {
  transition: none;
  vector-effect: non-scaling-stroke;
}

@keyframes galaxy-core-drift {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 0 34px var(--galaxy-node-glow, rgba(124,83,255,.3));
    filter: brightness(1);
  }

  26% {
    transform: translate(calc(-50% - 18px), calc(-50% - 20px)) scale(1.053) rotate(-2deg);
    filter: brightness(1.05);
  }

  44% {
    transform: translate(calc(-50% - 33px), calc(-50% - 27px)) scale(1.084);
    box-shadow: 0 0 102px var(--galaxy-node-glow, rgba(124,83,255,.78));
    filter: brightness(1.08);
  }

  69% {
    transform: translate(calc(-50% + 24px), calc(-50% - 11px)) scale(1.039) rotate(1.5deg);
  }

  86% {
    transform: translate(calc(-50% - 8px), calc(-50% - 21px)) scale(1.054) rotate(-1deg);
  }
}

@keyframes galaxy-node-float {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
    filter: brightness(1);
  }

  23% {
    transform: translate(calc(-50% + (var(--orbit-x, 10px) * .9)), calc(-50% + (var(--orbit-y, -10px) * .72))) scale(1.03) rotate(calc(var(--orbit-tilt, 3deg) * -.99));
    filter: brightness(1.03);
  }

  49% {
    transform: translate(calc(-50% + var(--orbit-x, 10px) * 2.37), calc(-50% + var(--orbit-y, -10px) * 2.37)) scale(1.072) rotate(calc(var(--orbit-tilt, 3deg) * 1.68));
    filter: brightness(1.08);
  }

  73% {
    transform: translate(calc(-50% - 12px), calc(-50% - 11px)) scale(1.035) rotate(calc(var(--orbit-tilt, 3deg) * -.72));
  }

  88% {
    transform: translate(calc(-50% + 9px), calc(-50% - 17px)) scale(1.047) rotate(calc(var(--orbit-tilt, 3deg) * .44));
  }
}

.canvas-tools {
  position: absolute;
  left: 15px;
  top: 45%;
  z-index: 4;
}

.canvas-tools button {
  display: grid;
  gap: 2px;
  padding: 6px;
  font-size: 13px;
}

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

.planet-detail {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
}

.planet-avatar {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,83,255,.72), rgba(35,21,84,.9));
}

.planet-avatar-orb {
  background: transparent;
}

.planet-orb {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #f8f7ff;
  box-shadow: 0 0 32px var(--planet-orb-glow, rgba(124,83,255,.28)), inset 0 0 18px rgba(255,255,255,.08);
}

.planet-orb.core {
  background: radial-gradient(circle at 35% 35%, var(--planet-orb-light, rgba(224,184,255,.95)), var(--planet-orb-accent, rgba(151,93,255,.78)) 34%, var(--planet-orb-deep, rgba(48,20,103,.96)) 78%);
}

.planet-orb.module {
  background: radial-gradient(circle at 35% 35%, var(--planet-orb-light, rgba(192,219,255,.95)), var(--planet-orb-accent, rgba(92,132,255,.72)) 34%, var(--planet-orb-deep, rgba(23,37,93,.96)) 78%);
}

.planet-orb.module.herb {
  background: radial-gradient(circle at 35% 35%, rgba(255,236,209,.96), rgba(255,171,85,.78) 34%, rgba(96,55,20,.96) 78%);
  box-shadow: 0 0 32px rgba(255, 171, 85, .24), inset 0 0 18px rgba(255,255,255,.08);
}


.planet-detail h2 {
  margin: 0 0 8px;
}

.planet-detail span {
  color: #ff7ab8;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 18px 0;
}

.mini-stats div {
  text-align: center;
}

.mini-stats strong {
  display: block;
}

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

hr {
  border: 0;
  border-top: 1px solid rgba(125,141,255,.14);
  margin: 20px 0;
}

.mastery {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
}

.rank-list {
  display: grid;
  gap: 14px;
}

.rank-list div {
  display: grid;
  grid-template-columns: 24px 1fr 130px 42px;
  align-items: center;
  gap: 10px;
  color: #e5e9ff;
}

.rank-list .progress {
  height: 7px;
}

.explore-tip {
  position: relative;
  min-height: 150px;
  padding-right: 110px;
}

.explore-tip .robot {
  position: absolute;
  right: 6px;
  bottom: 8px;
}

.explore-tip p {
  color: var(--muted);
  line-height: 1.8;
}

.below-galaxy {
  margin-top: 18px;
}

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

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

.herbal-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, .8fr);
  gap: 24px;
  align-items: center;
}

.herbal-stage-visual {
  display: grid;
  justify-items: center;
}

.herbal-stage-visual .study-module-hero {
  width: min(100%, 240px);
  aspect-ratio: 1 / 1;
}

.chapter-links button[disabled],
.knowledge-card button[disabled] {
  opacity: .68;
  cursor: not-allowed;
}

.module-markmap-card {
  min-height: 178px;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(125, 141, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(22, 31, 59, 0.8);
  box-shadow: inset 0 0 22px rgba(255, 255, 255, 0.03);
}

.module-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.module-card-head strong {
  font-size: 17px;
}

.module-card-head button,
.chapter-links button:not(.markmap-state-btn),
.chapter-links a:not(.markmap-state-btn) {
  min-height: 32px;
  padding: 6px 10px;
  color: #e9edff;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid rgba(125, 141, 255, 0.16);
  background: rgba(124, 83, 255, 0.24);
}

.chapter-links .markmap-state-btn {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 14px;
}

.chapter-links.collapsed-summary {
  color: var(--muted);
  font-size: 13px;
}

.chapter-links.collapsed-summary span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: var(--radius);
  border: 1px dashed rgba(125, 141, 255, 0.16);
  background: rgba(14, 21, 44, 0.46);
}

.module-markmap-card p {
  min-height: 44px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.module-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.module-card-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(124,83,255,.16);
  color: #dfe4ff;
  font-size: 12px;
}

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

.knowledge-card {
  position: relative;
  min-height: 155px;
  padding: 12px;
}

.knowledge-visual {
  height: 74px;
  margin-bottom: 10px;
}

.knowledge-visual.orb {
  border-radius: 50%;
  width: 74px;
  background: radial-gradient(circle at 35% 35%, rgba(222,230,255,.92), rgba(110,143,255,.68) 34%, rgba(25,35,91,.96) 80%);
  box-shadow: 0 0 24px rgba(93,122,255,.24);
}

.knowledge-visual.orb-1 {
  background: radial-gradient(circle at 35% 35%, rgba(255,232,206,.92), rgba(255,180,92,.72) 34%, rgba(79,44,17,.96) 80%);
}

.knowledge-visual.orb-2 {
  background: radial-gradient(circle at 35% 35%, rgba(215,255,243,.92), rgba(68,220,184,.7) 34%, rgba(18,74,64,.96) 80%);
}

.knowledge-visual.orb-3 {
  background: radial-gradient(circle at 35% 35%, rgba(255,224,239,.92), rgba(255,118,182,.7) 34%, rgba(83,22,58,.96) 80%);
}

.knowledge-visual.orb-4 {
  background: radial-gradient(circle at 35% 35%, rgba(231,222,255,.92), rgba(144,98,255,.72) 34%, rgba(49,21,97,.96) 80%);
}

.knowledge-card button {
  position: absolute;
  right: 12px;
  bottom: 12px;
  color: white;
  background: transparent;
  font-size: 22px;
}

.quiz-layout {
  grid-template-columns: minmax(0, 1fr);
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  padding: 20px 24px;
}

.metric-strip div {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 8px 12px;
  align-items: center;
}

.metric-strip i {
  grid-row: 1 / 3;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, #536dff, #7c53ff);
  font-style: normal;
}

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

.metric-strip strong {
  font-size: 20px;
}

.question-panel {
  padding: 25px 24px 20px;
}

.quiz-bank-panel {
  display: grid;
  gap: 18px;
  padding: 20px;
}

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

.quiz-module-grid button {
  min-height: 152px;
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 15px;
  color: var(--text);
  text-align: left;
  border: 1px solid rgba(125, 141, 255, .16);
  border-radius: 18px;
  background:
    radial-gradient(circle at 85% 10%, rgba(67, 222, 195, .16), transparent 32%),
    rgba(18, 27, 55, .78);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.quiz-module-grid button:hover,
.quiz-module-grid button.active {
  transform: translateY(-2px);
  border-color: rgba(142, 220, 255, .48);
  background:
    radial-gradient(circle at 85% 10%, rgba(67, 222, 195, .25), transparent 34%),
    linear-gradient(135deg, rgba(35, 53, 96, .94), rgba(32, 27, 88, .86));
}

.quiz-module-grid span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: rgba(124, 83, 255, .5);
  font-weight: 800;
}

.quiz-module-grid strong {
  font-size: 17px;
}

.quiz-module-grid em,
.quiz-module-grid small {
  color: var(--muted);
  font-style: normal;
  line-height: 1.5;
}

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

.quiz-set-list button {
  min-height: 68px;
  display: grid;
  grid-template-columns: 1fr auto 24px;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  color: var(--text);
  text-align: left;
  border: 1px solid rgba(125, 141, 255, .14);
  border-radius: 16px;
  background: rgba(9, 15, 36, .72);
  cursor: pointer;
}

.quiz-set-list button.active {
  border-color: rgba(124, 83, 255, .66);
  background: rgba(124, 83, 255, .22);
}

.quiz-set-list strong,
.quiz-set-list span {
  display: block;
}

.quiz-set-list span,
.quiz-set-list em {
  color: var(--muted);
  font-style: normal;
}

.quiz-set-list i {
  color: #e8ecff;
  font-style: normal;
  font-size: 24px;
}

.quiz-source-card {
  display: grid;
  gap: 12px;
}

.quiz-source-card > span {
  color: #8edcff;
}

.quiz-source-card h3 {
  margin: 0;
  font-size: 23px;
}

.quiz-source-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.quiz-source-card div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border-radius: 16px;
  background: rgba(8, 13, 31, .68);
}

.quiz-source-card strong {
  color: #fff;
  font-size: 30px;
}

.quiz-source-card small {
  color: var(--muted);
}

.quiz-empty {
  display: grid;
  gap: 12px;
  place-items: start;
}

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

.tcm-chapter-panel,
.tcm-chapter-status {
  display: grid;
  gap: 18px;
}

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

.tcm-chapter-grid button {
  min-height: 116px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
  color: var(--text);
  text-align: left;
  border: 1px solid rgba(125, 141, 255, .14);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 86% 12%, rgba(70, 217, 255, .12), transparent 34%),
    rgba(14, 22, 46, .76);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.tcm-chapter-grid button:hover,
.tcm-chapter-grid button.active {
  transform: translateY(-2px);
  border-color: rgba(142, 220, 255, .48);
  background:
    radial-gradient(circle at 86% 12%, rgba(66, 222, 183, .2), transparent 34%),
    linear-gradient(135deg, rgba(30, 47, 84, .94), rgba(32, 27, 88, .84));
}

.tcm-chapter-grid strong,
.tcm-chapter-grid span,
.tcm-chapter-grid small {
  display: block;
}

.tcm-chapter-grid strong {
  font-size: 17px;
}

.tcm-chapter-grid span {
  color: #8edcff;
  font-size: 13px;
}

.tcm-chapter-grid small {
  color: var(--muted);
  line-height: 1.55;
}

.tcm-chapter-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 180px)) minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
}

.tcm-chapter-summary div,
.tcm-chapter-summary button,
.quiz-card-empty {
  padding: 16px;
  border: 1px solid rgba(125, 141, 255, .13);
  border-radius: var(--radius);
  background: rgba(8, 13, 31, .58);
}

.tcm-chapter-summary div,
.tcm-chapter-summary button {
  display: grid;
  align-content: center;
  gap: 6px;
}

.tcm-chapter-summary button {
  color: var(--text);
  text-align: left;
  min-height: 132px;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.tcm-chapter-summary button:hover,
.tcm-chapter-summary button.active {
  transform: translateY(-2px);
  border-color: rgba(142, 220, 255, .48);
  background:
    radial-gradient(circle at 86% 12%, rgba(66, 222, 183, .18), transparent 34%),
    linear-gradient(135deg, rgba(30, 47, 84, .94), rgba(32, 27, 88, .84));
  box-shadow: 0 18px 36px rgba(6, 10, 26, .22);
}

.tcm-chapter-summary strong {
  color: #fff;
  font-size: 30px;
}

.tcm-chapter-summary span {
  color: var(--muted);
}

.tcm-chapter-summary p,
.quiz-card-empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.quiz-card-empty {
  display: grid;
  gap: 10px;
}

.quiz-card-empty strong {
  color: #fff;
  font-size: 20px;
}

.question-meta {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  margin-bottom: 20px;
}

.question-meta strong,
.question-meta em {
  padding: 7px 12px;
  color: #dcdfff;
  border-radius: 18px;
  background: rgba(124,83,255,.26);
  font-style: normal;
}

.question-panel h2 {
  margin: 0 0 18px;
  font-size: 21px;
}

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

.options button {
  min-height: 52px;
  display: grid;
  grid-template-columns: 38px 1fr 28px;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  color: #d8e0f8;
  text-align: left;
  border-radius: var(--radius);
  border: 1px solid rgba(125,141,255,.12);
  background: rgba(18, 27, 55, 0.72);
}

.options button span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}

.options .selected {
  color: #fff;
  border-color: rgba(126, 93, 255, .9);
  background: linear-gradient(90deg, rgba(124,83,255,.55), rgba(56,48,139,.68));
  box-shadow: inset 0 0 18px rgba(255,255,255,.08);
}

.options .correct {
  border-color: rgba(67, 222, 195, .72);
  background: linear-gradient(90deg, rgba(33, 120, 105, .68), rgba(16, 71, 74, .72));
}

.options .wrong {
  border-color: rgba(255, 108, 131, .72);
  background: linear-gradient(90deg, rgba(126, 45, 67, .68), rgba(83, 28, 47, .72));
}

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

.subjective-input {
  width: 100%;
  min-height: 180px;
  padding: 16px 18px;
  color: #edf2ff;
  border: 1px solid rgba(125, 141, 255, .16);
  border-radius: var(--radius);
  background: rgba(10, 15, 34, .78);
  resize: vertical;
  line-height: 1.7;
  font: inherit;
}

.subjective-input:focus {
  outline: none;
  border-color: rgba(142, 220, 255, .56);
  box-shadow: 0 0 0 3px rgba(124, 83, 255, .18);
}

.subjective-pending {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px dashed rgba(125, 141, 255, .22);
  border-radius: var(--radius);
  background: rgba(9, 15, 36, .56);
}

.subjective-pending strong {
  color: #fff;
  font-size: 16px;
}

.subjective-pending p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.analysis {
  display: grid;
  grid-template-columns: 1fr 230px;
  gap: 18px;
  margin-top: 22px;
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(125, 141, 255, .12);
  background: rgba(8, 13, 31, 0.72);
}

.analysis h3 {
  color: #b38cff;
}

.analysis p {
  color: #cbd4ef;
  line-height: 1.8;
}

.analysis span {
  color: var(--muted);
}

.question-actions {
  display: grid;
  grid-template-columns: 160px 1fr 1fr 160px;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

.radar svg {
  width: 100%;
  height: 250px;
}

.goal-card {
  display: grid;
  gap: 9px;
}

.goal-card p {
  color: var(--muted);
  margin: 0;
}

.goal-card strong {
  font-size: 20px;
}

.mistake-layout,
.casebase-layout,
.library-layout,
.notebook-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 20px;
}

.mistake-stack,
.casebase-stack,
.library-stack,
.notebook-stack {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
}

.mistake-toolbar .seg,
.casebase-toolbar .seg,
.library-toolbar .seg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mistake-toolbar small,
.casebase-toolbar small,
.library-toolbar small {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #edf2ff;
  background: rgba(255, 255, 255, .1);
  font-size: 12px;
}

.mistake-bank-panel,
.mistake-list-panel,
.casebase-list-panel,
.library-list-panel,
.notebook-list-panel {
  display: grid;
  gap: 18px;
}

.mistake-card-list,
.library-card-list {
  display: grid;
  gap: 14px;
}

.mistake-card,
.library-card {
  display: grid;
  gap: 13px;
  padding: 17px;
  border: 1px solid rgba(125, 141, 255, .14);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 95% 0%, rgba(255, 93, 110, .12), transparent 26%),
    rgba(15, 23, 48, .78);
}

.mistake-card-head,
.mistake-answer-row,
.library-card-head,
.library-answer-row,
.library-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.mistake-card-head span,
.mistake-card-head strong,
.mistake-card-head em,
.library-card-head span,
.library-card-head strong,
.library-card-head em {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
}

.mistake-card-head span,
.library-card-head span {
  color: #c9d2ef;
  background: rgba(255, 255, 255, .06);
}

.mistake-card-head strong,
.library-card-head strong {
  color: #fff;
  background: rgba(124, 83, 255, .26);
}

.mistake-card-head em,
.library-card-head em {
  color: #ffd4dc;
  background: rgba(255, 93, 110, .18);
}

.mistake-card h3,
.library-card h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.55;
}

.mistake-answer-row,
.library-answer-row {
  padding: 12px;
  border-radius: var(--radius);
  background: rgba(8, 13, 31, .58);
}

.mistake-answer-row span {
  color: #ffb7c0;
}

.library-answer-row span {
  color: #b9ffec;
}

.mistake-answer-row strong {
  color: #b9ffec;
}

.mistake-card p,
.library-card p,
.casebase-prose {
  margin: 0;
  color: #cbd4ef;
  line-height: 1.85;
}

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

.mistake-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #dfe5ff;
  background: rgba(124, 83, 255, .18);
  font-size: 12px;
}

.mistake-empty,
.casebase-empty,
.library-empty {
  min-height: 220px;
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: var(--radius);
  background: rgba(8, 13, 31, .56);
}

.mistake-empty h3,
.casebase-empty strong,
.library-empty h3 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 22px;
}

.mistake-empty p,
.casebase-empty p,
.library-empty p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.8;
}

.library-empty.single {
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  min-height: 360px;
}

.mistake-reason-list,
.case-count-list {
  display: grid;
  gap: 12px;
}

.mistake-reason-list div {
  display: grid;
  grid-template-columns: 1fr 120px 64px;
  gap: 10px;
  align-items: center;
  color: #dce4ff;
}

.mistake-reason-list strong {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.latest-mistake,
.review-plan,
.formula-card,
.case-focus-list {
  display: grid;
  gap: 12px;
}

.latest-mistake span {
  color: #8edcff;
}

.latest-mistake strong {
  line-height: 1.55;
}

.latest-mistake p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.library-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  background:
    radial-gradient(circle at 88% 16%, rgba(255, 182, 92, .14), transparent 30%),
    linear-gradient(135deg, rgba(20, 30, 62, .94), rgba(10, 15, 34, .9));
}

.library-hero p,
.note-editor-head p {
  margin: 0 0 8px;
  color: #8edcff;
}

.library-hero h2,
.note-editor-head h2 {
  margin: 0 0 10px;
  font-size: 26px;
}

.library-hero span,
.note-editor-head span {
  color: var(--muted);
  line-height: 1.75;
}

.library-actions {
  padding-top: 2px;
}

.ghost-link.active {
  color: #ffdf9f;
}

.ghost-link.danger {
  color: #ff9aa8;
}

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

.note-list button {
  min-height: 118px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 15px;
  color: var(--text);
  text-align: left;
  border: 1px solid rgba(125, 141, 255, .14);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 90% 10%, rgba(70, 217, 255, .1), transparent 30%),
    rgba(16, 24, 50, .78);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.note-list button:hover,
.note-list button.active {
  transform: translateY(-1px);
  border-color: rgba(142, 220, 255, .5);
  background:
    radial-gradient(circle at 90% 10%, rgba(66, 222, 183, .16), transparent 30%),
    linear-gradient(135deg, rgba(30, 47, 84, .92), rgba(32, 27, 88, .78));
}

.note-list span,
.note-list small,
.note-list em {
  color: var(--muted);
  font-style: normal;
}

.note-list strong {
  font-size: 18px;
}

.note-editor-panel {
  position: sticky;
  top: 20px;
  align-self: start;
  display: grid;
  gap: 18px;
}

.note-editor-head,
.note-editor-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.note-editor-body {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(8, 13, 31, .58);
}

.note-editor-body p {
  margin: 0;
  color: #dce4ff;
  line-height: 1.85;
}

.note-editor-foot {
  align-items: center;
  color: var(--muted);
}

.review-plan article {
  padding: 13px;
  border-radius: var(--radius);
  background: rgba(8, 13, 31, .55);
}

.review-plan strong,
.review-plan span {
  display: block;
}

.review-plan span {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.6;
}

.casebase-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(66, 222, 183, .16), transparent 32%),
    linear-gradient(135deg, rgba(20, 30, 62, .94), rgba(10, 15, 34, .9));
}

.casebase-hero p {
  margin: 0 0 8px;
  color: #8edcff;
}

.casebase-hero h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.casebase-hero span {
  color: var(--muted);
  line-height: 1.75;
}

.casebase-hero-stats {
  min-width: 170px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 12px;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(8, 13, 31, .58);
}

.casebase-hero-stats strong {
  color: #fff;
  font-size: 32px;
}

.casebase-hero-stats span {
  align-self: center;
}

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

.casebase-card-grid button {
  min-height: 170px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 15px;
  color: var(--text);
  text-align: left;
  border: 1px solid rgba(125, 141, 255, .15);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 88% 10%, rgba(124, 83, 255, .16), transparent 34%),
    rgba(16, 24, 50, .78);
}

.casebase-card-grid button:hover,
.casebase-card-grid button.active {
  border-color: rgba(142, 220, 255, .5);
  background:
    radial-gradient(circle at 88% 10%, rgba(66, 222, 183, .18), transparent 34%),
    rgba(24, 36, 70, .92);
}

.casebase-card-grid span,
.casebase-card-grid em,
.casebase-card-grid small {
  color: var(--muted);
  font-style: normal;
  line-height: 1.55;
}

.casebase-card-grid span {
  color: #8edcff;
}

.casebase-card-grid strong {
  font-size: 17px;
  line-height: 1.45;
}

.casebase-detail {
  display: block;
}

.casebase-analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: 16px;
}

.formula-card span {
  color: #8edcff;
}

.formula-card strong {
  font-size: 24px;
}

.formula-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.formula-card em {
  padding: 7px 10px;
  border-radius: 999px;
  color: #e6ebff;
  background: rgba(124, 83, 255, .18);
  font-style: normal;
  font-size: 13px;
}

.formula-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.case-count-list button {
  min-height: 54px;
  display: grid;
  grid-template-columns: 48px 36px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  color: var(--text);
  text-align: left;
  border-radius: var(--radius);
  background: rgba(8, 13, 31, .5);
}

.case-count-list button.active {
  background: rgba(124, 83, 255, .24);
}

.case-count-list span {
  color: #8edcff;
  font-weight: 800;
}

.case-count-list strong {
  color: #fff;
  font-size: 20px;
}

.case-count-list em {
  color: var(--muted);
  font-style: normal;
}

.case-focus-list div {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
  color: #dfe5ff;
}

.case-focus-list i {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #061222;
  background: #42deb7;
  font-style: normal;
}

.diagnosis-card {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 14px;
  align-items: center;
}

.diagnosis-card ol {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 12px;
}

.diagnosis-card li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.clinical-layout {
  grid-template-columns: minmax(0, 1fr) 390px;
}

.case-summary {
  padding: 21px 24px;
}

.case-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.case-head h2 {
  margin: 0;
  flex: 1;
}

.case-head span {
  padding: 6px 12px;
  color: #cfd7ff;
  border-radius: 17px;
  background: rgba(124,83,255,.17);
}

.case-summary p {
  color: #cbd4ef;
  line-height: 1.75;
  margin: 8px 0;
}

.clinical-step-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}

.clinical-top-timeline {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  align-items: center;
}

.timeline button {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  background: transparent;
}

.timeline i {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: #dce4ff;
  border: 1px solid rgba(125,141,255,.15);
  background: rgba(18,27,55,.8);
  font-style: normal;
}

.timeline .active i {
  color: white;
  background: linear-gradient(135deg, #7c53ff, #4320aa);
}

.clinical-work {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
}

.clinical-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.clinical-step-actions .primary,
.clinical-step-actions .soft-btn {
  min-width: 180px;
}

.clinical-step-actions .primary {
  flex: 1 1 240px;
}

.clinical-step-actions .soft-btn {
  flex: 0 0 auto;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #7154ff;
}

.section-title h2 {
  margin: 0;
}

.collect-panel > p {
  color: var(--muted);
}

.question-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.question-tabs button {
  min-height: 38px;
  padding: 0 10px;
  color: #dce3ff;
  white-space: nowrap;
  border-radius: var(--radius);
  background: rgba(18,27,55,.74);
}

.ask-list {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.clinical-answer-group {
  display: grid;
  gap: 4px;
  padding: 0;
}

.clinical-answer-group-list {
  display: grid;
  gap: 6px;
}

.ask-list button {
  min-height: 46px;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  color: #ccd4ef;
  text-align: left;
  border-radius: var(--radius);
  background: rgba(14,22,46,.72);
}

.ask-list button.done {
  color: white;
  background: rgba(38, 62, 96, 0.75);
}

.clinical-answer-item {
  display: grid;
  gap: 8px;
}

.clinical-answer-toggle.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(110, 72, 255, 0.38), rgba(42, 76, 143, 0.44));
  box-shadow: inset 0 0 0 1px rgba(145, 127, 255, 0.32);
}

.clinical-answer-toggle.active em {
  color: #d7cfff;
}

.clinical-answer-panel {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(18, 29, 58, 0.82);
  border: 1px solid rgba(129, 108, 255, 0.16);
}

.clinical-answer-preview {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(92, 74, 193, 0.14);
}

.clinical-answer-preview strong {
  display: block;
  margin-bottom: 6px;
  color: #f1f3ff;
  font-size: 13px;
}

.clinical-answer-preview p {
  margin: 0;
  color: #bcc6e7;
  line-height: 1.7;
}

.ask-list em {
  color: #aeb7dd;
  font-style: normal;
}

.info-timeline {
  display: grid;
  gap: 12px;
}

.info-timeline div {
  position: relative;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 10px;
  color: #dce4ff;
}

.info-timeline div.draft {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(95, 72, 204, 0.12);
  box-shadow: inset 0 0 0 1px rgba(140, 119, 255, 0.16);
}

.info-timeline i {
  width: 13px;
  height: 13px;
  margin-top: 4px;
  border-radius: 50%;
  background: #7b5cff;
  box-shadow: 0 0 14px rgba(124,83,255,.8);
}

.info-timeline p {
  grid-column: 2 / -1;
  margin: -4px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.info-timeline time {
  color: var(--soft);
  font-size: 12px;
}

.clinical-collected-groups {
  display: grid;
  gap: 14px;
}

.clinical-collected-group {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(95, 72, 204, 0.12);
  box-shadow: inset 0 0 0 1px rgba(140, 119, 255, 0.16);
}

.clinical-collected-group-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  color: #eef2ff;
}

.clinical-collected-group-head i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #7b5cff;
  box-shadow: 0 0 14px rgba(124,83,255,.8);
}

.clinical-collected-group-head strong {
  font-size: 16px;
}

.clinical-collected-group-lines {
  display: grid;
  gap: 10px;
  padding-left: 26px;
}

.clinical-collected-group-lines p {
  margin: 0;
  color: #c6d0ee;
  line-height: 1.7;
}

.clinical-collected-empty {
  padding: 14px 4px 6px;
}

.clinical-collected-empty strong {
  display: block;
  margin-bottom: 8px;
  color: #eef2ff;
}

.clinical-collected-empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.deepseek-tip {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 14px;
  margin-top: 24px;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(19, 27, 54, 0.76);
}

.clinical-empty-panel {
  min-height: 420px;
  display: grid;
  align-content: start;
  gap: 18px;
}

.clinical-empty-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.clinical-reasoning-panel,
.clinical-reasoning-summary {
  min-height: 420px;
}

.clinical-reasoning-board,
.clinical-reasoning-chain,
.clinical-reasoning-groups,
.clinical-differential-list {
  display: grid;
  gap: 14px;
}

.clinical-reasoning-source,
.clinical-reasoning-step,
.clinical-diagnosis-pill,
.clinical-differential-list article {
  border: 1px solid rgba(125, 141, 255, 0.1);
  border-radius: 14px;
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
}

.clinical-reasoning-source {
  padding: 16px;
}

.clinical-reasoning-source.accent {
  background: rgba(70, 217, 255, 0.07);
  border-color: rgba(70, 217, 255, 0.14);
}

.clinical-reasoning-source-head,
.clinical-differential-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.clinical-reasoning-source-head strong,
.clinical-diagnosis-pill strong,
.clinical-differential-head strong {
  color: #f7f8ff;
}

.clinical-reasoning-note,
.clinical-differential-head em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.clinical-reasoning-group {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(125, 141, 255, 0.12);
}

.clinical-reasoning-group:first-child {
  padding-top: 0;
  border-top: 0;
}

.clinical-reasoning-module {
  color: #8edcff;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.clinical-reasoning-lines,
.clinical-reasoning-prose {
  display: grid;
  gap: 8px;
}

.clinical-reasoning-lines p,
.clinical-reasoning-prose p,
.clinical-reasoning-summary-copy,
.clinical-differential-list p {
  margin: 0;
  color: #d5def8;
  line-height: 1.78;
}

.clinical-reasoning-step {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 16px;
}

.clinical-reasoning-step-tag {
  min-height: 56px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(168, 153, 255, 0.18);
  color: #fff;
  font-weight: 700;
  background: transparent;
  box-shadow: none;
}

.clinical-reasoning-step-body {
  display: grid;
  gap: 6px;
}

.clinical-reasoning-step-body strong {
  display: block;
  color: #f7f8ff;
}

.clinical-diagnosis-pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.clinical-diagnosis-pill {
  padding: 16px;
}

.clinical-diagnosis-pill span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.clinical-diagnosis-pill strong {
  font-size: 18px;
}

.clinical-focus-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.clinical-focus-tags span {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(168, 153, 255, 0.12);
  color: #eef2ff;
  background: transparent;
  box-shadow: none;
  font-size: 13px;
}

.clinical-differential-list article {
  padding: 14px 16px;
}

.deepseek-tip p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.related-clinical {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.related-clinical article {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.more-card {
  min-height: 86px;
  color: #dce3ff;
  border-radius: var(--radius);
  background: rgba(18,27,55,.72);
}

.more-card span {
  color: var(--muted);
}

.evidence-list {
  display: grid;
  gap: 14px;
}

.evidence-list div {
  display: grid;
  grid-template-columns: 1fr 126px 42px;
  align-items: center;
  gap: 10px;
  color: #dce4ff;
}

.mind-map {
  position: relative;
  height: 238px;
  overflow: hidden;
}

.mind-map::before {
  content: "";
  position: absolute;
  left: 70px;
  top: 42px;
  width: 220px;
  height: 150px;
  border-top: 1px solid rgba(180,190,255,.45);
  border-bottom: 1px solid rgba(180,190,255,.28);
  transform: skewY(-8deg);
}

.root,
.branch,
.leaf {
  position: absolute;
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(125,141,255,.12);
  border-radius: var(--radius);
  color: #dce4ff;
  background: transparent;
  backdrop-filter: none;
  font-size: 12px;
  text-align: center;
}

.root {
  left: 8px;
  top: 82px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: transparent;
}

.branch { left: 146px; }
.b1 { top: 36px; }
.b2 { top: 98px; }
.b3 { top: 160px; }
.leaf { right: 0; min-width: 108px; }
.l1 { top: 16px; }
.l2 { top: 54px; }
.l3 { top: 86px; }
.l4 { top: 124px; }
.l5 { top: 156px; }
.l6 { top: 194px; }

.body-viewer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  align-items: start;
}

.body-viewer-shell {
  padding: 0;
  overflow: hidden;
  min-height: 720px;
}

.persistent-embed-parking {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.body-viewer-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 18% 0%, rgba(69, 216, 211, .18), transparent 32%),
    linear-gradient(135deg, rgba(18, 27, 55, .96), rgba(8, 12, 30, .92));
}

.body-viewer-head p {
  margin: 0 0 6px;
  color: #8edcff;
  font-size: 13px;
}

.body-viewer-head h2 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3vw, 40px);
}

.body-viewer-head span {
  color: var(--muted);
  line-height: 1.7;
}

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

.body-viewer-frame {
  display: block;
  width: 100%;
  height: min(78vh, 840px);
  min-height: 620px;
  border: 0;
  background: transparent;
}

.body-viewer-frame-slot {
  min-height: 620px;
  background: transparent;
}

.body-viewer-stage {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.body-viewer-stage-note {
  display: grid;
  gap: 8px;
  padding: 0 18px 18px;
  color: rgba(231, 237, 255, 0.88);
  line-height: 1.75;
}

.body-viewer-stage-note code {
  color: #cbd6ff;
}

.body-viewer-empty {
  min-height: 620px;
  display: grid;
  place-items: center;
  padding: 28px;
}

.body-viewer-empty-card {
  width: min(720px, 100%);
  display: grid;
  gap: 16px;
  padding: 26px 28px;
  border: 1px solid rgba(184, 201, 255, 0.14);
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 0%, rgba(69, 216, 211, .12), transparent 34%),
    linear-gradient(135deg, rgba(10, 16, 38, .54), rgba(8, 12, 28, .38));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.02),
    0 18px 48px rgba(0,0,0,.16);
}

.body-viewer-empty-card strong {
  font-size: 24px;
}

.body-viewer-empty-card p {
  margin: 0;
  color: rgba(231, 237, 255, 0.88);
  line-height: 1.8;
}

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

.body-viewer-side {
  position: sticky;
  top: 18px;
}

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

.body-part-grid button {
  min-height: 86px;
  padding: 12px;
  color: var(--text);
  text-align: left;
  border: 1px solid rgba(125, 141, 255, .18);
  border-radius: 16px;
  background: rgba(18, 27, 55, .82);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.body-part-grid button:hover {
  transform: translateY(-2px);
  border-color: rgba(142, 220, 255, .46);
  background: rgba(29, 43, 82, .92);
}

.body-part-grid button.active {
  border-color: rgba(142, 220, 255, .42);
  background:
    radial-gradient(circle at 90% 10%, rgba(66, 222, 183, .14), transparent 28%),
    rgba(18, 28, 58, .82);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.02),
    0 0 26px rgba(70, 217, 255, .12);
}

.body-part-grid strong,
.body-part-grid span {
  display: block;
}

.body-part-grid span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.body-model-note {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.8;
}

.body-model-note code {
  color: #cbd6ff;
}

.placeholder {
  max-width: 760px;
  margin: 40px auto;
  text-align: center;
}

.compact-stage {
  min-height: 180px;
  display: grid;
  place-items: center;
}

.compact-stage .heart {
  transform: scale(.72);
}

.placeholder h2 {
  font-size: 34px;
  margin: 0 0 10px;
}

.placeholder p {
  color: var(--muted);
  line-height: 1.8;
}

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

.placeholder-grid article {
  padding: 16px;
  text-align: left;
}

.placeholder-grid span {
  display: block;
  color: var(--muted);
  margin-top: 8px;
}

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

.profile-entry {
  display: block;
  width: 100%;
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
}

.profile-note {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 13px;
  display: none;
}

.profile-actions,
.hero-actions,
.study-module-actions,
.auth-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-learning-card,
.ai-tools-hero,
.report-hero,
.auth-panel,
.account-panel {
  background:
    radial-gradient(circle at 78% 22%, rgba(66, 222, 183, 0.14), transparent 30%),
    radial-gradient(circle at 18% 10%, rgba(124, 83, 255, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(18, 24, 56, 0.94), rgba(10, 15, 34, 0.92));
}

.study-hero-shell {
  display: grid;
  place-items: center;
  min-height: 260px;
}

.study-hero-visual,
.task-visual,
.study-module-badge {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.22), transparent 18%),
    rgba(17, 26, 54, 0.86);
  box-shadow: 0 0 30px rgba(8, 12, 30, 0.42);
}

.study-hero-visual {
  width: min(320px, 72%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 32px;
}

.study-module-hero {
  width: min(340px, 78%);
  border-radius: 50%;
  border: 1px solid rgba(156, 143, 255, 0.28);
  box-shadow:
    inset 0 0 30px rgba(255,255,255,.08),
    0 0 46px rgba(12, 18, 42, .42);
}

.study-hero-shell {
  display: grid;
  place-items: center;
}

.study-hero-visual.study-module-hero {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,.06), transparent 12%),
    radial-gradient(circle at 50% 54%, rgba(8,12,28,0), rgba(8,12,28,.04) 88%, rgba(7,10,26,.08));
  overflow: hidden;
}

.hero-card .study-hero-visual.study-module-hero {
  border: 1px solid rgba(201, 174, 114, 0.18);
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,.22), transparent 14%),
    radial-gradient(circle at 62% 68%, rgba(255,190,118,.18), transparent 22%),
    linear-gradient(145deg, rgba(201, 147, 91, 0.94), rgba(128, 82, 41, 0.96) 45%, rgba(56, 34, 18, 0.98));
  box-shadow:
    inset 0 0 30px rgba(255,255,255,.08),
    0 0 38px rgba(12, 18, 42, .26);
}

.hero-card .study-hero-visual.study-module-hero.has-video-ready {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.hero-card .study-module-hero .study-hero-video {
  transform: scale(1.72);
}

.study-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.34);
  opacity: 1;
  filter: saturate(1.08) contrast(1.08) brightness(.98);
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  clip-path: circle(50% at 50% 50%);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  outline: 1px solid transparent;
}

.study-hero-visual span,
.study-module-badge,
.task-visual {
  color: #fff;
  font-weight: 800;
  letter-spacing: .04em;
}

.study-hero-visual span {
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(6, 10, 26, 0.36);
  backdrop-filter: blur(10px);
}

.study-module-hero span {
  padding: 12px 18px;
  background: rgba(6, 10, 26, 0.44);
  box-shadow: 0 0 18px rgba(0, 0, 0, .16);
  position: relative;
  z-index: 1;
}

.task-visual,
.study-module-badge {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
}

.visual-intro {
  background:
    radial-gradient(circle at 42% 30%, rgba(142, 220, 255, .45), transparent 16%),
    linear-gradient(140deg, rgba(79, 141, 255, .9), rgba(44, 30, 104, .92));
}

.visual-philosophy {
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.18), transparent 20%),
    conic-gradient(from 90deg, rgba(255,255,255,.92) 0 50%, rgba(15,25,58,.96) 50% 100%);
}

.visual-insight {
  background:
    radial-gradient(circle at 34% 30%, rgba(142, 220, 255, .38), transparent 18%),
    linear-gradient(135deg, rgba(69, 217, 255, .84), rgba(124, 83, 255, .88));
}

.visual-zangxiang {
  background:
    radial-gradient(circle at 52% 42%, rgba(255, 122, 198, .4), transparent 20%),
    linear-gradient(135deg, rgba(255, 118, 168, .82), rgba(91, 44, 173, .9));
}

.visual-essence {
  background:
    radial-gradient(circle at 48% 38%, rgba(66, 222, 183, .4), transparent 18%),
    linear-gradient(135deg, rgba(66, 222, 183, .88), rgba(26, 78, 108, .92));
}

.visual-meridian {
  background:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,.28), transparent 14%),
    linear-gradient(135deg, rgba(255, 182, 92, .84), rgba(66, 222, 183, .82));
}

.visual-constitution {
  background:
    radial-gradient(circle at 26% 26%, rgba(255,255,255,.24), transparent 14%),
    linear-gradient(135deg, rgba(118, 196, 126, .88), rgba(32, 66, 40, .92));
}

.visual-pathogenesis {
  background:
    radial-gradient(circle at 62% 22%, rgba(255,255,255,.22), transparent 15%),
    linear-gradient(135deg, rgba(255, 93, 110, .9), rgba(87, 26, 44, .96));
}

.visual-prevention {
  background:
    radial-gradient(circle at 50% 25%, rgba(255,255,255,.2), transparent 15%),
    linear-gradient(135deg, rgba(255, 182, 92, .88), rgba(134, 74, 24, .94));
}

.visual-track-basic {
  background:
    radial-gradient(circle at 36% 28%, rgba(255,255,255,.24), transparent 14%),
    radial-gradient(circle at 62% 62%, rgba(31, 209, 173, .22), transparent 22%),
    radial-gradient(circle, rgba(66,222,183,.66), rgba(13,57,54,.92));
}

.visual-track-diagnosis {
  background:
    radial-gradient(circle at 30% 26%, rgba(255,255,255,.22), transparent 14%),
    radial-gradient(circle, rgba(88, 162, 255, .72), rgba(42, 58, 130, .94));
}

.visual-track-herb {
  background:
    radial-gradient(circle at 28% 24%, rgba(255,255,255,.22), transparent 14%),
    radial-gradient(circle, rgba(255, 171, 85, .74), rgba(122, 74, 28, .94));
}

.visual-track-formula {
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,.2), transparent 13%),
    radial-gradient(circle, rgba(168, 176, 214, .52), rgba(63, 75, 118, .92));
}

.visual-track-internal {
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,.22), transparent 14%),
    radial-gradient(circle, rgba(92, 135, 255, .74), rgba(41, 71, 148, .94));
}

.visual-track-acupuncture {
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,.18), transparent 14%),
    radial-gradient(circle, rgba(255, 96, 114, .74), rgba(109, 34, 52, .94));
}

.visual-track-neijing {
  background:
    radial-gradient(circle at 28% 22%, rgba(255,255,255,.22), transparent 14%),
    radial-gradient(circle, rgba(92, 135, 255, .7), rgba(38, 64, 126, .94));
}

.visual-track-shanghan {
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,.2), transparent 14%),
    radial-gradient(circle, rgba(124, 142, 214, .62), rgba(70, 82, 148, .94));
}

.visual-track-formula {
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,.2), transparent 13%),
    linear-gradient(135deg, rgba(168, 176, 214, .86), rgba(63, 75, 118, .96));
}

.visual-track-internal {
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,.22), transparent 14%),
    linear-gradient(135deg, rgba(92, 135, 255, .88), rgba(41, 71, 148, .96));
}

.visual-track-acupuncture {
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,.18), transparent 14%),
    linear-gradient(135deg, rgba(255, 96, 114, .88), rgba(109, 34, 52, .96));
}

.visual-track-neijing {
  background:
    radial-gradient(circle at 28% 22%, rgba(255,255,255,.22), transparent 14%),
    linear-gradient(135deg, rgba(92, 135, 255, .88), rgba(38, 64, 126, .96));
}

.visual-track-shanghan {
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,.2), transparent 14%),
    linear-gradient(135deg, rgba(124, 142, 214, .86), rgba(70, 82, 148, .96));
}

.task-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 1fr);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
  cursor: grab;
  scrollbar-width: thin;
}

.task-progress-card {
  min-width: 0;
}

.task-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.account-layout {
  display: grid;
  gap: 18px;
}

.account-layout .account-panel:first-child {
  order: -1;
}

.account-profile-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.profile-avatar-picker {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #aeb8d8;
  cursor: pointer;
}

.profile-avatar-picker input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.profile-avatar-large {
  width: 86px;
  height: 86px;
}

.profile-avatar-picker span {
  font-size: 12px;
}

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

.profile-form select,
.profile-form input[readonly] {
  min-height: 46px;
  padding: 0 14px;
  color: var(--text);
  border: 1px solid rgba(125, 141, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(10, 16, 34, 0.8);
}

.profile-form input[readonly] {
  color: #aeb8d8;
}

.profile-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.settings-layout {
  align-items: start;
}

.settings-hero {
  background:
    radial-gradient(circle at 78% 22%, rgba(66, 222, 183, 0.12), transparent 30%),
    radial-gradient(circle at 18% 10%, rgba(124, 83, 255, 0.2), transparent 28%),
    linear-gradient(135deg, rgba(18, 24, 56, 0.94), rgba(10, 15, 34, 0.92));
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.app-shell:has(.settings-library) {
  background:
    radial-gradient(circle at 14% 8%, rgba(150, 118, 67, 0.16), transparent 24%),
    linear-gradient(135deg, #f8f4e8 0%, #eee3ca 48%, #fbfaf4 100%);
}

.app-shell:has(.settings-library) .page-route-video {
  display: block;
}

.app-shell:has(.settings-library) .sidebar {
  color: #3d3223;
  border-right-color: rgba(122, 87, 45, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 253, 247, 0.94), rgba(239, 229, 204, 0.9)),
    #f8f4e8;
  backdrop-filter: none;
}

.app-shell:has(.settings-library) .brand strong {
  color: #2f271c;
}

.app-shell:has(.settings-library) .brand small,
.app-shell:has(.settings-library) .profile small,
.app-shell:has(.settings-library) .profile-note,
.app-shell:has(.settings-library) .profile-stats span {
  color: #776955;
}

.app-shell:has(.settings-library) .nav-item {
  color: #5d503e;
}

.app-shell:has(.settings-library) .nav-item:hover {
  color: #2f271c;
  background: rgba(142, 106, 64, 0.1);
}

.app-shell:has(.settings-library) .nav-item.active {
  color: #5c3a11;
  background: #f0e5c6;
  box-shadow: inset 0 0 0 1px rgba(141, 100, 45, 0.2);
}

.app-shell:has(.settings-library) .nav-icon {
  border-color: rgba(117, 88, 52, 0.28);
}

.app-shell:has(.settings-library) .profile {
  border-color: rgba(122, 87, 45, 0.14);
  background: rgba(255, 253, 247, 0.68);
  box-shadow: inset 0 0 24px rgba(129, 94, 54, 0.08);
}

.app-shell:has(.settings-library) .profile strong,
.app-shell:has(.settings-library) .title-block h1 {
  color: #2f271c;
}

.app-shell:has(.settings-library) .profile-stats strong {
  color: #8d5f22;
}

.app-shell:has(.settings-library) .main {
  background:
    linear-gradient(90deg, rgba(142, 106, 64, 0.06) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(142, 106, 64, 0.05) 0 1px, transparent 1px 100%),
    #f8f4e8;
}

.app-shell:has(.settings-library) .title-block p {
  color: #766956;
}

.app-shell:has(.settings-library) .search {
  color: #7f705e;
  border-color: rgba(132, 98, 59, 0.2);
  background: rgba(255, 253, 247, 0.8);
  box-shadow: none;
}

.app-shell:has(.settings-library) .search input {
  color: #2f271c;
}

.app-shell:has(.settings-library) .search input::placeholder {
  color: #8e806a;
}

.app-shell:has(.settings-library) .round-btn {
  color: #4b3a27;
  border-color: rgba(132, 98, 59, 0.24);
  background: rgba(255, 253, 247, 0.82);
}

.settings-library {
  display: grid;
  min-height: calc(100vh - 130px);
}

.settings-paper {
  position: relative;
  overflow: hidden;
  padding: 28px;
  color: #3b3024;
  border: 1px solid rgba(129, 94, 54, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(142, 106, 64, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(142, 106, 64, 0.06) 0 1px, transparent 1px 100%),
    radial-gradient(circle at 8% 12%, rgba(150, 118, 67, 0.18), transparent 26%),
    radial-gradient(circle at 88% 18%, rgba(130, 162, 112, 0.12), transparent 22%),
    linear-gradient(135deg, #fbf8ef 0%, #f3ecd9 48%, #fcfaf4 100%);
  box-shadow: inset 0 0 40px rgba(96, 64, 31, 0.08), 0 18px 50px rgba(80, 55, 28, 0.16);
}

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

.settings-paper::before {
  inset: 14px;
  border: 1px solid rgba(119, 85, 46, 0.12);
}

.settings-paper::after {
  inset: 0;
  background:
    radial-gradient(circle at 16% 30%, rgba(119, 85, 46, 0.05), transparent 18%),
    radial-gradient(circle at 72% 74%, rgba(119, 85, 46, 0.07), transparent 24%);
  mix-blend-mode: multiply;
}

.settings-topline,
.settings-nav,
.settings-body {
  position: relative;
  z-index: 1;
}

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

.settings-topline p {
  margin: 0 0 8px;
  color: #8d642d;
  font-weight: 700;
}

.settings-topline h2 {
  margin: 0;
  color: #2e261c;
  font-size: 30px;
  line-height: 1.18;
}

.settings-topline span {
  display: block;
  margin-top: 10px;
  color: #766956;
  line-height: 1.7;
}

.settings-admin,
.settings-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-admin {
  color: #7f705e;
}

.settings-admin button,
.settings-nav button,
.settings-filter button {
  border: 1px solid rgba(132, 98, 59, 0.2);
  color: #4b3a27;
  background: rgba(255, 253, 247, 0.72);
}

.settings-admin button,
.settings-nav button {
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 999px;
}

.settings-nav {
  margin-bottom: 22px;
  overflow-x: auto;
}

.settings-nav button.active {
  color: #5c3a11;
  background: #f0e5c6;
  border-color: rgba(141, 100, 45, 0.36);
  font-weight: 700;
}

.settings-body {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 24px;
}

.settings-filter {
  padding: 18px;
  border-radius: 6px;
  background: rgba(255, 253, 247, 0.68);
  box-shadow: inset 0 0 24px rgba(129, 94, 54, 0.08);
}

.settings-filter h3 {
  margin: 0 0 18px;
  color: #2e261c;
  font-size: 19px;
}

.settings-filter button {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-bottom: 10px;
  padding: 11px 12px;
  border-radius: 4px;
  text-align: left;
}

.settings-filter button.active {
  color: #7a501d;
  background: #f5edd8;
  font-weight: 700;
}

.settings-filter em {
  color: #9a7d54;
  font-style: normal;
}

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

.settings-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(127, 90, 48, 0.16);
  border-radius: 7px;
  background: rgba(255, 253, 248, 0.76);
  box-shadow: 0 8px 24px rgba(99, 69, 35, 0.08);
}

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

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

.settings-card h3,
.settings-card-head h3 {
  margin: 0 0 8px;
  color: #2d251b;
  font-size: 22px;
}

.settings-card p,
.settings-card-head p {
  margin: 0;
  color: #756651;
  line-height: 1.7;
}

.settings-card-head > span {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  color: #6b471c;
  background: #efe3c6;
  font-weight: 700;
}

.settings-form input,
.settings-form select {
  color: #2d251b;
  border: 1px solid rgba(127, 90, 48, 0.18);
  background: rgba(255, 253, 247, 0.9);
}

.settings-form label span {
  color: #6d5d48;
}

.settings-toggle {
  min-height: 92px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 6px 14px;
  padding: 14px;
  border: 1px solid rgba(127, 90, 48, 0.14);
  border-radius: 7px;
  background: rgba(245, 237, 216, 0.58);
  cursor: pointer;
}

.settings-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.settings-toggle > span {
  position: relative;
  width: 48px;
  height: 28px;
  grid-row: 1 / span 2;
  border-radius: 999px;
  border: 1px solid rgba(127, 90, 48, 0.18);
  background: rgba(255, 253, 247, 0.9);
}

.settings-toggle > span::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #9a7d54;
  transition: transform 160ms ease, background 160ms ease;
}

.settings-toggle input:checked + span {
  background: #f0e5c6;
}

.settings-toggle input:checked + span::after {
  transform: translateX(20px);
  background: #8c5c21;
}

.settings-toggle input:focus-visible + span {
  outline: 2px solid rgba(140, 92, 33, 0.45);
  outline-offset: 3px;
}

.settings-toggle strong {
  color: #2d251b;
  font-size: 16px;
}

.settings-toggle em {
  color: #756651;
  font-style: normal;
  line-height: 1.55;
}

.settings-library .primary {
  background: #8c5c21;
  box-shadow: none;
}

.settings-library .soft-btn {
  color: #4b3a27;
  border-color: rgba(132, 98, 59, 0.2);
  background: #f0e5c6;
}

.settings-library .ghost-link {
  color: #9a3f36;
}

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

.settings-runtime-list div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 6px;
  background: rgba(245, 237, 216, 0.72);
}

.settings-runtime-list span {
  color: #8a7a63;
}

.settings-runtime-list strong {
  min-width: 0;
  color: #2d251b;
  overflow-wrap: anywhere;
}

.settings-mini-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.settings-mini-stats div {
  min-height: 78px;
  display: grid;
  place-items: center;
  padding: 10px;
  border-radius: 6px;
  background: rgba(245, 237, 216, 0.72);
}

.settings-mini-stats strong {
  color: #7a501d;
  font-size: 22px;
}

.settings-mini-stats span {
  color: #756651;
  font-size: 13px;
}

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

.settings-note-grid article {
  min-height: 116px;
  padding: 14px;
  border: 1px solid rgba(127, 90, 48, 0.13);
  border-radius: 6px;
  background: rgba(245, 237, 216, 0.58);
}

.settings-note-grid strong {
  display: block;
  margin-bottom: 8px;
  color: #2d251b;
}

.settings-note-grid span {
  color: #756651;
  line-height: 1.65;
}

.app-shell:has(.settings-library) {
  background:
    radial-gradient(circle at 16% 10%, rgba(124, 83, 255, 0.14), transparent 26%),
    radial-gradient(circle at 82% 18%, rgba(66, 222, 183, 0.08), transparent 24%),
    linear-gradient(135deg, #0c0c24 0%, #07111f 52%, #040715 100%);
}

.app-shell:has(.settings-library) .page-route-video {
  display: block;
  opacity: 0.88;
  filter: saturate(1.08) contrast(1.08) brightness(0.52);
}

.app-shell:has(.settings-library) .sidebar {
  color: #dfe5ff;
  border-right-color: rgba(125, 141, 255, 0.18);
  background: rgba(7, 10, 28, 0.86);
  backdrop-filter: blur(14px);
}

.app-shell:has(.settings-library) .main {
  background:
    linear-gradient(180deg, rgba(5, 8, 23, 0.02) 0%, rgba(5, 8, 23, 0.08) 100%);
}

.app-shell:has(.settings-library) .brand strong,
.app-shell:has(.settings-library) .profile strong,
.app-shell:has(.settings-library) .title-block h1 {
  color: #f6f8ff;
}

.app-shell:has(.settings-library) .brand small,
.app-shell:has(.settings-library) .profile small,
.app-shell:has(.settings-library) .profile-note,
.app-shell:has(.settings-library) .profile-stats span,
.app-shell:has(.settings-library) .title-block p {
  color: #9aa6c6;
}

.app-shell:has(.settings-library) .nav-item {
  color: #cfd6f6;
}

.app-shell:has(.settings-library) .nav-item:hover {
  color: #ffffff;
  background: rgba(125, 141, 255, 0.1);
}

.app-shell:has(.settings-library) .nav-item.active {
  color: #ffffff;
  background: rgba(124, 83, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(151, 128, 255, 0.28);
}

.app-shell:has(.settings-library) .nav-icon {
  border-color: rgba(183, 193, 255, 0.22);
}

.app-shell:has(.settings-library) .profile {
  border-color: rgba(125, 141, 255, 0.16);
  background: rgba(13, 19, 45, 0.72);
  box-shadow: none;
}

.app-shell:has(.settings-library) .profile-stats strong {
  color: #ffba6b;
}

.app-shell:has(.settings-library) .search {
  color: #9aa6c6;
  border-color: rgba(125, 141, 255, 0.18);
  background: rgba(16, 23, 52, 0.72);
  box-shadow: none;
}

.app-shell:has(.settings-library) .search input {
  color: #f6f8ff;
}

.app-shell:has(.settings-library) .search input::placeholder {
  color: #8d97b6;
}

.app-shell:has(.settings-library) .round-btn {
  color: #f6f8ff;
  border-color: rgba(183, 193, 255, 0.24);
  background: rgba(16, 23, 52, 0.74);
}

.settings-library {
  display: block;
  min-height: calc(100vh - 130px);
}

.settings-console {
  display: block;
}

.settings-main-stack,
.settings-side-stack {
  display: grid;
  gap: 18px;
}

.settings-main-stack {
  max-width: 1180px;
}

.settings-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 360px);
  gap: 18px;
  align-items: start;
}

.settings-hero-card,
.settings-card {
  min-width: 0;
  border: 1px solid rgba(125, 141, 255, 0.16);
  border-radius: 8px;
  background: rgba(14, 22, 50, 0.34);
}

.settings-hero-card {
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(124, 83, 255, 0.14), rgba(66, 222, 183, 0.04)),
    rgba(14, 22, 50, 0.28);
}

.settings-hero-card p {
  margin: 0 0 10px;
  color: #7fd8ff;
  font-weight: 700;
}

.settings-hero-card h2 {
  margin: 0;
  max-width: 760px;
  color: #ffffff;
  font-size: 30px;
  line-height: 1.18;
  text-wrap: balance;
}

.settings-hero-card span {
  display: block;
  max-width: 860px;
  margin-top: 12px;
  color: #aeb8d8;
  line-height: 1.7;
}

.settings-card {
  padding: 20px;
  box-shadow: none;
  backdrop-filter: none;
}

.settings-message {
  padding: 14px 16px;
  border: 1px solid rgba(125, 141, 255, 0.16);
  border-radius: 8px;
  background: rgba(14, 22, 50, 0.34);
  color: #dfe5ff;
  line-height: 1.6;
}

.settings-message.success {
  border-color: rgba(89, 213, 164, 0.28);
  color: #d7ffec;
  background: rgba(17, 52, 44, 0.28);
}

.settings-message.error {
  border-color: rgba(255, 122, 145, 0.28);
  color: #ffdbe1;
  background: rgba(70, 20, 35, 0.28);
}

.settings-card-wide {
  grid-column: auto;
}

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

.settings-card h3,
.settings-card-head h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 20px;
  line-height: 1.25;
}

.settings-card p,
.settings-card-head p,
.settings-hint {
  margin: 0;
  color: #aeb8d8;
  line-height: 1.65;
}

.settings-hint {
  margin-top: 14px;
}

.settings-hint strong {
  color: #dfe5ff;
}

.settings-card-head > span {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  color: #dfe5ff;
  background: rgba(124, 83, 255, 0.22);
  font-weight: 700;
}

.settings-form input,
.settings-form select {
  color: #f6f8ff;
  border: 1px solid rgba(125, 141, 255, 0.18);
  background: rgba(8, 13, 31, 0.8);
}

.settings-form label span {
  color: #9aa6c6;
}

.settings-toggle {
  min-height: 88px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 6px 14px;
  padding: 14px;
  border: 1px solid rgba(125, 141, 255, 0.16);
  border-radius: 8px;
  background: rgba(8, 13, 31, 0.22);
  cursor: pointer;
}

.settings-toggle > span {
  position: relative;
  width: 48px;
  height: 28px;
  grid-row: 1 / span 2;
  border-radius: 999px;
  border: 1px solid rgba(183, 193, 255, 0.2);
  background: rgba(29, 38, 75, 0.96);
}

.settings-toggle > span::after {
  background: #9aa6c6;
}

.settings-toggle input:checked + span {
  background: rgba(124, 83, 255, 0.62);
}

.settings-toggle input:checked + span::after {
  background: #ffffff;
}

.settings-toggle input:focus-visible + span {
  outline: 2px solid rgba(127, 216, 255, 0.55);
  outline-offset: 3px;
}

.settings-toggle strong {
  color: #ffffff;
}

.settings-toggle em {
  color: #aeb8d8;
}

.settings-library .primary {
  color: #ffffff;
  background: linear-gradient(135deg, #7d53ff, #8d35d8);
  box-shadow: none;
}

.settings-library .soft-btn {
  color: #dfe5ff;
  border-color: rgba(125, 141, 255, 0.18);
  background: rgba(37, 48, 90, 0.82);
}

.settings-library .ghost-link {
  color: #ff9aaa;
}

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

.settings-runtime-list div {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(22, 31, 66, 0.26);
}

.settings-runtime-list span {
  color: #8f9bbd;
}

.settings-runtime-list strong {
  min-width: 0;
  color: #f6f8ff;
  text-align: right;
  overflow-wrap: anywhere;
}

.settings-account-actions {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.settings-mini-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.settings-mini-stats div {
  min-height: 74px;
  display: grid;
  place-items: center;
  padding: 10px;
  border-radius: 8px;
  background: rgba(8, 13, 31, 0.22);
}

.settings-mini-stats strong {
  color: #ffffff;
  font-size: 22px;
}

.settings-mini-stats span {
  color: #9aa6c6;
  font-size: 13px;
}

.settings-note-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.settings-note-grid article {
  min-height: 0;
  padding: 14px;
  border: 0;
  border-radius: 8px;
  background: rgba(8, 13, 31, 0.58);
}

.settings-note-grid strong {
  display: block;
  margin-bottom: 8px;
  color: #ffffff;
}

.settings-note-grid span {
  color: #aeb8d8;
  line-height: 1.65;
}

.app-shell:has(.settings-library) {
  --video-surface: rgba(7, 12, 28, 0.08);
  --video-surface-strong: rgba(7, 12, 28, 0.12);
  --video-surface-active: rgba(124, 83, 255, 0.16);
  --video-border: rgba(184, 201, 255, 0.14);
  --video-shadow:
    inset 0 0 0 1px rgba(255,255,255,.02),
    0 12px 36px rgba(0, 0, 0, 0.14);
  background: transparent;
}

.app-shell:has(.settings-library) .main {
  background: transparent;
}

.app-shell:has(.settings-library) .sidebar {
  border-right-color: rgba(184, 201, 255, 0.12);
  background: var(--video-surface);
  box-shadow: inset -1px 0 0 rgba(255,255,255,.02);
  backdrop-filter: none;
}

.app-shell:has(.settings-library) .nav-item {
  background: rgba(255,255,255,.015);
  border: 1px solid transparent;
}

.app-shell:has(.settings-library) .nav-item:hover {
  background: rgba(255,255,255,.03);
  border-color: rgba(184, 201, 255, 0.08);
}

.app-shell:has(.settings-library) .nav-item.active {
  background: rgba(124, 83, 255, 0.1);
  box-shadow:
    inset 0 0 0 1px rgba(184, 201, 255, 0.14),
    0 10px 24px rgba(0, 0, 0, 0.08);
}

.app-shell:has(.settings-library) .profile,
.app-shell:has(.settings-library) .search,
.app-shell:has(.settings-library) .round-btn,
.settings-hero-card,
.settings-card,
.settings-toggle,
.settings-runtime-list div,
.settings-mini-stats div,
.settings-note-grid article,
.settings-library .soft-btn {
  border-color: var(--video-border);
  background: var(--video-surface);
  box-shadow: var(--video-shadow);
  backdrop-filter: none;
}

.app-shell:has(.settings-library) .search,
.app-shell:has(.settings-library) .round-btn,
.settings-library .soft-btn {
  background: var(--video-surface-strong);
}

.settings-hero-card {
  background: var(--video-surface);
}

.settings-toggle,
.settings-runtime-list div,
.settings-mini-stats div,
.settings-note-grid article {
  background: rgba(255,255,255,.035);
}

.settings-toggle > span {
  border-color: var(--video-border);
  background: rgba(255,255,255,.08);
}

.settings-form input,
.settings-form select {
  background: rgba(7, 12, 28, 0.28);
  border-color: var(--video-border);
}

.settings-card-head > span {
  background: var(--video-surface-active);
}

.classic-library {
  display: block;
  min-height: calc(100vh - 130px);
}

.books-standalone {
  --books-viewport-bg: linear-gradient(180deg, #f3f4f6 0%, #eef0f3 100%);
  --books-grid-line-x: rgba(15, 23, 42, 0.04);
  --books-grid-line-y: rgba(15, 23, 42, 0.03);
  --books-glow-a: rgba(241, 196, 89, 0.1);
  --books-glow-b: rgba(150, 196, 175, 0.08);
  --books-paper-text: #1f2937;
  --books-paper-muted: #667085;
  --books-paper-title: #101828;
  --books-paper-accent: #f59e0b;
  --books-paper-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 247, 249, 0.96));
  --books-paper-border: rgba(15, 23, 42, 0.08);
  --books-paper-shadow: inset 0 0 0 1px rgba(255,255,255,.55), 0 18px 50px rgba(15, 23, 42, 0.08);
  --books-paper-frame: rgba(15, 23, 42, 0.06);
  --books-paper-overlay-a: rgba(15, 23, 42, 0.02);
  --books-paper-overlay-b: rgba(15, 23, 42, 0.04);
  --books-surface: rgba(255, 255, 255, 0.88);
  --books-surface-strong: rgba(255, 255, 255, 0.96);
  --books-surface-alt: rgba(248, 250, 252, 0.94);
  --books-border: rgba(15, 23, 42, 0.08);
  --books-border-strong: rgba(15, 23, 42, 0.12);
  --books-button-text: #1f2937;
  --books-button-bg: rgba(255, 255, 255, 0.92);
  --books-button-hover: rgba(243, 244, 246, 0.98);
  --books-button-active: rgba(236, 253, 245, 0.95);
  --books-button-active-border: rgba(34, 197, 94, 0.24);
  --books-tag-bg: rgba(15, 23, 42, 0.06);
  --books-tag-text: #475467;
  position: fixed;
  inset: 0;
  z-index: 3;
  overflow: auto;
  padding: 0;
  background: var(--books-viewport-bg);
}

.books-standalone::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, var(--books-grid-line-x) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, var(--books-grid-line-y) 0 1px, transparent 1px 100%),
    radial-gradient(circle at 8% 12%, var(--books-glow-a), transparent 26%),
    radial-gradient(circle at 88% 18%, var(--books-glow-b), transparent 22%);
  background-size: auto, auto, auto, auto;
  opacity: 1;
}

.books-standalone.theme-dark {
  --books-viewport-bg: linear-gradient(180deg, #111315 0%, #151719 100%);
  --books-grid-line-x: rgba(255, 255, 255, 0.03);
  --books-grid-line-y: rgba(255, 255, 255, 0.025);
  --books-glow-a: rgba(0, 198, 255, 0.08);
  --books-glow-b: rgba(0, 255, 163, 0.05);
  --books-paper-text: #f2f4f7;
  --books-paper-muted: #98a2b3;
  --books-paper-title: #ffffff;
  --books-paper-accent: #facc15;
  --books-paper-bg: linear-gradient(180deg, rgba(28, 30, 35, 0.96), rgba(22, 24, 29, 0.94));
  --books-paper-border: rgba(255, 255, 255, 0.08);
  --books-paper-shadow: inset 0 0 0 1px rgba(255,255,255,.02), 0 18px 50px rgba(0, 0, 0, 0.32);
  --books-paper-frame: rgba(255, 255, 255, 0.05);
  --books-paper-overlay-a: rgba(255, 255, 255, 0.015);
  --books-paper-overlay-b: rgba(255, 255, 255, 0.035);
  --books-surface: rgba(38, 40, 45, 0.82);
  --books-surface-strong: rgba(40, 42, 47, 0.94);
  --books-surface-alt: rgba(31, 33, 38, 0.96);
  --books-border: rgba(255, 255, 255, 0.08);
  --books-border-strong: rgba(255, 255, 255, 0.12);
  --books-button-text: #f2f4f7;
  --books-button-bg: rgba(31, 33, 38, 0.96);
  --books-button-hover: rgba(44, 46, 52, 0.98);
  --books-button-active: rgba(7, 193, 96, 0.16);
  --books-button-active-border: rgba(7, 193, 96, 0.34);
  --books-tag-bg: rgba(255, 255, 255, 0.08);
  --books-tag-text: #cdd5df;
}

.books-standalone .classic-library {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  gap: 0;
  align-items: start;
}

.books-standalone .classic-paper {
  min-height: 100vh;
  border-radius: 0;
  border-top: 0;
  border-bottom: 0;
  overflow: visible;
}

.books-standalone .classic-book-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.classic-paper {
  position: relative;
  overflow: hidden;
  padding: 28px;
  color: var(--books-paper-text);
  border: 1px solid var(--books-paper-border);
  border-radius: 8px;
  background:
    linear-gradient(90deg, var(--books-grid-line-x) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, var(--books-grid-line-y) 0 1px, transparent 1px 100%),
    radial-gradient(circle at 8% 12%, var(--books-glow-a), transparent 26%),
    radial-gradient(circle at 88% 18%, var(--books-glow-b), transparent 22%),
    var(--books-paper-bg);
  box-shadow: var(--books-paper-shadow);
}

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

.classic-paper::before {
  inset: 14px;
  border: 1px solid var(--books-paper-frame);
}

.classic-paper::after {
  inset: 0;
  background:
    radial-gradient(circle at 16% 30%, var(--books-paper-overlay-a), transparent 18%),
    radial-gradient(circle at 72% 74%, var(--books-paper-overlay-b), transparent 24%);
  mix-blend-mode: multiply;
}

.classic-topline,
.classic-nav,
.classic-body {
  position: relative;
  z-index: 1;
}

.classic-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.classic-topline p {
  margin: 0 0 8px;
  color: var(--books-paper-accent);
  font-weight: 700;
}

.classic-topline h2 {
  margin: 0;
  color: var(--books-paper-title);
  font-size: 30px;
}

.classic-admin,
.classic-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.classic-admin {
  color: var(--books-paper-muted);
}

.classic-admin button,
.classic-nav button,
.classic-filter button,
.classic-search {
  border: 1px solid var(--books-border);
  color: var(--books-button-text);
  background: var(--books-button-bg);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.classic-admin button,
.classic-nav button,
.classic-search {
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 999px;
}

.classic-nav {
  margin-bottom: 22px;
  overflow-x: auto;
}

.classic-theme-toggle {
  min-width: 176px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.classic-theme-toggle span {
  font-size: 22px;
  line-height: 1;
}

.classic-theme-toggle strong {
  font-size: 15px;
  font-weight: 600;
}

.classic-nav button.active,
.classic-search.active {
  color: var(--books-button-text);
  background: var(--books-button-active);
  border-color: var(--books-button-active-border);
  font-weight: 700;
}

.classic-nav button:hover,
.classic-filter button:hover,
.classic-search:hover {
  color: var(--books-button-text);
  background: var(--books-button-hover);
  border-color: var(--books-border-strong);
  transform: translateY(-1px);
}

.classic-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 10px;
  margin: -4px 0 18px;
  padding: 12px;
  border: 1px solid var(--books-border);
  border-radius: 6px;
  background: var(--books-surface);
}

.classic-search-panel label {
  display: grid;
  gap: 6px;
}

.classic-search-panel span,
.classic-search-panel em {
  color: var(--books-paper-muted);
  font-size: 12px;
  font-style: normal;
}

.classic-search-panel input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  color: var(--books-paper-text);
  border: 1px solid var(--books-border);
  border-radius: 4px;
  background: var(--books-surface-strong);
}

.classic-search-panel button {
  min-height: 38px;
  padding: 0 14px;
  color: var(--books-button-text);
  border: 1px solid var(--books-border);
  border-radius: 999px;
  background: var(--books-button-bg);
}

.classic-body {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.classic-filter {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px;
  border-radius: 6px;
  background: var(--books-surface);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.06);
}

.classic-filter h3 {
  margin: 0 0 18px;
  color: var(--books-paper-title);
  font-size: 19px;
}

.classic-filter-section + .classic-filter-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--books-border);
}

.classic-dynasty-filter h3 {
  margin: 0 0 14px;
  color: var(--books-paper-title);
  font-size: 16px;
}

.classic-filter button {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 10px;
  padding: 11px 12px;
  border-radius: 4px;
  text-align: left;
}

.classic-filter button.active {
  color: var(--books-button-text);
  background: var(--books-button-active);
  font-weight: 700;
}

.classic-filter em {
  color: var(--books-paper-muted);
  font-style: normal;
}

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

.classic-section-head h3 {
  margin: 0 0 6px;
  color: var(--books-paper-title);
  font-size: 22px;
}

.classic-section-head p {
  margin: 0;
  color: var(--books-paper-muted);
  line-height: 1.7;
}

.classic-section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.classic-shelf-panel,
.classic-reader-shell {
  border: 1px solid var(--books-border);
  border-radius: 8px;
  background: var(--books-surface);
  box-shadow: inset 0 0 24px rgba(255,255,255,.03), 0 10px 30px rgba(15, 23, 42, 0.06);
}

.classic-shelf-panel {
  padding: 16px;
}

.classic-shelf-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--books-border);
}

.classic-shelf-meta strong {
  color: var(--books-paper-title);
  font-size: 16px;
}

.classic-shelf-meta span {
  color: var(--books-paper-muted);
  font-size: 12px;
  text-align: right;
}

.classic-book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
}

.classic-book-card {
  --classic-card-border: rgba(127, 90, 48, 0.16);
  --classic-card-hover-border: rgba(141, 100, 45, 0.34);
  --classic-card-active-border: rgba(122, 80, 29, 0.46);
  --classic-card-tint: rgba(127, 90, 48, 0.04);
  --classic-card-hover-tint: rgba(127, 90, 48, 0.08);
  --classic-card-active-tint: rgba(127, 90, 48, 0.13);
  --classic-card-shadow: rgba(99, 69, 35, 0.12);
  --classic-cover-start: #32412d;
  --classic-cover-end: #1d241a;
  --classic-cover-ink: #fff8df;
  --classic-cover-subtle: rgba(255, 248, 223, 0.76);
  --classic-tag-ink: #6b471c;
  --classic-tag-bg: #efe3c6;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  min-height: 164px;
  padding: 14px;
  border: 1px solid var(--classic-card-border);
  border-radius: 7px;
  background: linear-gradient(180deg, var(--classic-card-tint), var(--books-surface-alt) 74%);
  box-shadow: 0 8px 24px var(--classic-card-shadow);
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.classic-book-copy {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 8px;
}

.classic-book-card:hover,
.classic-book-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--classic-card-hover-border);
  background: linear-gradient(180deg, var(--classic-card-hover-tint), var(--books-surface-strong) 72%);
  box-shadow: 0 12px 28px var(--classic-card-shadow);
}

.classic-book-card.active {
  border-color: var(--classic-card-active-border);
  background: linear-gradient(180deg, var(--classic-card-active-tint), var(--books-surface-strong) 70%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.48), 0 10px 22px var(--classic-card-shadow);
}

.classic-cover {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 84px;
  border-radius: 5px;
  color: var(--classic-cover-ink);
  background: linear-gradient(160deg, var(--classic-cover-start), var(--classic-cover-end));
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.1), inset 0 -12px 24px rgba(0, 0, 0, 0.14);
}

.classic-cover .classic-cover-text {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.classic-cover .classic-cover-text i {
  font-style: normal;
}

.classic-cover small {
  margin-top: 8px;
  color: var(--classic-cover-subtle);
}

.classic-book-copy h4 {
  min-width: 0;
  margin: 0;
  color: var(--books-paper-title);
  font-size: 17px;
  line-height: 1.34;
  text-wrap: pretty;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.classic-book-copy-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.classic-format-chip,
.classic-viewer-chip {
  flex-shrink: 0;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.classic-format-chip.ready {
  color: #215325;
  background: rgba(89, 155, 84, 0.16);
}

.classic-format-chip.pending,
.classic-viewer-chip {
  color: #7c5828;
  background: rgba(176, 132, 62, 0.16);
}

.classic-book-copy p,
.classic-book-copy span {
  min-width: 0;
  margin: 0;
  color: var(--books-paper-muted);
  line-height: 1.55;
}

.classic-book-copy p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.classic-book-copy span {
  display: block;
  font-size: 13px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.classic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.classic-tags em {
  padding: 4px 8px;
  color: var(--classic-tag-ink);
  border-radius: 999px;
  background: var(--classic-tag-bg);
  font-size: 12px;
  font-style: normal;
}

.classic-empty-result {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 120px;
  padding: 18px;
  color: var(--books-paper-muted);
  border: 1px dashed var(--books-border-strong);
  border-radius: 7px;
  background: var(--books-surface);
}

.classic-empty-result strong {
  color: var(--books-paper-title);
}

.classic-reader-shell {
  display: grid;
  gap: 0;
  overflow: hidden;
}

.classic-viewer-head {
  padding: 18px 20px;
}

.classic-viewer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--books-border);
  background:
    radial-gradient(circle at 14% 0%, var(--books-glow-a), transparent 30%),
    var(--books-paper-bg);
}

.classic-viewer-head p {
  margin: 0 0 6px;
  color: var(--books-paper-accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}

.classic-viewer-head h3 {
  margin: 0 0 6px;
  color: var(--books-paper-title);
  font-size: 24px;
}

.classic-viewer-head span {
  color: var(--books-paper-muted);
  line-height: 1.6;
}

.classic-viewer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.classic-viewer-actions a {
  min-height: 36px;
  padding: 8px 14px;
  color: var(--books-button-text);
  border: 1px solid var(--books-border);
  border-radius: 999px;
  background: var(--books-button-bg);
}

.classic-viewer-stage {
  min-height: 900px;
  background: var(--books-surface);
}

.classic-pdf-reader-shell {
  display: grid;
  gap: 0;
  min-height: 900px;
}

.classic-pdf-reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-bottom: 1px solid var(--books-border);
  background: var(--books-surface-strong);
}

.classic-pdf-reader-nav,
.classic-pdf-reader-zoom {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.classic-pdf-page-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--books-paper-muted);
  font-size: 14px;
}

.classic-pdf-page-field input {
  width: 74px;
  min-height: 38px;
  padding: 0 10px;
  color: var(--books-paper-text);
  border: 1px solid var(--books-border);
  border-radius: 999px;
  background: var(--books-button-bg);
  text-align: center;
}

.classic-pdf-page-field strong,
.classic-pdf-reader-zoom strong {
  color: var(--books-paper-title);
}

.classic-pdf-reader-toolbar .soft-btn {
  min-height: 38px;
  padding: 0 14px;
}

.classic-pdf-status {
  padding: 12px 18px 0;
  color: var(--books-paper-muted);
  font-size: 13px;
}

.classic-pdf-canvas-shell {
  display: grid;
  justify-items: center;
  align-content: start;
  min-height: 820px;
  padding: 18px;
  overflow: auto;
}

.classic-pdf-canvas {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
}

.classic-pdf-empty {
  display: grid;
  align-content: center;
  gap: 10px;
  min-height: 900px;
  padding: 28px;
  color: var(--books-paper-muted);
}

.classic-pdf-empty strong {
  color: var(--books-paper-title);
  font-size: 22px;
}

.classic-pdf-empty span {
  line-height: 1.8;
}

.classic-pdf-empty em {
  color: var(--books-paper-muted);
  font-style: normal;
}

.auth-landing-screen {
  grid-column: 1 / -1;
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: auto;
  padding: clamp(28px, 5vw, 56px) 20px;
  background:
    radial-gradient(circle at 12% 92%, rgba(104, 215, 255, 0.2), transparent 22%),
    radial-gradient(circle at 88% 8%, rgba(103, 247, 210, 0.18), transparent 22%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,250,255,0.98));
}

.auth-landing-screen::before,
.auth-landing-screen::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.auth-landing-screen::before {
  background:
    repeating-linear-gradient(0deg, rgba(151, 169, 199, 0.08) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(90deg, rgba(151, 169, 199, 0.08) 0 1px, transparent 1px 72px);
}

.auth-landing-screen::after {
  background:
    radial-gradient(circle at 50% 14%, rgba(103, 247, 210, 0.09), transparent 18%),
    radial-gradient(circle at 50% 52%, rgba(91, 206, 255, 0.08), transparent 24%);
  filter: blur(18px);
}

.auth-landing-shell {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - clamp(56px, 10vw, 112px));
  min-height: calc(100dvh - clamp(56px, 10vw, 112px));
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 24px;
}

.auth-landing-brand {
  display: grid;
  justify-items: center;
  gap: 16px;
  text-align: center;
}

.auth-landing-brand-orbit {
  width: 72px;
  height: 58px;
}

.auth-landing-brand-copy h1 {
  margin: 0;
  color: #15233b;
  font-size: clamp(40px, 5vw, 54px);
  line-height: .94;
  letter-spacing: -0.03em;
}

.auth-landing-brand-copy p {
  margin: 10px 0 0;
  color: #6b7a93;
  font-size: 18px;
}

.auth-landing-card {
  width: min(100%, 540px);
  display: grid;
  gap: 18px;
  padding: clamp(28px, 4vw, 38px);
  border: 1px solid rgba(24, 44, 79, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 42px rgba(34, 60, 96, 0.12);
  backdrop-filter: blur(14px);
}

.auth-landing-card-head {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
}

.auth-landing-card-head h2 {
  margin: 0;
  color: #15233b;
  font-size: clamp(32px, 4vw, 42px);
  line-height: 1.06;
}

.auth-landing-card-head p {
  margin: 0;
  color: #7d889c;
  font-size: 17px;
  line-height: 1.7;
}

.auth-landing-form {
  display: grid;
  gap: 16px;
}

.auth-landing-field {
  display: grid;
  gap: 8px;
}

.auth-landing-label,
.auth-landing-label-row {
  color: #45556f;
  font-size: 15px;
}

.auth-landing-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-landing-text-btn,
.auth-landing-text-link {
  min-height: auto;
  padding: 0;
  color: #1daea4;
}

.auth-landing-input-wrap {
  min-height: 54px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid rgba(159, 175, 203, 0.5);
  border-radius: 14px;
  background: rgba(255,255,255,0.98);
  transition: border-color .18s ease, box-shadow .18s ease;
}

.auth-landing-input-wrap:focus-within {
  border-color: rgba(34, 191, 177, 0.62);
  box-shadow: 0 0 0 4px rgba(34, 191, 177, 0.12);
}

.auth-landing-input-icon,
.auth-landing-input-action {
  color: #a0a8b9;
  font-size: 18px;
}

.auth-landing-input-wrap input {
  min-height: 52px;
  padding: 0;
  color: #15233b;
  border: 0;
  background: transparent;
}

.auth-landing-input-wrap input::placeholder {
  color: #a0a8b9;
}

.auth-landing-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 144px;
  gap: 12px;
  align-items: end;
}

.auth-landing-code-btn {
  min-height: 54px;
  padding: 0 14px;
  color: #169f95;
  border: 1px solid rgba(34, 191, 177, 0.24);
  border-radius: 14px;
  background: rgba(34, 191, 177, 0.08);
  font-weight: 700;
}

.auth-landing-session-note {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #4f6480;
  font-size: 14px;
  line-height: 1.6;
}

.auth-landing-session-check {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(34, 191, 177, 0.14);
  color: #179f96;
  font-size: 13px;
  font-weight: 800;
  flex: 0 0 auto;
}

.auth-landing-submit {
  min-height: 50px;
  padding: 0 24px;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(90deg, #22bfb1, #159f97);
  box-shadow: 0 10px 22px rgba(34, 191, 177, 0.26);
  font-weight: 800;
  font-size: 18px;
}

.auth-landing-submit[disabled],
.auth-landing-code-btn[disabled],
.auth-landing-alt-btn[disabled] {
  opacity: 0.72;
  cursor: not-allowed;
}

.auth-landing-agreement {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #5f6e88;
  font-size: 14px;
  line-height: 1.7;
}

.auth-landing-agreement input {
  margin-top: 3px;
}

.auth-landing-divider {
  position: relative;
  display: grid;
  place-items: center;
  color: #98a4b8;
  font-size: 14px;
}

.auth-landing-divider::before {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  border-top: 1px solid rgba(159, 175, 203, 0.28);
}

.auth-landing-divider span {
  position: relative;
  padding: 0 12px;
  background: rgba(255,255,255,0.9);
}

.auth-landing-alt-btn {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  color: #475870;
  border: 1px solid rgba(159, 175, 203, 0.34);
  border-radius: 14px;
  background: rgba(255,255,255,0.72);
  font-size: 17px;
  font-weight: 700;
}

.auth-landing-alt-icon {
  font-size: 20px;
}

.auth-landing-switch-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #6f7c92;
  font-size: 16px;
}

.auth-landing-card .auth-message {
  border-radius: 14px;
}

.auth-head p,
.report-hero p {
  margin: 0 0 8px;
  color: #8edcff;
}

.auth-head h2,
.report-hero h2 {
  margin: 0 0 10px;
  font-size: 30px;
}

.auth-head span,
.report-hero span {
  color: var(--muted);
  line-height: 1.75;
}

.auth-tabs {
  margin: 18px 0 10px;
}

.auth-tabs button {
  min-height: 40px;
  padding: 0 16px;
  color: #dce3ff;
  border-radius: var(--radius);
  background: rgba(20, 29, 58, 0.72);
}

.auth-tabs .active {
  color: #fff;
  background: linear-gradient(90deg, rgba(124,83,255,.64), rgba(56,48,139,.7));
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.auth-form label {
  display: grid;
  gap: 7px;
}

.auth-form span {
  color: #dfe5ff;
  font-size: 13px;
}

.auth-form input,
.auth-form select {
  min-height: 46px;
  padding: 0 14px;
  color: var(--text);
  border: 1px solid rgba(125, 141, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(10, 16, 34, 0.8);
}

.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 12px;
  align-items: end;
}

.auth-inline-action {
  width: fit-content;
  min-height: 30px;
  padding: 0;
  justify-self: start;
  color: #aeb7dd;
}

.auth-panel-override .soft-btn,
.auth-panel-override .primary {
  min-height: 46px;
}

.self-study-mode-active {
  grid-template-columns: 1fr;
}

.self-study-shell {
  position: relative;
  min-height: 900px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: #10141c;
}

.self-study-bg,
.self-study-overlay {
  position: absolute;
  inset: 0;
}

.self-study-bg {
  background:
    linear-gradient(rgba(18, 24, 34, 0.24), rgba(18, 24, 34, 0.42)),
    url("https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=1800&q=80") center/cover no-repeat;
  filter: saturate(0.78) brightness(0.88);
}

.self-study-overlay {
  background:
    linear-gradient(180deg, rgba(11, 15, 24, 0.12), rgba(11, 15, 24, 0.36)),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.06) 0 1px, transparent 1px 96px);
}

.self-study-topbar,
.self-study-titlebar,
.self-study-footer,
.self-study-grid,
.self-study-notes {
  position: relative;
  z-index: 2;
}

.self-study-topbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 22px 28px 0;
}

.self-study-chip,
.self-study-pill {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  color: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
}

.self-study-titlebar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 26px 28px 0;
}

.self-study-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  padding: 120px 28px 0;
  align-items: start;
}

.self-study-panel {
  position: relative;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 24px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(18px);
  color: rgba(255,255,255,0.92);
}

.self-study-timer {
  min-height: 340px;
  padding: 28px;
}

.self-study-tag,
.self-study-state {
  color: rgba(255,255,255,0.72);
  font-size: 15px;
}

.self-study-state {
  position: absolute;
  right: 24px;
  top: 24px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(122, 209, 166, 0.18);
}

.self-study-clock {
  margin-top: 78px;
  font-size: 76px;
  font-weight: 700;
  letter-spacing: 0;
}

.self-study-text {
  margin-top: 18px;
  color: rgba(255,255,255,0.74);
  line-height: 1.8;
}

.self-study-progress {
  margin-top: 28px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  overflow: hidden;
}

.self-study-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7fd8a4, #6ff1b8);
}

.self-study-todo {
  min-height: 340px;
  padding: 28px;
}

.self-study-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

.self-study-head span {
  grid-column: 1 / -1;
  color: rgba(255,255,255,0.64);
  letter-spacing: 0.14em;
  font-size: 13px;
}

.self-study-head strong {
  font-size: 34px;
}

.self-study-head em {
  color: rgba(255,255,255,0.64);
  font-style: normal;
  font-size: 28px;
}

.self-study-list {
  margin-top: 24px;
  display: grid;
  gap: 18px;
}

.self-study-list article {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 18px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.self-study-list article:first-child {
  border-top: 0;
}

.self-study-list label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
}

.self-study-list span {
  color: rgba(255,255,255,0.64);
}

.self-study-list b {
  color: #8ff0ad;
  font-size: 28px;
  font-weight: 600;
}

.self-study-add {
  margin-top: 18px;
  justify-self: end;
}

.self-study-notes {
  margin: 22px 28px 0;
  min-height: 100px;
  display: grid;
  place-items: center;
}

.self-study-dot {
  position: absolute;
  left: 22px;
  top: 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.64);
}

.self-study-notes-count {
  font-size: 48px;
  color: rgba(255,255,255,0.9);
}

.self-study-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 26px 28px 28px;
}

.self-study-audio {
  min-width: 260px;
  display: grid;
  gap: 10px;
  padding: 14px 18px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.86);
  backdrop-filter: blur(16px);
}

.self-study-slider {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.22);
}

.self-study-slider i {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #87efac;
  transform: translate(-50%, -50%);
}

.self-study-control {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.92);
}

.auth-message {
  padding: 12px 14px;
  border-radius: var(--radius);
  line-height: 1.7;
}

.auth-message.success {
  color: #c8fff0;
  background: rgba(66, 222, 183, .16);
}

.auth-message.error {
  color: #ffd8de;
  background: rgba(255, 93, 110, .16);
}

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

.study-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.study-module-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(125, 141, 255, 0.14);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 90% 10%, rgba(124, 83, 255, .14), transparent 28%),
    rgba(16, 24, 50, .78);
}

.study-module-card.active {
  border-color: rgba(142, 220, 255, .5);
  background:
    radial-gradient(circle at 90% 10%, rgba(66, 222, 183, .16), transparent 28%),
    rgba(24, 36, 70, .92);
}

.study-module-top {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
}

.study-module-top strong,
.current-study-card strong {
  display: block;
  font-size: 18px;
}

.study-module-top span {
  color: var(--muted);
  line-height: 1.6;
}

.study-module-card p,
.current-study-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.current-study-card {
  display: grid;
  gap: 14px;
}

.current-study-card .study-hero-visual {
  width: 100%;
  max-width: 220px;
  justify-self: center;
}

@media (max-width: 760px) {
  .auth-landing-screen {
    padding-inline: 16px;
  }

  .auth-landing-shell {
    gap: 20px;
  }

  .auth-landing-card {
    padding: 24px 18px;
  }

  .auth-landing-brand-copy h1 {
    font-size: 34px;
  }

  .auth-landing-code-row {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .task-strip {
    scroll-behavior: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-core,
  .map-node,
  .planet-video,
  .galaxy-node.core {
    animation: none;
  }
}

@media (max-width: 1380px) {
  :root {
    --sidebar: 250px;
  }

  .dashboard-layout,
  .mentor-layout,
  .quiz-layout,
  .clinical-layout,
  .mistake-layout,
  .casebase-layout,
  .planet-layout,
  .classic-library,
  .settings-console,
  .body-viewer-layout {
    grid-template-columns: 1fr;
  }

  .mentor-layout-upgraded {
    grid-template-areas:
      "hero"
      "side"
      "chat";
  }

  .settings-card-grid,
  .settings-side-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .body-viewer-side {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-page-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .map-page-layout.progress-collapsed {
    grid-template-columns: minmax(0, 1fr);
  }

  .map-page-layout > .map-progress-panel {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

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

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

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

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

  .casebase-card-grid,
  .casebase-analysis-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 980px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .app-shell {
    display: block;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
  }

  .sidebar {
    position: relative;
    height: auto;
    min-height: 0;
    grid-template-rows: auto auto;
  }

  .profile {
    display: none;
  }

  .nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .classic-search-panel {
    grid-template-columns: 1fr;
  }

  .classic-book-grid {
    grid-template-columns: 1fr;
  }

  .classic-book-card {
    grid-template-columns: 80px minmax(0, 1fr);
  }

  .classic-viewer-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .classic-viewer-actions {
    justify-content: flex-start;
  }

  .classic-viewer-stage,
  .classic-pdf-frame-slot,
  .classic-pdf-frame,
  .classic-pdf-empty {
    min-height: 68vh;
  }

  .nav-item {
    min-width: 148px;
  }

  .mobile-only-nav-item {
    display: inline-flex;
  }

  .main {
    padding: 18px 14px 28px;
    height: auto;
    overflow: visible;
  }

  .topbar,
  .top-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .search {
    width: 100%;
  }

  .search-panel {
    right: auto;
    left: 0;
    width: min(100%, calc(100vw - 32px));
  }

  .hero-card,
  .mentor-hero,
  .clinical-work,
  .mistake-empty,
  .casebase-hero,
  .answer-card,
  .analysis,
  .donut-block,
  .donut-block.slim,
  .plan-card,
  .diagnosis-card,
  .mastery {
    grid-template-columns: 1fr;
  }

  .heart-stage .heart {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .tool-grid,
  .task-grid,
  .knowledge-row,
  .mentor-direct-groups,
  .module-markmap-grid,
  .quiz-module-grid,
  .tcm-chapter-grid,
  .casebase-card-grid,
  .metric-strip,
  .related-clinical,
  .side-stack,
  .map-page-layout > .map-progress-panel,
  .body-viewer-side {
    grid-template-columns: 1fr;
  }

  .body-viewer-head {
    flex-direction: column;
  }

  .mentor-direct-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .body-viewer-actions {
    justify-content: flex-start;
  }

  .body-viewer-frame {
    min-height: 560px;
    height: 72vh;
  }

  .map-page-layout {
    grid-template-columns: 1fr;
  }

  .map-page-layout .map-core,
  .map-page-layout .map-node {
    animation: none;
    will-change: auto;
  }

  .account-profile-head {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .classic-body {
    grid-template-columns: 1fr;
  }

  .settings-topline,
  .settings-body {
    grid-template-columns: 1fr;
  }

  .settings-topline {
    flex-direction: column;
  }

  .settings-board,
  .settings-note-grid {
    grid-template-columns: 1fr;
  }

  .books-standalone {
    padding: 0;
  }

  .books-standalone .classic-library {
    grid-template-columns: 1fr;
    min-height: 100vh;
    padding: 18px;
  }

  .classic-topline,
  .classic-section-head {
    flex-direction: column;
  }

  .map-stage-shell {
    padding: 14px;
  }

  .map-left {
    min-height: 0;
  }

  .learning-map,
  .galaxy-stage {
    min-height: 620px;
  }

  .map-node {
    width: 112px;
    min-height: 92px;
  }

  .map-core {
    width: 170px;
    min-height: 170px;
  }

  .galaxy-node.core {
    width: 170px;
    height: 170px;
  }

  .galaxy-node:not(.core) {
    width: 108px;
    height: 108px;
  }

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

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

@media (max-width: 620px) {
  .title-block h1 {
    font-size: 25px;
  }

  .hero-copy h2 {
    font-size: 24px;
  }

  .sub-toolbar,
  .meta-pills,
  .quick-actions,
  .prompt-tags {
    align-items: stretch;
    flex-direction: column;
  }

  .map-toolbar-group {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .map-toolbar-right {
    margin-left: 0;
  }

  .sub-toolbar > span {
    display: none;
  }

  .select-like,
  .seg,
  .primary.compact {
    width: 100%;
  }

  .nav-item.mobile-only-nav-item {
    min-width: 132px;
  }

  .map-stage-shell {
    padding: 12px;
  }

  .map-node {
    width: 98px;
    font-size: 12px;
  }

  .map-node b {
    width: 48px;
    height: 48px;
  }

  .related-tabs {
    width: calc(100% - 20px);
    overflow-x: auto;
    justify-content: flex-start;
  }

  .rank-list div,
  .evidence-list div,
  .mistake-reason-list div,
  .case-count-list button,
  .question-meta,
  .metric-strip div {
    grid-template-columns: 1fr;
  }

  .message.user .bubble,
  .message.ai .bubble {
    max-width: 100%;
  }

  .placeholder-grid,
  .body-part-grid,
  .quiz-module-grid,
  .tcm-chapter-grid,
  .tcm-chapter-summary,
  .casebase-card-grid,
  .classic-book-grid,
  .mini-stats {
    grid-template-columns: 1fr;
  }

  .classic-paper {
    padding: 18px;
  }

  .classic-book-card {
    grid-template-columns: 1fr;
  }

  .settings-paper {
    padding: 18px;
  }

  .settings-card-head,
  .settings-admin {
    flex-direction: column;
    align-items: flex-start;
  }

  .settings-card-grid,
  .settings-side-stack,
  .settings-mini-stats {
    grid-template-columns: 1fr;
  }

  .classic-cover {
    min-height: 112px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-stage-video {
    display: none;
  }
}
