:root {
  --ink: #1a2332;
  --muted: #5a6a7a;
  --paper: #f3f0ea;
  --card: #fffdf8;
  --line: #d5cfc3;
  --accent: #0f5c4c;
  --accent-2: #c45c26;
  --sky: #dce8e4;
  --danger: #9b2c2c;
  --ok: #1f6f4a;
  --font-display: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-body: "IBM Plex Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --edge: clamp(12px, 1.2vw, 28px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.page-body {
  font-family: var(--font-body);
  color: var(--ink);
  background: #ebe6dc;
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}
body.portal-learn,
body.portal-manage {
  font-size: 18px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 动态背景层 · 医学氛围 */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(1000px 520px at 12% -8%, rgba(15, 92, 76, .14) 0%, transparent 55%),
    radial-gradient(900px 480px at 92% 8%, rgba(46, 120, 130, .10) 0%, transparent 50%),
    radial-gradient(700px 420px at 70% 90%, rgba(196, 92, 38, .07) 0%, transparent 55%),
    linear-gradient(165deg, #f4f7f5 0%, #f3f0ea 40%, #e7eee9 100%);
}
.bg-med-pattern {
  position: absolute;
  inset: 0;
  opacity: .35;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(15, 92, 76, .14) 1px, transparent 0),
    linear-gradient(90deg, rgba(15, 92, 76, .03) 1px, transparent 1px),
    linear-gradient(0deg, rgba(15, 92, 76, .03) 1px, transparent 1px);
  background-size: 28px 28px, 84px 84px, 84px 84px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 20%, transparent 85%);
}
.bg-med-cross {
  position: absolute;
  width: 64px;
  height: 64px;
  opacity: .12;
  background:
    linear-gradient(#0f5c4c, #0f5c4c) center/18% 70% no-repeat,
    linear-gradient(#0f5c4c, #0f5c4c) center/70% 18% no-repeat;
  animation: crossFloat 18s ease-in-out infinite;
}
.bg-med-cross-a { left: 8%; top: 18%; animation-delay: 0s; }
.bg-med-cross-b { right: 10%; top: 22%; width: 48px; height: 48px; opacity: .1; animation-delay: -6s; }
.bg-med-cross-c { left: 18%; bottom: 16%; width: 56px; height: 56px; opacity: .09; animation-delay: -11s; }
@keyframes crossFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(6deg); }
}
.bg-ecg-line {
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: 18%;
  width: 110%;
  height: 120px;
  opacity: .85;
}
.ecg-path {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: ecgDraw 7.5s linear infinite;
}
@keyframes ecgDraw {
  0% { stroke-dashoffset: 1400; opacity: .15; }
  15% { opacity: .55; }
  50% { stroke-dashoffset: 0; opacity: .45; }
  100% { stroke-dashoffset: -1400; opacity: .12; }
}
.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: .45;
  animation: orbFloat 16s ease-in-out infinite;
}
.bg-orb-a {
  width: 42vw; height: 42vw; max-width: 520px; max-height: 520px;
  left: -8%; top: 10%;
  background: rgba(15, 92, 76, .22);
}
.bg-orb-b {
  width: 36vw; height: 36vw; max-width: 420px; max-height: 420px;
  right: -6%; top: 28%;
  background: rgba(55, 130, 140, .14);
  animation-delay: -5s;
}
.bg-orb-c {
  width: 28vw; height: 28vw; max-width: 320px; max-height: 320px;
  left: 38%; bottom: -10%;
  background: rgba(196, 92, 38, .10);
  animation-delay: -9s;
}
.bg-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .5;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(2%, -3%) scale(1.05); }
  66% { transform: translate(-2%, 2%) scale(.97); }
}

