/* =========================================================
   学习平台 · 视觉样式
   色板：天蓝 / 克莱因蓝 / 亮黄 / 白 / 黑（P3R 风格）
   ========================================================= */

:root {
  --sky: #35B6E8;
  --sky-deep: #1B7FBF;
  --klein: #002FA7;
  --klein-deep: #001F6E;
  --yellow: #FFE03A;
  --black: #0D0D0D;
  --white: #FFFFFF;
  --paper: #F7F9FC;
  --line: 2px solid var(--black);
  --shadow: 7px 7px 0 var(--black);
  --shadow-sm: 4px 4px 0 var(--black);
  --radius: 6px;
  --font: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", "Source Han Sans CN", system-ui, -apple-system, sans-serif;
  --font-num: "Bahnschrift", "DIN Alternate", "Arial Narrow", "Impact", var(--font);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font);
  color: var(--black);
  background: #08172B;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,.06); }
::-webkit-scrollbar-thumb { background: var(--klein); border: 2px solid #fff; border-radius: 8px; }

/* ============ 1. 登录页 ============ */
.login-body {
  background: #fff;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.login-body::before {
  content: "";
  position: absolute;
  top: -18vh; left: -10vw;
  width: 52vw; height: 52vw;
  background: var(--sky);
  opacity: .16;
  transform: rotate(24deg);
}

.login-body::after {
  content: "";
  position: absolute;
  right: -12vw; bottom: -26vh;
  width: 46vw; height: 46vw;
  background: var(--yellow);
  opacity: .5;
  transform: rotate(-18deg);
}

.login-wrap {
  position: relative;
  z-index: 2;
  width: min(1000px, 100%);
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 56px;
  align-items: center;
}

.login-brand .lb-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-num);
  font-weight: 700;
  letter-spacing: .22em;
  font-size: 13px;
  color: var(--klein);
  margin-bottom: 22px;
}

.login-brand .lb-mark i {
  display: block;
  width: 46px; height: 6px;
  background: var(--yellow);
  border: 2px solid var(--black);
}

.login-brand h1 {
  margin: 0 0 6px;
  font-size: 56px;
  line-height: 1.04;
  letter-spacing: -.02em;
  font-weight: 800;
}

.login-brand h1 em {
  font-style: normal;
  color: var(--klein);
  display: block;
}

.login-brand .lb-sub {
  font-family: var(--font-num);
  letter-spacing: .34em;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 26px;
}

.login-brand p.lb-desc {
  margin: 0;
  max-width: 380px;
  line-height: 1.9;
  font-size: 14px;
  color: #4b5563;
}

.login-brand .lb-stripes {
  margin-top: 30px;
  display: flex;
  gap: 8px;
}
.login-brand .lb-stripes span {
  height: 10px;
  border: 2px solid var(--black);
}
.login-brand .lb-stripes span:nth-child(1) { width: 84px; background: var(--klein); }
.login-brand .lb-stripes span:nth-child(2) { width: 44px; background: var(--yellow); }
.login-brand .lb-stripes span:nth-child(3) { width: 24px; background: var(--sky); }

.login-card {
  background: var(--klein);
  border: var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 38px 34px 30px;
  color: #fff;
  position: relative;
  overflow: hidden;
  transform: rotate(-.6deg);
}

.login-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 10px;
  background: var(--yellow);
  border-bottom: var(--line);
}

.login-card .lc-tag {
  font-family: var(--font-num);
  letter-spacing: .3em;
  font-size: 11px;
  color: var(--yellow);
  margin-bottom: 6px;
}

.login-card h2 {
  margin: 0 0 26px;
  font-size: 26px;
  letter-spacing: .02em;
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 12px;
  letter-spacing: .16em;
  color: #c8d4ff;
  margin-bottom: 8px;
  font-family: var(--font-num);
}

.field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  background: #fff;
  border: 2px solid var(--black);
  border-radius: 4px;
  font-size: 15px;
  color: var(--black);
  outline: none;
  transition: box-shadow .15s;
}

.field input:focus {
  box-shadow: 0 0 0 4px rgba(255, 224, 58, .55);
}

.btn-login {
  width: 100%;
  height: 52px;
  margin-top: 8px;
  background: var(--yellow);
  color: var(--black);
  border: 2px solid var(--black);
  border-radius: 4px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .22em;
  box-shadow: 5px 5px 0 rgba(0,0,0,.55);
  transition: transform .12s, box-shadow .12s;
}

.btn-login:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 rgba(0,0,0,.6); }
.btn-login:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 rgba(0,0,0,.55); }

.login-error {
  min-height: 20px;
  margin-top: 12px;
  font-size: 13px;
  color: #FFD2D2;
  letter-spacing: .02em;
}

