:root {
  --green: #3db87a;
  --green-dark: #2fa066;
  --green-soft: #e8f7ef;
  --green-header: #5fbf8a;
  --mint: #d8efe4;
  --mint-deep: #c5e6d6;
  --text: #222;
  --text-secondary: #666;
  --text-muted: #999;
  --border: #e8e8e8;
  --bg: #f5f7f6;
  --white: #fff;
  --status-todo: #e6a23c;
  --status-todo-bg: #fdf6ec;
  --status-doing: #409eff;
  --status-doing-bg: #ecf5ff;
  --status-done: #3db87a;
  --status-done-bg: #e8f7ef;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  --tablet-w: 1024px;
  --tablet-h: 768px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  color: var(--text);
  background: #1e2328;
  min-height: 100vh;
  overflow: hidden;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ========== Tablet device stage ========== */
.device-stage {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  background:
    radial-gradient(ellipse at 50% 0%, #3a424a 0%, transparent 55%),
    #1e2328;
}

.device-frame {
  width: var(--tablet-w);
  height: var(--tablet-h);
  flex-shrink: 0;
  transform-origin: center center;
  position: relative;
}

.device-bezel {
  width: 100%;
  height: 100%;
  border-radius: 22px;
  background: #0f1215;
  padding: 14px 14px 18px;
  box-shadow:
    0 0 0 2px #3a4148,
    0 24px 60px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.device-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #9aa3ab;
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 0 6px 8px;
  flex-shrink: 0;
}

/* ========== Shell ========== */
.shell {
  width: 100%;
  flex: 1;
  min-height: 0;
  background: var(--mint);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.view {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

.view.active {
  display: flex;
}

/* ========== Home ========== */
.home {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: linear-gradient(180deg, #d9f0e5 0%, #cfead9 40%, #c6e4d2 100%);
  padding: 10px 14px 12px;
  overflow: hidden;
}

.home-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-bottom: 10px;
}

.home-brand {
  grid-column: 2;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: #1f6b45;
  letter-spacing: 0.06em;
}

.home-actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  gap: 8px;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: #2d6b4a;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(45, 107, 74, 0.08);
}

.pill-btn:hover {
  background: var(--white);
}

.subjects {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 14px;
}

.subject {
  position: relative;
  padding: 6px 2px 10px;
  font-size: 15px;
  color: #4a7a60;
}

.subject.active {
  color: #1f6b45;
  font-weight: 700;
}

.subject.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--green);
}

.home-body {
  flex: 1;
  display: grid;
  grid-template-columns: 72px 1fr 260px;
  gap: 14px;
  min-height: 0;
}

/* Left nav */
.side-nav {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  padding: 18px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow);
  align-self: start;
}

.side-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #7a9085;
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
  padding: 4px 2px;
}

.side-item .icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef5f1;
  color: #7a9085;
}

.side-item.active {
  color: var(--green-dark);
  font-weight: 600;
}

.side-item.active .icon {
  background: var(--green-soft);
  color: var(--green);
}

.side-item svg {
  width: 20px;
  height: 20px;
}

/* Knowledge map */
.map-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  padding: 14px 16px 12px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

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

.map-head .book {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-head .book svg {
  width: 16px;
  height: 16px;
}

.map-subject {
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

/* 章节/小节树形下拉（参考样式） */
.catalog-picker {
  position: relative;
  flex: 1;
  min-width: 0;
  margin-left: 6px;
}

.catalog-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 8px 4px 4px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  transition: background 0.15s ease;
}

.catalog-trigger:hover,
.catalog-picker.open .catalog-trigger {
  background: rgba(61, 184, 122, 0.08);
}

.catalog-trigger span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-caret {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: #666;
  transition: transform 0.15s ease;
}

.catalog-picker.open .catalog-caret {
  transform: rotate(180deg);
}

.catalog-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: min(320px, 72vw);
  max-height: 320px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e6ebe8;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 6px 0;
  z-index: 20;
}

.catalog-group + .catalog-group {
  margin-top: 2px;
}

.catalog-row {
  width: 100%;
  display: flex;
  align-items: center;
  text-align: left;
  font-size: 14px;
  color: #333;
  background: transparent;
  border: none;
  cursor: pointer;
}

.catalog-chapter {
  padding: 0 12px 0 8px;
  min-height: 36px;
  font-weight: 700;
}

.catalog-toggle {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  position: relative;
  border: none;
  background: transparent;
  cursor: pointer;
}

.catalog-toggle::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #444;
  transition: transform 0.15s ease;
}

.catalog-group:not(.open) .catalog-toggle::before {
  transform: rotate(-90deg);
  top: 7px;
  left: 8px;
}

.catalog-label {
  flex: 1;
  min-width: 0;
  padding: 8px 4px;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  color: #222;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 2px;
}

.catalog-label:hover,
.catalog-chapter:hover .catalog-label {
  color: #1f8a55;
}

.catalog-children {
  display: none;
}

.catalog-group.open .catalog-children {
  display: block;
}

.catalog-section {
  min-height: 34px;
  padding: 8px 16px 8px 38px;
  font-weight: 400;
  color: #444;
}

.catalog-section:hover {
  background: #f3faf6;
  color: #1f8a55;
}

.catalog-section.active,
.catalog-chapter.active .catalog-label {
  background: #e8f7ef;
  color: #1f8a55;
  font-weight: 600;
}

.catalog-chapter.active {
  background: #e8f7ef;
}

.catalog-chapter.active .catalog-label {
  background: transparent;
}

.map-stage {
  flex: 1;
  position: relative;
  border-radius: 14px;
  background:
    radial-gradient(circle at 20% 30%, rgba(61, 184, 122, 0.06), transparent 28%),
    radial-gradient(circle at 75% 60%, rgba(91, 155, 213, 0.07), transparent 30%),
    linear-gradient(180deg, #f7fbf8, #f2f7f4);
  overflow: hidden;
  margin: 8px 0 12px;
}

.map-stage-tools {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-mastery-filter {
  position: relative;
}

.map-mastery-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #d7e8de;
  color: #5a7468;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(20, 50, 36, 0.06);
}

.map-mastery-trigger svg {
  width: 12px;
  height: 12px;
}

.map-mastery-filter.open .map-mastery-trigger svg {
  transform: rotate(180deg);
}

.map-mastery-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 120px;
  padding: 6px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #d7e8de;
  box-shadow: 0 10px 24px rgba(20, 50, 36, 0.12);
}

.map-mastery-menu button {
  display: block;
  width: 100%;
  height: 30px;
  padding: 0 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #33483d;
  font-size: 12px;
  text-align: left;
}

.map-mastery-menu button:hover,
.map-mastery-menu button.active {
  background: #e8f7ef;
  color: #1f8a55;
}

.map-trace-toggle {
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #d7e8de;
  color: #5a7468;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(20, 50, 36, 0.06);
}

.map-trace-toggle[aria-pressed="true"] {
  background: #e8f7ef;
  border-color: #8fd6b0;
  color: #1f8a55;
  font-weight: 700;
}

.map-stage.show-traceable .node.has-trace {
  box-shadow: 0 0 0 3px rgba(61, 184, 122, 0.55), 0 6px 16px rgba(61, 184, 122, 0.28);
  z-index: 2;
}

.map-stage.show-traceable .node:not(.has-trace):not(.is-filtered-out) {
  opacity: 0.22;
  filter: grayscale(0.35);
  pointer-events: none;
}

.node.is-filtered-out {
  visibility: hidden;
  pointer-events: none;
}

.node.is-selected {
  z-index: 3;
}

