/* ============================================================
 * 知识图谱乐园 · 多乐园视觉语言
 * ============================================================ */
:root {
  --kp-navy: #26335f;
  --kp-ink: #3d355f;
  --kp-muted: #6f6890;
  --kp-line: #e5e0f4;
  --kp-paper: #ffffff;
  --kp-wash: #f8f6ff;
  --kp-math: #4d96ff;
  --kp-chinese: #ff6b9d;
  --kp-english: #55b96a;
  --kp-physics: #ff9f45;
  --kp-accent: #7b6cf6;
  --kp-soft-blue: #eaf2ff;
  --kp-soft-pink: #fff0f5;
  --kp-soft-green: #ecfaf0;
  --kp-soft-orange: #fff4e9;
  --kp-shadow: 0 6px 0 rgba(74, 63, 107, .10), 0 14px 32px rgba(74, 63, 107, .12);
}
body.kp-page {
  background:
    radial-gradient(circle at 9% 10%, rgba(255, 255, 255, .78) 0 7%, transparent 7.4%),
    radial-gradient(circle at 92% 20%, rgba(255, 241, 171, .62) 0 8%, transparent 8.4%),
    linear-gradient(160deg, #aee6ff 0%, #d8d2ff 47%, #ffd9e9 100%);
  user-select: text;
}
.kp-page #app { max-width: 1500px; margin: 0 auto; padding-bottom: 70px; }
.kp-shell { width: 100%; }
.kp-topbar { margin-bottom: 18px; }
.kp-topbar .topbar-park-pill.on {
  background: linear-gradient(135deg, #e7f8ef, #dff1ff);
  color: #225a75;
  border-color: #8ed5c5;
}
.kp-sound { display: none; }
.kp-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
  gap: 22px;
  padding: 28px 30px;
  border-radius: 30px;
  background: linear-gradient(135deg, #ffffff 0%, #fffaf3 56%, #f1fff8 100%);
  box-shadow: var(--kp-shadow);
  margin-bottom: 18px;
}
.kp-hero::before {
  content: "";
  position: absolute;
  right: -80px;
  top: -110px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(107, 203, 119, .25), rgba(77, 150, 255, .08) 55%, transparent 70%);
}
.kp-hero::after {
  content: "⌁  ·  ⌁  ·  ⌁";
  position: absolute;
  right: 22px;
  bottom: 12px;
  color: rgba(77, 150, 255, .24);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 8px;
}
.kp-hero-copy { position: relative; z-index: 1; min-width: 0; }
.kp-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border: 2px dashed #8dd8c1;
  border-radius: 999px;
  background: #effcf7;
  color: #1d7569;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 13px;
}
.kp-hero h1 {
  font-size: clamp(28px, 4.4vw, 50px);
  line-height: 1.15;
  letter-spacing: .5px;
  color: var(--kp-navy);
  font-weight: 950;
}
.kp-hero h1 em {
  font-style: normal;
  color: transparent;
  background: linear-gradient(90deg, #3e8f74, #4d96ff 48%, #ff6b9d);
  -webkit-background-clip: text;
  background-clip: text;
}
.kp-hero p.lede {
  max-width: 760px;
  margin-top: 12px;
  color: #5d5778;
  font-size: clamp(14px, 1.45vw, 17px);
  font-weight: 700;
  line-height: 1.8;
}
.kp-hero-tools { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.kp-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.kp-actions .btn { min-height: 48px; padding: 12px 22px; font-size: 15px; }
.kp-actions .btn-soft {
  background: #fff;
  color: #3c5cc4;
  box-shadow: inset 0 0 0 2px #cfdbf7, 0 4px 0 rgba(77, 150, 255, .12);
}
.kp-actions .btn-soft:active { box-shadow: inset 0 0 0 2px #cfdbf7; }
.kp-orbit {
  position: relative;
  z-index: 1;
  min-height: 230px;
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.96) 0 23%, transparent 24%),
    repeating-radial-gradient(circle at 50% 50%, rgba(77,150,255,.13) 0 2px, transparent 2px 39px),
    linear-gradient(145deg, #eff8ff, #f8f2ff);
  border: 2px solid #e5e1f5;
  overflow: hidden;
}
.kp-orbit::before,
.kp-orbit::after {
  content: "";
  position: absolute;
  inset: 24px;
  border: 2px dashed rgba(77, 150, 255, .24);
  border-radius: 50%;
  transform: rotate(-16deg) scaleY(.66);
}
.kp-orbit::after { transform: rotate(28deg) scaleY(.5); border-color: rgba(107,203,119,.3); }
.kp-orbit-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff, #fff8db);
  border: 4px solid #ffd54d;
  box-shadow: 0 10px 26px rgba(74, 63, 107, .18);
  text-align: center;
  font-size: 42px;
}
.kp-orbit-center small {
  display: block;
  margin-top: -12px;
  font-size: 11px;
  color: #9a6b00;
  font-weight: 900;
}
.kp-orbit-node {
  position: absolute;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 19px;
  background: #fff;
  border: 3px solid var(--nc, #4d96ff);
  color: var(--nc, #4d96ff);
  font-size: 26px;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--nc) 25%, transparent), 0 8px 18px rgba(74,63,107,.12);
  animation: kpFloat 4.6s ease-in-out infinite;
}
.kp-orbit-node.n1 { left: 9%; top: 18%; animation-delay: -.4s; }
.kp-orbit-node.n2 { right: 10%; top: 13%; animation-delay: -1.2s; }
.kp-orbit-node.n3 { right: 14%; bottom: 14%; animation-delay: -2.1s; }
.kp-orbit-node.n4 { left: 12%; bottom: 12%; animation-delay: -2.9s; }
@keyframes kpFloat { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(2deg); } }
.kp-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.kp-stat {
  background: rgba(255,255,255,.92);
  border-radius: 22px;
  padding: 16px 18px;
  border: 2px solid rgba(255,255,255,.8);
  box-shadow: 0 5px 0 rgba(74,63,107,.08), 0 10px 24px rgba(74,63,107,.1);
}
.kp-stat .num { display: block; color: var(--kp-navy); font-size: clamp(24px, 3.1vw, 36px); font-weight: 950; line-height: 1; }
.kp-stat .label { display: block; margin-top: 7px; color: var(--kp-muted); font-size: 12px; font-weight: 800; }
.kp-section-head {
  display: flex;
  align-items: end;
  gap: 12px;
  margin: 24px 2px 12px;
}
.kp-section-head h2 { color: var(--kp-navy); font-size: clamp(19px, 2vw, 24px); font-weight: 950; }
.kp-section-head p { color: var(--kp-muted); font-size: 12px; font-weight: 700; line-height: 1.6; margin-left: auto; max-width: 640px; text-align: right; }
.kp-subjects {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.kp-subject-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 176px;
  padding: 17px;
  border-radius: 24px;
  border: 3px solid transparent;
  background: var(--sb, #eaf2ff);
  color: var(--kp-ink);
  text-decoration: none;
  overflow: hidden;
  transition: transform .18s cubic-bezier(.34,1.56,.64,1), border-color .18s;
}
.kp-subject-card::after {
  content: attr(data-mark);
  position: absolute;
  right: -8px;
  bottom: -26px;
  color: rgba(255,255,255,.66);
  font-size: 98px;
  font-weight: 950;
  line-height: 1;
  transform: rotate(-8deg);
  pointer-events: none;
}
.kp-subject-card:hover { transform: translateY(-5px); border-color: var(--sc); }
.kp-subject-card .sc-ico {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255,255,255,.8);
  font-size: 27px;
  box-shadow: inset 0 -4px 0 rgba(74,63,107,.07);
}
.kp-subject-card .kp-card-read { position: absolute; top: 12px; right: 12px; z-index: 1; background: rgba(255,255,255,.88); }
.kp-subject-card h3 { margin-top: 12px; font-size: 20px; font-weight: 950; color: var(--kp-navy); }
.kp-subject-card p { margin-top: 4px; font-size: 12px; font-weight: 700; line-height: 1.65; color: #655f7c; max-width: 85%; }
.kp-subject-card .sc-meta { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 900; color: #4d476b; }
.kp-subject-card .sc-go { margin-left: auto; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--sc); font-size: 15px; }
.kp-journey {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.kp-step {
  display: flex;
  gap: 12px;
  padding: 17px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 5px 0 rgba(74,63,107,.08), 0 10px 22px rgba(74,63,107,.08);
  border: 2px solid #f0edf9;
}
.kp-step-no {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 950;
  background: linear-gradient(135deg, #4d96ff, #7b6cf6);
  box-shadow: inset 0 -4px 0 rgba(0,0,0,.1);
}
.kp-step:nth-child(2) .kp-step-no { background: linear-gradient(135deg, #6bcb77, #3ec6c6); }
.kp-step:nth-child(3) .kp-step-no { background: linear-gradient(135deg, #ff9f45, #ff6b9d); }
.kp-step h3 { color: var(--kp-navy); font-size: 16px; font-weight: 950; }
.kp-step p { color: var(--kp-muted); font-size: 12px; font-weight: 700; line-height: 1.65; margin-top: 4px; }
.kp-step .kp-voice-btn { margin-top: 7px; }
.kp-note .kp-voice-btn { margin-top: 7px; }
.kp-note {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 13px 16px;
  border: 2px dashed #c9d9f8;
  border-radius: 18px;
  background: rgba(255,255,255,.65);
  color: #5b6781;
  font-size: 12px;
  line-height: 1.7;
  font-weight: 700;
}
.kp-note strong { color: #3c5cc4; }
.kp-note a { color: #2459a8; font-weight: 900; }

/* ---------- 图谱 ---------- */
.kp-page-explore #app { max-width: none; }
.kp-explore-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 2px 12px;
}
.kp-explore-title { min-width: 220px; }
.kp-explore-title h1 { color: var(--kp-navy); font-size: clamp(24px, 3vw, 34px); font-weight: 950; }
.kp-explore-title p { color: var(--kp-muted); font-size: 12px; font-weight: 700; margin-top: 3px; }
.kp-subject-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.76);
  border: 2px solid rgba(255,255,255,.85);
  box-shadow: 0 4px 14px rgba(74,63,107,.08);
  overflow-x: auto;
  scrollbar-width: none;
}
.kp-subject-tabs::-webkit-scrollbar { display: none; }
.kp-subject-tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 40px;
  padding: 7px 14px;
  border-radius: 999px;
  color: #5e577b;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  border: 2px solid transparent;
}
.kp-subject-tab:hover { background: #fff; }
.kp-subject-tab.on { background: #fff; border-color: var(--sc, #4d96ff); color: var(--sc, #4d96ff); box-shadow: 0 3px 0 color-mix(in srgb, var(--sc) 20%, transparent); }
.kp-explore-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.kp-explore-actions .btn { min-height: 42px; padding: 9px 16px; font-size: 13px; }
.kp-explore-voice { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.kp-explore-voice .kp-voice-picker { max-width: 230px; }
.kp-explore-voice .kp-voice-btn { min-height: 42px; }
.kp-explore-layout {
  display: grid;
  grid-template-columns: minmax(250px, 304px) minmax(0, 1fr) minmax(270px, 340px);
  gap: 12px;
  align-items: stretch;
  min-height: calc(100vh - 185px);
}
.kp-panel {
  min-width: 0;
  background: rgba(255,255,255,.95);
  border-radius: 24px;
  border: 2px solid rgba(255,255,255,.9);
  box-shadow: 0 6px 0 rgba(74,63,107,.08), 0 12px 26px rgba(74,63,107,.1);
}
.kp-directory { display: flex; flex-direction: column; max-height: calc(100vh - 185px); overflow: hidden; }
.kp-directory-head { padding: 15px 15px 10px; border-bottom: 2px solid var(--kp-line); }
.kp-directory-head h2 { color: var(--kp-navy); font-size: 17px; font-weight: 950; display: flex; gap: 7px; align-items: center; }
.kp-directory-head h2 span { margin-left: auto; font-size: 11px; color: var(--kp-muted); font-weight: 800; }
.kp-search-row { position: relative; margin-top: 10px; }
.kp-search-row input {
  width: 100%;
  height: 44px;
  padding: 10px 38px 10px 13px;
  border: 2px solid #dde6f6;
  border-radius: 14px;
  background: #f9fbff;
  color: var(--kp-ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  outline: none;
}
.kp-search-row input:focus { border-color: #79a9f7; box-shadow: 0 0 0 3px rgba(77,150,255,.14); }
.kp-search-clear {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #eef2fa;
  color: #6f7895;
  font-size: 15px;
  cursor: pointer;
}
.kp-filter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.kp-filter-row select {
  width: 100%;
  min-height: 40px;
  border: 2px solid #e0e7f4;
  border-radius: 12px;
  padding: 7px 9px;
  background: #fff;
  color: #4b5576;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
}
.kp-result-count { margin-top: 8px; color: #7b7595; font-size: 11px; font-weight: 800; }
.kp-list { flex: 1; min-height: 120px; overflow-y: auto; padding: 7px; overscroll-behavior: contain; }
.kp-list-item {
  width: 100%;
  min-height: 46px;
  border: 2px solid transparent;
  border-radius: 13px;
  background: transparent;
  padding: 8px 9px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--kp-ink);
  transition: background .15s, border-color .15s;
}
.kp-list-item:hover { background: #f4f8ff; border-color: #dbe8ff; }
.kp-list-item.on { background: linear-gradient(135deg, #edf5ff, #f2efff); border-color: #b9cdf8; }
.kp-list-item .li-name { display: block; font-size: 13px; font-weight: 900; line-height: 1.45; }
.kp-list-item .li-meta { display: block; margin-top: 2px; color: #8a84a1; font-size: 10.5px; font-weight: 700; line-height: 1.35; }
.kp-list-empty { padding: 24px 12px; text-align: center; color: #8a84a1; font-size: 12px; font-weight: 700; line-height: 1.7; }
.kp-list-chapter {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 4px 0 3px;
  padding: 7px 8px 5px;
  background: rgba(255, 255, 255, .96);
  color: #8a6380;
  font-size: 10.5px;
  font-weight: 950;
  line-height: 1.45;
  border-bottom: 1px dashed #eadfee;
  backdrop-filter: blur(4px);
}
.kp-list-more {
  width: calc(100% - 10px);
  min-height: 42px;
  margin: 8px 5px;
  border: 2px dashed #c9d8f4;
  border-radius: 13px;
  background: #f7faff;
  color: #315aa8;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.kp-list-more small { color: #7b7595; font-size: 10px; font-weight: 700; }
.kp-list-more:hover { border-color: #8eb3ef; background: #edf5ff; }
.kp-graph-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 560px;
}
.kp-graph-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 11px 12px;
  border-bottom: 2px solid var(--kp-line);
  background: linear-gradient(180deg, #fff, #fbfaff);
}
.kp-seg {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: #f0edf8;
}
.kp-seg button {
  min-height: 34px;
  padding: 5px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #746e8d;
  font-family: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}
.kp-seg button.on { background: #fff; color: #315aa8; box-shadow: 0 2px 5px rgba(74,63,107,.1); }
.kp-tool-btn {
  width: 36px;
  height: 36px;
  border: 2px solid #e5e1f0;
  border-radius: 11px;
  background: #fff;
  color: #555a74;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}
.kp-tool-btn:hover { border-color: #9fbdf5; color: #2f63bd; }
.kp-tool-spacer { margin-left: auto; }
.kp-graph-hint { color: #8a84a1; font-size: 10.5px; font-weight: 700; white-space: nowrap; }
#kpGraph {
  flex: 1;
  min-height: 500px;
  width: 100%;
  background:
    radial-gradient(rgba(77,150,255,.10) 1.2px, transparent 1.3px) 0 0 / 24px 24px,
    linear-gradient(180deg, #fcfdff, #f9f7ff);
  outline: none;
}
.kp-graph-empty {
  position: absolute;
  inset: 66px 0 0;
  display: grid;
  place-items: center;
  padding: 30px;
  text-align: center;
  color: #8a84a1;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.8;
  pointer-events: none;
}
.kp-graph-empty[hidden] { display: none; }
.kp-detail { display: flex; flex-direction: column; max-height: calc(100vh - 185px); overflow: hidden; }
.kp-detail-body { overflow-y: auto; padding: 17px; overscroll-behavior: contain; }
.kp-detail-kicker { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.kp-detail-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 9px; }
.kp-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f1f3fb;
  color: #61688a;
  font-size: 10.5px;
  font-weight: 900;
}
.kp-chip.blue { background: #e9f2ff; color: #2d64bd; }
.kp-chip.green { background: #e9f8ee; color: #227d43; }
.kp-chip.pink { background: #fff0f5; color: #bd3f6c; }
.kp-chip.orange { background: #fff3e6; color: #a95a08; }
.kp-detail h2 { color: var(--kp-navy); font-size: clamp(20px, 2vw, 27px); line-height: 1.35; font-weight: 950; overflow-wrap: anywhere; }
.kp-detail .kd-chapter { margin-top: 5px; color: #817a9b; font-size: 12px; font-weight: 700; line-height: 1.55; }
.kp-detail .kd-id {
  display: inline-block;
  margin-top: 3px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f1f3fb;
  color: #77718f;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 9.5px;
  letter-spacing: .2px;
}
.kp-standard-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.kp-standard-list span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3f5fb;
  color: #69708c;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 9.5px;
  font-weight: 700;
}
.kp-detail-empty {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  text-align: center;
  color: #817b96;
}
.kp-detail-empty span { font-size: 38px; margin-bottom: 8px; }
.kp-detail-empty b { color: var(--kp-navy); font-size: 16px; font-weight: 950; }
.kp-detail-empty p { margin-top: 6px; font-size: 11.5px; font-weight: 700; line-height: 1.7; }
.kp-detail-desc {
  margin-top: 14px;
  padding: 13px 14px;
  border-radius: 16px;
  background: #f8f8ff;
  color: #514b6c;
  font-size: 13px;
  line-height: 1.8;
  font-weight: 650;
}
.kp-detail h3 { margin-top: 17px; color: var(--kp-navy); font-size: 14px; font-weight: 950; }
.kp-mastery { margin: 8px 0 0; padding-left: 19px; color: #625c7b; font-size: 12px; line-height: 1.75; font-weight: 700; }
.kp-mastery li { margin: 3px 0; }
.kp-relations { display: flex; flex-direction: column; gap: 7px; margin-top: 8px; }
.kp-relation {
  width: 100%;
  padding: 8px 10px;
  border: 2px solid #ece8f7;
  border-radius: 13px;
  background: #fff;
  color: #514b6c;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
}
.kp-relation:hover { border-color: #b9cdf8; background: #f8fbff; }
.kp-relation small { display: block; color: #9a94ad; font-size: 10px; font-weight: 700; margin-top: 2px; }
.kp-detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 16px; }
.kp-detail-actions .btn { width: 100%; min-height: 42px; padding: 8px 9px; font-size: 12px; }
.kp-detail-actions .btn-wide { grid-column: 1 / -1; }
.kp-drawer-toggle { display: none; }
.kp-drawer-backdrop { display: none; }
.kp-legend { display: flex; flex-wrap: wrap; gap: 10px; padding: 8px 14px 11px; color: #7b7595; font-size: 10.5px; font-weight: 800; border-top: 1px solid #f0edf7; }
.kp-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; background: var(--lc, #4d96ff); }

/* ---------- 诊断 ---------- */
.kp-page-diagnose #app { max-width: 1180px; }
.kp-diagnose-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.kp-diagnose-head h1 { color: var(--kp-navy); font-size: clamp(25px, 3.2vw, 36px); font-weight: 950; }
.kp-diagnose-head p { color: var(--kp-muted); font-size: 12px; font-weight: 700; margin-top: 2px; }
.kp-diagnose-head .kp-explore-actions { margin-left: auto; }
.kp-setup {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: 16px;
  align-items: start;
}
.kp-setup-main { padding: 20px; }
.kp-setup h2 { color: var(--kp-navy); font-size: 20px; font-weight: 950; }
.kp-setup .kp-muted { margin-top: 4px; color: var(--kp-muted); font-size: 12px; font-weight: 700; line-height: 1.65; }
.kp-subject-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 15px; }
.kp-subject-choice {
  min-height: 92px;
  border: 3px solid transparent;
  border-radius: 17px;
  background: var(--sb, #eef4ff);
  color: var(--kp-ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  padding: 9px;
}
.kp-subject-choice .ico { display: block; font-size: 28px; margin-bottom: 4px; }
.kp-subject-choice small { display: block; margin-top: 2px; color: #77718f; font-size: 10px; font-weight: 700; }
.kp-subject-choice.on { border-color: var(--sc); background: #fff; box-shadow: 0 4px 0 color-mix(in srgb, var(--sc) 20%, transparent); }
.kp-field-label { display: flex; align-items: center; gap: 6px; margin: 18px 0 7px; color: var(--kp-navy); font-size: 13px; font-weight: 950; }
.kp-field-label small { color: var(--kp-muted); font-size: 10.5px; font-weight: 700; }
.kp-scope-row { display: flex; gap: 7px; flex-wrap: wrap; }
.kp-scope-btn {
  min-height: 42px;
  padding: 8px 13px;
  border: 2px solid #e1e5f1;
  border-radius: 12px;
  background: #fff;
  color: #5c5874;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.kp-scope-btn.on { border-color: #7b9fea; background: #edf4ff; color: #2f5ca8; }
.kp-target-search { position: relative; margin-top: 9px; }
.kp-target-search input { width: 100%; height: 46px; border: 2px solid #dfe6f5; border-radius: 14px; padding: 10px 12px; background: #fbfcff; font-family: inherit; font-size: 16px; font-weight: 700; color: var(--kp-ink); outline: none; }
.kp-target-search input:focus { border-color: #7da8ee; box-shadow: 0 0 0 3px rgba(77,150,255,.12); }
.kp-target-results { max-height: 230px; overflow-y: auto; margin-top: 7px; border: 2px solid #eeeaf8; border-radius: 15px; padding: 5px; background: #fff; }
.kp-target-result { width: 100%; border: 0; border-radius: 10px; background: transparent; padding: 9px 10px; text-align: left; color: #514b6c; font-family: inherit; cursor: pointer; }
.kp-target-result:hover { background: #f3f7ff; }
.kp-target-result b { display: block; font-size: 12.5px; font-weight: 900; }
.kp-target-result small { display: block; margin-top: 2px; color: #8a84a1; font-size: 10.5px; font-weight: 700; }
.kp-selected { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; min-height: 25px; }
.kp-selected:empty::before { content: "还没有选择知识点"; color: #a29caf; font-size: 11px; font-weight: 700; }
.kp-target-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 5px 7px 5px 10px; border-radius: 999px; background: #eef4ff; color: #315aa8; font-size: 11px; font-weight: 900; }
.kp-target-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
.kp-target-chip button { border: 0; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #5f75a2; font-size: 12px; font-weight: 900; cursor: pointer; }
.kp-setup-side { display: flex; flex-direction: column; gap: 12px; }
.kp-setup-card { padding: 18px; }
.kp-setup-card h3 { color: var(--kp-navy); font-size: 15px; font-weight: 950; }
.kp-setup-card p { margin-top: 6px; color: var(--kp-muted); font-size: 12px; font-weight: 700; line-height: 1.75; }
.kp-mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 11px; }
.kp-mini-stat { border-radius: 13px; padding: 9px; background: #f8f7ff; }
.kp-mini-stat b { display: block; color: var(--kp-navy); font-size: 18px; font-weight: 950; }
.kp-mini-stat span { color: #827c98; font-size: 10px; font-weight: 800; }
.kp-start-btn { width: 100%; margin-top: 12px; min-height: 50px; font-size: 15px; }
.kp-demo-link { display: block; text-align: center; margin-top: 8px; color: #6b6686; font-size: 11px; font-weight: 800; }
.kp-quiz-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 265px; gap: 14px; align-items: start; }
.kp-quiz { padding: 20px; }
.kp-quiz-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kp-quiz-head .kp-chip { font-size: 11px; }
.kp-progress { flex: 1; min-width: 130px; height: 12px; border-radius: 999px; background: #eeeaf7; overflow: hidden; }
.kp-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6bcb77, #4d96ff); transition: width .3s; }
.kp-quiz-meta { color: #817b96; font-size: 11px; font-weight: 900; }
.kp-question-topic { margin-top: 19px; color: #827c98; font-size: 11.5px; font-weight: 800; }
.kp-question-topic b { color: #3d5f96; font-size: 13px; }
.kp-question {
  margin-top: 8px;
  color: var(--kp-navy);
  font-size: clamp(19px, 2.6vw, 28px);
  font-weight: 900;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.kp-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 17px; }
.kp-choice {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border: 3px solid #e8e4f2;
  border-radius: 16px;
  background: #fff;
  color: #4f496a;
  text-align: left;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.kp-choice:hover { border-color: #a9c2f1; background: #f8fbff; transform: translateY(-2px); }
.kp-choice .key { flex: none; width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; background: #f0f3fb; color: #526184; font-size: 13px; font-weight: 950; }
.kp-answer-row { display: flex; gap: 8px; margin-top: 15px; }
.kp-answer-row input { flex: 1; min-width: 0; height: 50px; border: 3px solid #dfe6f4; border-radius: 15px; padding: 10px 13px; background: #fbfcff; color: var(--kp-ink); font-family: inherit; font-size: 17px; font-weight: 700; outline: none; }
.kp-answer-row input:focus { border-color: #7ea8ee; box-shadow: 0 0 0 3px rgba(77,150,255,.12); }
.kp-answer-row .btn { min-height: 50px; padding: 10px 20px; font-size: 14px; }
.kp-question-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 13px; }
.kp-question-actions .btn { min-height: 42px; padding: 8px 15px; font-size: 12px; }
.kp-question-actions .kp-help { margin-left: auto; color: #8a84a1; font-size: 10.5px; font-weight: 700; }
.kp-feedback { display: none; margin-top: 16px; padding: 13px 15px; border-radius: 16px; border: 2px solid; font-size: 12px; line-height: 1.75; font-weight: 700; }
.kp-feedback-head { display: flex; align-items: flex-start; gap: 7px; flex-wrap: wrap; }
.kp-feedback-head strong { flex: 1 1 160px; }
.kp-feedback-head .kp-voice-btn { margin-left: auto; }
.kp-feedback.show { display: block; animation: kpRise .22s ease; }
.kp-feedback.ok { background: #effcf3; border-color: #a9dfb5; color: #276d3d; }
.kp-feedback.bad { background: #fff8ed; border-color: #ffd39b; color: #8a5908; }
.kp-feedback strong { display: block; font-size: 14px; margin-bottom: 3px; }
@keyframes kpRise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.kp-quiz-side { display: flex; flex-direction: column; gap: 10px; }
.kp-side-card { padding: 15px; }
.kp-side-card h3 { color: var(--kp-navy); font-size: 14px; font-weight: 950; }
.kp-side-card p { color: var(--kp-muted); font-size: 11.5px; font-weight: 700; line-height: 1.7; margin-top: 4px; }
.kp-quiz-list { display: flex; flex-direction: column; gap: 5px; margin-top: 9px; max-height: 270px; overflow-y: auto; }
.kp-quiz-item { display: flex; gap: 7px; align-items: center; padding: 6px 8px; border-radius: 10px; background: #f8f7ff; color: #625c7b; font-size: 11px; font-weight: 800; }
.kp-quiz-item .dot { width: 8px; height: 8px; border-radius: 50%; background: #d3cee1; flex: none; }
.kp-quiz-item.mastered .dot { background: #55b96a; }
.kp-quiz-item.shaky .dot { background: #ffb020; }
.kp-quiz-item.weak .dot { background: #ff6b6b; }
.kp-quiz-item.current { background: #edf4ff; color: #315aa8; }
.kp-result-wrap { display: flex; flex-direction: column; gap: 14px; }
.kp-result-hero { padding: 24px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(220px, .8fr); gap: 18px; align-items: center; }
.kp-result-tools { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin: 7px 0 3px; }
.kp-result-hero h2 { color: var(--kp-navy); font-size: clamp(24px, 3vw, 34px); font-weight: 950; }
.kp-result-hero p { margin-top: 7px; color: var(--kp-muted); font-size: 13px; font-weight: 700; line-height: 1.75; }
.kp-result-badge { display: flex; gap: 9px; justify-content: flex-end; flex-wrap: wrap; }
.kp-score { min-width: 104px; padding: 14px 12px; border-radius: 20px; background: #f8f7ff; text-align: center; }
.kp-score b { display: block; color: var(--kp-navy); font-size: 29px; font-weight: 950; }
.kp-score span { display: block; margin-top: 2px; color: #7f7996; font-size: 10.5px; font-weight: 800; }
.kp-score.weak b { color: #d04c4c; }
.kp-score.shaky b { color: #b87b00; }
.kp-score.mastered b { color: #278c4b; }
.kp-result-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr); gap: 14px; }
.kp-result-card { padding: 18px; }
.kp-result-card h3 { display: flex; align-items: center; gap: 7px; color: var(--kp-navy); font-size: 17px; font-weight: 950; }
.kp-result-card h3 small { margin-left: auto; color: #8a84a1; font-size: 10.5px; font-weight: 700; }
.kp-root-list { display: flex; flex-direction: column; gap: 8px; margin-top: 11px; }
.kp-root-item { display: flex; gap: 10px; padding: 10px 11px; border-radius: 14px; background: #fff7f2; border: 2px solid #ffddc8; }
.kp-root-item .ri-ico { flex: none; font-size: 21px; }
.kp-root-item b { display: block; color: #8b4728; font-size: 13px; font-weight: 900; }
.kp-root-item small { display: block; margin-top: 2px; color: #9a745f; font-size: 10.5px; font-weight: 700; line-height: 1.5; }
.kp-path { position: relative; display: flex; flex-direction: column; gap: 0; margin-top: 10px; }
.kp-path-item { position: relative; display: flex; gap: 10px; padding: 0 0 12px; }
.kp-path-item::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: #e5e1f1; }
.kp-path-item:last-child::before { display: none; }
.kp-path-no { position: relative; z-index: 1; flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #edf4ff; color: #315aa8; font-size: 11px; font-weight: 950; border: 2px solid #c7dafb; }
.kp-path-item.weak .kp-path-no { background: #fff0ef; border-color: #ffc3be; color: #c8473f; }
.kp-path-item.shaky .kp-path-no { background: #fff8e6; border-color: #ffdb91; color: #9b6a00; }
.kp-path-body { min-width: 0; padding-top: 3px; }
.kp-path-body b { display: block; color: #4e4869; font-size: 12.5px; font-weight: 900; line-height: 1.5; }
.kp-path-body small { display: block; color: #8a84a1; font-size: 10.5px; font-weight: 700; line-height: 1.5; margin-top: 1px; }
.kp-chapter-list { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; max-height: 430px; overflow-y: auto; }
.kp-chapter { padding: 9px 10px; border-radius: 13px; background: #f8f7ff; border: 2px solid #efecf8; }
.kp-chapter-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 6px; }
.kp-chapter-head b { color: #514b6c; font-size: 11.5px; font-weight: 900; line-height: 1.5; }
.kp-chapter-head span { margin-left: auto; color: #8a84a1; font-size: 10px; font-weight: 800; line-height: 1.5; text-align: right; }
.kp-chapter-bar { display: flex; height: 6px; border-radius: 999px; overflow: hidden; margin-top: 6px; background: #ece9f4; }
.kp-chapter-bar i { display: block; height: 100%; }
.kp-chapter-bar .m { background: #6bcb77; }
.kp-chapter-bar .i { background: #b9e8c4; }
.kp-chapter-bar .s { background: #ffd15c; }
.kp-chapter-bar .w { background: #ff7777; }
.kp-mastery-note { margin-top: 9px; color: #8a84a1; font-size: 10.5px; font-weight: 700; line-height: 1.65; }
.kp-result-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 15px; }
.kp-result-actions .btn { min-height: 42px; padding: 9px 16px; font-size: 12px; }
.kp-result-empty { padding: 22px; color: #8a84a1; font-size: 12px; font-weight: 700; line-height: 1.7; }
.kp-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 90;
  transform: translate(-50%, 16px);
  opacity: 0;
  padding: 10px 17px;
  border-radius: 999px;
  background: rgba(38, 51, 95, .94);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(38,51,95,.25);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}
.kp-toast.show { opacity: 1; transform: translate(-50%, 0); }
.kp-loading { padding: 36px 20px; text-align: center; color: #7f7996; font-size: 13px; font-weight: 800; }


/* ---------- 诊断交互补全 ---------- */
.kp-mode-row{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin-top:9px}
.kp-mode-card{display:flex;flex-direction:column;gap:5px;min-height:112px;padding:13px 14px;border:3px solid #e7e3f1;border-radius:16px;background:#fff;color:#514b6c;font-family:inherit;text-align:left;cursor:pointer;transition:border-color .16s,background .16s,transform .16s}
.kp-mode-card:hover{border-color:#b8cbf0;background:#f9fbff;transform:translateY(-2px)}
.kp-mode-card.on{border-color:#7b9fea;background:linear-gradient(135deg,#eef5ff,#f7f3ff);box-shadow:0 4px 0 rgba(77,150,255,.14)}
.kp-mode-card b{color:var(--kp-navy);font-size:14px;font-weight:950}
.kp-mode-card span{color:#716b89;font-size:11.5px;font-weight:700;line-height:1.65}
.kp-target-block{margin-top:5px;padding:13px;border-radius:18px;background:#fbfaff;border:2px solid #efecf7}
.kp-target-empty{padding:16px 12px;text-align:center;color:#8a84a1;font-size:11.5px;font-weight:700;line-height:1.7}
.kp-chapter-picker{display:flex;flex-direction:column;gap:6px;margin-top:9px;max-height:360px;overflow-y:auto;overscroll-behavior:contain;padding-right:2px}
.kp-chapter-pick{border:2px solid #ece8f5;border-radius:13px;background:#fff;overflow:hidden}
.kp-chapter-pick summary{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:7px;min-height:44px;padding:8px 10px;cursor:pointer;list-style:none}
.kp-chapter-pick summary::-webkit-details-marker{display:none}
.kp-chapter-pick summary::after{content:"▾";color:#8a84a1;font-size:11px;transition:transform .15s}
.kp-chapter-pick[open] summary::after{transform:rotate(180deg)}
.kp-chapter-pick summary>span{color:#315aa8;font-size:10.5px;font-weight:950;white-space:nowrap}
.kp-chapter-pick summary>b{min-width:0;color:#514b6c;font-size:12px;font-weight:900;line-height:1.45;overflow-wrap:anywhere}
.kp-chapter-pick summary>small{color:#8a84a1;font-size:10px;font-weight:800;white-space:nowrap}
.kp-chapter-pick>div{display:flex;flex-wrap:wrap;gap:5px;padding:2px 9px 10px}
.kp-pick-topic,.kp-weak-pick{min-height:34px;padding:5px 9px;border:2px solid #e7e4f0;border-radius:10px;background:#fff;color:#5c5677;font-family:inherit;font-size:10.5px;font-weight:800;line-height:1.4;text-align:left;cursor:pointer}
.kp-pick-topic:hover,.kp-weak-pick:hover{border-color:#a9c2f1;background:#f7faff}
.kp-pick-topic.on{border-color:#6f9ce7;background:#edf4ff;color:#315aa8}
.kp-weak-pick{border-color:#ffd8c3;background:#fff8f2;color:#84512f}
.kp-question-figure{max-width:100%;margin-top:13px;padding:10px;border:2px solid #ece8f5;border-radius:14px;background:#fff;overflow-x:auto;text-align:center}
.kp-question-figure img,.kp-question-figure svg{max-width:100%;height:auto}
.kp-reference{margin-top:10px;padding:10px 12px;border-radius:12px;background:rgba(255,255,255,.76);border:1px solid rgba(120,95,30,.15)}
.kp-reference span{display:block;color:#9a6c13;font-size:10px;font-weight:950;letter-spacing:.3px}
.kp-reference b{display:block;margin-top:2px;color:#5e4b22;font-size:13px;font-weight:900;overflow-wrap:anywhere}
.kp-reference p{margin-top:4px;color:#716039;font-size:11px;font-weight:700;line-height:1.65}
.kp-self-grade{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:11px;padding-top:10px;border-top:1px dashed rgba(120,95,30,.2)}
.kp-self-grade span{color:#685b38;font-size:11px;font-weight:900}
.kp-self-grade .btn{min-height:38px;padding:7px 13px;font-size:11.5px}
.kp-next-btn{display:block;width:100%;min-height:46px;margin-top:11px;font-size:13.5px}
.kp-result-tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
.kp-result-tag{display:inline-flex;align-items:center;max-width:100%;padding:5px 9px;border-radius:999px;background:#eef8f1;color:#2a7443;font-size:10.5px;font-weight:800;line-height:1.4;overflow-wrap:anywhere}
.kp-result-tag.mastered{background:#e9f8ee;color:#227d43}
.kp-result-tag.shaky{background:#fff7e3;color:#956400}
.kp-result-tag.weak{background:#fff0ef;color:#b73f38}
.kp-result-next{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:11px}
.kp-result-next>div{padding:11px 12px;border-radius:14px;background:#f8f7ff;border:2px solid #efecf8}
.kp-result-next b{display:block;color:#4f496a;font-size:11.5px;font-weight:950}
.kp-result-next span{display:block;margin-top:3px;color:#817b96;font-size:10.5px;font-weight:700;line-height:1.6}
.kp-empty-state{max-width:620px;margin:40px auto;padding:28px 22px;border-radius:24px;background:#fff;box-shadow:var(--kp-shadow);text-align:center}
.kp-empty-state b{display:block;color:var(--kp-navy);font-size:20px;font-weight:950}
.kp-empty-state p{margin:7px 0 14px;color:var(--kp-muted);font-size:12px;font-weight:700;line-height:1.7;overflow-wrap:anywhere}

/* ---------- 档案 ---------- */
.kp-page-profile #app { max-width: 1180px; }
.profile-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr); gap: 18px; padding: 24px; align-items: center; }
.profile-id { display: flex; align-items: center; gap: 15px; min-width: 0; }
.profile-avatar { flex: none; width: 86px; height: 86px; display: grid; place-items: center; border-radius: 28px; background: linear-gradient(145deg, #fff4c9, #ffd8e8); border: 4px solid #fff; box-shadow: 0 6px 0 rgba(74,63,107,.09), 0 10px 20px rgba(74,63,107,.12); font-size: 49px; }
.profile-id h1 { color: var(--kp-navy); font-size: clamp(26px, 3.2vw, 38px); font-weight: 950; }
.profile-id p { color: #6f6890; font-size: 12px; font-weight: 700; margin-top: 4px; }
.profile-switch-row { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.profile-chip { min-height: 36px; padding: 6px 11px; border-radius: 999px; border: 2px solid #e4e0ef; background: #fff; color: #615b7c; font-family: inherit; font-size: 11px; font-weight: 900; cursor: pointer; }
.profile-chip.on { border-color: #8bb5f4; background: #edf5ff; color: #315aa8; }
.profile-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.profile-actions .btn { min-height: 40px; padding: 8px 13px; font-size: 12px; }
.profile-stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; margin: 14px 0; }
.profile-stat { padding: 14px 12px; border-radius: 18px; background: rgba(255,255,255,.94); border: 2px solid rgba(255,255,255,.9); box-shadow: 0 4px 0 rgba(74,63,107,.08); }
.profile-stat b { display: block; color: var(--kp-navy); font-size: 24px; font-weight: 950; }
.profile-stat span { color: #7f7996; font-size: 10.5px; font-weight: 800; }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 14px; align-items: start; }
.profile-card { padding: 18px; }
.profile-card h2 { display: flex; align-items: center; gap: 7px; color: var(--kp-navy); font-size: 18px; font-weight: 950; }
.profile-card h2 small { margin-left: auto; color: #8a84a1; font-size: 10.5px; font-weight: 700; }
.profile-parks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 11px; }
.profile-park { display: flex; align-items: center; gap: 9px; padding: 10px; border-radius: 14px; background: #f8f7ff; color: inherit; text-decoration: none; border: 2px solid #efecf7; }
.profile-park:hover { border-color: #cbd9f6; background: #f5f9ff; }
.profile-park .pi-ico { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: #fff; font-size: 22px; }
.profile-park b { display: block; color: #514b6c; font-size: 12px; font-weight: 900; }
.profile-park small { display: block; color: #8a84a1; font-size: 10px; font-weight: 700; margin-top: 2px; }
.profile-reading { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px; border-radius: 15px; background: linear-gradient(135deg,#effcf7,#edf5ff); border: 2px dashed #a9dfc9; }
.profile-reading .pr-ring { flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#55b96a var(--p, 0%), #dcefe2 0); position: relative; font-size: 10px; font-weight: 950; color: #2b7a43; }
.profile-reading .pr-ring::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #fff; }
.profile-reading .pr-ring b { position: relative; z-index: 1; font-size: 13px; }
.profile-reading strong { display: block; color: #2e6b49; font-size: 13px; font-weight: 950; }
.profile-reading span { display: block; margin-top: 3px; color: #6c8975; font-size: 10.5px; font-weight: 700; line-height: 1.5; }
.profile-weak-list { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.profile-weak { padding: 9px 10px; border-radius: 13px; background: #fff8f2; border: 2px solid #ffe3cd; }
.profile-weak b { display: block; color: #7b4b2c; font-size: 11.5px; font-weight: 900; line-height: 1.5; }
.profile-weak small { display: block; color: #9a7b64; font-size: 10px; font-weight: 700; margin-top: 2px; }
.profile-timeline { display: flex; flex-direction: column; margin-top: 9px; max-height: 560px; overflow-y: auto; }
.profile-event { display: flex; gap: 9px; padding: 0 0 13px; position: relative; }
.profile-event::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: #ece8f5; }
.profile-event:last-child::before { display: none; }
.profile-event .pe-ico { position: relative; z-index: 1; flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #edf4ff; font-size: 14px; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(74,63,107,.1); }
.profile-event b { display: block; color: #514b6c; font-size: 11.5px; font-weight: 900; line-height: 1.5; }
.profile-event small { display: block; color: #8a84a1; font-size: 10px; font-weight: 700; line-height: 1.5; margin-top: 1px; }
.profile-empty { padding: 22px 10px; color: #8a84a1; font-size: 11.5px; font-weight: 700; line-height: 1.7; text-align: center; }
.profile-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.profile-form label { display: flex; flex-direction: column; gap: 4px; color: #6f6890; font-size: 11px; font-weight: 900; }
.profile-form label.full { grid-column: 1 / -1; }
.profile-form input, .profile-form select, .profile-form textarea { width: 100%; min-height: 42px; border: 2px solid #e1e6f2; border-radius: 11px; padding: 8px 10px; background: #fbfcff; color: #4f496a; font-family: inherit; font-size: 15px; font-weight: 700; outline: none; }
.profile-form textarea { min-height: 70px; resize: vertical; }
.profile-form input:focus, .profile-form select:focus, .profile-form textarea:focus { border-color: #82abea; }
.profile-form-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.profile-form-actions .btn { min-height: 40px; padding: 8px 15px; font-size: 12px; }
.profile-dialog { width: min(92vw, 560px); border: 0; border-radius: 24px; padding: 0; box-shadow: 0 30px 80px rgba(38,51,95,.32); }
.profile-dialog::backdrop { background: rgba(38,51,95,.42); backdrop-filter: blur(3px); }
.profile-dialog-inner { padding: 20px; }
.profile-dialog h2 { color: var(--kp-navy); font-size: 20px; font-weight: 950; margin-bottom: 12px; }
.profile-dialog textarea { width: 100%; min-height: 240px; border: 2px solid #e1e6f2; border-radius: 13px; padding: 11px; font-family: ui-monospace, Menlo, monospace; font-size: 12px; line-height: 1.5; }
.profile-dialog-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; flex-wrap: wrap; }
.profile-dialog-actions .btn { min-height: 40px; padding: 8px 15px; font-size: 12px; }
.profile-privacy { margin-top: 12px; padding: 10px 12px; border-radius: 13px; background: #f7f8ff; color: #73708a; font-size: 10.5px; font-weight: 700; line-height: 1.65; }

/* 档案仪表盘：页头保持轻量，内容按标签切换，长列表在面板内分页。 */
.profile-dashboard-head {
  grid-template-columns: minmax(0, 1fr) minmax(250px, auto);
  grid-template-rows: auto auto;
  gap: 12px 18px;
  padding: 20px 22px;
}
.profile-dashboard-head .profile-id { align-items: flex-start; }
.profile-dashboard-head .profile-avatar { width: 72px; height: 72px; border-radius: 23px; font-size: 40px; }
.profile-dashboard-head .profile-id h1 { font-size: clamp(24px, 3vw, 34px); line-height: 1.15; overflow-wrap: anywhere; }
.profile-dashboard-head .profile-id p { line-height: 1.6; overflow-wrap: anywhere; }
.profile-dashboard-head .profile-switch-row { margin-top: 9px; }
.profile-head-tools,
.profile-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
  min-width: 0;
}
.profile-dashboard-head .profile-actions {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-content: flex-start;
  padding-top: 12px;
  border-top: 1px dashed #e8e3f2;
}
.profile-dashboard-head .profile-head-tools {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
}
.profile-read-all,
.kp-read-all { min-height: 40px; padding: 7px 13px; font-size: 12px; }
.kp-voice-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: none;
  min-height: 38px;
  padding: 6px 11px;
  border: 2px solid #dce8fb;
  border-radius: 999px;
  background: #f7faff;
  color: #315aa8;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1.3;
  cursor: pointer;
}
.kp-voice-btn:hover { border-color: #a9c2f1; background: #edf5ff; }
.kp-voice-btn.compact { min-height: 32px; padding: 4px 9px; font-size: 10.5px; }
.kp-voice-btn.speaking { border-color: #78c98a; background: #eaf9ee; color: #287c42; }
.kp-voice-picker {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 210px;
  min-height: 38px;
  padding: 4px 8px;
  border: 2px solid #e4e0ef;
  border-radius: 999px;
  background: #fff;
  color: #6f6890;
}
.kp-voice-picker select {
  width: 100%;
  min-width: 0;
  max-width: 170px;
  min-height: 28px;
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: #514b6c;
  font-family: inherit;
  font-size: 11.5px !important;
  font-weight: 800;
  outline: none;
}
.profile-dashboard {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 148px);
  min-height: 0;
}
.profile-dashboard-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 2px solid var(--kp-line);
  background: linear-gradient(180deg, #fff, #fcfbff);
}
.profile-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.profile-tabs::-webkit-scrollbar { display: none; }
.profile-tabs button {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  padding: 7px 13px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #625c7b;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}
.profile-tabs button:hover { background: #f5f8ff; }
.profile-tabs button.on { border-color: #b9cdf8; background: #edf5ff; color: #315aa8; box-shadow: 0 3px 0 rgba(77,150,255,.1); }
.profile-tabs button small {
  min-width: 20px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(81,75,108,.08);
  color: #7a7492;
  font-size: 9.5px;
  font-weight: 900;
  line-height: 1.4;
}
.profile-tabs button.on small { background: #dcebff; color: #315aa8; }
.profile-page-note { flex: none; margin-left: auto; color: #8a84a1; font-size: 10px; font-weight: 800; white-space: nowrap; }
.profile-tab-panel {
  padding: 14px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.profile-tab-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr); gap: 12px; align-items: start; }
.profile-overview-layout { grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); }
.profile-column { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.profile-card { min-width: 0; padding: 16px; border-radius: 19px; background: #fff; border: 2px solid #efecf7; box-shadow: none; }
.profile-card-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.profile-card-head h2 { min-width: 0; flex: 1 1 170px; margin: 0; line-height: 1.35; overflow-wrap: anywhere; }
.profile-card-head > small { flex: none; margin-left: auto; }
.profile-card-head .kp-voice-btn { margin-left: 2px; }
.profile-stat { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; column-gap: 7px; min-width: 0; padding: 11px; }
.profile-stat .ps-ico { grid-row: 1 / 3; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: #f1f5ff; font-size: 16px; }
.profile-stat b { min-width: 0; font-size: 21px; line-height: 1.1; }
.profile-stat > span:last-child { min-width: 0; font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }
.profile-parks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profile-park { min-width: 0; }
.profile-park > span:last-child { min-width: 0; }
.profile-park b, .profile-park small { overflow-wrap: anywhere; }
.profile-reading { align-items: flex-start; }
.profile-reading > span:last-child { min-width: 0; }
.profile-weak { min-width: 0; overflow-wrap: anywhere; }
.profile-timeline { max-height: none; overflow: visible; }
.profile-diagnosis-list { gap: 5px; }
.profile-event {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: default;
}
button.profile-event { cursor: pointer; }
button.profile-event:hover { border-radius: 12px; background: #fafaff; }
.profile-event > div { min-width: 0; flex: 1; }
.profile-event b, .profile-event small { overflow-wrap: anywhere; }
.profile-event .pe-open { flex: none; align-self: center; color: #9ba2b9; font-size: 22px; font-weight: 700; }
.profile-pager { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed #e8e3f2; }
.profile-pager button {
  min-height: 38px;
  padding: 6px 11px;
  border: 2px solid #e1e6f2;
  border-radius: 11px;
  background: #fff;
  color: #4f496a;
  font-family: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}
.profile-pager button:hover:not(:disabled) { border-color: #a9c2f1; background: #f7faff; }
.profile-pager button:disabled { opacity: .42; cursor: default; }
.profile-pager span { color: #7b7595; font-size: 10.5px; font-weight: 800; white-space: nowrap; }
.profile-empty-action { display: block; width: 100%; margin-top: 11px; text-align: center; text-decoration: none; }
.profile-dialog { max-height: min(86vh, 720px); overflow: auto; }
.profile-dialog-tools { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .kp-hero { grid-template-columns: minmax(0, 1fr) 300px; padding: 24px; }
  .kp-explore-layout { grid-template-columns: minmax(235px, 280px) minmax(0, 1fr); }
  .kp-detail {
    position: fixed;
    z-index: 72;
    top: 78px;
    right: 14px;
    bottom: 14px;
    width: min(390px, calc(100vw - 28px));
    max-height: none;
    transform: translateX(calc(100% + 24px));
    transition: transform .25s cubic-bezier(.2,.8,.2,1);
    box-shadow: 0 24px 60px rgba(38,51,95,.28);
  }
  .kp-detail.open { transform: none; }
  .kp-drawer-toggle { display: inline-flex; }
  .kp-drawer-backdrop { display: block; position: fixed; inset: 0; z-index: 71; background: rgba(38,51,95,.25); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .kp-drawer-backdrop.open { opacity: 1; pointer-events: auto; }
  .profile-dashboard-head { grid-template-columns: minmax(0, 1fr) auto; }
  .profile-overview-layout, .profile-tab-layout { grid-template-columns: 1fr; }
  .profile-tabs button { padding-inline: 11px; }
  .profile-stat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 701px) and (max-width: 1180px) {
  .kp-page-profile #app { padding-bottom: 10px; }
  .profile-dashboard-head {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 14px;
    padding: 14px 16px;
  }
  .profile-dashboard-head .profile-avatar { width: 58px; height: 58px; border-radius: 19px; font-size: 32px; }
  .profile-dashboard-head .profile-id h1 { font-size: 27px; }
  .profile-dashboard-head .profile-switch-row { margin-top: 5px; }
  .profile-chip { min-height: 32px; padding: 4px 9px; }
  .profile-head-tools { flex-wrap: nowrap; }
  .kp-voice-picker { min-height: 34px; }
  .kp-voice-picker select { min-height: 24px; font-size: 11.5px !important; }
  .profile-read-all { min-height: 34px; }
  .profile-dashboard-head .profile-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-top: 8px;
  }
  .profile-dashboard-head .profile-actions .btn { min-height: 34px; padding: 5px 10px; font-size: 11px; }
  .profile-stat-grid { margin: 9px 0; }
  .profile-stat { padding: 8px 9px; }
  .profile-stat b { font-size: 18px; }
  .profile-stat-grid { display: flex; overflow-x: auto; scrollbar-width: none; }
  .profile-stat-grid::-webkit-scrollbar { display: none; }
  .profile-stat { flex: 1 1 0; min-width: 116px; }
  .profile-stat .ps-ico { width: 28px; height: 28px; font-size: 15px; }
  .profile-stat b { font-size: 20px; }
  .profile-dashboard { height: calc(100dvh - 366px); max-height: none; min-height: 200px; }
}
@media (max-height: 520px) and (min-width: 701px) and (max-width: 1024px) and (orientation: landscape) {
  .kp-page-profile #app { padding: 6px 8px 10px; }
  .kp-page-profile .kp-topbar { margin-bottom: 8px; }
  .profile-dashboard-head {
    position: relative;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 38px;
    gap: 0 10px;
    height: 88px;
    padding: 7px 10px 43px;
  }
  .profile-dashboard-head .profile-head-tools {
    grid-column: 2;
    grid-row: 1;
  }
  .profile-dashboard-head .profile-avatar { width: 38px; height: 38px; border-radius: 12px; font-size: 21px; }
  .profile-dashboard-head .profile-id { align-items: center; gap: 8px; }
  .profile-id h1 { font-size: 20px; }
  .profile-id p { font-size: 9px; margin-top: 0; }
  .profile-dashboard-head .profile-switch-row {
    position: absolute;
    left: 58px;
    bottom: 7px;
    max-width: 220px;
    margin: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .profile-dashboard-head .profile-switch-row::-webkit-scrollbar { display: none; }
  .profile-chip { min-height: 26px; padding: 2px 7px; font-size: 9px; }
  .profile-head-tools { width: auto; justify-content: flex-end; flex-wrap: nowrap; align-self: start; }
  .kp-voice-picker { flex: 0 1 180px; }
  .kp-voice-picker select { max-width: 150px; font-size: 11.5px !important; }
  .profile-read-all { min-height: 32px; padding: 4px 9px; }
  .profile-dashboard-head .profile-actions {
    position: absolute;
    right: 10px;
    bottom: 7px;
    display: flex !important;
    flex-wrap: nowrap !important;
    max-width: calc(100% - 290px);
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 2px;
    scrollbar-width: none;
  }
  .profile-dashboard-head .profile-actions::-webkit-scrollbar { display: none; }
  .profile-dashboard-head .profile-actions .btn { flex: 0 0 auto; min-height: 26px; padding: 2px 8px; font-size: 9.5px; }
  .profile-stat-grid { gap: 5px; margin: 5px 0; }
  .profile-stat { grid-template-columns: 22px minmax(0, 1fr); column-gap: 5px; padding: 3px 6px; }
  .profile-stat .ps-ico { width: 22px; height: 22px; border-radius: 7px; font-size: 12px; }
  .profile-stat b { font-size: 15px; }
  .profile-stat > span:last-child { font-size: 8.5px; line-height: 1.2; }
  .profile-dashboard { height: calc(100vh - 245px); max-height: none; min-height: 0; flex: 0 0 auto; }
  .profile-dashboard-bar { padding: 3px 7px; }
  .profile-tabs button { min-height: 34px; padding: 3px 8px; font-size: 10.5px; }
  .profile-tab-panel { padding: 8px; }
  .profile-stat { flex: 1 1 0; min-width: 108px; }
  .kp-page-explore #app { padding: 6px 8px 10px; }
  .kp-page-explore .kp-topbar { margin-bottom: 7px; }
  .kp-page-explore .kp-explore-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
    margin-bottom: 7px;
  }
  .kp-page-explore .kp-explore-head h1 { font-size: 25px; }
  .kp-page-explore .kp-explore-head p { font-size: 10px; margin-top: 0; }
  .kp-page-explore .kp-explore-actions {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin-left: 0;
    align-self: center;
    flex-wrap: nowrap;
  }
  .kp-page-explore .kp-subject-tabs {
    grid-column: 1 / -1;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .kp-page-explore .kp-subject-tabs::-webkit-scrollbar { display: none; }
  .kp-page-explore .kp-subject-tab { min-height: 34px; padding: 4px 10px; font-size: 11px; }
  .kp-page-explore .kp-explore-actions .btn { min-height: 34px; padding: 5px 10px; font-size: 11px; }
  .kp-page-explore .kp-explore-voice { flex-wrap: nowrap; }
  .kp-page-explore .kp-voice-picker { min-height: 34px; max-width: 180px; }
  .kp-page-explore .kp-voice-picker select { font-size: 11px !important; }
  .kp-page-explore .kp-explore-layout {
    grid-template-columns: minmax(190px, 228px) minmax(0, 1fr);
    min-height: calc(100dvh - 145px);
  }
  .kp-page-explore .kp-directory,
  .kp-page-explore .kp-detail { max-height: calc(100dvh - 145px); }
  .kp-page-explore .kp-graph-panel { min-height: calc(100dvh - 145px); }
  .kp-page-explore #kpGraph { min-height: calc(100dvh - 220px); }
  .kp-page-explore .kp-directory-head { padding: 9px 10px 6px; }
  .kp-page-explore .kp-directory-head h2 { font-size: 14px; }
  .kp-page-explore .kp-search-row { margin-top: 6px; }
  .kp-page-explore .kp-search-row input { height: 38px; font-size: 15px; }
  .kp-page-explore .kp-filters { gap: 5px; }
  .kp-page-explore .kp-filters select { min-height: 34px; padding: 5px 7px; font-size: 10px; }
  .kp-page-explore .kp-directory-count { padding: 5px 10px; }
  .kp-page-explore .kp-list-item { min-height: 40px; padding: 6px 8px; }
  .kp-page-explore .kp-list-item .li-name { font-size: 11px; }
  .kp-page-explore .kp-graph-toolbar { padding: 6px 8px; gap: 5px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .kp-page-explore .kp-graph-toolbar::-webkit-scrollbar { display: none; }
  .kp-page-explore .kp-seg button { min-height: 30px; padding: 3px 7px; font-size: 10px; }
  .kp-page-explore .kp-graph-actions { flex: none; }
  .kp-page-explore .kp-graph-hint { display: none; }
  .kp-page-explore .kp-legend { padding: 4px 10px 6px; font-size: 9px; }
}
@media (max-width: 900px) {
  .kp-hero { grid-template-columns: 1fr; }
  .kp-orbit { min-height: 190px; }
  .kp-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .kp-subjects { grid-template-columns: repeat(2, 1fr); }
  .kp-journey { grid-template-columns: 1fr; }
  .kp-setup { grid-template-columns: 1fr; }
  .kp-setup-side { display: grid; grid-template-columns: 1fr 1fr; }
  .kp-quiz-wrap { grid-template-columns: 1fr; }
  .kp-quiz-side { display: grid; grid-template-columns: 1fr 1fr; }
  .kp-result-hero, .kp-result-grid { grid-template-columns: 1fr; }
  .kp-result-badge { justify-content: flex-start; }
  .kp-explore-layout { grid-template-columns: minmax(210px, 250px) minmax(0, 1fr); min-height: calc(100vh - 170px); }
  .kp-directory, .kp-detail { max-height: calc(100vh - 170px); }
  .kp-graph-panel { min-height: 500px; }
  #kpGraph { min-height: 440px; }
  .profile-hero { grid-template-columns: 1fr; }
  .profile-actions { justify-content: flex-start; }
  .profile-dashboard-head { grid-template-columns: 1fr; }
  .profile-head-tools { justify-content: flex-start; }
  .profile-dashboard-head .profile-actions { padding-top: 10px; }
  .profile-page-note { display: none; }
}
@media (min-width: 701px) and (max-width: 900px) and (orientation: portrait) {
  .kp-page-explore #app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: 12px;
    overflow: hidden;
  }
  .kp-page-explore .kp-topbar { flex: none; }
  .kp-page-explore .kp-shell {
    display: flex;
    flex: 1;
    flex-direction: column;
    height: 0;
    min-height: 0;
  }
  .kp-page-explore .kp-explore-head { flex: none; }
  .kp-page-explore .kp-explore-layout {
    flex: 1;
    height: 0;
    min-height: 0;
    grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }
  .kp-page-explore .kp-directory {
    height: 100%;
    max-height: none;
    min-height: 0;
    overflow: hidden;
  }
  .kp-page-explore .kp-graph-panel {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  .kp-page-explore #kpGraph {
    height: 0;
    min-height: 0;
  }
}
@media (max-width: 700px) {
  .kp-page #app { padding: 10px 10px 62px; }
  .kp-topbar { margin-bottom: 10px; }
  .kp-hero { padding: 20px 18px; border-radius: 24px; }
  .kp-hero h1 { font-size: clamp(27px, 8vw, 39px); }
  .kp-orbit { min-height: 165px; }
  .kp-orbit-center { width: 88px; height: 88px; font-size: 34px; }
  .kp-orbit-center small { margin-top: -8px; font-size: 9px; }
  .kp-orbit-node { width: 48px; height: 48px; border-radius: 15px; font-size: 21px; }
  .kp-section-head { align-items: flex-start; flex-direction: column; gap: 3px; }
  .kp-section-head p { margin-left: 0; text-align: left; }
  .kp-subjects { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kp-subject-card { min-height: 160px; padding: 13px; }
  .kp-subject-card h3 { font-size: 17px; }
  .kp-subject-card p { font-size: 10.5px; max-width: 100%; }
  .kp-subject-card .sc-ico { width: 42px; height: 42px; font-size: 23px; }
  .kp-subject-card .sc-meta { font-size: 9.5px; }
  .kp-subject-card .sc-go { width: 28px; height: 28px; }
  .kp-stat { padding: 12px; }
  .kp-stat .num { font-size: 25px; }
  .kp-step { padding: 13px; }
  .kp-note { padding: 11px 12px; }

  .kp-page-explore #app { padding: 10px 10px 58px; }
  .kp-explore-head { gap: 9px; margin-bottom: 9px; }
  .kp-explore-title { min-width: 0; flex: 1 1 100%; }
  .kp-explore-title h1 { font-size: 25px; }
  .kp-subject-tabs { width: 100%; order: 2; }
  .kp-explore-actions { order: 3; width: 100%; margin-left: 0; }
  .kp-explore-actions .btn { flex: 1; padding: 8px 10px; font-size: 11.5px; }
  .kp-explore-layout { display: block; min-height: 0; }
  .kp-directory {
    position: fixed;
    z-index: 72;
    left: 10px;
    right: 10px;
    bottom: 10px;
    top: 78px;
    max-height: none;
    transform: translateY(calc(100% + 24px));
    transition: transform .25s cubic-bezier(.2,.8,.2,1);
    box-shadow: 0 24px 60px rgba(38,51,95,.28);
  }
  .kp-directory.open { transform: none; }
  .kp-graph-panel { min-height: 510px; height: calc(100vh - 245px); max-height: 650px; border-radius: 20px; }
  #kpGraph { min-height: 410px; height: 100%; }
  .kp-graph-toolbar { padding: 8px; gap: 5px; }
  .kp-seg button { min-height: 32px; padding: 4px 8px; font-size: 10px; }
  .kp-tool-btn { width: 34px; height: 34px; }
  .kp-graph-hint { display: none; }
  .kp-tool-spacer { display: none; }
  .kp-legend { font-size: 9.5px; gap: 7px; padding: 7px 10px 9px; }
  .kp-detail { top: 78px; right: 10px; bottom: 10px; width: calc(100vw - 20px); }
  .kp-graph-empty { inset: 52px 10px 0; font-size: 12px; }

  .kp-page-diagnose #app { padding: 10px 10px 62px; }
  .kp-diagnose-head { gap: 8px; }
  .kp-diagnose-head .kp-explore-actions { width: 100%; margin-left: 0; }
  .kp-diagnose-head .kp-explore-actions .btn { flex: 1; }
  .kp-setup-main, .kp-quiz, .kp-result-hero, .kp-result-card, .profile-card { padding: 15px; }
  .kp-subject-grid { grid-template-columns: 1fr 1fr; }
  .kp-subject-choice { min-height: 78px; }
  .kp-setup-side { grid-template-columns: 1fr; }
  .kp-quiz-side { grid-template-columns: 1fr; }
  .kp-choices { grid-template-columns: 1fr; }
  .kp-question { font-size: 20px; }
  .kp-answer-row { flex-direction: column; }
  .kp-answer-row .btn { width: 100%; }
  .kp-question-actions .kp-help { flex-basis: 100%; margin-left: 0; }
  .kp-result-badge { gap: 7px; }
  .kp-score { flex: 1; min-width: 80px; }
  .kp-result-actions { padding: 12px; }
  .kp-result-actions .btn { flex: 1; }

  .kp-mode-row { grid-template-columns: 1fr; }
  .kp-mode-card { min-height: 0; }
  .kp-target-block { padding: 10px; }
  .kp-chapter-picker { max-height: 300px; }
  .kp-chapter-head span { width: 100%; margin-left: 0; text-align: left; }
  .kp-self-grade .btn { flex: 1; }
  .kp-result-next { grid-template-columns: 1fr; }
  .kp-page-profile #app { padding: 10px 10px 16px; }
  .profile-hero { padding: 17px; }
  .profile-dashboard-head { padding: 15px; gap: 11px; }
  .profile-dashboard-head .profile-avatar { width: 60px; height: 60px; border-radius: 19px; font-size: 33px; }
  .profile-id { gap: 11px; }
  .profile-id h1 { font-size: 25px; }
  .profile-id p { font-size: 11px; }
  .profile-chip { min-height: 40px; }
  .profile-head-tools, .profile-tools { width: 100%; }
  .kp-voice-picker { flex: 1 1 160px; max-width: none; }
  .kp-voice-picker select { max-width: none; font-size: 16px !important; }
  .profile-read-all { flex: 1 1 110px; }
  .profile-dashboard-head .profile-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 3px;
    scrollbar-width: none;
  }
  .profile-dashboard-head .profile-actions::-webkit-scrollbar { display: none; }
  .profile-dashboard-head .profile-actions .btn { flex: 0 0 auto; min-width: 84px; padding: 7px 10px; font-size: 11px; }
  .profile-dashboard-bar { padding: 9px 10px; }
  .profile-tabs { gap: 3px; }
  .profile-tabs button { min-height: 44px; padding: 6px 10px; font-size: 11.5px; }
  .profile-dashboard {
    max-height: calc(100dvh - 456px);
    min-height: 0;
  }
  .profile-tab-panel {
    padding: 10px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
  .profile-card { padding: 13px; }
  .profile-card-head h2 { flex-basis: 135px; font-size: 16px; }
  .profile-card-head .kp-voice-btn { min-height: 38px; }
  .profile-stat-grid {
    display: flex;
    gap: 7px;
    margin: 10px 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }
  .profile-stat-grid::-webkit-scrollbar { display: none; }
  .profile-stat {
    flex: 0 0 118px;
    grid-template-columns: 26px minmax(0, 1fr);
    column-gap: 6px;
    padding: 9px 8px;
    scroll-snap-align: start;
  }
  .profile-stat .ps-ico { width: 26px; height: 26px; border-radius: 8px; font-size: 14px; }
  .profile-avatar { width: 70px; height: 70px; border-radius: 22px; font-size: 39px; }
  .profile-stat b { font-size: 18px; }
  .profile-stat > span:last-child { font-size: 9.5px; }
  .profile-parks { grid-template-columns: 1fr; }
  .profile-event { gap: 7px; }
  .profile-event b { font-size: 11px; }
  .profile-event small { font-size: 9.5px; }
  .profile-form { grid-template-columns: 1fr; }
  .profile-form label.full, .profile-form-actions { grid-column: auto; }
}
@media (max-width: 390px) {
  .kp-subjects { grid-template-columns: 1fr; }
  .kp-subject-card { min-height: 145px; }
  .kp-actions .btn { width: 100%; }
  .kp-stat-grid { gap: 7px; }
  .kp-stat .num { font-size: 22px; }
  .kp-stat .label { font-size: 10.5px; }
  .profile-dashboard-head .profile-actions .btn { min-width: 78px; }
  .profile-card-head h2 { flex-basis: 100%; }
  .profile-card-head > small { margin-left: 0; }
  .profile-pager { gap: 5px; }
  .profile-pager button { padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .kp-orbit-node { animation: none; }
  .kp-hero h1 em { animation: none; }
  * { scroll-behavior: auto !important; }
}
@media print {
  body.kp-page { background: #fff; }
  .topbar, .kp-actions, .kp-explore-actions, .kp-diagnose-head .kp-explore-actions,
  .kp-result-actions, .kp-toast, #bg-deco, #confetti-canvas, .kp-drawer-toggle { display: none !important; }
  #app { padding: 0 !important; max-width: none !important; }
  .kp-panel, .kp-result-card, .kp-result-hero { box-shadow: none !important; border: 1px solid #ddd !important; break-inside: avoid; }
  .kp-result-grid { grid-template-columns: 1fr 1fr; }
}