.login-hint {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed rgba(255,255,255,.28);
  font-size: 11.5px;
  line-height: 1.9;
  color: #a9bbff;
  letter-spacing: .03em;
}
.login-hint b { color: var(--yellow); font-weight: 600; }

/* ============ 2. 背景视频 ============ */
#bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #08172B;
}
#bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#bg .veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(8,23,43,.06), rgba(8,23,43,.52) 78%),
    linear-gradient(180deg, rgba(8,23,43,.28), rgba(8,23,43,.18) 40%, rgba(8,23,43,.5));
}

/* ============ 3. 开幕动画 ============ */
.opening {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #000;
  overflow: hidden;
}
.opening[hidden] { display: none; }

.opening video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.opening .greet {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  z-index: 2;
  padding: 30px 64px;
  animation: greetOut 1.2s ease forwards 3.2s;
}
.opening .greet::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(58% 68% at 50% 50%, rgba(0,0,0,.5), rgba(0,0,0,0) 76%);
  z-index: -1;
}
.opening .greet h1 {
  margin: 0 0 8px;
  font-size: 54px;
  letter-spacing: .06em;
  color: #fff;
  text-shadow:
    3px 0 0 #000, -3px 0 0 #000, 0 3px 0 #000, 0 -3px 0 #000,
    3px 3px 0 #000, -3px 3px 0 #000, 3px -3px 0 #000, -3px -3px 0 #000,
    0 10px 30px rgba(0,0,0,.55);
}
.opening .greet p {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .4em;
  color: var(--yellow);
  text-shadow:
    2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000,
    2px 2px 0 #000, -2px 2px 0 #000, 2px -2px 0 #000, -2px -2px 0 #000;
}
@keyframes greetOut {
  to { opacity: 0; transform: translate(-50%, -50%) scale(1.06); }
}

.opening .skip {
  position: absolute;
  right: 26px;
  top: 22px;
  z-index: 5;
  background: rgba(0,0,0,.4);
  color: #fff;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 100px;
  padding: 7px 16px;
  font-size: 12px;
  letter-spacing: .16em;
}
.opening .skip:hover { background: var(--yellow); color: #000; border-color: #000; }

.opening.closing { animation: opFade .45s ease forwards; }
@keyframes opFade { to { opacity: 0; } }

/* ============ 4. 应用外壳 ============ */
.app {
  position: relative;
  z-index: 2;
  height: 100vh;
  display: flex;
  padding: 22px 30px 26px;
}
.app[hidden] { display: none; }

.win {
  width: min(1320px, 100%);
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* 时钟条 */
.clockbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0 2px;
  flex: 0 0 auto;
}

.clockmeta {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
}
.clockmeta .cm {
  text-align: right;
  line-height: 1.5;
}
.clockmeta .cm-date {
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: .18em;
  color: rgba(255,255,255,.82);
}
.clockmeta .cm-user {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  letter-spacing: .06em;
}
.clockmeta .cm-role {
  font-size: 10px;
  letter-spacing: .2em;
  color: var(--yellow);
  font-family: var(--font-num);
}

.btn-logout {
  height: 34px;
  padding: 0 14px;
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.55);
  border-radius: 4px;
  font-size: 12px;
  letter-spacing: .12em;
}
.btn-logout:hover { background: var(--yellow); color: #000; border-color: #000; }

/* 翻页时钟 */
.flipclock {
  display: flex;
  align-items: center;
  gap: 9px;
}
.fc-group { display: flex; gap: 6px; }

.fd {
  position: relative;
  width: 62px;
  height: 88px;
  perspective: 460px;
  font-family: var(--font-num);
  font-size: 66px;
  font-weight: 700;
  line-height: 88px;
  text-align: center;
  user-select: none;
  filter: drop-shadow(0 5px 0 rgba(0,0,0,.45));
}

.fd-half {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  overflow: hidden;
  background: var(--yellow);
  border: 2px solid var(--black);
}
.fd-half span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 88px;
  line-height: 88px;
  text-align: center;
  color: var(--black);
}
.fd-top { top: 0; border-radius: 7px 7px 0 0; border-bottom: 1px solid rgba(0,0,0,.45); }
.fd-top span { top: 0; }
.fd-bottom { bottom: 0; border-radius: 0 0 7px 7px; }
.fd-bottom span { top: -44px; }

.fd-flip-top, .fd-flip-bottom {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  overflow: hidden;
  background: var(--yellow);
  border: 2px solid var(--black);
  opacity: 0;
  backface-visibility: hidden;
}
.fd-flip-top { top: 0; border-radius: 7px 7px 0 0; transform-origin: bottom; z-index: 4; }
.fd-flip-top span { position: absolute; left: 0; width: 100%; height: 88px; line-height: 88px; top: 0; color: var(--black); }
.fd-flip-bottom { bottom: 0; border-radius: 0 0 7px 7px; transform-origin: top; z-index: 3; transform: rotateX(90deg); }
.fd-flip-bottom span { position: absolute; left: 0; width: 100%; height: 88px; line-height: 88px; top: -44px; color: var(--black); }