.map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.node {
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.node:hover {
  transform: translate(-50%, -50%) scale(1.04);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.node.excellent { background: #d8f3e4; color: #1f8a55; border-color: #8fd6b0; }
.node.good { background: #dcecff; color: #2f6fbf; border-color: #9ec4f0; }
.node.average { background: #fff3d6; color: #c4891a; border-color: #f0d08a; }
.node.weak { background: #ffe0e8; color: #c24b6e; border-color: #f0a4b8; }
.node.none { background: #eceff1; color: #7a8690; border-color: #d0d6db; }

.node.center {
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 700;
}

.node-popup {
  position: absolute;
  left: 58%;
  top: 42%;
  width: 180px;
  background: var(--white);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  z-index: 6;
}

.node-popup[hidden] {
  display: none !important;
}

.node-popup .actions .btn-ghost[hidden] {
  display: none !important;
}

.node-popup .name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.node-popup .mastery {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.node-popup .actions {
  display: flex;
  gap: 8px;
}

.node-popup .actions button {
  flex: 1;
  height: 30px;
  border-radius: 8px;
  font-size: 12px;
}

.btn-ghost {
  background: #f3f5f4;
  color: var(--text-secondary);
}

.btn-primary {
  background: var(--green);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--green-dark);
}

.map-footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 12px;
  color: var(--text-secondary);
}

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

.legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.legend .excellent { background: #3db87a; }
.legend .good { background: #5b9bd5; }
.legend .average { background: #e6a23c; }
.legend .weak { background: #e86a8a; }
.legend .none { background: #b0b8bf; }

.recommend-study {
  height: 40px;
  padding: 0 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, #52c98a, #3db87a);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(61, 184, 122, 0.35);
}

.recommend-study:hover {
  filter: brightness(1.03);
}

/* Right panels */
.right-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat-card,
.teacher-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.stat-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
}

.stat-row .left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.stat-row .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.stat-row strong {
  color: var(--text);
  font-size: 15px;
}

.practice-btn {
  height: 44px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #2d6b4a;
}

.practice-btn svg {
  width: 18px;
  height: 18px;
  color: var(--green);
}

.teacher-entries {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.entry {
  border-radius: 12px;
  background: #f4faf7;
  border: 1px solid #e2f0e8;
  padding: 16px 10px;
  text-align: center;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.entry:hover {
  transform: translateY(-2px);
  border-color: #b7e0c8;
}

.entry .entry-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #7ed0a4, #3db87a);
  color: var(--white);
}

.entry .entry-icon.orange {
  background: linear-gradient(160deg, #f0c27a, #e6a23c);
}

.entry .entry-icon svg {
  width: 22px;
  height: 22px;
}

.entry .label {
  font-size: 13px;
  font-weight: 600;
  color: #2d6b4a;
}

.entry .label em {
  font-style: normal;
  color: var(--text-muted);
  margin-left: 2px;
}

/* Course center choice modal — within tablet shell */
.modal-mask {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 180;
  padding: 20px;
}

.modal-mask.show {
  display: flex;
}

.modal {
  width: min(420px, 100%);
  background: var(--white);
  border-radius: 16px;
  padding: 22px 20px 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.modal h3 {
  font-size: 17px;
  margin-bottom: 6px;
}

.modal p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.modal-actions {
  display: grid;
  gap: 10px;
}

.modal-actions button {
  height: 44px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
}

.modal-actions .primary {
  background: var(--green);
  color: var(--white);
}

.modal-actions .secondary {
  background: var(--green-soft);
  color: var(--green-dark);
}

.modal-actions .cancel {
  background: #f3f5f4;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ========== Filter drawer ========== */
.filter-mask {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  display: none;
  justify-content: flex-end;
  z-index: 200;
  overflow: hidden;
}

.filter-mask.show {
  display: flex !important;
}

.filter-panel {
  width: 320px;
  max-width: 78%;
  height: 100%;
  background: var(--white);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  animation: filter-in 0.22s ease;
}

@keyframes filter-in {
  from { transform: translateX(24px); opacity: 0.6; }
  to { transform: translateX(0); opacity: 1; }
}

.filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 10px;
}

.filter-head h3 {
  font-size: 18px;
  font-weight: 700;
}

.filter-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #666;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.filter-close:hover {
  background: #f3f5f4;
}

.filter-close svg {
  width: 18px;
  height: 18px;
}

.filter-body {
  flex: 1;
  padding: 8px 18px 16px;
  overflow-y: auto;
}

.filter-label {
  display: block;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 10px;
}

.filter-select {
  position: relative;
}

.filter-select-trigger {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #dfe5e1;
  border-radius: 8px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text);
}

.filter-select.open .filter-select-trigger {
  border-color: var(--green);
}

.filter-select-trigger svg {
  width: 16px;
  height: 16px;
  color: #999;
  transition: transform 0.15s ease;
}

.filter-select.open .filter-select-trigger svg {
  transform: rotate(180deg);
}

.filter-options {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: var(--white);
  border: 1px solid #e5ebe7;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  z-index: 2;
}

.filter-select.open .filter-options {
  display: block;
}

.filter-option {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text);
}

.filter-option:hover {
  background: #f5faf7;
}

.filter-option.active {
  color: var(--green-dark);
  background: var(--green-soft);
  font-weight: 600;
}

.filter-hint {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
}

.filter-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px 18px 18px;
  border-top: 1px solid #eef2f0;
}

.filter-btn {
  height: 44px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
}

.filter-btn.cancel {
  background: #f3f5f4;
  color: var(--text-secondary);
}

.filter-btn.confirm {
  background: var(--green);
  color: var(--white);
}

.filter-btn.confirm:hover {
  background: var(--green-dark);
}

.resource-card.is-filtered-out,
.paper-item.is-filtered-out,
.exam-card.is-filtered-out {
  display: none !important;
}

/* ========== Featured papers (精选卷) ========== */
.papers-content {
  background: #f3f6f4;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 4px 4px 8px;
}

#papers-header-title {
  max-width: min(520px, 54vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

#papers-tabs-shell[hidden] {
  display: none !important;
}

#papers-chapter-layout {
  padding-top: 16px;
}

.papers-type-panel {
  display: none;
}

.papers-type-panel.active {
  display: block;
}

.exam-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}

.exam-thumb {
  position: relative;
  height: 118px;
  background: linear-gradient(160deg, #e8f6ee 0%, #d4eddf 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.exam-thumb-inner {
  width: 78px;
  height: 92px;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(45, 107, 74, 0.12);
  padding: 12px 10px;
  transform: rotate(-2deg);
}

.exam-sheet {
  display: flex;
  flex-direction: column;
  gap: 7px;
  height: 100%;
}

.sheet-line {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: #d7e8de;
}

.sheet-line.short { width: 55%; }
.sheet-line.mid { width: 72%; }

.exam-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: rgba(61, 184, 122, 0.92);
  border-radius: 4px;
  padding: 3px 7px;
}

.exam-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.exam-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 20px;
}

.exam-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-secondary);
}

.exam-meta > span {
  display: flex;
  align-items: baseline;
  gap: 2px;
  min-width: 0;
}

.result-score {
  font-family: "Segoe Script", "Comic Sans MS", "KaiTi", cursive;
  font-size: 18px;
  font-style: normal;
  font-weight: 700;
  color: #e24b4b;
  line-height: 1;
}

.result-score.empty {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #b0b8bf;
}

.exam-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
}

.exam-btn {
  height: 34px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.exam-btn.ghost {
  background: #fff;
  color: #5b6a62;
  border: 1px solid #e4eae6;
}

.exam-btn.primary {
  background: var(--green);
  color: #fff;
}

.exam-btn.primary:hover {
  background: var(--green-dark);
}

.papers-footer-tip {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding: 18px 8px 8px;
}

/* ========== Course Center (shared with previous) ========== */
.app {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--white);
}

.header {
  background: var(--green-header);
  color: var(--white);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
}

.header-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--white);
  font-size: 15px;
  min-width: 72px;
}

.header-back svg {
  width: 18px;
  height: 18px;
}

.header-title {
  font-size: 17px;
  font-weight: 600;
}

.header-title-chapter {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0;
  max-width: min(560px, 58vw);
  font-size: 15px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-title-chapter .header-title-main {
  font-weight: 600;
}

.header-title-chapter .header-title-sep {
  margin: 0 2px;
  opacity: 0.85;
  font-weight: 500;
}

.header-title-chapter .header-title-unit {
  font-weight: 550;
  opacity: 0.95;
}

.header-action {
  min-width: 72px;
  display: flex;
  justify-content: flex-end;
}

.header-action button {
  color: var(--white);
  padding: 6px;
  display: inline-flex;
}

.header-action svg {
  width: 20px;
  height: 20px;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 56px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  flex-shrink: 0;
}


.tab {
  position: relative;
  padding: 14px 4px 12px;
  font-size: 15px;
  color: var(--text-secondary);
}

.tab.active {
  color: var(--text);
  font-weight: 600;
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: var(--green);
}

.content {
  flex: 1;
  overflow-y: auto;
  background: var(--bg);
  padding: 0 20px 28px;
}

.section-title {
  text-align: center;
  font-size: 15px;
  color: var(--text-secondary);
  padding: 16px 8px 8px;

}

/* Section sync: left resources + right papers */
.content-section {
  display: flex;
  flex-direction: column;
  min-height: 0;
}


.content-section > .panel.active {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.section-split {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: stretch;
  min-height: 0;
  padding-bottom: 8px;
}

.section-main {
  background: var(--white);
  border-radius: 12px;
  padding: 14px 16px 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}


/* 章节 Tab 壳：设计感（波浪/贴纸/主题色）挂在 Tab 区域 */
.chapter-tabs-shell {
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  padding-top: 22px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}

.chapter-tabs-shell .tabs {
  position: relative;
  z-index: 1;
  background: transparent;
  border-bottom: none;
  gap: 36px;
}

.chapter-tabs-shell.theme-sync {
  background: linear-gradient(180deg, #e8f7ef 0%, #ffffff 70%);
}
.chapter-tabs-shell.theme-topic {
  background: linear-gradient(180deg, #eaf3fb 0%, #ffffff 70%);
}
.chapter-tabs-shell.theme-extend {
  background: linear-gradient(180deg, #fff4e5 0%, #ffffff 70%);
}

.chapter-tabs-shell.theme-sync .tab.active {
  color: #1f8a55;
}
.chapter-tabs-shell.theme-sync .tab.active::after {
  background: #3db87a;
}
.chapter-tabs-shell.theme-topic .tab.active {
  color: #2f6fbf;
}
.chapter-tabs-shell.theme-topic .tab.active::after {
  background: #5b9bd5;
}
.chapter-tabs-shell.theme-extend .tab.active {
  color: #c4891a;
}
.chapter-tabs-shell.theme-extend .tab.active::after {
  background: #f0a04b;
}

/* 章节内容区：一个大容器包住标题 + 左右分栏（设计感留在 Tab） */
.chapter-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
  overflow: hidden;
  border-radius: 0;
  border: none;
  box-shadow: none;
  padding: 12px 0 12px;
  background: var(--white);
}

.chapter-stage-head {
  display: none;
}

.chapter-stage-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

/* 栏目标题行：标题 + 辅助文案同处一个渐变容器 */
.lane-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  min-height: 34px;
  flex-shrink: 0;
  padding: 7px 12px 7px 10px;
  border-radius: 10px;
  background: linear-gradient(90deg, #e8f7ef 0%, #f3fbf6 42%, rgba(255, 255, 255, 0) 100%);
  border: 1px solid transparent;
  border-image: none;
}

.lane-label {
  position: relative;
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  color: #1f8a55;
  padding-left: 10px;
}

.lane-label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: #3db87a;
  transform: translateY(-50%);
}

.lane-hint {
  position: relative;
  flex: 0 1 auto;
  max-width: calc(100% - 72px);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  color: #5a7f6a;
  padding: 0 0 0 8px;
  border-radius: 0;
  background: transparent;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lane-hint::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 12px;
  border-radius: 0;
  background: rgba(61, 184, 122, 0.35);
  transform: translateY(-50%);
  box-shadow: none;
}

.lane-head-papers {
  padding-right: 8px;
}

/* 课程/试卷数量都跟在辅助文案后，轻量展示 */
.lane-count {
  flex-shrink: 0;
  margin-left: 2px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-muted);
  background: none;
  padding: 0;
}

.lane-count::before {
  content: "·";
  margin-right: 6px;
  color: rgba(0, 0, 0, 0.22);
}

#chapter-type-split.theme-sync .lane-count { color: #6a8f78; }
#chapter-type-split.theme-topic .lane-count { color: #6a829e; }
#chapter-type-split.theme-extend .lane-count { color: #a07d4a; }

#chapter-type-split.theme-sync .lane-head {
  background: linear-gradient(90deg, #e8f7ef 0%, #f3fbf6 46%, rgba(255, 255, 255, 0) 100%);
}
#chapter-type-split.theme-sync .lane-label {
  color: #1f8a55;
}
#chapter-type-split.theme-sync .lane-label::before {
  background: #3db87a;
}
#chapter-type-split.theme-sync .lane-hint {
  color: #5a7f6a;
  background: transparent;
}
#chapter-type-split.theme-sync .lane-hint::before {
  background: rgba(61, 184, 122, 0.35);
  box-shadow: none;
}

#chapter-type-split.theme-topic .lane-head {
  background: linear-gradient(90deg, #eaf3fb 0%, #f4f8fd 46%, rgba(255, 255, 255, 0) 100%);
}
#chapter-type-split.theme-topic .lane-label {
  color: #2f6fbf;
}
#chapter-type-split.theme-topic .lane-label::before,
#chapter-type-split.theme-topic .lane-hint::before {
  background: #5b9bd5;
}
#chapter-type-split.theme-topic .lane-hint {
  color: #5a7296;
  background: transparent;
}
#chapter-type-split.theme-topic .lane-hint::before {
  background: rgba(91, 155, 213, 0.4);
  box-shadow: none;
}