.page-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  background: color-mix(in srgb, #f4f7f5 88%, #0f5c4c 12%);
}
.page-transition.is-leaving {
  visibility: visible;
  animation: fadeCover .18s ease forwards;
}
.page-transition.is-entering {
  visibility: visible;
  animation: fadeReveal .22s ease forwards;
}
@keyframes fadeCover {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeReveal {
  from { opacity: 1; }
  to { opacity: 0; }
}

.page-content {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  width: 100%;
  animation: pageIn .28s ease both;
}
@keyframes pageIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.main-area { min-height: 40vh; }

/* 大宽屏：贴边，几乎占满显示器 */
.wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 var(--edge);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: .75rem;
  min-width: 0;
  flex: 1;
}
.brand strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: .03em;
  white-space: nowrap;
}
.brand span {
  color: var(--muted);
  font-size: .88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav {
  display: flex;
  gap: .85rem;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.nav a { color: var(--ink); font-weight: 500; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .35rem; border: 1px solid var(--accent); background: var(--accent);
  color: #fff; padding: .4rem .85rem; border-radius: 3px;
  font-weight: 600; cursor: pointer; text-decoration: none;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.05); text-decoration: none; color: #fff; }
.btn.secondary { background: transparent; color: var(--accent); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.warn { background: var(--accent-2); border-color: var(--accent-2); }

.hero-home {
  min-height: calc(100vh - 70px);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.25rem 2rem;
  align-content: center;
  align-items: center;
  padding: 1.5rem 0 2rem;
}
.hero-home--centered {
  grid-template-columns: 1fr;
  justify-items: center;
  justify-content: center;
  text-align: center;
  gap: 3.5rem;
  padding: 2.5rem 0 3rem;
  width: 100%;
}
.hero-copy--center {
  display: grid;
  gap: .9rem;
  justify-items: center;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 100%;
  margin: 0 auto 1.25rem;
}
.portal-grid--center {
  width: min(980px, 100%);
  gap: 1.25rem;
  margin: 0.75rem auto 0;
  text-align: left;
}
.hero-eyebrow {
  margin: 0 auto;
  color: var(--muted);
  letter-spacing: .18em;
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  white-space: normal;
  text-align: center;
  width: 100%;
  animation: fadeRise .8s ease both;
}
.hero-title {
  font-family: var(--font-display) !important;
  font-size: clamp(2.75rem, 5.2vw, 4.1rem) !important;
  line-height: 1.15 !important;
  margin: 0 auto;
  white-space: nowrap;
  letter-spacing: .06em;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(105deg, #0f5c4c 0%, #1f6f4a 35%, #c45c26 70%, #0f5c4c 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: titleShine 5s linear infinite, fadeRise .9s .1s ease both;
  position: relative;
  display: inline-block;
  max-width: 100%;
}
.portal-card h2 {
  font-family: var(--font-display);
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.8rem) !important;
  white-space: nowrap;
  letter-spacing: .04em;
  text-align: center;
}
.portal-card p {
  color: var(--muted);
  margin: 0;
  font-size: clamp(1.15rem, 1.5vw, 1.35rem) !important;
  text-align: center;
}
.portal-grid--center .btn {
  font-size: clamp(1.15rem, 1.45vw, 1.35rem) !important;
  padding: .75rem 1.4rem;
  margin: 0 auto;
}

.hero-title::after {
  content: attr(data-text);
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  color: transparent;
  text-shadow: 0 0 28px rgba(15, 92, 76, .25);
  animation: titlePulse 2.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes titleShine {
  0% { background-position: 0% center; }
  100% { background-position: 220% center; }
}
@keyframes titlePulse {
  0%, 100% { opacity: .35; transform: scale(1); }
  50% { opacity: .7; transform: scale(1.01); }
}
@keyframes fadeRise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-home .hero-copy { display: grid; gap: .85rem; }
.hero-home h1.hero-title,
.hero-home .hero-title {
  font-family: var(--font-display) !important;
  font-size: clamp(2.75rem, 5.2vw, 4.1rem) !important;
  line-height: 1.15 !important;
  margin: 0 auto;
  white-space: nowrap;
  text-align: center;
}
.hero-home .lead {
  display: none;
}
.portal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
.portal-grid--center {
  width: min(980px, 100%);
  gap: 1.25rem;
  margin: 0.75rem auto 0;
  text-align: left;
}
.auth-center {
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0 2.5rem;
  width: 100%;
}
.auth-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(380px, 600px);
  gap: 1.25rem;
  align-items: stretch;
  width: min(1000px, 100%);
}
@media (max-width: 920px) {
  .auth-layout { grid-template-columns: 1fr; width: min(420px, 100%); }
}
.auth-layout--centered {
  grid-template-columns: 1fr;
  width: min(420px, 100%);
  margin: 0 auto;
}
.auth-card {
  width: 100%;
  margin: 0;
  text-align: left;
}
.auth-card h2 {
  text-align: center;
  white-space: nowrap;
}
.auth-card .form-grid.narrow {
  max-width: none;
  width: 100%;
  margin: 0 auto;
}
.auth-card .muted {
  text-align: center;
}
.auth-card .btn {
  width: 100%;
}
.demo-accounts {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  margin: 0;
}
.demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: .65rem;
}
.demo-accounts h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  text-align: center;
}
.demo-hint {
  margin: 0;
  font-size: .92rem;
  text-align: center;
}
.demo-item {
  display: grid;
  align-content: space-between;
  gap: .55rem;
  padding: .75rem .6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--sky) 55%, #fff);
}
.demo-meta {
  display: grid;
  gap: .2rem;
  font-size: .88rem;
}
.demo-meta strong {
  font-size: .95rem;
}
.demo-meta code {
  font-family: ui-monospace, Consolas, monospace;
  background: #fff;
  padding: .05rem .3rem;
  border-radius: 3px;
  border: 1px solid var(--line);
  font-size: .8rem;
}
.demo-item .btn {
  width: 100%;
  min-width: 0;
  font-size: .85rem;
  padding: .4rem .3rem;
  white-space: nowrap;
}
.reveal-card {
  animation: fadeRise .85s ease both;
}
.reveal-card:nth-child(1) { animation-delay: .28s; }
.reveal-card:nth-child(2) { animation-delay: .4s; }
@media (max-width: 980px) {
  .hero-home { grid-template-columns: 1fr; min-height: auto; }
  .hero-home h1, .hero-title { white-space: normal; }
  .portal-grid { grid-template-columns: 1fr; }
  .brand { flex-direction: column; gap: .1rem; }
  .brand span { white-space: normal; }
}
.portal-card {
  background: color-mix(in srgb, var(--card) 88%, transparent);
  border: 1px solid var(--line);
  padding: 2rem 1.7rem;
  backdrop-filter: blur(6px);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.1rem;
  min-height: 180px;
}
.portal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(26, 35, 50, .08);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}
.portal-card h2 {
  font-family: var(--font-display);
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.8rem) !important;
  white-space: nowrap;
  letter-spacing: .04em;
  text-align: center;
}
.portal-card p {
  color: var(--muted);
  margin: 0;
  font-size: clamp(1.15rem, 1.5vw, 1.35rem) !important;
  text-align: center;
}
.portal-grid--center .btn {
  font-size: clamp(1.15rem, 1.45vw, 1.35rem) !important;
  padding: .75rem 1.4rem;
  margin: 0 auto;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  padding: .85rem 1rem;
  margin: .65rem 0;
}
.panel h2, .panel h3 {
  margin: 0 0 .55rem;
  font-family: var(--font-display);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: .55rem;
}
.stat {
  background: var(--sky);
  padding: .65rem .8rem;
  border: 1px solid var(--line);
}
.stat .n { font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.stat .l { color: var(--muted); font-size: .8rem; white-space: nowrap; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
table.data th, table.data td {
  border-bottom: 1px solid var(--line);
  padding: .4rem .35rem;
  text-align: left;
  vertical-align: top;
}
table.data th {
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: .65rem .9rem;
  max-width: none;
}
.form-grid.narrow { max-width: 480px; grid-template-columns: 1fr; }
label { display: grid; gap: .2rem; font-weight: 600; font-size: .88rem; }
input[type=text], input[type=password], input[type=number], input[type=url],
input[type=email], select, textarea {
  font: inherit; padding: .4rem .55rem; border: 1px solid var(--line);
  background: #fff; border-radius: 3px; width: 100%;
}
.flash {
  padding: .5rem .75rem; border: 1px solid var(--line); background: #eef6f2;
  margin: .55rem 0; font-size: .9rem;
}
.flash.error { background: #f8e8e8; border-color: #e2b6b6; color: var(--danger); }

.q-block {
  border-top: 1px dashed var(--line);
  padding: .55rem 0;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  gap: .35rem 1.25rem;
  align-items: start;
}
.q-block:first-child { border-top: 0; }
.q-block .q-stem { margin: 0; }
.q-block .q-choices { display: grid; gap: .15rem; }
@media (max-width: 900px) {
  .q-block { grid-template-columns: 1fr; }
}
.choice {
  display: flex; gap: .45rem; align-items: flex-start;
  margin: 0; font-size: .92rem;
}
.muted { color: var(--muted); }
.ok { color: var(--ok); font-weight: 600; }
.bad { color: var(--danger); font-weight: 600; }
.footer,
.footer--fixed {
  margin: 0;
  color: var(--muted);
  font-size: .85rem;
  border-top: 1px solid var(--line);
  padding: .55rem var(--edge);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: color-mix(in srgb, #f3f0ea 92%, transparent);
  backdrop-filter: blur(10px);
}

/* 学员/管理顶栏导航 */
.portal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .55rem;
  align-items: center;
  padding: .65rem 0 .75rem;
  margin-bottom: .35rem;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, #f7f4ef 90%, transparent);
  backdrop-filter: blur(8px);
}
.portal-nav a {
  color: var(--ink);
  font-weight: 600;
  font-size: 1.05em;
  padding: .45rem .75rem;
  border-radius: 4px;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid transparent;
}
.portal-nav a:hover {
  background: var(--sky);
  text-decoration: none;
}
.portal-nav a.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.portal-nav--manage a.active { background: #1a3d36; }
.portal-learn .panel h2,
.portal-learn .panel h3,
.portal-manage .panel h2,
.portal-manage .panel h3 { font-size: 1.45em; }
.portal-learn .stat .n,
.portal-manage .stat .n { font-size: 1.75rem; }
.portal-learn .stat .l,
.portal-manage .stat .l { font-size: .95rem; }
.portal-learn table.data,
.portal-manage table.data { font-size: 1.02em; }
.portal-learn .btn,
.portal-manage .btn {
  font-size: 1.05em;
  padding: .55rem 1.05rem;
}

.layout-side {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: .85rem;
  margin-top: .75rem;
  align-items: start;
}
@media (max-width: 860px) {
  .layout-side { grid-template-columns: 1fr; }
}
.side-nav {
  position: sticky;
  top: .5rem;
  padding: .55rem !important;
}
.side-nav a {
  display: block;
  padding: .4rem .55rem;
  color: var(--ink);
  border-left: 3px solid transparent;
  white-space: nowrap;
  font-size: .92rem;
}
.side-nav a:hover, .side-nav a.active {
  background: var(--sky);
  border-left-color: var(--accent);
  text-decoration: none;
}

/* 双栏紧凑内容区 */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
}
@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; }
}
.nowrap { white-space: nowrap; }
.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: .35rem 0 .15rem;
}
.page-title h2 {
  margin: 0;
  font-family: var(--font-display);
  white-space: nowrap;
}
.inline-actions { display: flex; gap: .45rem; flex-wrap: wrap; align-items: center; }