.fd.flipping .fd-flip-top { opacity: 1; animation: flipTop .42s ease-in forwards; }
.fd.flipping .fd-flip-bottom { opacity: 1; animation: flipBottom .42s ease-out forwards; }
@keyframes flipTop {
  from { transform: rotateX(0); }
  to   { transform: rotateX(-90deg); }
}
@keyframes flipBottom {
  from { transform: rotateX(90deg); }
  to   { transform: rotateX(0); }
}

.fc-colon {
  font-family: var(--font-num);
  font-size: 58px;
  font-weight: 700;
  color: var(--yellow);
  text-shadow: 0 4px 0 rgba(0,0,0,.5), 0 0 2px #000;
  margin: 0 2px 8px;
  animation: colonBlink 1s steps(1) infinite;
}
@keyframes colonBlink { 50% { opacity: .28; } }

/* 主舞台 */
.stage {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 16px;
}

/* 侧导航 */
.sidenav {
  flex: 0 0 216px;
  width: 216px;
  background: var(--klein);
  border: var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 16px 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}
.sidenav::after {
  content: "";
  position: absolute;
  right: -46px;
  bottom: -46px;
  width: 120px;
  height: 120px;
  background: var(--sky);
  opacity: .35;
  transform: rotate(45deg);
}

.sn-brand {
  padding: 2px 6px 14px;
  border-bottom: 1px solid rgba(255,255,255,.22);
  margin-bottom: 6px;
}
.sn-brand .snb-cn { color: #fff; font-weight: 800; font-size: 15px; letter-spacing: .08em; }
.sn-brand .snb-en {
  font-family: var(--font-num);
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--yellow);
  margin-top: 3px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 12px;
  background: transparent;
  color: #e8eeff;
  border: 2px solid transparent;
  border-radius: 4px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-align: left;
  transition: background .15s, transform .12s;
  z-index: 1;
}
.nav-item .ni-idx {
  font-family: var(--font-num);
  font-size: 10.5px;
  letter-spacing: .06em;
  color: rgba(255,255,255,.55);
  width: 20px;
  flex: 0 0 20px;
}
.nav-item:hover { background: rgba(255,255,255,.13); }
.nav-item.active {
  background: var(--yellow);
  color: var(--black);
  border-color: var(--black);
  box-shadow: 3px 3px 0 rgba(0,0,0,.6);
  transform: translate(-1px, -1px);
}
.nav-item.active .ni-idx { color: var(--klein); }

/* 内容面板 */
.panel {
  flex: 1;
  min-width: 0;
  background: var(--white);
  border: var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.panel-inner {
  flex: 1;
  overflow: auto;
  padding: 22px 24px 26px;
}

/* 页头 */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--black);
  position: relative;
}
.page-head::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 96px;
  height: 6px;
  background: var(--yellow);
}
.ph-en {
  font-family: var(--font-num);
  font-size: 10.5px;
  letter-spacing: .32em;
  color: var(--klein);
  margin-bottom: 4px;
}
.ph-cn {
  margin: 0;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: .01em;
}
.ph-right { display: flex; align-items: center; gap: 8px; }