#chapter-type-split.theme-extend .lane-head {
  background: linear-gradient(90deg, #fff4e5 0%, #fff9f1 46%, rgba(255, 255, 255, 0) 100%);
}
#chapter-type-split.theme-extend .lane-label {
  color: #c4891a;
}
#chapter-type-split.theme-extend .lane-label::before,
#chapter-type-split.theme-extend .lane-hint::before {
  background: #f0a04b;
}
#chapter-type-split.theme-extend .lane-hint {
  color: #9a6b2e;
  background: transparent;
}
#chapter-type-split.theme-extend .lane-hint::before {
  background: rgba(240, 160, 75, 0.45);
  box-shadow: none;
}

/* 左右分栏在同一容器内，用竖线分隔，不再各自成卡 */
.chapter-stage-body.section-split {
  position: relative;
  z-index: 1;
  padding: 0 16px 8px;
  min-height: 0;
  gap: 0;
}

.chapter-stage-body.section-split > .section-papers {
  border-left: 1px solid rgba(0, 0, 0, 0.06);
  padding-left: 16px;
  margin-left: 16px;
}

#chapter-type-split #chapter-course-main,
#chapter-type-split #chapter-papers-card {
  box-shadow: none;
  border: none;
  background: transparent;
  background-image: none;
  border-radius: 0;
  padding-top: 4px;
}

#chapter-type-split #chapter-course-main {
  padding-left: 4px;
  padding-right: 4px;
}

#chapter-type-split #chapter-papers-card {
  overflow: hidden;
  padding: 4px 4px 8px 0;
}

#view-chapter .content.content-section {
  padding: 0;
  background: var(--white);
  overflow: hidden;
}

#view-chapter #chapter-school.panel.active {
  padding: 16px 20px 20px;
  overflow-y: auto;
  background: var(--bg);
}

#chapter-course-main {
  padding-top: 4px;
}

/* 顶部学生向装饰边 */
.student-edge {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 34px;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
}

.student-edge.compact {
  height: 28px;
}

.edge-wave {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 28px;
  display: block;
}

.student-edge.compact .edge-wave {
  height: 24px;
}

.edge-wave .wave-fill {
  fill: #d8f3e4;
  transition: fill 0.2s ease;
}

.chapter-tabs-shell.theme-sync .edge-wave .wave-fill,
.chapter-tabs-shell.theme-sync .edge-wave .wave-fill {
  fill: #d4f0e2;
}

.chapter-tabs-shell.theme-topic .edge-wave .wave-fill,
.chapter-tabs-shell.theme-topic .edge-wave .wave-fill {
  fill: #d7e7f8;
}

.chapter-tabs-shell.theme-extend .edge-wave .wave-fill,
.chapter-tabs-shell.theme-extend .edge-wave .wave-fill {
  fill: #ffe8c8;
}

.edge-stickers {
  position: absolute;
  inset: 0;
}

.sticker {
  position: absolute;
  display: block;
  opacity: 0.92;
}

/* 默认同步课贴纸：书本 / 对勾 / 圆点 */
.sk-1 {
  left: 18px;
  top: 4px;
  width: 16px;
  height: 18px;
  border-radius: 3px;
  background: linear-gradient(160deg, #7ed0a4, #3db87a);
  box-shadow: 2px 2px 0 rgba(31, 138, 85, 0.18);
}
.sk-1::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 5px;
  height: 2px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 4px 0 rgba(255, 255, 255, 0.55);
}

.sk-2 {
  left: 48px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #3db87a;
}
.sk-2::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 1px;
  width: 5px;
  height: 3px;
  border-left: 2px solid #3db87a;
  border-bottom: 2px solid #3db87a;
  transform: rotate(-45deg);
}

.sk-3 {
  right: 92px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8fd6b0;
  box-shadow: 14px 4px 0 #b7e0c8, 28px -1px 0 #6bc995;
}

/* 专题课：星星 / 闪电 */
.chapter-tabs-shell.theme-topic .sk-1,
.chapter-tabs-shell.theme-topic .sk-1 {
  width: 0;
  height: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 12px solid #5b9bd5;
  transform: rotate(-8deg);
}
.chapter-tabs-shell.theme-topic .sk-1::before,
.chapter-tabs-shell.theme-topic .sk-1::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 7px;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 12px solid #5b9bd5;
  width: 0;
  height: 0;
  background: transparent;
  box-shadow: none;
}

.chapter-tabs-shell.theme-topic .sk-2,
.chapter-tabs-shell.theme-topic .sk-2 {
  width: 10px;
  height: 16px;
  border: none;
  border-radius: 0;
  background: #5b9bd5;
  clip-path: polygon(40% 0, 100% 0, 60% 45%, 90% 45%, 20% 100%, 40% 52%, 10% 52%);
  left: 52px;
  top: 5px;
}
.chapter-tabs-shell.theme-topic .sk-2::after,
.chapter-tabs-shell.theme-topic .sk-2::after {
  display: none;
}

.chapter-tabs-shell.theme-topic .sk-3 {
  background: #9ec4f0;
  box-shadow: 14px 4px 0 #c5daf5, 28px -1px 0 #7aaee0;
}

/* 拓展课：小旗 / 火花 */
.chapter-tabs-shell.theme-extend .sk-1,
.chapter-tabs-shell.theme-extend .sk-1 {
  width: 14px;
  height: 16px;
  border-radius: 0 6px 6px 0;
  background: linear-gradient(160deg, #f0c27a, #e6a23c);
  box-shadow: none;
  left: 22px;
}
.chapter-tabs-shell.theme-extend .sk-1::before,
.chapter-tabs-shell.theme-extend .sk-1::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 0;
  bottom: -4px;
  width: 3px;
  height: auto;
  background: #c4891a;
  box-shadow: none;
  border-radius: 1px;
}

.chapter-tabs-shell.theme-extend .sk-2,
.chapter-tabs-shell.theme-extend .sk-2 {
  width: 12px;
  height: 12px;
  border: none;
  border-radius: 2px;
  background: #f0a04b;
  transform: rotate(45deg);
  left: 50px;
  top: 7px;
}
.chapter-tabs-shell.theme-extend .sk-2::after,
.chapter-tabs-shell.theme-extend .sk-2::after {
  display: none;
}

.chapter-tabs-shell.theme-extend .sk-3 {
  background: #f5c98a;
  box-shadow: 14px 4px 0 #ffe0b0, 28px -1px 0 #e6a23c;
}

.edge-chip {
  position: absolute;
  right: 10px;
  top: 2px;
  height: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-family: "Segoe Script", "Lucida Handwriting", "KaiTi", "STKaiti", cursive;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.08em;
  color: rgba(31, 138, 85, 0.38);
  white-space: nowrap;
  transform: rotate(-6deg);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.edge-chip::before {
  content: "稳扎稳打";
}

.chapter-tabs-shell.theme-topic .edge-chip,
.chapter-tabs-shell.theme-topic .edge-chip {
  color: rgba(47, 111, 191, 0.4);
  border: none;
  box-shadow: none;
  transform: rotate(-5deg);
}
.chapter-tabs-shell.theme-topic .edge-chip::before,
.chapter-tabs-shell.theme-topic .edge-chip::before {
  content: "重点冲刺";
}

.chapter-tabs-shell.theme-extend .edge-chip,
.chapter-tabs-shell.theme-extend .edge-chip {
  color: rgba(196, 137, 26, 0.42);
  border: none;
  box-shadow: none;
  transform: rotate(-7deg);
}
.chapter-tabs-shell.theme-extend .edge-chip::before,
.chapter-tabs-shell.theme-extend .edge-chip::before {
  content: "挑战一下";
}

.edge-chip.paper-chip {
  right: 8px;
  top: 3px;
  font-size: 14px;
  transform: rotate(-5deg);
}

#chapter-papers-card {
  position: relative;
  padding-top: 34px;
  overflow: visible;
}

#chapter-papers-card .edge-chip {
  right: 8px;
  top: 3px;
  font-size: 14px;
}

#chapter-type-split.theme-sync .source-tab.active {
  background: #e8f7ef;
  color: #1f8a55;
}
#chapter-type-split.theme-sync .source-tab.active em {
  background: #3db87a;
}

#chapter-type-split.theme-topic .source-tab.active {
  background: #eaf3fb;
  color: #2f6fbf;
}
#chapter-type-split.theme-topic .source-tab.active em {
  background: #5b9bd5;
}

#chapter-type-split.theme-extend .source-tab.active {
  background: #fff4e5;
  color: #c4891a;
}
#chapter-type-split.theme-extend .source-tab.active em {
  background: #f0a04b;
}

#chapter-type-split.theme-sync .resource-thumb:not(.type-video):not(.type-ppt) {
  background: linear-gradient(145deg, #6bc995 0%, #3aa870 55%, #2d9a64 100%);
}

#chapter-type-split.theme-topic .resource-thumb:not(.type-video):not(.type-ppt) {
  background: linear-gradient(145deg, #7aaee0 0%, #5b9bd5 55%, #3f7fbe 100%);
}

#chapter-type-split.theme-extend .resource-thumb:not(.type-video):not(.type-ppt) {
  background: linear-gradient(145deg, #f0b35a 0%, #e89a2f 50%, #d4841f 100%);
}

#chapter-course-main .resource-card {
  border-radius: 10px;
  padding: 8px;
  border: 1px solid #e2ebe6;
  background: #fbfcfb;
  box-shadow: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

#chapter-type-split.theme-sync .resource-card {
  border-color: #d4ecde;
  background: #fbfdfc;
}
#chapter-type-split.theme-topic .resource-card {
  border-color: #d5e4f4;
  background: #fbfdfe;
}
#chapter-type-split.theme-extend .resource-card {
  border-color: #f0e0c8;
  background: #fffcf8;
}

#chapter-type-split.theme-sync .resource-card:hover,
#chapter-type-split.theme-topic .resource-card:hover,
#chapter-type-split.theme-extend .resource-card:hover {
  box-shadow: none;
}

.source-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.source-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f3f6f4;
  color: var(--text-secondary);
  font-size: 13px;
  transition: background 0.15s ease, color 0.15s ease;
}