/* 首页端口下方登录状态提示 */
.portal-status {
  width: min(720px, 100%);
  margin: 1.1rem auto 0;
  text-align: center;
  padding: .85rem 1.1rem;
  border: 1px solid rgba(15, 92, 76, 0.28);
  border-radius: 12px;
  background: rgba(232, 246, 242, 0.92);
  box-shadow: 0 8px 24px rgba(12, 40, 48, 0.08);
}
.portal-status__text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  font-weight: 600;
}
.portal-status__text + .portal-status__text {
  margin-top: .45rem;
}
.portal-status a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ========== 手机端布局整理 ========== */
@media (max-width: 760px) {
  :root {
    --edge: 14px;
  }

  body.page-body {
    font-size: 15px;
  }
  body.portal-learn,
  body.portal-manage {
    font-size: 16px;
  }

  /* 顶栏：上下分区，避免横向撑破 */
  .site-header {
    flex-direction: column;
    align-items: stretch;
    gap: .55rem;
    padding: .65rem 0 .7rem;
  }
  .brand {
    flex-direction: column;
    align-items: flex-start;
    gap: .15rem;
  }
  .brand strong {
    white-space: normal;
    font-size: 1.02rem;
    line-height: 1.35;
  }
  .brand span {
    white-space: normal;
    font-size: .78rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .nav {
    flex-wrap: wrap;
    gap: .45rem .7rem;
    white-space: normal;
    font-size: .92rem;
  }
  .nav .muted {
    width: 100%;
    font-size: .85rem;
  }

  /* 首页英雄区 */
  .hero-home,
  .hero-home--centered {
    min-height: auto;
    gap: 1.35rem;
    padding: 1.1rem 0 1.75rem;
    align-content: start;
  }
  .hero-copy--center {
    margin-bottom: .35rem;
    gap: .55rem;
  }
  .hero-eyebrow {
    font-size: .68rem;
    letter-spacing: .12em;
    line-height: 1.4;
    padding: 0 .25rem;
  }
  .hero-title,
  .hero-home h1.hero-title,
  .hero-home .hero-title {
    font-size: clamp(1.45rem, 7.2vw, 1.95rem) !important;
    white-space: normal !important;
    letter-spacing: .04em;
    line-height: 1.3 !important;
    padding: 0 .15rem;
  }
  .portal-grid,
  .portal-grid--center {
    width: 100%;
    grid-template-columns: 1fr;
    gap: .85rem;
    margin-top: .35rem;
  }
  .portal-card {
    min-height: 0;
    padding: 1.25rem 1rem;
    gap: .85rem;
  }
  .portal-card:hover {
    transform: none;
  }
  .portal-card h2 {
    font-size: clamp(1.35rem, 5.8vw, 1.65rem) !important;
    white-space: normal !important;
    line-height: 1.3;
  }
  .portal-grid--center .btn {
    width: 100%;
    max-width: 280px;
    font-size: 1.05rem !important;
    padding: .7rem 1.1rem;
  }
  .portal-status {
    width: 100%;
    margin-top: .95rem;
    padding: .75rem .85rem;
  }
  .portal-status__text {
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.55;
  }

  /* 学员/管理导航：横向滑动，不挤成一坨 */
  .portal-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    gap: .3rem;
    padding: .55rem 0 .65rem;
    margin: 0 calc(var(--edge) * -1) .45rem;
    padding-left: var(--edge);
    padding-right: var(--edge);
  }
  .portal-nav a {
    flex: 0 0 auto;
    font-size: .9rem;
    padding: .4rem .65rem;
  }

  /* 面板与标题 */
  .panel {
    padding: .75rem .8rem;
    margin: .55rem 0;
  }
  .panel h2,
  .panel h3,
  .page-title h2 {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.35;
    font-size: 1.2rem;
  }
  .portal-learn .panel h2,
  .portal-learn .panel h3,
  .portal-manage .panel h2,
  .portal-manage .panel h3 {
    font-size: 1.2rem;
  }
  .page-title {
    flex-direction: column;
    align-items: flex-start;
    gap: .55rem;
  }
  .inline-actions {
    flex-wrap: wrap;
    width: 100%;
  }
  .inline-actions .btn {
    flex: 1 1 auto;
  }

  /* 数据卡与表格 */
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem;
  }
  .stat {
    padding: .55rem .6rem;
  }
  .stat .n {
    font-size: 1.25rem;
  }
  .portal-learn .stat .n,
  .portal-manage .stat .n {
    font-size: 1.35rem;
  }
  .stat .l {
    white-space: normal;
    font-size: .78rem;
    line-height: 1.3;
  }
  .panel:has(table.data) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table.data {
    min-width: 480px;
    font-size: .88rem;
  }

  /* 表单与刷题 */
  .form-grid {
    grid-template-columns: 1fr;
    gap: .55rem;
  }
  .auth-center {
    min-height: auto;
    padding: .85rem 0 1.5rem;
    align-items: flex-start;
  }
  .auth-card h2,
  .demo-accounts h3 {
    white-space: normal;
    font-size: 1.25rem;
    line-height: 1.35;
  }
  .q-block {
    gap: .45rem;
    padding: .7rem 0;
  }
  .choice {
    gap: .55rem;
    padding: .35rem .15rem;
    min-height: 2.5rem;
    font-size: .95rem;
  }
  .choice input {
    margin-top: .25rem;
    width: 1.1rem;
    height: 1.1rem;
    flex: 0 0 auto;
  }

  /* 底栏：允许换行，避免遮挡 */
  .footer,
  .footer--fixed {
    white-space: normal;
    line-height: 1.4;
    font-size: .75rem;
    padding: .55rem var(--edge) .65rem;
    text-align: center;
  }

  /* 背景在小屏弱化，减少干扰与性能压力 */
  .bg-med-cross,
  .bg-ecg-line {
    opacity: .06;
  }
  .bg-orb {
    opacity: .28;
    filter: blur(28px);
  }
}

@media (max-width: 420px) {
  .stats {
    grid-template-columns: 1fr 1fr;
  }
  .hero-title,
  .hero-home h1.hero-title,
  .hero-home .hero-title {
    font-size: 1.38rem !important;
  }
  .portal-card h2 {
    font-size: 1.28rem !important;
  }
  .nav a {
    font-size: .88rem;
  }
}

/* ========== 学员画像状态条 ========== */
.profile-bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem .85rem;
  margin: .35rem 0 .85rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--sky) 50%, #fff);
  flex-wrap: wrap;
}
.profile-tag {
  font-weight: 700;
  font-size: .92rem;
  padding: .2rem .65rem;
  border-radius: 3px;
  color: #fff;
}
.profile-tag--none  { background: #5a7a6a; }
.profile-tag--high  { background: var(--accent); }
.profile-tag--low   { background: var(--accent-2); }
.profile-change {
  font-size: .85rem;
  color: var(--muted);
  text-decoration: underline;
}
.profile-hint {
  font-size: .92rem;
  color: var(--ink);
}

/* ========== 三大模式卡片 ========== */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .85rem;
  margin-bottom: 1rem;
}
.mode-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .45rem;
  padding: 1.35rem 1.15rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  backdrop-filter: blur(6px);
  text-decoration: none;
  color: var(--ink);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.mode-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(26, 35, 50, .09);
  text-decoration: none;
  color: var(--ink);
}
.mode-card--quick  { border-top: 3px solid #c49a26; }
.mode-card--random { border-top: 3px solid #3a7a8a; }
.mode-card--deep   { border-top: 3px solid var(--accent); }
.mode-icon {
  font-size: 1.65rem;
  line-height: 1;
}
.mode-card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  white-space: nowrap;
}
.mode-card p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.5;
  flex: 1;
}
.mode-go {
  font-weight: 700;
  font-size: .88rem;
  color: var(--accent);
}
@media (max-width: 860px) {
  .mode-grid { grid-template-columns: 1fr; }
  .mode-card h2 { white-space: normal; }
}

/* ========== 画像选择选项 ========== */
.profile-options {
  display: grid;
  gap: .65rem;
}
.profile-option {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .85rem;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  transition: border-color .18s, background .18s;
  font-weight: 400;
}
.profile-option:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--sky) 40%, #fff);
}
.profile-option input {
  margin-top: .2rem;
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
}
.profile-option__body {
  display: grid;
  gap: .15rem;
}
.profile-option__body strong {
  font-size: 1.02rem;
}
.profile-option__body span {
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.45;
}

/* ========== 快刷 · 知识点卡片 ========== */
.kp-card {
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: var(--card);
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
}
.kp-card__head {
  display: flex;
  align-items: center;
  gap: .65rem;
  flex-wrap: wrap;
  margin-bottom: .35rem;
}
.kp-card__label {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: #fff;
  background: var(--accent);
  padding: .12rem .5rem;
  border-radius: 2px;
}
.kp-card__name {
  margin: 0 0 .35rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
}
.kp-card__summary {
  font-size: .95rem;
  line-height: 1.65;
  color: var(--ink);
}
.kp-card__ext {
  margin-top: .55rem;
  font-size: .9rem;
  color: var(--muted);
}
.kp-card__ext summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
}

/* ========== 深度学习 · 科目/章节 ========== */
.deep-subjects {
  display: grid;
  gap: .75rem;
}
.deep-subject__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
}
.deep-subject__head h3 {
  margin: 0;
}
.deep-chapters {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .55rem;
}
.deep-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .7rem;
  border: 1px solid var(--line);
  background: #fff;
  font-size: .88rem;
  color: var(--ink);
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.deep-chip:hover {
  border-color: var(--accent);
  background: var(--sky);
  text-decoration: none;
}
.deep-chip__kp {
  font-size: .75rem;
  color: var(--muted);
}

/* 章节练习合并：带按钮的chip */
.deep-chip--actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .5rem .8rem;
  flex-wrap: wrap;
}
.deep-chip__info {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.deep-chip__btns {
  display: flex;
  gap: .35rem;
  flex-shrink: 0;
}

/* ========== 章节练习 · 科目卡片网格 ========== */
.subject-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .75rem;
  margin-top: .5rem;
}
@media (max-width: 1200px) { .subject-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px)  { .subject-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .subject-grid { grid-template-columns: repeat(2, 1fr); } }