/* 通用按钮 */
.btn {
  height: 38px;
  padding: 0 16px;
  border: 2px solid var(--black);
  border-radius: 4px;
  background: #fff;
  color: var(--black);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.btn:hover { background: #f2f5fa; transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--black); }
.btn:active { transform: translate(1px, 1px); box-shadow: none; }
.btn-primary { background: var(--klein); color: #fff; }
.btn-primary:hover { background: var(--klein-deep); }
.btn-yellow { background: var(--yellow); }
.btn-yellow:hover { background: #ffd400; }
.btn-ghost { background: transparent; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ============ 5. 主界面 ============ */
.home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.date-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.date-chip {
  font-family: var(--font-num);
  font-size: 13px;
  letter-spacing: .1em;
  background: var(--klein);
  color: #fff;
  border: 2px solid var(--black);
  border-radius: 4px;
  padding: 7px 14px;
}
.icon-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 2px solid var(--black);
  border-radius: 4px;
  background: #fff;
  font-family: var(--font-num);
  font-weight: 700;
  transition: background .12s;
}
.icon-btn:hover { background: var(--yellow); }
.icon-btn svg { width: 16px; height: 16px; display: block; }

.home-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.quick-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.quick-btn {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  border: 2px solid var(--black);
  border-radius: 5px;
  background: #fff;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  box-shadow: var(--shadow-sm);
  transition: transform .12s, box-shadow .12s, background .12s;
}
.quick-btn span {
  font-family: var(--font-num);
  font-size: 9px;
  letter-spacing: .24em;
  color: var(--klein);
}
.quick-btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--black); background: #fffdf2; }

.blk {
  border: 2px solid var(--black);
  border-radius: 5px;
  background: #fff;
  overflow: hidden;
}
.blk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--paper);
  border-bottom: 2px solid var(--black);
}
.blk-head h3 { margin: 0; font-size: 14px; letter-spacing: .06em; }
.blk-head .bh-en { font-family: var(--font-num); font-size: 9.5px; letter-spacing: .26em; color: var(--klein); }
.blk-body { padding: 14px; min-height: 288px; }

.note-text {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.85;
  font-size: 14px;
  color: #1f2937;
  word-break: break-word;
}
.note-empty { color: #9aa3af; font-size: 13.5px; line-height: 1.9; }

.task-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.task-item {
  border: 2px solid var(--black);
  border-left: 8px solid var(--yellow);
  border-radius: 4px;
  padding: 9px 12px;
  background: #fff;
}
.task-item .ti-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.task-item .ti-name { font-size: 14px; font-weight: 700; }
.task-item .ti-sub {
  font-family: var(--font-num);
  font-size: 10px; letter-spacing: .16em; color: var(--klein);
}
.task-item .ti-range { font-size: 11.5px; color: #6b7280; margin-top: 4px; letter-spacing: .04em; }

/* ============ 6. 学习诊断 ============ */
.diag-card {
  border: 2px solid var(--black);
  border-radius: 5px;
  background: #fff;
  padding: 20px 22px;
}
.radar-wrap { display: flex; justify-content: center; padding: 6px 0 2px; }
.radar-wrap svg { width: 100%; max-width: 460px; height: auto; }

.score-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 6px;
}
.score-pill {
  border: 2px solid var(--black);
  border-radius: 4px;
  padding: 9px 10px;
  text-align: center;
  background: var(--paper);
}
.score-pill .sp-k { font-size: 11px; color: #6b7280; letter-spacing: .1em; }
.score-pill .sp-v {
  font-family: var(--font-num);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}
.score-pill .sp-v small { font-size: 11px; color: #9aa3af; font-weight: 400; }

.advice-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.advice-item {
  display: flex;
  gap: 12px;
  border: 2px solid var(--black);
  border-radius: 4px;
  padding: 11px 14px;
  background: #fff;
}
.advice-item .ai-tag {
  flex: 0 0 auto;
  align-self: flex-start;
  font-family: var(--font-num);
  font-size: 10px;
  letter-spacing: .14em;
  padding: 3px 8px;
  border: 2px solid var(--black);
  border-radius: 3px;
  background: var(--yellow);
}
.advice-item p { margin: 0; font-size: 13.5px; line-height: 1.8; color: #1f2937; }

/* ============ 7. 科目 / 书目 ============ */
.subject-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.subject-card {
  position: relative;
  border: var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  padding: 20px 20px 18px;
  min-height: 152px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  background: #fff;
  overflow: hidden;
  transition: transform .14s, box-shadow .14s;
}
.subject-card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--black); }
.subject-card .sc-bar {
  position: absolute;
  left: 0; top: 0;
  width: 8px; height: 100%;
  background: var(--c, var(--klein));
  border-right: 2px solid var(--black);
}
.subject-card .sc-en {
  font-family: var(--font-num);
  font-size: 10.5px;
  letter-spacing: .3em;
  color: var(--c, var(--klein));
  margin-left: 10px;
}
.subject-card .sc-cn {
  display: block;
  font-size: 27px;
  font-weight: 800;
  margin: 6px 0 8px;
  margin-left: 10px;
}
.subject-card .sc-go {
  margin-left: 10px;
  font-size: 12px;
  letter-spacing: .12em;
  color: #6b7280;
}
.subject-card .sc-badge {
  position: absolute;
  right: 14px; bottom: 14px;
  font-family: var(--font-num);
  font-size: 40px;
  font-weight: 700;
  color: var(--c, var(--klein));
  opacity: .16;
  line-height: 1;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.book-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: transform .14s, box-shadow .14s, background .14s;
}
.book-card:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--black); background: #fffdf2; }
.book-card .bk-icon { flex: 0 0 46px; width: 46px; height: 46px; }
.book-card .bk-meta { min-width: 0; }
.book-card .bk-name { font-size: 15.5px; font-weight: 700; letter-spacing: .02em; }
.book-card .bk-en {
  font-family: var(--font-num);
  font-size: 9.5px;
  letter-spacing: .2em;
  color: #6b7280;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.book-card .bk-state {
  font-size: 11px;
  color: var(--klein);
  margin-top: 5px;
  letter-spacing: .04em;
}

.crumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: #6b7280; margin-bottom: 14px;
  letter-spacing: .04em;
}
.crumb b { color: var(--black); }

/* ============ 8. 播放器 ============ */
.player-block {
  border: 2px solid var(--black);
  border-radius: 6px;
  overflow: hidden;
  background: #0b0f19;
  box-shadow: var(--shadow-sm);
}
.player-block video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  max-height: 44vh;
  background: #000;
  object-fit: contain;
}
.player-ctrl {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: #0b0f19;
  border-top: 2px solid var(--black);
}
.pc-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 2px solid rgba(255,255,255,.35);
  border-radius: 4px;
  background: transparent;
  color: #fff;
  transition: background .12s, border-color .12s;
}
.pc-btn:hover { background: var(--yellow); color: #000; border-color: #000; }
.pc-btn svg { width: 15px; height: 15px; fill: currentColor; }

.pc-seek {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,.18);
  border-radius: 100px;
  position: relative;
  cursor: pointer;
  touch-action: none;
}
.pc-seek::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: -9px; bottom: -9px;
  z-index: 0;
}
.pc-seek .pc-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--yellow);
  border-radius: 100px;
}
.pc-seek .pc-dot {
  position: absolute;
  top: 50%;
  width: 14px; height: 14px;
  background: #fff;
  border: 2px solid #000;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  left: 0;
  z-index: 1;
}