.source-tab em {
  font-style: normal;
  font-size: 11px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.source-tab.active {
  background: var(--green-soft);
  color: var(--green-dark);
  font-weight: 600;
}

.source-tab.active em {
  background: var(--green);
  color: var(--white);
}

.source-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.source-dot.blue { background: #5b9bd5; }
.source-dot.orange { background: #f0a04b; }

.source-panel {
  display: none;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.source-panel.active {
  display: block;
}

.source-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.resource-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.section-papers {
  min-height: 0;
}

.papers-card {
  height: 100%;
  background: var(--white);
  border-radius: 12px;
  padding: 14px 14px 16px;
  box-shadow: var(--shadow);
  border: 1px solid #d9efe3;
  display: flex;
  flex-direction: column;
  background-image: linear-gradient(180deg, #f4fbf7 0%, #ffffff 48px);
  transition: border-color 0.2s ease, background-image 0.2s ease;
}

.papers-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.papers-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--green-dark);
}

.papers-title-mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(61, 184, 122, 0.16);
  flex-shrink: 0;
}

.papers-title-text {
  letter-spacing: 0.01em;
}

#chapter-type-split.theme-sync .papers-title { color: #1f8a55; }
#chapter-type-split.theme-sync .papers-title-mark {
  background: #3db87a;
  box-shadow: 0 0 0 4px rgba(61, 184, 122, 0.18);
  border-radius: 50%;
}
#chapter-type-split.theme-sync .papers-count {
  color: #1f8a55;
  background: #e8f7ef;
}

#chapter-type-split.theme-topic .papers-title { color: #2f6fbf; }
#chapter-type-split.theme-topic .papers-title-mark {
  background: #5b9bd5;
  box-shadow: 0 0 0 4px rgba(91, 155, 213, 0.18);
  border-radius: 3px;
  transform: rotate(12deg);
}
#chapter-type-split.theme-topic .papers-count {
  color: #2f6fbf;
  background: #eaf3fb;
}

#chapter-type-split.theme-extend .papers-title { color: #c4891a; }
#chapter-type-split.theme-extend .papers-title-mark {
  width: 11px;
  height: 11px;
  background: #f0a04b;
  box-shadow: 0 0 0 4px rgba(240, 160, 75, 0.2);
  border-radius: 2px;
  transform: rotate(45deg);
}
#chapter-type-split.theme-extend .papers-count {
  color: #c4891a;
  background: #fff4e5;
}

.papers-desc {
  margin-top: 6px;
  margin-left: 18px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.papers-count {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 999px;
  padding: 4px 10px;
  transition: color 0.2s ease, background 0.2s ease;
}

.section-papers .paper-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* 章节维度：右侧只显示当前课程类型的配套试卷 */
.section-papers .chapter-papers {
  display: none !important;
}

.section-papers .chapter-papers.active {
  display: flex !important;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.section-papers .chapter-papers.papers-empty.active {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 12px 8px 20px;
}

.papers-empty .empty-illust {
  width: 120px;
  height: 96px;
  margin-bottom: 4px;
}

.papers-empty .empty-illust svg {
  width: 100%;
  height: 100%;
}

.papers-empty .empty-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.papers-empty .empty-desc {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 220px;
}

.papers-empty .empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}

.papers-empty .empty-link {
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--green-dark);
  background: var(--green-soft);
}

.papers-empty .empty-link:hover {
  background: #d7f0e3;
}

.section-papers .paper-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 8px;
  padding: 12px;
  align-items: start;
}

.section-papers .paper-icon {
  width: 36px;
  height: 36px;
  grid-row: 1 / span 2;
}

.section-papers .paper-icon svg {
  width: 18px;
  height: 18px;
}

.section-papers .paper-body {
  min-width: 0;
  grid-column: 2;
}

.section-papers .paper-name {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  font-size: 13px;
}

.section-papers .paper-meta {
  gap: 8px;
  flex-wrap: wrap;
}

.section-papers .paper-action {
  grid-column: 2;
  justify-self: start;
  height: 28px;
  line-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--green-soft);
}

.paper-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
  overflow: visible;
}

.paper-name-row .paper-name {
  flex: 1;
  min-width: 0;
}

.paper-name-row .req-marker-slot {
  flex: 0 0 auto;
  align-self: center;
}

.paper-status {
  flex-shrink: 0;
  font-size: 11px;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 4px;
  border: 1px solid currentColor;
  white-space: nowrap;
}

.paper-status.todo {
  color: var(--status-todo);
  background: var(--status-todo-bg);
}

.paper-status.done {
  color: var(--status-done);
  background: var(--status-done-bg);
}

.paper-action.todo {
  color: var(--green);
  background: var(--green-soft);
}

.paper-action.done {
  color: var(--text-secondary);
  background: #f0f2f1;
}

.paper-icon.done {
  background: linear-gradient(160deg, #a8dcc0, #6fbf93);
}

.paper-item.is-done {
  border-color: #d5ebdd;
  background: #f7fbf8;
}

.category {
  margin-top: 12px;
  background: var(--white);
  border-radius: 12px;
  padding: 16px 16px 18px;
  box-shadow: var(--shadow);
}

.category + .category {
  margin-top: 14px;
}

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

.category-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
}

.category-title .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

.category-title .dot.blue { background: #5b9bd5; }
.category-title .dot.orange { background: #f0a04b; }
.category-title .dot.purple { background: #8b7cf6; }

.category-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.category-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin: -6px 0 14px 16px;
}

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

.resource-card {
  cursor: pointer;
  transition: transform 0.15s ease;
}

.resource-card:hover {
  transform: translateY(-2px);
}

.resource-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(145deg, #6bc995 0%, #3aa870 55%, #2d9a64 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.resource-thumb.type-video {
  background: linear-gradient(145deg, #5f8fd6 0%, #3f6fbe 55%, #2f5aa3 100%);
}

.resource-thumb.type-ppt {
  background: linear-gradient(145deg, #f0b35a 0%, #e89a2f 50%, #d4841f 100%);
}

.resource-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 72%, rgba(255, 255, 255, 0.18) 0 18%, transparent 19%),
    radial-gradient(circle at 22% 28%, rgba(255, 255, 255, 0.12) 0 12%, transparent 13%);
  pointer-events: none;
}

.type-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 2px 8px;
  letter-spacing: 0.02em;
}

.type-badge.ppt {
  background: rgba(180, 70, 20, 0.45);
}

.play-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #2f5aa3;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.play-btn svg {
  width: 14px;
  height: 14px;
  margin-left: 1px;
}

.ppt-slides {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  display: flex;
  gap: 3px;
}

.ppt-slides span {
  width: 14px;
  height: 10px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.ppt-slides span:nth-child(2) {
  opacity: 0.75;
  transform: translateY(-1px);
}

.ppt-slides span:nth-child(3) {
  opacity: 0.5;
  transform: translateY(-2px);
}

.thumb-label {
  position: relative;
  z-index: 1;
  color: var(--white);
  text-align: center;
  padding: 8px;
}

.thumb-label .badge {
  display: inline-block;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 2px 8px;
  margin-bottom: 6px;
}

.thumb-label .main {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.thumb-label .sub {
  margin-top: 4px;
  font-size: 10px;
  opacity: 0.9;
}

.resource-name {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}

.resource-footer {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.resource-duration {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.resource-duration svg {
  width: 12px;
  height: 12px;
}

.status {
  font-size: 11px;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 4px;
  border: 1px solid currentColor;
  white-space: nowrap;
}

.status.todo { color: var(--status-todo); background: var(--status-todo-bg); }
.status.doing { color: var(--status-doing); background: var(--status-doing-bg); }
.status.done { color: var(--status-done); background: var(--status-done-bg); }

.paper-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.paper-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafcfa;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.paper-item:hover {
  border-color: #b7e0c8;
  background: var(--green-soft);
}

.paper-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(160deg, #7ed0a4, #3db87a);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  flex-shrink: 0;
}

.paper-icon svg {
  width: 20px;
  height: 20px;
}

.paper-body {
  flex: 1;
  min-width: 0;
}

.paper-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.paper-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
}

.paper-action {
  font-size: 12px;
  color: var(--green);
  font-weight: 500;
  flex-shrink: 0;
}

.course-type {
  margin-top: 12px;
  background: var(--white);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.course-type-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.course-type-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 6px;
  padding: 4px 10px;
}

.course-type-name {
  font-size: 16px;
  font-weight: 600;
}

.course-type-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 14px;
}

.sub-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed #e5efe9;
}

.sub-block-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.sub-block-title svg {
  width: 14px;
  height: 14px;
  color: var(--green);
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

/* chapter/section 内容区需保持纵向 flex，才能撑起内部左右分栏 */
.content-section > .panel.active {
  display: flex;
  flex-direction: column;
}

/* Locked to tablet canvas — do not collapse to phone layout based on PC viewport */
.home-body {
  grid-template-columns: 72px 1fr 240px;
}

.resource-grid {
  grid-template-columns: repeat(4, 1fr);
}

.resource-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.section-split {
  grid-template-columns: minmax(0, 1fr) 280px;
}

/* ========== 专项学习中心 ========== */
.special-app {
  background: #f7f8fa;
}

.special-main {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 28px 40px 36px;
  background:
    radial-gradient(ellipse at 50% 0%, #fff 0%, #f7f8fa 70%);
}

.special-ribbon-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  margin-bottom: 28px;
}

.special-ribbon {
  min-width: 280px;
  padding: 14px 48px 16px;
  text-align: center;
  color: #7a4e00;
  background: linear-gradient(180deg, #ffe28a 0%, #ffd24d 55%, #f5c53a 100%);
  clip-path: polygon(8% 0, 92% 0, 100% 50%, 92% 100%, 8% 100%, 0 50%);
  box-shadow: 0 6px 0 #e0a800, 0 10px 18px rgba(224, 168, 0, 0.25);
}

.special-ribbon-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.special-ribbon-mastery {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0.9;
}

.special-notify {
  position: absolute;
  right: 8px;
  top: 4px;
  color: #5b9bd5;
}

.special-notify-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #f5c53a;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.special-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  max-width: 900px;
  margin: 0 auto;
}

.special-card {
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(40, 60, 90, 0.08);
  padding: 22px 16px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 280px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  color: inherit;
}

.special-card.card-learn {
  background: linear-gradient(180deg, #fff 55%, #eef6ff 100%);
  cursor: pointer;
}

.special-card.card-learn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(40, 60, 90, 0.12);
}

.special-card.card-practice {
  background: linear-gradient(180deg, #fff 55%, #f4f0ff 100%);
  cursor: pointer;
}

.special-card.card-practice:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(40, 60, 90, 0.12);
}

.practice-shot-app {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #f4f6f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.practice-shot-frame {
  position: relative;
  height: 100%;
  max-width: 100%;
  line-height: 0;
}

.practice-shot {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
}

.practice-shot-hit {
  position: absolute;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.practice-shot-back {
  top: 2.8%;
  left: 1.6%;
  width: 9.5%;
  height: 7.2%;
}

.practice-shot-result {
  right: 3.6%;
  bottom: 3.2%;
  width: 15.5%;
  height: 6.6%;
}

.practice-result-mask {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(17, 24, 28, 0.38);
  padding: 24px;
}

.practice-result-mask:not([hidden]) {
  display: flex;
}

.practice-demo-bar {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #e4eae6;
  border-radius: 999px;
  padding: 3px 5px 3px 10px;
  box-shadow: 0 6px 16px rgba(20, 30, 40, 0.08);
}

.practice-demo-label {
  font-size: 11px;
  color: #8a9399;
}

.practice-demo-btn {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #6b7378;
}

.practice-demo-btn.active {
  background: #e8f6ee;
  color: #1f8a55;
  font-weight: 600;
}

.practice-result-dialog {
  position: relative;
  width: min(460px, 100%);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(20, 30, 40, 0.22);
}

.practice-result-mask[data-result-mode="trace"] .practice-result-dialog {
  width: min(560px, 100%);
}

.practice-result-mask[data-result-mode="single"] .is-trace,
.practice-result-mask[data-result-mode="trace"] .is-single {
  display: none;
}

.practice-result-title {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -42%);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 3;
}

.practice-result-ribbon {
  min-width: 168px;
  text-align: center;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  padding: 11px 34px 10px;
  background: #ffc107;
  clip-path: polygon(10% 0, 90% 0, 100% 100%, 0 100%);
}

.practice-result-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9aa3ab;
}

.practice-result-close svg {
  width: 16px;
  height: 16px;
}

.practice-result-body {
  padding: 46px 28px 22px;
  text-align: center;
}

.practice-result-name {
  font-size: 16px;
  font-weight: 600;
  color: #2b3338;
}

.practice-result-mastery {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.practice-result-label {
  font-size: 13px;
  color: #8a9399;
}

.practice-result-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 8px;
}

.practice-result-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.practice-result-col .practice-result-name {
  min-height: 44px;
  display: flex;
  align-items: center;
}

.practice-result-col .practice-result-grade {
  margin-top: 4px;
}

.practice-result-arrow {
  display: flex;
  align-items: center;
  gap: 2px;
  padding-top: 52px;
}

.practice-result-arrow span {
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 9px solid #ffc107;
}

.practice-result-chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid #b7e0c8;
  color: #1f8a55;
  background: #f3fbf6;
  font-size: 11px;
  font-weight: 600;
}