.subject-card {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .85rem 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: all .18s;
  min-height: 70px;
}
.subject-card:hover {
  border-color: var(--accent);
  background: var(--sky);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15,92,76,.1);
}
.subject-card--empty {
  opacity: .45;
  cursor: default;
}
.subject-card--empty:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--line);
  background: var(--card);
}
.subject-card__icon {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #1a7a65);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
}
.subject-card__body {
  flex: 1;
  min-width: 0;
}
.subject-card__name {
  margin: 0 0 .15rem;
  font-size: .92rem;
  font-family: var(--font-display);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.subject-card__stats {
  font-size: .75rem;
  color: var(--muted);
}

/* 弹窗内考点标签 */
.kp-tag {
  display: inline-block;
  padding: .3rem .6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: .82rem;
  cursor: pointer;
  transition: all .15s;
  background: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kp-tag:hover {
  border-color: var(--accent) !important;
  background: #f0f5ff !important;
}
.kp-tag--active {
  background: #f0f5ff !important;
  border-color: var(--accent) !important;
}

/* 弹窗顶栏：标题 + 题量 + 按钮 */
.kp-modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--line);
}

/* 弹窗右上角关闭按钮 */
.kp-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  z-index: 10;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  padding: 0 .2rem;
  transition: color .15s;
}
.kp-modal-close:hover { color: var(--danger); }

/* 章节行：三列固定对齐 */
.kp-chapter-row {
  display: grid;
  grid-template-columns: 1fr 60px 100px;
  align-items: center;
  gap: .5rem;
  padding: .45rem .6rem;
  margin-bottom: .3rem;
  background: rgba(15,92,76,.04);
  border-radius: 8px;
}
.kp-chapter-row:first-child { margin-top: 0; }
.kp-chapter-name {
  font-size: .9rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kp-chapter-count {
  font-size: .78rem;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}
.kp-chapter-btn {
  white-space: nowrap;
  font-size: .78rem !important;
  padding: .2rem .5rem !important;
}

/* 考点 2 列网格 */
.kp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem;
  margin-bottom: .75rem;
  padding: 0 .3rem;
}

/* ========== 深度学习 · 知识框架树 ========== */
.kp-tree {
  display: grid;
  gap: .65rem;
}
.kp-node {
  padding: .65rem .85rem;
  border: 1px solid var(--line);
  background: #fff;
}
.kp-node__name {
  font-weight: 700;
  font-size: .98rem;
  margin-bottom: .25rem;
}
.kp-node__summary {
  font-size: .9rem;
  line-height: 1.6;
  color: var(--ink);
}
.kp-node__ext {
  margin-top: .4rem;
  font-size: .85rem;
  color: var(--muted);
}
.kp-node__ext summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
}

/* ========== 错题本 · 书架小本本 ========== */
.nb-shelf {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 900px) {
  .nb-shelf { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .nb-shelf { grid-template-columns: 1fr; }
}

.nb-book {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  transition: transform .2s ease, box-shadow .2s ease;
}
.nb-book:hover {
  transform: translateY(-4px) rotate(-.5deg);
  box-shadow: 0 10px 24px rgba(26, 35, 50, .12);
  text-decoration: none;
  color: var(--ink);
}

.nb-cover {
  display: flex;
  min-height: 150px;
  border-radius: 4px 8px 8px 4px;
  overflow: hidden;
  box-shadow: 2px 3px 8px rgba(26, 35, 50, .10);
}
.nb-spine {
  width: 14px;
  flex: 0 0 14px;
  background: linear-gradient(180deg, #0f5c4c, #1a7a62);
  border-radius: 4px 0 0 4px;
}
.nb-book--has-wrong .nb-spine {
  background: linear-gradient(180deg, #9b2c2c, #c45c26);
}
.nb-book--perfect .nb-spine {
  background: linear-gradient(180deg, #1f6f4a, #3a9a6a);
}
.nb-book--empty .nb-spine {
  background: linear-gradient(180deg, #8a8a7a, #aaa89a);
}
.nb-cover__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: 1.1rem .85rem;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: none;
  border-radius: 0 8px 8px 0;
}
.nb-subject {
  font-size: .72rem;
  letter-spacing: .08em;
  color: var(--muted);
  text-transform: uppercase;
}
.nb-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.35;
}
.nb-badge {
  font-size: .78rem;
  font-weight: 700;
  padding: .18rem .6rem;
  border-radius: 10px;
  white-space: nowrap;
}
.nb-badge--wrong {
  background: #fde8e8;
  color: #9b2c2c;
  border: 1px solid #e2b6b6;
}
.nb-badge--perfect {
  background: #e6f6ee;
  color: #1f6f4a;
  border: 1px solid #a8dcc0;
}
.nb-badge--clear {
  background: #eef6f2;
  color: var(--accent);
  border: 1px solid #c2ddd4;
}
.nb-badge--new {
  background: #f5f3ee;
  color: var(--muted);
  border: 1px solid var(--line);
}
.nb-info {
  display: flex;
  justify-content: center;
  gap: .85rem;
  margin-top: .45rem;
  font-size: .78rem;
  color: var(--muted);
}

/* ========== 错题本 · 翻页内页 ========== */
.nb-pages {
  display: grid;
  gap: .85rem;
  margin-top: .75rem;
}
.nb-page {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 1rem 1.15rem;
  border-left: 4px solid var(--accent-2);
  position: relative;
}
.nb-page::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 12px;
  width: 1px;
  background: rgba(196, 92, 38, .15);
}
.nb-page__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .55rem;
  font-size: .82rem;
}
.nb-page__num {
  font-weight: 700;
  color: var(--accent-2);
}
.nb-page__explain {
  margin-top: .65rem;
  font-size: .88rem;
  color: var(--muted);
}
.nb-page__explain summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
}
.choice--correct {
  color: var(--ok);
  font-weight: 600;
}

.nb-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.25rem;
}
.nb-pager__info {
  font-size: .88rem;
  color: var(--muted);
}

/* ========== 错题本 · 弹窗 ========== */
.nb-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(20, 28, 38, .55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s;
}
.nb-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}
.nb-modal {
  position: relative;
  width: min(720px, 92vw);
  max-height: 82vh;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 24px 64px rgba(20, 28, 38, .22);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.nb-modal__close {
  position: absolute;
  top: .65rem;
  right: .75rem;
  z-index: 10;
  width: 2rem;
  height: 2rem;
  border: none;
  background: rgba(26, 35, 50, .06);
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.nb-modal__close:hover {
  background: rgba(26, 35, 50, .12);
  color: var(--ink);
}
.nb-modal__content {
  overflow-y: auto;
  padding: 1.5rem 1.75rem 1.75rem;
  flex: 1;
}
@media (max-width: 600px) {
  .nb-modal-backdrop { padding: .75rem; }
  .nb-modal { width: 100%; max-height: 90vh; border-radius: 8px; }
  .nb-modal__content { padding: 1.1rem 1rem 1.25rem; }
}

/* ── 错误标记弹窗（学员端） ── */
.flag-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.flag-modal-box {
  background: #fff;
  border-radius: 8px;
  padding: 1.2rem 1.4rem;
  min-width: 280px;
  max-width: 90vw;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
}

/* 弹窗内阅读器 */
.nb-reader__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding-right: 2rem;
}
.nb-reader__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
}
.nb-empty {
  text-align: center;
  padding: 2.5rem 1rem;
}
.nb-empty__icon {
  font-size: 2.2rem;
  margin: 0 0 .5rem;
}

/* 书本可点击提示 */
.nb-book { cursor: pointer; }
.nb-book:active .nb-cover {
  transform: scale(.97);
}
.nb-cover {
  transition: transform .15s ease;
}