/* 进度条上的时间标签（打点） */
.pc-seek .pc-marks {
  position: absolute;
  inset: 0;
  z-index: 3;
}
.pc-mark {
  position: absolute;
  top: 50%;
  width: 5px;
  height: 15px;
  transform: translate(-50%, -50%);
  background: var(--sky);
  border: 1.5px solid #000;
  border-radius: 2px;
  cursor: pointer;
  transition: transform .12s, background .12s;
}
.pc-mark.t { background: var(--yellow); height: 19px; }
.pc-mark:hover { transform: translate(-50%, -50%) scale(1.35); background: #fff; }
.pc-time {
  font-family: var(--font-num);
  font-size: 11.5px;
  color: #d7deea;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.player-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.player-title h3 { margin: 0; font-size: 19px; font-weight: 800; }
.player-title .pt-en { font-family: var(--font-num); font-size: 10px; letter-spacing: .24em; color: var(--klein); }

/* 播放页专属：左播放器 + 右讨论区，一屏装下 */
.panel-inner.panel-player {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.play-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(318px, .86fr);
  gap: 16px;
}
.play-left { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.panel-player .player-block { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.panel-player .player-block video {
  flex: 1;
  min-height: 0;
  aspect-ratio: auto;
  max-height: none;
}
.panel-player .player-ctrl { flex: 0 0 auto; }
.panel-player .cm-card { margin-top: 0; display: flex; flex-direction: column; min-height: 0; }
.panel-player .cm-list { flex: 1; min-height: 0; max-height: none; }
.panel-player .cm-compose { flex: 0 0 auto; }
.panel-player .footer-action { margin-top: 14px; }

@media (max-width: 1180px) {
  .panel-inner.panel-player { display: block; overflow: auto; }
  .play-grid { display: block; }
  .panel-player .player-block { display: block; }
  .panel-player .player-block video { flex: none; aspect-ratio: 16 / 9; max-height: 40vh; }
  .panel-player .cm-card { margin-top: 16px; }
  .panel-player .cm-list { max-height: 260px; }
}

/* 课程讨论区（三个账号共享） */
.cm-card {
  margin-top: 16px;
  border: 2px solid var(--black);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.cm-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 14px;
  background: var(--klein);
  color: #fff;
  border-bottom: 2px solid var(--black);
}
.cm-head h4 { margin: 0; font-size: 14px; letter-spacing: .08em; }
.cm-head-r { display: flex; align-items: center; gap: 10px; }
.cm-head .cm-en { font-family: var(--font-num); font-size: 9px; letter-spacing: .26em; color: var(--yellow); }
.cm-count {
  font-family: var(--font-num);
  font-size: 10px;
  letter-spacing: .08em;
  padding: 2px 9px;
  border: 1.5px solid rgba(255,255,255,.5);
  border-radius: 100px;
}

.cm-list {
  max-height: 268px;
  overflow: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  background: #fff;
}
.cm-empty { font-size: 13px; color: #9aa3af; text-align: center; padding: 16px 0; }

.cm-item { display: flex; gap: 10px; }
.cm-ava {
  width: 30px; height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  background: var(--sky);
  color: #06263c;
  border: 2px solid var(--black);
}
.cm-item.is-teacher .cm-ava { background: var(--yellow); }
.cm-main { flex: 1; min-width: 0; }
.cm-meta { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.cm-meta b { font-size: 12.5px; }
.cm-meta time {
  margin-left: auto;
  font-family: var(--font-num);
  font-size: 10px;
  color: #a2aab6;
  letter-spacing: .06em;
}
.cm-badge {
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 100px;
  background: var(--paper);
  border: 1px solid #cfd6e0;
  color: #5b6472;
  letter-spacing: .06em;
}
.cm-badge.t { background: var(--yellow); border-color: var(--black); color: #000; font-weight: 700; }

.cm-text {
  font-size: 13.5px;
  line-height: 1.72;
  color: #1b2430;
  word-break: break-word;
}
.cm-time {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 1px 7px;
  margin-right: 8px;
  border-radius: 3px;
  background: var(--yellow);
  border: 1.5px solid var(--black);
  color: #000;
  cursor: pointer;
  vertical-align: 1px;
  transition: background .12s, color .12s;
}
.cm-time:hover { background: #000; color: var(--yellow); }

.cm-compose {
  border-top: 2px solid var(--black);
  background: var(--paper);
  padding: 11px 14px 13px;
}
.cm-me { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12.5px; }
.cm-me .cm-ava { width: 26px; height: 26px; flex-basis: 26px; font-size: 12px; }
.cm-compose textarea {
  width: 100%;
  min-height: 62px;
  resize: vertical;
  border: 2px solid var(--black);
  border-radius: 4px;
  padding: 9px 11px;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.7;
  outline: none;
  background: #fff;
}
.cm-compose textarea:focus { box-shadow: 0 0 0 4px rgba(255,224,58,.5); }
.cm-actions { display: flex; align-items: center; gap: 10px; margin-top: 9px; flex-wrap: wrap; }
.cm-tip { font-size: 11px; color: #8d96a3; letter-spacing: .02em; }
.cm-actions .btn svg { width: 13px; height: 13px; fill: currentColor; }
.btn-tag { background: #fff; padding: 0 12px; }
.btn-tag svg { fill: var(--klein); }
.btn-tag:hover { background: var(--yellow); }
.btn-send { margin-left: auto; }

.footer-action {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============ 9. 题目 ============ */
.q-card {
  border: 2px solid var(--black);
  border-radius: 6px;
  background: #fff;
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
}
.q-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.q-idx {
  font-family: var(--font-num);
  font-size: 11px;
  letter-spacing: .2em;
  background: var(--klein);
  color: #fff;
  padding: 4px 10px;
  border-radius: 3px;
}
.q-type { font-size: 11.5px; color: #6b7280; letter-spacing: .1em; }
.q-text { font-size: 16.5px; line-height: 1.8; margin: 0 0 18px; font-weight: 600; }

.opt-list { display: flex; flex-direction: column; gap: 10px; }
.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid var(--black);
  border-radius: 5px;
  padding: 12px 14px;
  background: #fff;
  text-align: left;
  font-size: 14.5px;
  transition: background .12s, transform .1s;
}
.opt:hover { background: #f4f7fc; }
.opt .ok-key {
  flex: 0 0 26px;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border: 2px solid var(--black);
  border-radius: 3px;
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 700;
  background: var(--paper);
}
.opt.sel { background: #fff8d6; box-shadow: 3px 3px 0 var(--black); }
.opt.sel .ok-key { background: var(--yellow); }
.opt.correct { background: #e6f7ee; }
.opt.correct .ok-key { background: #1E9E75; color: #fff; border-color: #0d5b43; }
.opt.wrong { background: #fdecec; }
.opt.wrong .ok-key { background: #D64545; color: #fff; border-color: #7a1f1f; }
.opt[disabled] { cursor: default; }
.opt[disabled]:hover { background: inherit; }

.q-foot { display: flex; align-items: center; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.q-feedback { font-size: 14px; font-weight: 700; letter-spacing: .04em; }
.q-feedback.ok { color: #0d7a52; }
.q-feedback.no { color: #b32d2d; }

.exam-item { margin-bottom: 18px; }
.exam-item:last-child { margin-bottom: 0; }

.result-card {
  border: 2px solid var(--black);
  border-radius: 6px;
  background: var(--klein);
  color: #fff;
  padding: 34px 28px;
  text-align: center;
  box-shadow: var(--shadow);
}
.result-card .rc-en { font-family: var(--font-num); font-size: 10.5px; letter-spacing: .34em; color: var(--yellow); }
.result-card .rc-score {
  font-family: var(--font-num);
  font-size: 76px;
  font-weight: 700;
  line-height: 1.1;
  margin: 8px 0 2px;
  color: var(--yellow);
}
.result-card .rc-score small { font-size: 22px; color: #fff; }
.result-card .rc-desc { font-size: 14px; color: #cfd9ff; letter-spacing: .04em; }
.result-card .rc-actions { margin-top: 20px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

.exam-locked {
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px; color: #6b7280; margin-top: 8px;
}

/* ============ 10. 日历 ============ */
.cal-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }

.cal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.cal-title { font-size: 19px; font-weight: 800; letter-spacing: .04em; }
.cal-title small { font-family: var(--font-num); font-size: 10px; letter-spacing: .26em; color: var(--klein); display: block; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-dow {
  text-align: center;
  font-family: var(--font-num);
  font-size: 10.5px;
  letter-spacing: .12em;
  color: #6b7280;
  padding: 4px 0 6px;
}
.cal-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 2px solid #e2e8f0;
  border-radius: 4px;
  background: #fff;
  padding: 5px 6px;
  text-align: left;
  font-family: var(--font-num);
  font-size: 13px;
  transition: border-color .12s, background .12s, transform .1s;
  overflow: hidden;
}
.cal-cell:hover { border-color: var(--black); transform: translateY(-1px); }
.cal-cell.blank { border: 2px dashed #eef2f7; background: transparent; cursor: default; }
.cal-cell.blank:hover { transform: none; border-color: #eef2f7; }
.cal-cell.today { border-color: var(--klein); }
.cal-cell.today .cc-num { color: var(--klein); }
.cal-cell.sel { background: #fff8d6; border-color: var(--black); box-shadow: 3px 3px 0 var(--black); }
.cal-cell.in-range { background: #eef4ff; border-color: var(--klein); }
.cal-cell .cc-num { font-size: 13px; font-weight: 700; }
.cal-cell .cc-dot {
  position: absolute;
  right: 6px; top: 6px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--sky);
}
.cal-cell .cc-task {
  position: absolute;
  left: 5px; bottom: 5px;
  right: 5px;
  font-family: var(--font);
  font-size: 9.5px;
  line-height: 1.3;
  color: #fff;
  background: var(--klein);
  border-radius: 2px;
  padding: 2px 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-cell .cc-more {
  position: absolute;
  right: 4px; bottom: 4px;
  font-size: 9px;
  color: #fff;
  background: var(--yellow);
  color: #000;
  border-radius: 2px;
  padding: 0 3px;
}

.day-editor {
  border: 2px solid var(--black);
  border-radius: 6px;
  background: #fff;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
}
.day-editor .de-date {
  font-family: var(--font-num);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--klein);
  margin-bottom: 10px;
}
.day-editor textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border: 2px solid var(--black);
  border-radius: 4px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.8;
  outline: none;
}
.day-editor textarea:focus { box-shadow: 0 0 0 4px rgba(255,224,58,.5); }
.de-tasks { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.de-task {
  border: 2px solid var(--black);
  border-left: 6px solid var(--yellow);
  border-radius: 3px;
  padding: 7px 10px;
  font-size: 12.5px;
  line-height: 1.6;
}
.de-task b { display: block; font-size: 13px; }

.assign-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid var(--black);
  border-radius: 5px;
  background: var(--yellow);
  padding: 10px 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.assign-bar .ab-tag {
  font-family: var(--font-num);
  font-size: 10px;
  letter-spacing: .2em;
  background: #000;
  color: var(--yellow);
  padding: 3px 8px;
  border-radius: 2px;
}
.assign-bar .ab-text { font-size: 13px; font-weight: 600; }
.assign-bar .ab-actions { margin-left: auto; display: flex; gap: 8px; }

/* ============ 11. 学习导航 ============ */
.nav-group { margin-bottom: 24px; }
.nav-group:last-child { margin-bottom: 0; }
.ng-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.ng-head h3 { margin: 0; font-size: 16px; letter-spacing: .06em; }
.ng-head .ng-en { font-family: var(--font-num); font-size: 9.5px; letter-spacing: .26em; color: var(--klein); }
.ng-head .ng-line { flex: 1; height: 2px; background: var(--black); opacity: .12; }

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}
.link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: var(--line);
  border-radius: 5px;
  background: #fff;
  padding: 13px 14px;
  box-shadow: var(--shadow-sm);
  transition: transform .13s, box-shadow .13s, background .13s;
}
.link-card:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--black); background: #fffdf2; }
.link-card .lk-ic {
  flex: 0 0 38px;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 2px solid var(--black);
  border-radius: 4px;
  background: var(--yellow);
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
}
.link-card .lk-name { font-size: 14.5px; font-weight: 700; }
.link-card .lk-desc { font-size: 11.5px; color: #6b7280; margin-top: 2px; }
.link-card .lk-go { margin-left: auto; font-family: var(--font-num); font-size: 14px; color: var(--klein); }

/* ============ 12. 老师端 ============ */
.stu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.stu-card {
  border: 2px solid var(--black);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.stu-card .sc-top {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--klein);
  color: #fff;
  border-bottom: 2px solid var(--black);
}
.stu-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 2px solid #000;
  background: var(--yellow);
  display: grid; place-items: center;
  font-weight: 800;
  color: #000;
  font-size: 16px;
  flex: 0 0 42px;
}
.stu-card .sc-name { font-size: 16px; font-weight: 800; letter-spacing: .04em; }
.stu-card .sc-uid { font-family: var(--font-num); font-size: 10px; letter-spacing: .18em; color: #b8c7ff; }
.stu-card .sc-body { padding: 14px 16px; }
.stu-section-t { font-size: 11px; letter-spacing: .16em; color: #6b7280; font-family: var(--font-num); margin: 0 0 8px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip {
  font-size: 11.5px;
  border: 2px solid var(--black);
  border-radius: 100px;
  padding: 3px 10px;
  background: var(--paper);
}
.chip.empty { color: #9aa3af; border-style: dashed; background: transparent; }

.score-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.score-table th, .score-table td {
  border: 1px solid #dbe3ee;
  padding: 6px 8px;
  text-align: center;
}
.score-table th {
  background: var(--paper);
  font-family: var(--font-num);
  font-size: 10.5px;
  letter-spacing: .12em;
  color: #4b5563;
  font-weight: 600;
}
.score-table td.sc-v { font-family: var(--font-num); font-weight: 700; }
.score-table td.sc-total { background: #fff8d6; font-weight: 800; }

/* 作业布置 */
.step-block { margin-bottom: 20px; }
.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.step-no {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  background: var(--klein);
  color: #fff;
  border: 2px solid var(--black);
  border-radius: 3px;
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 700;
}
.step-head h3 { margin: 0; font-size: 15px; letter-spacing: .04em; }
.step-head .sh-en { font-family: var(--font-num); font-size: 9px; letter-spacing: .24em; color: #9aa3af; }

.pick-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.pick {
  border: 2px solid var(--black);
  border-radius: 4px;
  background: #fff;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  transition: background .12s, transform .1s, box-shadow .12s;
}
.pick:hover { background: #f4f7fc; }
.pick.on { background: var(--yellow); box-shadow: 3px 3px 0 var(--black); transform: translate(-1px,-1px); }
.pick small { display: block; font-family: var(--font-num); font-size: 9px; letter-spacing: .18em; color: #6b7280; margin-top: 2px; }
.pick.on small { color: var(--klein); }

.assign-summary {
  border: 2px dashed var(--black);
  border-radius: 5px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.9;
  background: var(--paper);
}
.assign-summary b { color: var(--klein); }

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 48px 20px;
  color: #9aa3af;
  text-align: center;
}
.empty-state .es-mark {
  font-family: var(--font-num);
  font-size: 40px;
  font-weight: 700;
  color: #dbe3ee;
  letter-spacing: .1em;
}
.empty-state p { margin: 0; font-size: 13px; }

/* 轻提示 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(20px);
  background: var(--black);
  color: #fff;
  font-size: 13px;
  letter-spacing: .06em;
  padding: 10px 20px;
  border-radius: 100px;
  border: 2px solid var(--yellow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 响应式 */
@media (max-width: 1100px) {
  .login-wrap { grid-template-columns: 1fr; gap: 34px; max-width: 480px; }
  .login-brand h1 { font-size: 40px; }
  .home-cols { grid-template-columns: 1fr; }
  .cal-wrap { grid-template-columns: 1fr; }
  .day-editor { position: static; }
  .stu-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { padding: 12px; }
  .stage { flex-direction: column; }
  .sidenav {
    flex: 0 0 auto;
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    padding: 10px;
    gap: 6px;
  }
  .sn-brand { display: none; }
  .nav-item { width: auto; white-space: nowrap; padding: 9px 12px; }
  .nav-item .ni-idx { display: none; }
  .subject-grid { grid-template-columns: 1fr; }
  .score-row { grid-template-columns: repeat(2, 1fr); }
  .fd { width: 44px; height: 64px; font-size: 46px; line-height: 64px; }
  .fd-half span { height: 64px; line-height: 64px; }
  .fd-bottom span, .fd-flip-bottom span { top: -32px; }
  .fd-flip-top span { height: 64px; line-height: 64px; }
  .fc-colon { font-size: 38px; }
  .clockmeta { position: static; transform: none; }
  .clockbar { flex-wrap: wrap; gap: 10px; }
}