.practice-result-grade {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e8f6ee;
  color: #1f8a55;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}

.practice-result-grade.is-basic {
  background: #fff4e5;
  color: #c4891a;
}

.practice-result-tip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.practice-result-title .practice-result-tip-icon {
  width: 18px;
  height: 18px;
  border-color: #e0b000;
  color: #b8860b;
  background: #fffdf3;
  box-shadow: 0 1px 4px rgba(180, 130, 0, 0.16);
}

.practice-result-tip-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #c5cbd0;
  color: #9aa3ab;
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  font-style: italic;
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
}

.practice-result-tip-icon[aria-expanded="true"] {
  border-color: #c9a000;
  color: #8a6d1f;
}

.practice-result-tip-bubble {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-58%);
  width: 228px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #3d4449;
  color: #fff;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.55;
  text-align: left;
  box-shadow: 0 8px 20px rgba(20, 30, 40, 0.18);
  z-index: 4;
}

.practice-result-tip-bubble::after {
  content: "";
  position: absolute;
  left: 58%;
  top: -5px;
  width: 8px;
  height: 8px;
  background: #3d4449;
  transform: translateX(-50%) rotate(45deg);
}

.practice-result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid #eef1f0;
  border-radius: 0 0 16px 16px;
  overflow: hidden;
}

.practice-result-actions button {
  height: 52px;
  font-size: 14px;
  font-weight: 600;
  color: #5b656c;
  background: #fff;
}

.practice-result-actions button + button {
  border-left: 1px solid #eef1f0;
}

.practice-result-actions .is-primary {
  color: #1f8a55;
}

.special-card.card-record {
  background: linear-gradient(180deg, #fff 55%, #fff4ea 100%);
}

.special-card.is-disabled {
  cursor: default;
  pointer-events: none;
  user-select: none;
}

.special-card-illust {
  width: 100%;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.special-card-title {
  font-size: 20px;
  font-weight: 700;
  color: #222;
  margin-top: 4px;
}

.special-card-desc {
  margin-top: 8px;
  font-size: 13px;
  color: #8a8f98;
}

/* ========== 知识点精讲 ========== */
.lecture-app {
  background: #fff;
}

.lecture-header {
  height: 52px;
  background: #3a3f46;
  color: #fff;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 14px;
  flex-shrink: 0;
  gap: 8px;
}

.lecture-back {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 8px;
  justify-self: start;
}

.lecture-back svg {
  width: 22px;
  height: 22px;
}

.lecture-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.lecture-tab {
  color: rgba(255, 255, 255, 0.55);
  font-size: 16px;
  padding: 8px 18px;
  font-weight: 500;
}

.lecture-tab.active {
  color: #fff;
  font-weight: 600;
}

.lecture-tab-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.28);
}

.lecture-header .demo-mode-cluster {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lecture-header .demo-mode-switch {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 3px 5px 3px 10px;
}

.lecture-header .demo-mode-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
}

.lecture-header .demo-mode-btn {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
}

.lecture-header .demo-mode-btn.active {
  background: #fff;
  color: #3a3f46;
  font-weight: 600;
}

.lecture-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(94, 196, 170, 0.18), transparent 45%),
    radial-gradient(ellipse at 90% 10%, rgba(255, 214, 120, 0.16), transparent 40%),
    #e8f3ee;
  padding: 18px 24px 20px;
}

.lecture-content > .panel.active {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  height: 100%;
}

.lecture-empty {
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 12px;
}

.lecture-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e8eeec;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #9aa5a0;
}

.lecture-footer {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px 20px 16px;
  background: #fff;
  border-top: 1px solid #eef1f0;
}

.lecture-btn {
  min-width: 110px;
  height: 36px;
  border-radius: 18px;
  font-size: 14px;
  font-weight: 600;
  padding: 0 18px;
}

.lecture-btn.ghost {
  border: 1px solid #3db87a;
  color: #3db87a;
  background: #fff;
}

.lecture-btn.primary {
  background: #3db87a;
  color: #fff;
}

/* 知识点精讲：黑板报风知识点卡片 */
.kp-card-root {
  max-width: 920px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-top: 0;
}

.kp-deck {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 252, 249, 0.96)),
    #f7fcfa;
  border-radius: 26px;
  border: 2.5px dashed #3db8a8;
  box-shadow:
    0 10px 28px rgba(45, 120, 100, 0.12),
    inset 0 0 0 6px rgba(255, 255, 255, 0.55);
  padding: 18px 22px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.kp-deck-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image:
    radial-gradient(circle at 12% 18%, #1a6b5e 1.2px, transparent 1.3px),
    radial-gradient(circle at 78% 22%, #1a6b5e 1px, transparent 1.1px),
    radial-gradient(circle at 30% 70%, #1a6b5e 1.2px, transparent 1.3px),
    radial-gradient(circle at 88% 78%, #1a6b5e 1px, transparent 1.1px);
  background-size: 56px 56px, 72px 72px, 64px 64px, 48px 48px;
  z-index: 0;
}

.kp-deck-deco::after {
  content: "π   Σ   √   ×   ÷   △   ∞   ∠";
  position: absolute;
  inset: 18px;
  font-size: 22px;
  letter-spacing: 0.55em;
  line-height: 2.4;
  color: #1a6b5e;
  opacity: 0.55;
}

.kp-head,
.kp-slider-shell,
.kp-pager {
  position: relative;
  z-index: 1;
}

.kp-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px 12px;
  padding: 4px 4px 8px;
  border-bottom: none;
  flex-shrink: 0;
}

.kp-head-main {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
  min-width: 0;
}

.kp-title {
  font-size: 24px;
  font-weight: 800;
  color: #1a3d36;
  line-height: 1.3;
  margin: 0;
  position: relative;
  padding-left: 2px;
}

.kp-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, rgba(255, 220, 100, 0.55), transparent 85%);
  z-index: -1;
  border-radius: 4px;
}

/* 贴在知识点旁：斜切印章徽章（左=要求，右=考频） */
.kp-stamps {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: 6px;
}

.kp-seal {
  --seal-skew: -20deg;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 30px;
  padding: 0 12px;
  user-select: none;
  /* 以首字为圆心逆时针旋转 */
  transform-origin: 0.7em 55%;
  transform: rotate(-24deg);
  filter: drop-shadow(0 2px 2px rgba(40, 60, 50, 0.08));
}

.kp-seal.freq {
  transform: rotate(-20deg);
  margin-left: -2px;
}

/* 外层斜切底板（无外边框） */
.kp-seal::before {
  content: "";
  position: absolute;
  inset: 0;
  border: none;
  border-radius: 3px;
  transform: skewX(var(--seal-skew));
  background:
    radial-gradient(circle at 18% 30%, rgba(255, 255, 255, 0.55), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), transparent 55%);
}

/* 内层虚线框 */
.kp-seal::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed currentColor;
  border-radius: 2px;
  opacity: 0.7;
  pointer-events: none;
  transform: skewX(var(--seal-skew));
}

/* 四角折线装饰 */
.kp-seal-ornament {
  position: absolute;
  inset: 2px;
  z-index: 0;
  pointer-events: none;
  transform: skewX(var(--seal-skew));
  background:
    linear-gradient(currentColor, currentColor) left 3px top 3px / 7px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) left 3px top 3px / 1.5px 7px no-repeat,
    linear-gradient(currentColor, currentColor) right 3px top 3px / 7px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) right 3px top 3px / 1.5px 7px no-repeat,
    linear-gradient(currentColor, currentColor) left 3px bottom 3px / 7px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) left 3px bottom 3px / 1.5px 7px no-repeat,
    linear-gradient(currentColor, currentColor) right 3px bottom 3px / 7px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) right 3px bottom 3px / 1.5px 7px no-repeat;
  opacity: 0.85;
}

/* 右侧小菱形点缀 */
.kp-seal-spark {
  position: absolute;
  right: 3px;
  top: 50%;
  z-index: 2;
  width: 5px;
  height: 5px;
  margin-top: -2.5px;
  background: currentColor;
  transform: rotate(45deg) skewX(0deg);
  opacity: 0.55;
  border-radius: 0.5px;
  pointer-events: none;
}

.kp-seal-spark::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 50%;
  width: 6px;
  height: 1px;
  margin-top: -0.5px;
  background: currentColor;
  opacity: 0.45;
}