/* ========== 真题实战 ========== */
.real-years {
  display: grid;
  gap: .75rem;
}
.real-year__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .55rem;
}
.real-year__head h3 { margin: 0; }
.real-year__papers {
  display: grid;
  gap: .55rem;
}
.real-paper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .65rem .85rem;
  border: 1px solid var(--line);
  background: #fff;
}
.real-paper__info {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.real-paper__info strong { font-size: .95rem; }
.real-paper__info .muted { font-size: .82rem; }

/* ========== 预测出题 · 年份对比 ========== */
.predict-compare {
  display: grid;
  gap: 1rem;
}
.predict-year h4 {
  margin: 0 0 .45rem;
  font-family: var(--font-display);
}
.predict-bars {
  display: grid;
  gap: .3rem;
}
.predict-bar {
  display: grid;
  grid-template-columns: 100px 1fr 32px;
  gap: .5rem;
  align-items: center;
  font-size: .82rem;
}
.predict-bar__label {
  text-align: right;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.predict-bar__track {
  height: 14px;
  background: var(--sky);
  border-radius: 2px;
  overflow: hidden;
}
.predict-bar__fill {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  max-width: 100%;
}
.predict-bar__n {
  font-weight: 700;
  font-size: .78rem;
}
@media (max-width: 600px) {
  .predict-bar { grid-template-columns: 72px 1fr 28px; }
  .real-paper { flex-direction: column; align-items: stretch; }
  .real-paper .btn { width: 100%; }
}

/* ========== 知识云图 · 亚克力立体积木 ========== */
.kc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1.25rem;
  margin-bottom: 1rem;
  font-size: .88rem;
  color: var(--muted);
}
.kc-legend__item {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.kc-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0,0,0,.15);
}
.kc-dot--new       { background: linear-gradient(135deg, #d4cfc6, #b0aaa0); }
.kc-dot--weak      { background: linear-gradient(135deg, #f0956a, #c45c26); }
.kc-dot--learning  { background: linear-gradient(135deg, #f0d060, #c49a26); }
.kc-dot--mastered  { background: linear-gradient(135deg, #5ad08a, #1f6f4a); }

.kc-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.1rem 1.35rem;
  padding: 2.5rem 2rem;
  border: 1px solid rgba(255,255,255,.45);
  background: linear-gradient(160deg, rgba(255,255,255,.55) 0%, rgba(220,232,228,.35) 100%);
  backdrop-filter: blur(12px);
  min-height: 300px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(15,92,76,.06), inset 0 1px 0 rgba(255,255,255,.6);
  perspective: 900px;
}

.kc-word {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
  line-height: 1.2;
  padding: .65rem 1.1rem;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(4deg) rotateY(-2deg);
  transition: transform .22s ease, box-shadow .22s ease;
  border: 1.5px solid rgba(255,255,255,.65);
  box-shadow:
    0 6px 0 -1px var(--block-side, #ccc),
    0 10px 18px rgba(0,0,0,.13),
    inset 0 2px 4px rgba(255,255,255,.7),
    inset 0 -2px 6px rgba(0,0,0,.06);
  text-shadow: 0 1px 1px rgba(255,255,255,.5);
}
.kc-word::before {
  content: "";
  position: absolute;
  top: 3px; left: 8%;
  width: 55%;
  height: 32%;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,.72), transparent);
  pointer-events: none;
}
.kc-word:hover {
  transform: rotateX(0deg) rotateY(0deg) translateY(-5px) scale(1.08);
  box-shadow:
    0 10px 0 -1px var(--block-side, #ccc),
    0 18px 32px rgba(0,0,0,.18),
    inset 0 2px 4px rgba(255,255,255,.8),
    inset 0 -2px 6px rgba(0,0,0,.05);
  text-decoration: none;
}
.kc-word:active {
  transform: rotateX(2deg) translateY(1px) scale(.97);
  box-shadow:
    0 3px 0 -1px var(--block-side, #ccc),
    0 5px 10px rgba(0,0,0,.12),
    inset 0 2px 4px rgba(255,255,255,.5);
}

/* 各状态颜色 · 未通过灰色 vs 通过彩色 */
.kc-word--new {
  --block-side: #8a8578;
  background: linear-gradient(145deg, rgba(195,192,185,.6), rgba(160,157,148,.5));
  color: #9a958a;
  opacity: .55;
  border-color: rgba(180,175,165,.4);
  box-shadow:
    0 4px 0 -1px var(--block-side),
    0 6px 10px rgba(0,0,0,.06),
    inset 0 1px 2px rgba(255,255,255,.3);
}
.kc-word--weak {
  --block-side: #9a3a12;
  background: linear-gradient(145deg, rgba(255,140,80,.92), rgba(210,80,20,.88));
  color: #fff;
  text-shadow: 0 1px 3px rgba(120,30,0,.4);
}
.kc-word--learning {
  --block-side: #8a6a08;
  background: linear-gradient(145deg, rgba(255,220,60,.92), rgba(220,170,20,.88));
  color: #4a3500;
  text-shadow: 0 1px 1px rgba(255,255,255,.5);
}
.kc-word--mastered {
  --block-side: #0e5030;
  background: linear-gradient(145deg, rgba(60,230,130,.92), rgba(20,130,70,.9));
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,60,30,.4);
  box-shadow:
    0 7px 0 -1px var(--block-side),
    0 12px 22px rgba(0,0,0,.15),
    0 0 18px rgba(31,180,90,.25),
    inset 0 2px 5px rgba(255,255,255,.75),
    inset 0 -2px 6px rgba(0,0,0,.08);
}

@media (max-width: 600px) {
  .kc-cloud {
    padding: 1.5rem 1rem;
    gap: .85rem 1rem;
    min-height: 200px;
  }
  .kc-word {
    padding: .5rem .85rem;
    border-radius: 8px;
  }
}

/* ========== 知识云图 · 视图切换 ========== */
.kc-toggle {
  display: flex;
  gap: .35rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px;
  background: rgba(255,255,255,.6);
}
.kc-toggle__btn {
  border: none;
  background: transparent;
  padding: .4rem .9rem;
  font-size: .88rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-radius: 4px;
  transition: all .2s;
}
.kc-toggle__btn.is-active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 6px rgba(15,92,76,.2);
}
.kc-toggle__btn:hover:not(.is-active) {
  background: var(--sky);
  color: var(--ink);
}

/* ========== 知识大树 ========== */
.kt-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 0 0;
  min-height: 520px;
}

/* 树冠：大椭圆绿色区域 */
.kt-canopy {
  position: relative;
  width: min(880px, 94%);
  min-height: 400px;
  border-radius: 50% 50% 46% 46% / 55% 55% 42% 42%;
  background:
    radial-gradient(ellipse 60% 50% at 30% 35%, rgba(80,190,120,.35), transparent),
    radial-gradient(ellipse 55% 55% at 70% 40%, rgba(50,160,90,.3), transparent),
    radial-gradient(ellipse 70% 60% at 50% 55%, rgba(34,120,70,.28), transparent),
    linear-gradient(175deg, rgba(110,210,140,.4) 0%, rgba(40,130,75,.45) 50%, rgba(25,90,55,.5) 100%);
  box-shadow:
    0 18px 50px rgba(15,92,76,.15),
    inset 0 -20px 40px rgba(0,60,30,.12),
    inset 0 12px 30px rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
  overflow: hidden;
}
.kt-canopy__glow {
  position: absolute;
  top: -15%;
  left: 20%;
  width: 60%;
  height: 45%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,255,220,.25), transparent 70%);
  pointer-events: none;
}

/* 果实容器 */
.kt-fruits {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .8rem 1rem;
  position: relative;
  z-index: 2;
  max-height: 340px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.2) transparent;
}
.kt-fruits::-webkit-scrollbar { width: 4px; }
.kt-fruits::-webkit-scrollbar-track { background: transparent; }
.kt-fruits::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border-radius: 3px; }

/* 单个果实 */
.kt-fruit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transform: scale(var(--fscale, 1));
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
  animation: fruit-drop .5s ease both;
  animation-delay: var(--fdelay, 0ms);
  position: relative;
}
@keyframes fruit-drop {
  0% { opacity: 0; transform: scale(var(--fscale, 1)) translateY(-18px); }
  60% { opacity: 1; transform: scale(var(--fscale, 1)) translateY(3px); }
  100% { opacity: 1; transform: scale(var(--fscale, 1)) translateY(0); }
}
.kt-fruit__body {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .5rem .85rem;
  border-radius: 50% 50% 50% 50% / 55% 55% 45% 45%;
  font-weight: 700;
  font-size: .82rem;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  border: 2px solid rgba(255,255,255,.5);
  box-shadow:
    0 4px 10px rgba(0,0,0,.15),
    inset 0 2px 4px rgba(255,255,255,.5),
    inset 0 -3px 6px rgba(0,0,0,.1);
  text-shadow: 0 1px 1px rgba(255,255,255,.4);
}
/* 果实小梗 */
.kt-fruit::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 2px;
  height: 7px;
  background: #5a3a1a;
  border-radius: 1px;
  transform: translateX(-50%) rotate(3deg);
}