.kp-seal-text {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.22em;
  line-height: 1;
  text-indent: 0.1em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.kp-seal.ability {
  color: #3d6fd8;
}

.kp-seal.ability::before {
  background:
    radial-gradient(circle at 18% 30%, rgba(255, 255, 255, 0.6), transparent 42%),
    linear-gradient(145deg, rgba(140, 175, 245, 0.32), rgba(236, 243, 255, 0.62) 60%, rgba(91, 140, 230, 0.2));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.kp-seal.freq {
  color: #e05a4f;
}

.kp-seal.freq::before {
  background:
    radial-gradient(circle at 18% 30%, rgba(255, 255, 255, 0.6), transparent 42%),
    linear-gradient(145deg, rgba(255, 170, 155, 0.34), rgba(255, 242, 238, 0.62) 60%, rgba(224, 90, 79, 0.18));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.kp-slider-shell {
  position: relative;
  flex: 1;
  min-height: 0;
  margin-top: 0;
  overflow: hidden;
}

.kp-slider {
  display: flex;
  width: 200%;
  height: 100%;
  transition: transform 0.28s ease;
  will-change: transform;
  touch-action: pan-y;
}

.kp-slider[data-page="1"] {
  transform: translateX(-50%);
}

.kp-page {
  width: 50%;
  height: 100%;
  overflow-y: auto;
  padding-right: 2px;
  box-sizing: border-box;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.kp-page::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.kp-page-inner {
  padding: 0 4px 10px 0;
}

/* 分区文案嵌在虚线正中；右侧操作提示在虚线上方（评审后可随时去掉） */
.kp-page-title {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  margin: 14px 0 14px;
  z-index: 1;
}

.kp-page-title::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 0;
  border-top: 2px dotted #9ecfbf;
  transform: translateY(-50%);
  z-index: 0;
  pointer-events: none;
}

.kp-page-title h2 {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 16px;
  font-size: 13px;
  font-weight: 800;
  color: #1f6b58;
  letter-spacing: 0.12em;
  line-height: 1;
  background: linear-gradient(180deg, #ffffff 0%, #eef8f3 100%);
  border: 1.5px solid #a8d9c6;
  border-radius: 999px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 2px 6px rgba(47, 158, 144, 0.1);
}

/* 两侧小装饰点，增强标签感 */
.kp-page-title h2::before,
.kp-page-title h2::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #3db89a;
  box-shadow: 0 0 0 2px rgba(61, 184, 154, 0.18);
  flex-shrink: 0;
}

.kp-page-title h2::after {
  background: #7bc4a8;
  box-shadow: 0 0 0 2px rgba(123, 196, 168, 0.18);
}

.kp-page-hint {
  position: absolute;
  right: 0;
  bottom: calc(50% + 10px);
  z-index: 2;
  font-size: 12px;
  color: #5f9084;
  white-space: nowrap;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  transform: none;
}

.kp-concept-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kp-concept-list li {
  list-style: none;
  position: relative;
  padding: 12px 14px 12px 42px;
  background: #fff;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.75;
  color: #2d403a;
  border: 1.5px solid #d7ece4;
  box-shadow: 3px 3px 0 rgba(61, 184, 168, 0.12);
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.kp-concept-list li:nth-child(2) {
  border-color: #e6d7f0;
  box-shadow: 3px 3px 0 rgba(170, 130, 200, 0.12);
}

.kp-concept-list li:nth-child(3) {
  border-color: #f0dfc0;
  box-shadow: 3px 3px 0 rgba(230, 170, 70, 0.14);
}

.kp-concept-list li::before {
  content: attr(data-index);
  position: absolute;
  left: 12px;
  top: 13px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #3db8a8;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 0 rgba(31, 122, 109, 0.35);
}

.kp-concept-list li:nth-child(2)::before {
  background: #9b7ec8;
  box-shadow: 0 2px 0 rgba(110, 80, 150, 0.35);
}

.kp-concept-list li:nth-child(3)::before {
  background: #e0a84a;
  box-shadow: 0 2px 0 rgba(160, 110, 30, 0.35);
}

/* 单考点：核心概念单容器简版 */
.kp-concept-panel {
  position: relative;
  background: #fff;
  border: 1.5px solid #d7ece4;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(61, 184, 168, 0.08);
  padding-top: 8px;
  overflow: visible;
}

.kp-concept-ribbon {
  position: absolute;
  left: 14px;
  top: -10px;
  background: #3db8a8;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 0 rgba(31, 122, 109, 0.35);
  z-index: 2;
}

.kp-concept-panel-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kp-concept-point {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.kp-concept-point + .kp-concept-point {
  padding-top: 12px;
  border-top: 1px dashed rgba(120, 160, 145, 0.28);
}

.kp-concept-point-num {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 50%;
  background: #e8f6f1;
  color: #2f9e90;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kp-concept-point-main,
.kp-concept-item-body {
  flex: 1;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.kp-concept-point-text {
  margin: 0;
  width: 100%;
  font-size: 14px;
  line-height: 1.75;
  color: #2d403a;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* 要点配图：默认大图，与文字同栏阅读；仍可点击放大 */
.kp-concept-figure {
  margin: 2px 0 0;
  width: 100%;
}

.kp-concept-figure-btn {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px;
  border: 1px solid #d7ece4;
  border-radius: 12px;
  background: #f7fbf9;
  cursor: zoom-in;
  box-shadow: 0 2px 8px rgba(45, 120, 100, 0.08);
}

.kp-concept-figure-btn img {
  display: block;
  width: 100%;
  max-height: 280px;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}

.kp-concept-figure-cap {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #7a9a90;
  text-align: center;
  line-height: 1.2;
}

.kp-image-preview {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(20, 28, 32, 0.72);
}

.kp-image-preview.show {
  display: flex;
}

.kp-image-preview-dialog {
  position: relative;
  max-width: min(860px, 92%);
  max-height: 86%;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
}

.kp-image-preview-img {
  display: block;
  max-width: 100%;
  max-height: calc(86vh - 80px);
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
}

.kp-image-preview-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #2f9e90;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.kp-formula {
  margin-top: 14px;
  position: relative;
  background: linear-gradient(180deg, #fff9e8, #fff3d1);
  border: 2px dashed #f0b35a;
  border-radius: 16px;
  padding: 20px 12px 12px;
  box-shadow: 0 6px 0 rgba(240, 179, 90, 0.18);
}

.kp-formula-ribbon {
  position: absolute;
  left: 14px;
  top: -10px;
  background: #f0b35a;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 0 rgba(180, 120, 30, 0.35);
}

.kp-formula-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.kp-formula-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.78);
  border: 1.5px solid #f0d19a;
  border-radius: 12px;
  padding: 10px 12px;
}

/* 单考点：仅 1 条公式时更干净 */
.kp-formula.is-single .kp-formula-item {
  background: rgba(255, 255, 255, 0.55);
  border-color: transparent;
  padding: 6px 8px;
}

.kp-formula-no {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f0b35a;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  box-shadow: 0 2px 0 rgba(180, 120, 30, 0.28);
}

/* 名称：内容 同行展示，便于后台配置 */
.kp-formula-line {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: #7a4e00;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.kp-exam-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 2px;
}

.kp-exam-card {
  position: relative;
  margin-top: 0;
  border: 1.5px solid #b7e0c8;
  border-radius: 16px;
  background: linear-gradient(180deg, #f3fbf6 0%, #ffffff 72px);
  box-shadow: 0 2px 10px rgba(61, 184, 122, 0.08);
  padding: 0 0 4px;
  overflow: visible;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.kp-page-inner > .kp-exam-card {
  margin-top: 0;
}

.kp-exam-card.is-open {
  border-color: #8fd0b3;
  box-shadow: 0 4px 14px rgba(61, 184, 122, 0.14);
}

/* 顶部波浪 + 贴纸装饰区（对齐章节课程中心） */
.kp-exam-edge {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 32px;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
}

.kp-exam-wave {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 26px;
  display: block;
}

.kp-exam-wave .wave-fill {
  fill: #d4f0e2;
}

.kp-exam-stickers {
  position: absolute;
  inset: 0;
}

.eks {
  position: absolute;
  display: block;
  opacity: 0.9;
}

.kp-exam-card.tone-0 .ek-1 {
  left: 62px;
  top: 5px;
  width: 14px;
  height: 11px;
  border-radius: 2px 2px 1px 1px;
  background: #6bc995;
  box-shadow: 0 2px 0 #2d9a64;
}
.kp-exam-card.tone-0 .ek-1::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 2px;
  width: 8px;
  height: 2px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 1px;
  box-shadow: 0 3px 0 rgba(255, 255, 255, 0.4);
}
.kp-exam-card.tone-0 .ek-2 {
  left: 84px;
  top: 6px;
  width: 11px;
  height: 11px;
  border: 2px solid #3db87a;
  border-radius: 50%;
  background: transparent;
}
.kp-exam-card.tone-0 .ek-2::after {
  content: "";
  position: absolute;
  left: 1px;
  top: 2px;
  width: 5px;
  height: 3px;
  border-left: 2px solid #3db87a;
  border-bottom: 2px solid #3db87a;
  transform: rotate(-45deg);
}
.kp-exam-card.tone-0 .ek-3 {
  left: 104px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9fd9b8;
  box-shadow: 12px 1px 0 #c5e9d4, 24px -1px 0 #6bc995;
}

.kp-exam-card.tone-1 .ek-1 {
  left: 68px;
  top: 4px;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 11px solid #5b9bd5;
}
.kp-exam-card.tone-1 .ek-1::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 7px;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 11px solid #5b9bd5;
}
.kp-exam-card.tone-1 .ek-2 {
  left: 90px;
  top: 5px;
  width: 9px;
  height: 14px;
  background: #5b9bd5;
  clip-path: polygon(40% 0, 100% 0, 60% 45%, 90% 45%, 20% 100%, 40% 52%, 10% 52%);
}
.kp-exam-card.tone-1 .ek-3 {
  left: 108px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9ec4f0;
  box-shadow: 12px 1px 0 #c5daf5, 24px -1px 0 #7aaee0;
}

.kp-exam-card.tone-2 .ek-1 {
  left: 66px;
  top: 4px;
  width: 12px;
  height: 14px;
  border-radius: 0 5px 5px 0;
  background: linear-gradient(160deg, #f0c27a, #e6a23c);
}
.kp-exam-card.tone-2 .ek-1::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 0;
  bottom: -3px;
  width: 3px;
  background: #c4891a;
}
.kp-exam-card.tone-2 .ek-2 {
  left: 88px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: #f0a04b;
  transform: rotate(45deg);
}
.kp-exam-card.tone-2 .ek-3 {
  left: 108px;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f5c98a;
  box-shadow: 12px 1px 0 #ffe0b0, 24px -1px 0 #e6a23c;
}

/* 左上角水印字：与波浪背景融合 */
.kp-exam-badge {
  position: absolute;
  left: 10px;
  top: 4px;
  z-index: 3;
  display: inline-block;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-family: "Segoe Script", "Lucida Handwriting", "KaiTi", "STKaiti", cursive;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.08em;
  color: rgba(31, 138, 85, 0.4);
  white-space: nowrap;
  transform: rotate(-6deg);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.kp-exam-head {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  color: inherit;
  background: transparent;
  padding: 30px 14px 6px;
  border: none;
  min-height: 52px;
  overflow: visible;
}

button.kp-exam-head {
  cursor: pointer;
}

button.kp-exam-head:hover .kp-exam-name {
  color: #1f7a6d;
}

.kp-exam-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-size: 16px;
  font-weight: 800;
  color: #16362f;
  line-height: 1.45;
  letter-spacing: 0.01em;
  overflow: visible;
}

.kp-exam-name {
  min-width: 0;
  max-width: 100%;
}

.kp-exam-type-host {
  position: relative;
  flex: 0 0 auto;
  margin-left: 0;
  vertical-align: middle;
}

.kp-exam-type-host .kp-exam-type {
  margin-left: 0;
  vertical-align: 0;
}

/* 考点类型：斜切小印章，贴在名称后；与顶栏掌握/高频同族 */
.kp-exam-type {
  --type-skew: -14deg;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 11px 0 10px;
  margin-left: 10px;
  vertical-align: 0.18em;
  color: #fff;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 2px 2px rgba(40, 60, 50, 0.14));
}

.kp-exam-type::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 3px;
  transform: skewX(var(--type-skew));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.kp-exam-type::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px dashed rgba(255, 255, 255, 0.72);
  border-radius: 2px;
  transform: skewX(var(--type-skew));
  pointer-events: none;
}

.kp-exam-type-text {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-indent: 0.04em;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.16);
}

.kp-exam-type-text::before {
  content: "";
  width: 5px;
  height: 5px;
  margin-left: 1px;
  background: currentColor;
  transform: rotate(45deg);
  opacity: 0.85;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.kp-exam-type.is-concept::before {
  background:
    radial-gradient(circle at 18% 28%, rgba(255, 255, 255, 0.42), transparent 46%),
    linear-gradient(145deg, #5fd0c0 0%, #2aa090 48%, #1f7a6d 100%);
}

.kp-exam-type.is-method::before {
  background:
    radial-gradient(circle at 18% 28%, rgba(255, 255, 255, 0.42), transparent 46%),
    linear-gradient(145deg, #7eb3ee 0%, #4a8ad4 48%, #2f6fbf 100%);
}

.kp-exam-type.is-integrate::before {
  background:
    radial-gradient(circle at 18% 28%, rgba(255, 255, 255, 0.42), transparent 46%),
    linear-gradient(145deg, #f3c56a 0%, #e09a32 48%, #c47a1a 100%);
}

.kp-exam-type.is-pitfall::before {
  background:
    radial-gradient(circle at 18% 28%, rgba(255, 255, 255, 0.42), transparent 46%),
    linear-gradient(145deg, #f08b86 0%, #e0726c 48%, #c45c5c 100%);
}

.kp-exam-chevron {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: #9aa5a0;
  transition: transform 0.2s ease;
}

.kp-exam-card.is-open .kp-exam-chevron {
  transform: rotate(180deg);
  color: #3db8a8;
}

/* 考点说明 / 典型例题：默认跟 tone-0 绿卡一致，随考点卡片色系联动 */
.kp-direction {
  position: relative;
  z-index: 1;
  margin: 2px 14px 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(184, 230, 210, 0.55) 0%, rgba(232, 246, 238, 0.72) 100%);
  font-size: 13px;
  line-height: 1.65;
  color: #5c6f7a;
}

.kp-direction-label {
  display: inline;
  margin: 0 4px 0 0;
  padding: 0;
  color: #1f7a6d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.65;
  white-space: nowrap;
}

.kp-direction-text {
  display: inline;
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: #4a6670;
  font-weight: 400;
}

.kp-exam-body {
  position: relative;
  z-index: 1;
  margin: 10px 14px 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(120, 150, 140, 0.22);
  overflow: visible;
}

.kp-example {
  position: relative;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(184, 230, 210, 0.38) 0%, rgba(232, 246, 238, 0.72) 48%, #f4faf7 100%);
  padding: 18px 12px 12px;
  margin-top: 10px;
  box-shadow: none;
  overflow: visible;
}

.kp-example-badge {
  position: absolute;
  left: 14px;
  top: -11px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px 0 12px;
  margin: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #f4fbf8 0%, #dff3ea 100%);
  color: #1f7a6d;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: none;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 3px 8px rgba(61, 184, 168, 0.16),
    0 1px 2px rgba(61, 184, 168, 0.08);
}

/* tone-1 / tone-2 考点卡片容器色系 */
.kp-exam-card.tone-1 {
  border-color: #bcd4f2;
  background: linear-gradient(180deg, #f2f7fd 0%, #ffffff 72px);
  box-shadow: 0 2px 10px rgba(91, 155, 213, 0.08);
}
.kp-exam-card.tone-1 .kp-exam-wave .wave-fill {
  fill: #d7e7f8;
}
.kp-exam-card.tone-1 .kp-exam-badge {
  color: rgba(47, 111, 191, 0.42);
  transform: rotate(-5deg);
}
.kp-exam-card.tone-1.is-open {
  border-color: #9ec4f0;
  box-shadow: 0 4px 14px rgba(91, 155, 213, 0.14);
}

.kp-exam-card.tone-2 {
  border-color: #f3d2a3;
  background: linear-gradient(180deg, #fff8ef 0%, #ffffff 72px);
  box-shadow: 0 2px 10px rgba(240, 160, 75, 0.1);
}
.kp-exam-card.tone-2 .kp-exam-wave .wave-fill {
  fill: #ffe8c8;
}
.kp-exam-card.tone-2 .kp-exam-badge {
  color: rgba(196, 137, 26, 0.45);
  transform: rotate(-7deg);
}
.kp-exam-card.tone-2.is-open {
  border-color: #e6c08a;
  box-shadow: 0 4px 14px rgba(230, 162, 60, 0.14);
}

/* tone-1 蓝卡：考点说明 + 典型例题跟蓝系 */
.kp-exam-card.tone-1 .kp-direction {
  background: linear-gradient(180deg, rgba(183, 210, 239, 0.58) 0%, rgba(232, 241, 250, 0.78) 100%);
}
.kp-exam-card.tone-1 .kp-direction-label {
  color: #2f6fbf;
}
.kp-exam-card.tone-1 .kp-direction-text {
  color: #4a6178;
}
.kp-exam-card.tone-1 .kp-exam-body {
  border-top-color: rgba(120, 150, 180, 0.24);
}
.kp-exam-card.tone-1 .kp-example {
  background: linear-gradient(180deg, rgba(183, 210, 239, 0.4) 0%, rgba(232, 241, 250, 0.78) 48%, #f4f8fd 100%);
}
.kp-exam-card.tone-1 .kp-example-badge {
  background: linear-gradient(180deg, #f7fbff 0%, #e0edf9 100%);
  color: #2f6fbf;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 3px 8px rgba(91, 155, 213, 0.16),
    0 1px 2px rgba(91, 155, 213, 0.08);
}

/* tone-2 橙卡：考点说明 + 典型例题跟橙系 */
.kp-exam-card.tone-2 .kp-direction {
  background: linear-gradient(180deg, rgba(240, 200, 136, 0.5) 0%, rgba(255, 244, 224, 0.78) 100%);
}
.kp-exam-card.tone-2 .kp-direction-label {
  color: #c4891a;
}
.kp-exam-card.tone-2 .kp-direction-text {
  color: #6e5a38;
}
.kp-exam-card.tone-2 .kp-exam-body {
  border-top-color: rgba(180, 150, 100, 0.28);
}
.kp-exam-card.tone-2 .kp-example {
  background: linear-gradient(180deg, rgba(240, 200, 136, 0.36) 0%, rgba(255, 244, 224, 0.78) 48%, #fff8ef 100%);
}
.kp-exam-card.tone-2 .kp-example-badge {
  background: linear-gradient(180deg, #fffaf2 0%, #f8e6c4 100%);
  color: #c4891a;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 3px 8px rgba(240, 160, 75, 0.16),
    0 1px 2px rgba(240, 160, 75, 0.08);
}

/* 多考点：典型例题 + 右侧好题本入口（与单考点标签内星星区分） */
.kp-example-head {
  position: absolute;
  left: 14px;
  top: -11px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 72px);
}

.kp-example-head .kp-example-badge {
  position: static;
  padding: 0 12px;
  flex-shrink: 0;
}

.kp-example-head .kp-fav-beside {
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  font-weight: 700;
  color: #1f7a6d;
  gap: 3px;
  white-space: nowrap;
}

.kp-example-head .kp-fav-beside svg {
  width: 13px;
  height: 13px;
}

.kp-example-head .kp-fav-beside:hover {
  color: #15967f;
}

.kp-example-head .kp-fav-beside.is-added {
  color: #c4891a;
}

.kp-exam-card.tone-1 .kp-example-head .kp-fav-beside {
  color: #2f6fbf;
}

.kp-exam-card.tone-1 .kp-example-head .kp-fav-beside:hover {
  color: #1f5faf;
}

.kp-exam-card.tone-2 .kp-example-head .kp-fav-beside {
  color: #c4891a;
}

.kp-exam-card.tone-2 .kp-example-head .kp-fav-beside:hover {
  color: #a87412;
}

.kp-example-badge > span {
  line-height: 1;
}

.kp-example-badge .kp-star-btn {
  width: 18px;
  height: 18px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #a8b8c8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  flex-shrink: 0;
}

.kp-example-badge .kp-star-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
}

.kp-example-badge .kp-star-btn.is-added,
.kp-example-badge.is-added .kp-star-btn {
  color: #f0b429;
  background: transparent;
}

.kp-example-badge .kp-star-btn.is-added svg,
.kp-example-badge.is-added .kp-star-btn svg {
  fill: #f0b429;
  stroke: #e0a31f;
}

/* 解析入口：固定在典型例题容器右上角 */
.kp-analysis-btn {
  position: absolute;
  top: 2px;
  right: 4px;
  z-index: 2;
  height: 22px;
  margin: 0;
  padding: 0 2px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #8a96a0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
}

.kp-analysis-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.kp-analysis-btn span {
  line-height: 1;
}

.kp-analysis-btn .kp-analysis-icon-eye {
  display: block;
}

.kp-analysis-btn .kp-analysis-icon-eye-off {
  display: none;
}

.kp-analysis-btn.is-open {
  color: #8a96a0;
}

.kp-analysis-btn.is-open .kp-analysis-icon-eye {
  display: none;
}

.kp-analysis-btn.is-open .kp-analysis-icon-eye-off {
  display: block;
}

.kp-toast {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(8px);
  z-index: 5;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(34, 44, 54, 0.88);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.kp-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.kp-fav-btn {
  height: auto;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #8a641f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
}

.kp-fav-btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.kp-fav-btn span {
  line-height: 1;
}

.kp-fav-btn.is-added {
  color: #c4891a;
  background: transparent;
}

.kp-fav-btn.is-added svg {
  fill: #f0b429;
  stroke: #e0a31f;
}

.kp-example-stem {
  font-size: 14px;
  line-height: 1.75;
  color: #243032;
  background: transparent;
  border-radius: 0;
  padding: 4px 56px 0 0;
  border: none;
  word-break: break-word;
}

.kp-analysis {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  background: transparent;
  border: none;
  border-top: 1px dashed rgba(200, 170, 80, 0.35);
  border-radius: 0;
  box-shadow: none;
}

.kp-analysis.is-open {
  display: block;
}

.kp-analysis-title {
  font-size: 13px;
  font-weight: 800;
  color: #8a641f;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kp-analysis-title > span:first-child {
  color: #e0a84a;
  flex-shrink: 0;
  line-height: 1;
}

.kp-steps {
  background: transparent;
  border-radius: 0;
  padding: 0;
}

.kp-steps-empty {
  padding: 8px 4px 4px;
  font-size: 13px;
  font-weight: 700;
  color: #8a7a55;
  text-align: center;
}

.kp-exam-empty {
  margin: 18px 8px 8px;
  padding: 28px 16px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #5f7f74;
  background: rgba(255, 255, 255, 0.55);
  border: 1.5px dashed #9ecfbf;
  border-radius: 14px;
}

.kp-step {
  font-size: 13px;
  line-height: 1.7;
  color: #333;
  margin-bottom: 14px;
  padding: 0 0 0 10px;
  border-left: 3px solid #ffe08a;
}

.kp-step:last-child {
  margin-bottom: 0;
}

.kp-step-label {
  color: #333;
  font-weight: 600;
}

.kp-step-detail {
  margin-top: 6px;
  line-height: 1.75;
}

.kp-hl {
  display: inline;
  margin-top: 6px;
  background: none;
  padding: 0;
  border-radius: 0;
  color: #333;
  font-weight: 500;
  line-height: 1.75;
}

/* 解题要点：替换原能力/难度/易错点 */
.kp-keypoints {
  margin-top: 14px;
  padding: 12px 12px 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffaf0 0%, #fff6e4 100%);
  border: 1px solid #f0d9a8;
}

.kp-keypoints-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  color: #8a641f;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.kp-keypoints-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #f0b35a;
  box-shadow: 0 0 0 3px rgba(240, 179, 90, 0.22);
  transform: rotate(45deg);
}

.kp-keypoints-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: kp-key;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kp-keypoints-list li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.65;
  color: #4a3a22;
  font-weight: 500;
  counter-increment: kp-key;
}

.kp-keypoints-list li::before {
  content: counter(kp-key);
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 50%;
  background: #f0b35a;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* 考点清单末尾 Tips：独立模块（对齐公式定理卡的设计语言） */
.kp-tips {
  position: relative;
  margin-top: 22px;
  padding: 18px 14px 12px;
  border-radius: 16px;
  border: 2px dashed #7eb6ef;
  background:
    radial-gradient(circle at 92% 12%, rgba(126, 182, 239, 0.22), transparent 28%),
    radial-gradient(circle at 8% 88%, rgba(94, 196, 170, 0.14), transparent 32%),
    linear-gradient(180deg, #f3f8ff 0%, #eaf3fc 48%, #e4f0fa 100%);
  box-shadow:
    0 6px 0 rgba(91, 155, 213, 0.14),
    0 10px 22px rgba(61, 110, 170, 0.08);
  overflow: visible;
}

.kp-tips-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
}

.kp-tips-head-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding-top: 0;
}

.kp-tips > .kp-tips-ribbon {
  position: absolute;
  left: 14px;
  top: -12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(145deg, #7aaee0 0%, #5b9bd5 52%, #3f7fbe 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 4px 12px 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 3px 0 rgba(47, 100, 168, 0.38),
    0 6px 12px rgba(61, 110, 170, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.kp-tips-ribbon-bulb {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kp-tips-ribbon-bulb .kp-tips-bulb {
  width: 18px;
  height: 18px;
  display: block;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.12));
}

.kp-tips-sub {
  margin: 0;
  color: #5f7f9a;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.kp-tips-deco {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  margin: 0;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 230, 140, 0.55), transparent 62%),
    linear-gradient(145deg, #fff8e8 0%, #ffe6b0 55%, #f5c86a 100%);
  border: 1.5px solid rgba(240, 179, 90, 0.45);
  box-shadow:
    0 3px 0 rgba(200, 140, 40, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  pointer-events: none;
}

.kp-tips-deco .kp-tips-bulb {
  width: 34px;
  height: 34px;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(240, 160, 40, 0.35));
}

.kp-tips-list {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kp-tips-empty {
  position: relative;
  z-index: 1;
  margin: 4px 0 2px;
  padding: 22px 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  color: #5f7f9a;
  background: rgba(255, 255, 255, 0.72);
  border: 1.5px dashed #c5ddf5;
  border-radius: 12px;
}

.kp-tips-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  border: 1.5px solid #c5ddf5;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.kp-tips-no {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #7aaee0 0%, #5b9bd5 60%, #3f7fbe 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 0 rgba(47, 100, 168, 0.28);
}

.kp-tips-text {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #2f4a63;
  font-weight: 600;
}

/* Tips 方案 B：悬浮按钮 + 侧栏 */
.kp-tips-fab {
  position: absolute;
  right: 18px;
  bottom: 58px;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1.5px solid rgba(240, 179, 90, 0.55);
  border-radius: 50%;
  cursor: pointer;
  background: linear-gradient(145deg, #fff8e6 0%, #ffe4a8 48%, #f5c86a 100%);
  box-shadow:
    0 3px 0 rgba(200, 140, 40, 0.28),
    0 8px 16px rgba(240, 170, 60, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kp-tips-fab:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow:
    0 4px 0 rgba(200, 140, 40, 0.28),
    0 10px 18px rgba(240, 170, 60, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.kp-tips-fab:active {
  transform: translateY(1px) scale(0.98);
  box-shadow:
    0 2px 0 rgba(200, 140, 40, 0.28),
    0 5px 10px rgba(240, 170, 60, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.kp-tips-fab[hidden] {
  display: none !important;
}

.kp-tips-fab-bulb {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 40%, #fff7c8 0%, #ffd24d 55%, #f0a020 100%);
  box-shadow:
    0 0 0 2px rgba(255, 220, 120, 0.45),
    0 1px 4px rgba(200, 130, 20, 0.28);
  animation: kp-tips-glow 1.8s ease-in-out infinite;
}

.kp-tips-fab-bulb .kp-tips-bulb {
  width: 22px;
  height: 22px;
  display: block;
}

@keyframes kp-tips-glow {
  0%,
  100% {
    box-shadow:
      0 0 0 2px rgba(255, 220, 120, 0.4),
      0 1px 4px rgba(200, 130, 20, 0.25);
  }
  50% {
    box-shadow:
      0 0 0 4px rgba(255, 220, 120, 0.55),
      0 2px 6px rgba(200, 130, 20, 0.32);
  }
}

.kp-tips-bulb-rays {
  animation: kp-tips-rays 1.8s ease-in-out infinite;
  transform-origin: 24px 24px;
}

@keyframes kp-tips-rays {
  0%,
  100% {
    opacity: 0.72;
  }
  50% {
    opacity: 1;
  }
}

.kp-tips-bulb-glass {
  fill: #ffd24d;
}

.kp-tips-drawer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.kp-tips-drawer-badge {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 230, 140, 0.55), transparent 62%),
    linear-gradient(145deg, #fff8e8 0%, #ffe6b0 55%, #f5c86a 100%);
  border: 1.5px solid rgba(240, 179, 90, 0.45);
  box-shadow: 0 1px 0 rgba(200, 140, 40, 0.2);
}

.kp-tips-drawer-badge .kp-tips-bulb {
  width: 20px;
  height: 20px;
  display: block;
}

.kp-tips-drawer-title {
  color: #5a3a10;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.kp-tips-drawer-root {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

.kp-tips-drawer-root.is-open {
  pointer-events: auto;
}

.kp-tips-drawer-root[hidden] {
  display: none !important;
}

.kp-tips-drawer-mask {
  position: absolute;
  inset: 0;
  background: rgba(28, 44, 62, 0.28);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.kp-tips-drawer-root.is-open .kp-tips-drawer-mask {
  opacity: 1;
}

.kp-tips-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 78%);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 92% 8%, rgba(126, 182, 239, 0.2), transparent 30%),
    linear-gradient(180deg, #f5f9ff 0%, #eef5fc 100%);
  border-left: 1.5px solid #c5ddf5;
  box-shadow: -10px 0 28px rgba(47, 80, 120, 0.16);
  transform: translateX(104%);
  transition: transform 0.22s ease;
  padding: 16px 14px 14px;
}

.kp-tips-drawer-root.is-open .kp-tips-drawer {
  transform: translateX(0);
}

.kp-tips-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.kp-tips-drawer-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.kp-tips-drawer-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1.5px solid #c5ddf5;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  color: #3f6f9a;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.kp-tips-drawer-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.kp-tips-drawer .kp-tips-list {
  gap: 10px;
}

.kp-foot {
  margin-top: 14px;
  padding-top: 12px;
  /* 与上方「✦ 解题步骤」四角星左对齐 */
  padding-left: 8px;
  border-top: 1px dashed rgba(200, 170, 80, 0.28);
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.kp-pager {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: 12px;
  margin-top: 2px;
}

.kp-pager-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #b7e0d5;
  background: #fff;
  color: #2f9e90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 0 rgba(61, 184, 168, 0.2);
}

.kp-pager-btn:disabled {
  opacity: 0.35;
  cursor: default;
  box-shadow: none;
}

.kp-pager-btn svg {
  width: 16px;
  height: 16px;
}

.kp-pager-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kp-pager-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c5ddd5;
  padding: 0;
}

.kp-pager-dot.active {
  width: 20px;
  border-radius: 999px;
  background: #3db8a8;
}