/* 果实状态颜色 */
.kt-fruit--new .kt-fruit__body {
  background: linear-gradient(145deg, rgba(200,198,190,.7), rgba(165,162,152,.65));
  color: #8a8578;
  border-color: rgba(180,175,165,.4);
  box-shadow: 0 3px 6px rgba(0,0,0,.08), inset 0 1px 2px rgba(255,255,255,.3);
  opacity: .7;
}
.kt-fruit--weak .kt-fruit__body {
  background: linear-gradient(145deg, #ff9a5c, #e05a20);
  color: #fff;
  text-shadow: 0 1px 2px rgba(120,30,0,.4);
}
.kt-fruit--learning .kt-fruit__body {
  background: linear-gradient(145deg, #ffe04a, #d4a012);
  color: #5a4200;
  text-shadow: 0 1px 1px rgba(255,255,255,.5);
}
.kt-fruit--mastered .kt-fruit__body {
  background: linear-gradient(145deg, #ff6a6a, #d42a2a);
  color: #fff;
  text-shadow: 0 1px 2px rgba(100,0,0,.4);
  box-shadow:
    0 5px 14px rgba(180,30,30,.25),
    0 0 12px rgba(255,80,80,.2),
    inset 0 2px 5px rgba(255,255,255,.55),
    inset 0 -3px 6px rgba(0,0,0,.12);
}
.kt-fruit:hover {
  transform: scale(calc(var(--fscale, 1) * 1.18));
  z-index: 5;
  filter: brightness(1.08);
}
.kt-fruit:hover .kt-fruit__body {
  box-shadow:
    0 8px 20px rgba(0,0,0,.2),
    0 0 16px rgba(255,220,100,.3),
    inset 0 2px 5px rgba(255,255,255,.6);
}

/* 树干：短粗 */
.kt-trunk {
  width: 68px;
  height: 72px;
  background: linear-gradient(90deg, #6a4420 0%, #8a5a2a 30%, #a06a30 50%, #7a4a22 75%, #5a3818 100%);
  border-radius: 6px 6px 14px 14px;
  position: relative;
  margin-top: -12px;
  box-shadow: 0 6px 16px rgba(60,30,10,.2);
}
.kt-trunk__texture {
  position: absolute;
  inset: 8px 12px;
  background:
    repeating-linear-gradient(175deg, transparent, transparent 8px, rgba(0,0,0,.08) 9px, transparent 10px),
    repeating-linear-gradient(185deg, transparent, transparent 12px, rgba(255,255,255,.06) 13px, transparent 14px);
  border-radius: 4px;
}
/* 树根扩展 */
.kt-trunk::before,
.kt-trunk::after {
  content: "";
  position: absolute;
  bottom: -4px;
  width: 28px;
  height: 14px;
  background: #6a4420;
  border-radius: 0 0 50% 50%;
}
.kt-trunk::before { left: -12px; transform: rotate(12deg); }
.kt-trunk::after { right: -12px; transform: rotate(-12deg); }

/* 地面 */
.kt-ground {
  width: min(320px, 60%);
  height: 18px;
  background: radial-gradient(ellipse, rgba(80,140,60,.3) 0%, rgba(80,140,60,.1) 60%, transparent 80%);
  border-radius: 50%;
  margin-top: -2px;
}

.kt-hint {
  text-align: center;
  font-size: .82rem;
  color: var(--muted);
  margin-top: .85rem;
}

@media (max-width: 600px) {
  .kt-canopy {
    min-height: 300px;
    padding: 2rem 1.2rem;
    border-radius: 45% 45% 42% 42% / 50% 50% 38% 38%;
  }
  .kt-fruits { gap: .55rem .7rem; max-height: 250px; }
  .kt-fruit__body { padding: .4rem .65rem; font-size: .72rem; }
  .kt-trunk { width: 52px; height: 56px; }
}

/* ========== 知识材料（学员端 + 管理端共用） ========== */
.km-list {
  display: grid;
  gap: .75rem;
}
.km-item {
  border: 1px solid var(--line);
  background: #fff;
  padding: .85rem 1rem;
  border-left: 4px solid var(--accent);
}
.km-item--image { border-left-color: #3a7a8a; }
.km-item--file  { border-left-color: #c49a26; }
.km-item__head {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
  margin-bottom: .45rem;
}
.km-item__title {
  font-size: .95rem;
}
.km-item__text {
  font-size: .92rem;
  line-height: 1.7;
  color: var(--ink);
}
.km-item__img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin-top: .35rem;
}
.km-type-tag {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: .12rem .5rem;
  border-radius: 2px;
  color: #fff;
  background: var(--accent);
}
.km-type-tag--image { background: #3a7a8a; }
.km-type-tag--file  { background: #c49a26; }
.km-count {
  display: inline-block;
  min-width: 1.4rem;
  text-align: center;
  font-size: .82rem;
  font-weight: 700;
  padding: .1rem .35rem;
  border-radius: 8px;
  background: #f0ede6;
  color: var(--muted);
}
.km-count--has {
  background: #e6f6ee;
  color: #1f6f4a;
}

/* ========== 登录回忆弹窗 · 多方向汇聚 ========== */
.recall-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(18, 26, 36, .6);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease, visibility .5s;
}
.recall-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}

.recall-modal {
  position: relative;
  width: min(600px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 18px;
  background: linear-gradient(155deg, rgba(255,253,248,.97), rgba(232,246,242,.95));
  box-shadow: 0 32px 80px rgba(10,20,30,.28), 0 0 0 1px rgba(255,255,255,.5);
  transform: scale(.82);
  transition: transform .5s cubic-bezier(.22,1,.36,1);
}
.recall-modal--wide {
  width: min(750px, 96vw);
}

/* 快速5分钟倒计时 */
.quick5-timer {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  padding: .6rem;
  margin-bottom: .5rem;
  border-radius: 10px;
  background: rgba(15,92,76,.06);
}
.recall-backdrop.is-visible .recall-modal {
  transform: scale(1);
}

/* 画框装饰 */
.recall-frame {
  position: absolute;
  inset: 6px;
  border: 2.5px solid rgba(15,92,76,.25);
  border-radius: 14px;
  pointer-events: none;
  box-shadow: inset 0 0 12px rgba(15,92,76,.06);
}
.recall-frame::before,
.recall-frame::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(196,154,38,.5);
}
.recall-frame::before {
  top: -2px; left: -2px;
  border-right: none; border-bottom: none;
  border-radius: 12px 0 0 0;
}
.recall-frame::after {
  bottom: -2px; right: -2px;
  border-left: none; border-top: none;
  border-radius: 0 0 12px 0;
}

.recall-body {
  padding: 2.2rem 2rem 1.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
}

.recall-header {
  text-align: center;
}
.recall-eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(15,92,76,.08);
  padding: .2rem .7rem;
  border-radius: 10px;
  margin-bottom: .45rem;
}
.recall-title {
  margin: .25rem 0 .2rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
}
.recall-sub {
  margin: 0;
  font-size: .88rem;
  color: var(--muted);
}

/* 汇聚词云：每个词从不同方向飞入 */
.recall-cloud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .6rem .8rem;
  padding: 1.25rem 1rem;
  min-height: 100px;
  width: 100%;
}
.recall-word {
  display: inline-block;
  font-weight: 800;
  padding: .4rem .75rem;
  border-radius: 8px;
  border: 1.5px solid rgba(255,255,255,.6);
  box-shadow: 0 4px 0 -1px var(--rw-side, #bbb), 0 6px 12px rgba(0,0,0,.1),
    inset 0 2px 3px rgba(255,255,255,.65);
  opacity: 0;
  transform: translate(var(--rx, 0), var(--ry, 0)) scale(.5) rotate(var(--rr, 0deg));
  animation: recall-converge .6s cubic-bezier(.22,1,.36,1) forwards;
  animation-delay: calc(var(--d) * 80ms + 300ms);
}
/* 8 个方向循环 */
.recall-word:nth-child(8n+1) { --rx: -80px; --ry: -60px; --rr: -12deg; }
.recall-word:nth-child(8n+2) { --rx: 80px;  --ry: -50px; --rr: 10deg; }
.recall-word:nth-child(8n+3) { --rx: -70px; --ry: 55px;  --rr: 8deg; }
.recall-word:nth-child(8n+4) { --rx: 75px;  --ry: 60px;  --rr: -8deg; }
.recall-word:nth-child(8n+5) { --rx: 0px;   --ry: -80px; --rr: 5deg; }
.recall-word:nth-child(8n+6) { --rx: -90px; --ry: 0px;   --rr: -6deg; }
.recall-word:nth-child(8n+7) { --rx: 90px;  --ry: 10px;  --rr: 7deg; }
.recall-word:nth-child(8n+8) { --rx: 0px;   --ry: 75px;  --rr: -5deg; }

@keyframes recall-converge {
  to {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
}

.recall-word--weak {
  --rw-side: #9a3a12;
  background: linear-gradient(145deg, rgba(244,160,110,.88), rgba(196,92,38,.8));
  color: #fff;
}
.recall-word--learning {
  --rw-side: #9a7a10;
  background: linear-gradient(145deg, rgba(250,215,90,.88), rgba(196,154,38,.8));
  color: #5a4200;
}
.recall-word--mastered {
  --rw-side: #145a38;
  background: linear-gradient(145deg, rgba(90,210,140,.88), rgba(31,111,74,.82));
  color: #fff;
}

/* 徽章 · 盾牌造型（参考徽章.png） */
.recall-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}
.recall-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  padding: 1.5rem 1.4rem 1.3rem;
  min-width: 108px;
  position: relative;
  /* 盾牌形状：上圆下尖 */
  border: 3px solid #a8dadc;
  border-radius: 14px 14px 50% 50% / 14px 14px 40% 40%;
  background: linear-gradient(170deg, rgba(255,255,255,.98) 0%, rgba(240,252,248,.96) 100%);
  /* 金色光芒 */
  box-shadow:
    0 0 12px rgba(212,175,55,.35),
    0 0 28px rgba(212,175,55,.18),
    0 0 48px rgba(212,175,55,.08),
    0 6px 16px rgba(15,92,76,.10),
    inset 0 1px 0 rgba(255,255,255,.9);
  font-size: .78rem;
  font-weight: 700;
  color: #2a6a5a;
  opacity: 0;
  transform: scale(2.2) translateY(-30px);
  animation: recall-badge-stamp .55s cubic-bezier(.17,.89,.32,1.28) forwards;
  animation-delay: calc(var(--d) * 550ms + 300ms);
}
/* 金色弧线装饰（上方） */
.recall-badge::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 14%;
  right: 14%;
  height: 16px;
  border: none;
  border-bottom: 2.5px solid rgba(212,175,55,.55);
  border-radius: 0 0 50% 50%;
  pointer-events: none;
}
/* 金色弧线装饰（下方） */
.recall-badge::after {
  content: "";
  position: absolute;
  bottom: 16px;
  left: 18%;
  right: 18%;
  height: 12px;
  border-top: 2px solid rgba(212,175,55,.45);
  border-radius: 50% 50% 0 0;
  pointer-events: none;
}
/* 仪式感"当当当"盖章动画 */
@keyframes recall-badge-stamp {
  0% {
    opacity: 0;
    transform: scale(2.2) translateY(-30px);
  }
  55% {
    opacity: 1;
    transform: scale(.92) translateY(2px);
  }
  72% {
    transform: scale(1.06) translateY(-2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.recall-badge__icon {
  font-size: 2rem;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.12));
  position: relative;
  z-index: 2;
}
.recall-badge__name {
  font-size: .92rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.3;
  max-width: 88px;
  position: relative;
  z-index: 2;
}
/* 角落小圆点装饰 */
.recall-badge .badge-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
}
.recall-badge .badge-dot--tl { top: 10px; left: 10px; background: #5ab88a; }
.recall-badge .badge-dot--tr { top: 10px; right: 10px; background: #e8c83a; }
.recall-badge .badge-dot--bl { bottom: 20px; left: 14px; background: #e8c83a; }
.recall-badge .badge-dot--br { bottom: 20px; right: 14px; background: #5ab88a; }

/* 积累进度 */
.recall-progress {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .85rem;
  color: var(--muted);
  flex-wrap: wrap;
  justify-content: center;
}
.recall-merge-link {
  font-weight: 700;
  color: var(--accent);
}

/* 按钮区 */
.recall-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: .35rem;
}
.recall-btn-primary {
  font-size: 1.02rem;
  padding: .6rem 1.4rem;
}

/* 多步弹窗补充 */
.recall-step { width: 100%; }
.recall-cloud--full {
  max-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
}
/* 弹窗内滚动条：融入背景 */
.recall-modal::-webkit-scrollbar,
.recall-cloud--full::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
.recall-modal::-webkit-scrollbar-track,
.recall-cloud--full::-webkit-scrollbar-track {
  background: transparent;
}
.recall-modal::-webkit-scrollbar-thumb,
.recall-cloud--full::-webkit-scrollbar-thumb {
  background: rgba(15,92,76,.12);
  border-radius: 4px;
}
.recall-modal::-webkit-scrollbar-thumb:hover,
.recall-cloud--full::-webkit-scrollbar-thumb:hover {
  background: rgba(15,92,76,.22);
}
.recall-modal,
.recall-cloud--full {
  scrollbar-width: thin;
  scrollbar-color: rgba(15,92,76,.12) transparent;
}
.recall-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  justify-content: center;
  font-size: .78rem;
  color: var(--muted);
  margin-top: .55rem;
}
.recall-legend span {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}
.recall-badges--full {
  padding: 1rem 0;
}
.recall-entry {
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s;
}
.recall-entry:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(15,92,76,.08);
}
.recall-entry h3 { margin: 0 0 .25rem; }
.recall-entry p { margin: 0; }

/* ========== 水瓶 ========== */
.bottle-shelf {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.25rem;
  padding: 1rem 0;
}
.bottle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  opacity: 0;
  transform: translateY(20px) scale(.8);
  animation: bottle-in .5s ease forwards;
  animation-delay: calc(var(--d) * 100ms + 200ms);
}
@keyframes bottle-in {
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.bottle__neck {
  width: 16px;
  height: 10px;
  background: rgba(200,220,235,.5);
  border: 1.5px solid rgba(160,190,210,.6);
  border-bottom: none;
  border-radius: 3px 3px 0 0;
}
.bottle__glass {
  position: relative;
  width: 44px;
  height: 72px;
  border: 2px solid rgba(160,190,210,.65);
  border-radius: 6px 6px 10px 10px;
  background: rgba(235,245,252,.35);
  overflow: hidden;
  box-shadow: inset 0 0 8px rgba(255,255,255,.5), 0 3px 8px rgba(0,0,0,.06);
}
.bottle__water {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--level, 50%);
  transition: height 1s cubic-bezier(.22,1,.36,1);
  border-radius: 0 0 8px 8px;
}
.bottle__water--mastered {
  background: linear-gradient(180deg, rgba(90,210,140,.85), rgba(31,111,74,.9));
}
.bottle__water--learning {
  background: linear-gradient(180deg, rgba(250,215,90,.85), rgba(196,154,38,.9));
}
.bottle__water--weak {
  background: linear-gradient(180deg, rgba(244,160,110,.85), rgba(196,92,38,.9));
}
.bottle__water--new {
  background: linear-gradient(180deg, rgba(200,200,195,.5), rgba(170,168,160,.6));
}
/* 水面波浪 */
.bottle__wave {
  position: absolute;
  top: -5px;
  left: -20%;
  width: 140%;
  height: 10px;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.55) 0%, transparent 70%);
  border-radius: 50%;
  animation: wave-move 2.2s ease-in-out infinite;
}
@keyframes wave-move {
  0%, 100% { transform: translateX(-8%) scaleY(1); }
  50% { transform: translateX(8%) scaleY(1.4); }
}
/* 气泡 */
.bottle__bubble {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,.6);
  animation: bubble-rise 2.5s ease-in infinite;
}
.bottle__bubble.b1 { left: 25%; animation-delay: 0s; }
.bottle__bubble.b2 { left: 55%; animation-delay: .8s; width: 3px; height: 3px; }
.bottle__bubble.b3 { left: 75%; animation-delay: 1.5s; width: 2.5px; height: 2.5px; }
@keyframes bubble-rise {
  0% { bottom: 10%; opacity: 0; transform: scale(.5); }
  20% { opacity: .8; }
  100% { bottom: 85%; opacity: 0; transform: scale(1.1); }
}
.bottle__label {
  font-size: .68rem;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  max-width: 52px;
  line-height: 1.2;
}

@media (max-width: 600px) {
  .recall-backdrop { padding: .75rem; }
  .recall-body { padding: 1.5rem 1.1rem 1.3rem; }
  .recall-title { font-size: 1.2rem; }
  .recall-cloud { gap: .45rem .6rem; padding: .85rem .5rem; }
  .recall-word { padding: .3rem .55rem; }
}

/* ========== 消息通知 ========== */
.nav-notif { position: relative; }
.notif-dot {
  position: absolute;
  top: -4px; right: -8px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #d63031;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}
.notif-badge-big {
  display: inline-block;
  padding: .2rem .7rem;
  border-radius: 10px;
  background: #d63031;
  color: #fff;
  font-size: .82rem;
  font-weight: 700;
}
.notif-list {
  display: grid;
  gap: .65rem;
}
.notif-item {
  border: 1px solid var(--line);
  background: #fff;
  padding: .75rem 1rem;
  border-left: 4px solid var(--accent);
}
.notif-item--correction { border-left-color: #d63031; }
.notif-item--new_questions { border-left-color: #3a7a8a; }
.notif-item--badge { border-left-color: #c49a26; }
.notif-item__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .3rem;
}
.notif-item__time {
  font-size: .78rem;
  color: var(--muted);
}
.notif-item__title {
  font-size: .95rem;
}
.notif-item__content {
  margin: .25rem 0 0;
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.55;
}
.notif-type-tag {
  font-size: .7rem;
  font-weight: 700;
  padding: .1rem .45rem;
  border-radius: 2px;
  color: #fff;
  background: var(--accent);
}
.notif-type-tag--correction { background: #d63031; }
.notif-type-tag--new_questions { background: #3a7a8a; }
.notif-type-tag--badge { background: #c49a26; }

/* ========== 答案质疑 ========== */
.challenge-box {
  margin-top: .65rem;
  border-top: 1px dashed var(--line);
  padding-top: .55rem;
}
.challenge-box summary {
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  color: var(--accent-2);
}
.challenge-box form {
  display: grid;
  gap: .45rem;
  margin-top: .45rem;
}
.challenge-box textarea,
.challenge-box input[type="text"] {
  width: 100%;
  padding: .45rem .6rem;
  border: 1px solid var(--line);
  font-size: .88rem;
  font-family: inherit;
}
.challenge-card { border-left: 4px solid var(--muted); }
.challenge-card--pending { border-left-color: #c49a26; }
.challenge-card--approved { border-left-color: #1f6f4a; }
.challenge-card--rejected { border-left-color: #9b2c2c; }
.challenge-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: .45rem;
}
.challenge-status {
  font-size: .75rem;
  font-weight: 700;
  padding: .15rem .55rem;
  border-radius: 3px;
  color: #fff;
}
.challenge-status--pending { background: #c49a26; }
.challenge-status--approved { background: #1f6f4a; }
.challenge-status--rejected { background: #9b2c2c; }
.challenge-stem,
.challenge-reason,
.challenge-suggest {
  font-size: .9rem;
  line-height: 1.6;
  margin-bottom: .3rem;
}
.challenge-actions {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
  margin-top: .65rem;
}
.challenge-note {
  flex: 1;
  min-width: 160px;
  padding: .4rem .6rem;
  border: 1px solid var(--line);
  font-size: .88rem;
}
.active-filter {
  border-color: var(--accent) !important;
  background: var(--sky) !important;
  font-weight: 700;
}

/* ===== 教学方案模块 ===== */
.page-head { margin: 1.2rem 0; }
.page-head h1 { margin: .4rem 0; font-family: var(--font-display); color: var(--ink); }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.card-link { display: block; }
.card-grid {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  height: 100%;
  box-shadow: 0 2px 8px rgba(26,35,50,.06);
  transition: transform .15s ease, box-shadow .15s ease;
}
.card-link:hover .card-grid { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(26,35,50,.12); }
.card-grid h3 { margin: 0 0 .4rem; font-family: var(--font-display); color: var(--accent); }
.card-grid p { margin: .25rem 0; }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
  margin: 1rem 0;
  box-shadow: 0 2px 8px rgba(26,35,50,.05);
}
.panel h2 { margin: .2rem 0 .7rem; font-family: var(--font-display); color: var(--accent); }
.panel h3 { margin: .9rem 0 .4rem; color: var(--ink); }
.three-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: .6rem 0; }
.focus-block { border: 1px solid var(--line); border-left: 4px solid var(--sky); border-radius: 8px; padding: .7rem .9rem; background: #faf9f4; }
.focus-block--must { border-left-color: var(--accent); }
.focus-block h3 { margin: 0 0 .4rem; color: var(--accent); }
.focus-block p { margin: .3rem 0; white-space: pre-line; }
.exam-note {
  background: #eef5f2; border: 1px solid #cfe0d9; border-radius: 8px;
  padding: .55rem .8rem; margin: .5rem 0; color: var(--accent);
  white-space: pre-line;
}
.data-table { width: 100%; border-collapse: collapse; margin: .5rem 0; }
.data-table th, .data-table td { border: 1px solid var(--line); padding: .5rem .7rem; text-align: left; vertical-align: top; }
.data-table th { background: #f1eee7; font-weight: 600; }
.focus-list { display: flex; flex-direction: column; gap: .6rem; }
.focus-item { display: flex; gap: .7rem; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; background: #faf9f4; }
.focus-item p { margin: .3rem 0 0; white-space: pre-line; }
.badge { display: inline-block; font-size: .8rem; padding: .15rem .5rem; border-radius: 999px; white-space: nowrap; background: var(--sky); color: var(--accent); font-weight: 600; }
.badge--must { background: #fde8d9; color: var(--accent-2); }
.badge--key { background: var(--sky); color: var(--accent); }
.badge--hard { background: #f5dddd; color: var(--danger); }
.badge--mistake { background: #fdf3d7; color: #8a6d1a; }
.btn-sm { padding: .3rem .7rem; font-size: .9rem; }

/* ===== 教学中心首页 ===== */
.hero-sub { max-width: 640px; margin: .6rem auto 0; color: var(--muted); font-size: 1.05rem; }
.hero-actions { display: flex; gap: .8rem; justify-content: center; margin-top: 1.2rem; }
.subject-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; margin-top: .8rem; }
.subject-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.2rem 1.3rem 1.1rem;
  box-shadow: 0 2px 10px rgba(26,35,50,.06);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  position: relative;
  overflow: hidden;
}
.subject-card:hover { transform: translateY(-4px); box-shadow: 0 10px 22px rgba(26,35,50,.14); border-color: var(--accent); text-decoration: none; }
.subject-card__icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #2e7d6c);
  color: #fff; font-family: var(--font-display); font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: .7rem;
}
.subject-card--related .subject-card__icon { background: linear-gradient(135deg, #5a6a7a, #7d8c9c); }
.subject-card h3 { margin: 0 0 .3rem; font-family: var(--font-display); color: var(--ink); font-size: 1.15rem; }
.subject-card__meta { margin: 0 0 .25rem; color: var(--accent); font-weight: 600; }
.subject-card__stats { margin: 0 0 .4rem; font-size: .92rem; color: var(--muted); }
.subject-card__exam { margin: 0; font-size: .88rem; color: var(--muted); }

/* ===== 来源考题（教学内容溯源） ===== */
.source-questions { display: flex; flex-direction: column; gap: .5rem; margin-top: .6rem; }
.source-question { border: 1px solid var(--line); border-radius: 10px; background: #faf9f4; overflow: hidden; }
.source-question summary { cursor: pointer; padding: .6rem .9rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: baseline; }
.source-question summary:hover { background: #f3efe6; }
.source-question__body { padding: .3rem .9rem .9rem; border-top: 1px dashed var(--line); }
.source-question__body .q-choices p { margin: .25rem 0; }
.source-question__body p.choice-correct { color: var(--ok); font-weight: 600; }
.source-question__links { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.badge--a1 { background: var(--sky); color: var(--accent); }
.badge--a2 { background: #e3ecf6; color: #2c5f8a; }
.badge--x { background: #fde8d9; color: var(--accent-2); }
.badge--b { background: #eef0e0; color: #6a6a1a; }

/* ===== 教学管理 ===== */
.manage-edit-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0 .2rem; }
.manage-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .5rem; }
.subject-card__manage { margin: .6rem 0 0; font-size: .85rem; color: var(--accent); font-weight: 600; }
.stats { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1rem 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1.2rem; min-width: 130px; box-shadow: 0 2px 8px rgba(26,35,50,.05); }
.stat .n { font-size: 1.7rem; font-family: var(--font-display); color: var(--accent); line-height: 1.1; }
.stat .l { color: var(--muted); font-size: .9rem; }

/* ===== 教学内容前端管理 ===== */
.filter-bar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin: .6rem 0; }
.filter-bar select, .filter-bar input[type=text] { padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--card); font: inherit; }
.btn.danger, .btn-sm.danger { background: var(--danger); color: #fff; }
.btn.danger:hover, .btn-sm.danger:hover { filter: brightness(1.1); }
.inline-actions { display: flex; gap: .35rem; align-items: center; flex-wrap: wrap; }
.form-grid label { display: block; margin: .7rem 0 .25rem; font-weight: 600; }
.form-grid input[type=text], .form-grid input[type=number], .form-grid select, .form-grid textarea {
  width: 100%; padding: .5rem .65rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit;
}
.form-grid textarea { resize: vertical; }
.form-grid .helptext { color: var(--muted); font-size: .85rem; }
.form-grid .errorlist { color: var(--danger); margin: .2rem 0; }
.specialty-title { margin: .4rem 0 .8rem; font-family: var(--font-display); color: var(--ink); }
