/* ============================================================
 * KeyLab 键练 · 暗色主题
 * ============================================================ */

:root{
  --bg:#080b11;
  --bg2:#0a0e14;
  --surface:#111823;
  --surface2:#161f2c;
  --surface3:#1c2634;
  --line:#212c3b;
  --line2:#2b3849;
  --txt:#e6edf5;
  --txt2:#b3c0d1;
  --muted:#7d8b9d;
  --accent:#2dd4bf;
  --accent2:#60a5fa;
  --accent3:#a78bfa;
  --good:#34d399;
  --warn:#fbbf24;
  --bad:#f87171;
  --radius:14px;
  --font:"PingFang SC","HarmonyOS Sans SC","Microsoft YaHei",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",sans-serif;
  --mono:"JetBrains Mono","Cascadia Mono",Consolas,"SF Mono",Menlo,monospace;
}

*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  background:
    radial-gradient(1200px 620px at 82% -12%, rgba(45,212,191,.09), transparent 60%),
    radial-gradient(900px 520px at 4% 0%, rgba(96,165,250,.07), transparent 58%),
    var(--bg);
  color:var(--txt);
  font-family:var(--font);
  font-size:14px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none}
button,select,input,textarea{font-family:inherit;font-size:inherit;color:inherit}
::selection{background:rgba(45,212,191,.3)}

::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:#233042;border-radius:8px;border:2px solid var(--bg)}
::-webkit-scrollbar-thumb:hover{background:#2f4056}

/* ---------- 布局 ---------- */
.app{display:flex;min-height:100vh}

.sidebar{
  width:236px;flex:0 0 236px;
  background:linear-gradient(180deg,#0c1119,#0a0e15);
  border-right:1px solid var(--line);
  display:flex;flex-direction:column;
  padding:20px 14px;position:sticky;top:0;height:100vh;
}
.logo{display:flex;align-items:center;gap:11px;padding:4px 8px 22px}
.logo-mark{
  width:34px;height:34px;border-radius:10px;flex:0 0 34px;
  background:linear-gradient(135deg,var(--accent),#0e7490);
  position:relative;box-shadow:0 4px 16px rgba(45,212,191,.28);
}
.logo-mark::before{
  content:"";position:absolute;inset:9px 7px;border:2px solid rgba(8,11,17,.85);border-radius:4px;
}
.logo-mark::after{
  content:"";position:absolute;left:12px;right:12px;bottom:12px;height:2.5px;border-radius:2px;background:rgba(8,11,17,.85);
}
.logo-txt strong{display:block;font-size:15px;letter-spacing:.5px}
.logo-txt small{color:var(--muted);font-size:11px}

.nav{display:flex;flex-direction:column;gap:3px}
.nav-item{
  display:flex;align-items:center;gap:11px;
  padding:10px 12px;border-radius:10px;color:var(--txt2);
  font-size:13.5px;transition:.16s;position:relative;
}
.nav-item:hover{background:var(--surface);color:var(--txt)}
.nav-item.active{background:linear-gradient(90deg,rgba(45,212,191,.16),rgba(45,212,191,.03));color:#fff}
.nav-item.active::before{
  content:"";position:absolute;left:0;top:9px;bottom:9px;width:3px;border-radius:0 3px 3px 0;background:var(--accent);
}
.ni-ic{width:17px;height:17px;flex:0 0 17px;opacity:.85;background:currentColor;
  -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain}
.ic-home{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V21h14V9.5'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.5 12 3l9 7.5'/%3E%3Cpath d='M5 9.5V21h14V9.5'/%3E%3C/svg%3E")}
.ic-cn{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h16M12 3v3M9 10c0 5-2 8-5 10M11 10c0 4 2 7 6 9'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h16M12 3v3M9 10c0 5-2 8-5 10M11 10c0 4 2 7 6 9'/%3E%3C/svg%3E")}
.ic-en{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 19 6-14 6 14M8 14h6'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 19 6-14 6 14M8 14h6'/%3E%3C/svg%3E")}
.ic-test{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E")}
.ic-report{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='2'/%3E%3Cpath d='M8 9h8M8 13h8M8 17h5'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='2'/%3E%3Cpath d='M8 9h8M8 13h8M8 17h5'/%3E%3C/svg%3E")}
.ic-game{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9h12a3 3 0 0 1 3 3v2a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3v-2a3 3 0 0 1 3-3z'/%3E%3Cpath d='M8 12h.01M11 12h.01'/%3E%3Cpath d='M15 11v2M14 12h2'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9h12a3 3 0 0 1 3 3v2a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3v-2a3 3 0 0 1 3-3z'/%3E%3Cpath d='M8 12h.01M11 12h.01'/%3E%3Cpath d='M15 11v2M14 12h2'/%3E%3C/svg%3E")}

.side-foot{margin-top:auto;padding:14px 6px 0}
.tip-card{
  background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:12px 13px;
}
.tip-card strong{font-size:12px;color:var(--accent);display:block;margin-bottom:5px}
.tip-card p{font-size:12px;color:var(--muted);line-height:1.65}
.tip-card b{color:var(--txt2)}
.copy{display:block;margin-top:12px;text-align:center;color:#4b5768;font-size:11px}

.main{flex:1;min-width:0;display:flex;flex-direction:column}
.topbar{
  height:58px;display:flex;align-items:center;justify-content:space-between;
  padding:0 28px;border-bottom:1px solid var(--line);
  background:rgba(10,14,20,.72);backdrop-filter:blur(12px);
  position:sticky;top:0;z-index:30;
}
.tb-l{display:flex;align-items:center;gap:10px}
.fire{font-size:16px}
.tb-day{font-size:14px;color:var(--txt2)}
.tb-day b{color:var(--accent);font-size:17px;font-weight:700;margin:0 2px}
.badge-state{
  font-size:11.5px;padding:3px 9px;border-radius:20px;
  background:var(--surface2);border:1px solid var(--line2);color:var(--muted);
}
.badge-state.on{background:rgba(52,211,153,.13);border-color:rgba(52,211,153,.35);color:var(--good)}
.tb-streak{font-size:12.5px;color:var(--muted)}
.tb-streak b{color:var(--txt);font-weight:700}

.view-root{padding:24px 28px 56px;max-width:1240px;width:100%;display:flex;flex-direction:column;gap:18px}

/* ---------- 通用组件 ---------- */
.card{
  background:linear-gradient(180deg,var(--surface),#0f1620);
  border:1px solid var(--line);border-radius:var(--radius);
  padding:16px 18px;position:relative;
}
.card.pad{padding:18px 20px}
.card-hd{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:14px;gap:12px}
.card-hd h3{font-size:14.5px;font-weight:600;letter-spacing:.2px}
.muted{color:var(--muted);font-size:12px}
.muted.sm{font-size:11.5px}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}

.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  padding:9px 16px;border-radius:9px;cursor:pointer;
  background:var(--surface2);border:1px solid var(--line2);color:var(--txt2);
  font-size:13px;transition:.16s;white-space:nowrap;
}
.btn:hover{background:var(--surface3);color:var(--txt);border-color:#3a4a5e}
.btn.sm{padding:6px 12px;font-size:12.5px;border-radius:8px}
.btn.block{width:100%;margin-top:14px}
.btn.ghost{background:transparent}
.btn-primary{
  background:linear-gradient(135deg,var(--accent),#14b8a6);
  border-color:transparent;color:#04211e;font-weight:600;
}
.btn-primary:hover{filter:brightness(1.1);color:#04211e}
.btn.danger{color:#fca5a5;border-color:rgba(248,113,113,.3)}
.btn.danger:hover{background:rgba(248,113,113,.12);color:#fecaca}
.btn-danger{
  background:linear-gradient(135deg,#f87171,#ef4444);
  border-color:transparent;color:#2a0c0c;font-weight:600;
}
.btn-danger:hover{filter:brightness(1.08);color:#2a0c0c}
.row-actions{display:flex;gap:10px;flex-wrap:wrap}
.row-actions.center{justify-content:center;margin-top:14px}

.seg{display:inline-flex;background:var(--surface2);border:1px solid var(--line);border-radius:10px;padding:3px;gap:2px}
.seg button{
  background:transparent;border:0;cursor:pointer;color:var(--muted);
  padding:7px 14px;border-radius:8px;font-size:12.5px;transition:.15s;
}
.seg button:hover{color:var(--txt2)}
.seg button.on{background:var(--surface3);color:var(--txt);box-shadow:0 1px 3px rgba(0,0,0,.35)}
.seg.big button{padding:10px 20px;font-size:13.5px}

.chip{
  display:inline-block;padding:3px 10px;border-radius:7px;font-size:12px;
  background:var(--surface2);border:1px solid var(--line2);color:var(--txt2);
}
.chip.on{background:rgba(45,212,191,.14);border-color:rgba(45,212,191,.35);color:var(--accent)}

.good{color:var(--good)!important}
.warn{color:var(--warn)!important}
.bad{color:var(--bad)!important}

.empty-mini{color:var(--muted);font-size:12.5px;padding:12px;text-align:center}
.empty-mini.tall{padding:70px 12px}

.page-title{font-size:21px;font-weight:650;letter-spacing:.3px}
.page-sub{color:var(--muted);font-size:12.5px;margin-top:4px;max-width:640px}

/* ---------- 首页 Hero ---------- */
.hero{
  display:flex;align-items:center;gap:26px;
  background:
    radial-gradient(600px 240px at 88% 50%, rgba(45,212,191,.13), transparent 70%),
    linear-gradient(180deg,#121b26,#0e1520);
  border:1px solid var(--line);border-radius:18px;padding:26px 28px;
}
.hero-main{flex:1;min-width:0}
.hero-tag{
  display:inline-block;font-size:11.5px;padding:4px 11px;border-radius:20px;
  background:var(--surface2);border:1px solid var(--line2);color:var(--muted);margin-bottom:12px;
}
.hero-title{font-size:31px;font-weight:650;letter-spacing:.5px;line-height:1.3}
.hero-title em{
  font-style:normal;font-size:44px;font-weight:800;margin:0 6px;
  background:linear-gradient(135deg,#5eead4,#2dd4bf 55%,#38bdf8);
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.hero-sub{color:var(--muted);font-size:13px;margin-top:8px}
.hero-sub b{color:var(--txt2);font-weight:600}
.hero-actions{display:flex;gap:10px;margin-top:18px;flex-wrap:wrap}

.hero-ring{position:relative;flex:0 0 auto;text-align:center}
.ring{display:block}
.ring-in{position:absolute;left:0;right:0;top:50%;transform:translateY(-64%);pointer-events:none}
.ring-in strong{display:block;font-size:25px;font-weight:700;line-height:1}
.ring-in strong i{font-style:normal;font-size:13px;color:var(--muted);margin-left:1px}
.ring-in span{font-size:11px;color:var(--muted)}

/* 首页打字演示（强调“这是打字网站”） */
.hero-type{display:flex;align-items:center;gap:12px;margin-top:16px;flex-wrap:wrap}
.ht-dot{width:8px;height:8px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 4px rgba(45,212,191,.16);animation:htpulse 1.6s infinite}
@keyframes htpulse{0%,100%{opacity:1}50%{opacity:.35}}
.ht-label{font-size:11.5px;color:var(--muted);letter-spacing:.5px;white-space:nowrap}
.ht-box{
  flex:1;min-width:0;display:flex;align-items:center;gap:2px;
  background:#0b1118;border:1px solid var(--line2);border-radius:10px;
  padding:9px 14px;font-family:var(--mono);font-size:15px;
  overflow:hidden;white-space:nowrap;
}
.ht-text{color:#e6edf5}
.ht-cursor{display:inline-block;width:9px;height:18px;background:var(--accent);border-radius:2px;margin-left:2px;animation:htblink 1s steps(1) infinite;transform:translateY(2px)}
@keyframes htblink{50%{opacity:0}}
@media (max-width:760px){
  .hero-type{margin-top:14px;gap:9px}
  .ht-label{display:none}
  .ht-box{font-size:13.5px;padding:8px 11px}
}
.ring-in.sm{transform:translateY(-52%)}
.ring-in.sm strong{font-size:19px}
.ring-goal{margin-top:8px;font-size:11.5px;color:var(--muted)}
.ring-goal select{
  background:var(--surface2);border:1px solid var(--line2);border-radius:7px;
  padding:3px 6px;font-size:11.5px;cursor:pointer;
}

/* ---------- 统计卡 ---------- */
.stat{display:flex;align-items:center;gap:13px}
.stat-ic{
  width:38px;height:38px;flex:0 0 38px;border-radius:11px;
  background:var(--surface2);border:1px solid var(--line2);
  position:relative;
}
.stat-ic::after{
  content:"";position:absolute;inset:0;margin:auto;width:18px;height:18px;
  background:var(--accent);-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;
}
.ic-calendar::after{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E")}
.ic-clock::after{background:var(--accent2);-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E")}
.ic-text::after{background:var(--accent3);-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h16M4 12h16M4 18h10'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h16M4 12h16M4 18h10'/%3E%3C/svg%3E")}
.ic-flame::after{background:var(--warn);-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Cpath d='M12 2s5 5 5 9a5 5 0 0 1-10 0c0-2 1-3 1-3s-3 2-3 6a7 7 0 0 0 14 0c0-6-7-12-7-12z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3E%3Cpath d='M12 2s5 5 5 9a5 5 0 0 1-10 0c0-2 1-3 1-3s-3 2-3 6a7 7 0 0 0 14 0c0-6-7-12-7-12z'/%3E%3C/svg%3E")}
.stat-b{min-width:0}
.stat-l{display:block;font-size:11.5px;color:var(--muted)}
.stat-v{display:block;font-size:19px;font-weight:700;letter-spacing:.3px;line-height:1.35}
.stat-v i{font-style:normal;font-size:12px;color:var(--muted);margin-left:3px;font-weight:400}
.stat-s{display:block;font-size:11px;color:#5d6b7d}
.stat.sm2{display:block}
.dl{font-size:11px;font-weight:600}
.dl.up{color:var(--good)}
.dl.down{color:var(--bad)}
.dl.flat{color:var(--muted)}

/* ---------- 模式卡 ---------- */
.mode{display:block;transition:.18s;overflow:hidden}
.mode:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--mc) 45%,var(--line))}
.mode-bar{height:3px;border-radius:3px;background:var(--mc);width:38px;margin-bottom:13px}
.mode h3{font-size:16px;font-weight:600}
.mode-tag{font-size:11.5px;color:var(--mc);margin-top:4px;letter-spacing:.3px}
.mode p{font-size:12.5px;color:var(--muted);margin-top:9px;line-height:1.65;min-height:40px}
.mode-go{font-size:12.5px;color:var(--txt2);display:inline-block;margin-top:6px}
.mode:hover .mode-go{color:var(--mc)}

/* ---------- 图表 ---------- */
.chart{width:100%;height:auto;display:block;overflow:visible}
.chart-radar{width:100%;max-width:300px;height:auto;display:block;margin:0 auto}
.center-card{display:flex;flex-direction:column}

.hbars{display:flex;flex-direction:column;gap:11px}
.hbar{display:grid;grid-template-columns:76px 1fr 54px;align-items:center;gap:10px;font-size:12.5px}
.hbar-k{color:var(--txt2)}
.hbar-t{height:8px;background:var(--surface3);border-radius:6px;overflow:hidden}
.hbar-t i{display:block;height:100%;border-radius:6px;transition:width .5s}
.hbar-v{text-align:right;color:var(--muted);font-size:12px}

/* ---------- 热力图 ---------- */
.heat{display:flex;gap:7px;overflow-x:auto;padding-bottom:4px}
.heat-dows{display:flex;flex-direction:column;gap:3px;padding-top:0}
.heat-dows span{height:14px;font-size:9.5px;color:#5d6b7d;line-height:14px}
.heat-grid{display:flex;gap:3px}
.heat-col{display:flex;flex-direction:column;gap:3px}
.hc{
  width:14px;height:14px;border-radius:3.5px;background:#141c27;display:block;cursor:pointer;
  border:1px solid transparent;transition:.12s;
}
.hc:hover{transform:scale(1.22)}
.hc.lv1{background:rgba(45,212,191,.28)}
.hc.lv2{background:rgba(45,212,191,.48)}
.hc.lv3{background:rgba(45,212,191,.7)}
.hc.lv4{background:#2dd4bf}
.hc.fu{opacity:.28;cursor:default}
.hc.today{border-color:#5eead4}
.heat-legend{display:flex;align-items:center;gap:4px;justify-content:flex-end;margin-top:10px;font-size:10.5px;color:var(--muted)}
.heat-legend .hc{width:11px;height:11px;cursor:default}

/* ---------- 练习页 ---------- */
.pr-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;flex-wrap:wrap}
.pr-head-r{display:flex;gap:10px}

.metrics{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}
.met{
  background:linear-gradient(180deg,var(--surface),#0f1620);
  border:1px solid var(--line);border-radius:12px;padding:12px 14px;text-align:center;
}
.met span{display:block;font-size:11px;color:var(--muted)}
.met strong{display:inline-block;font-size:25px;font-weight:700;letter-spacing:.5px;font-variant-numeric:tabular-nums;line-height:1.25}
.met i{font-style:normal;font-size:11.5px;color:var(--muted);margin-left:3px}
.met.big strong{color:var(--accent)}

.pr-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;flex-wrap:wrap}
.pr-bar-r{display:flex;align-items:center;gap:9px}
.tog{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--muted);cursor:pointer;user-select:none}
.tog input{accent-color:var(--accent);cursor:pointer}

.progress{height:5px;background:var(--surface3);border-radius:5px;overflow:hidden;margin-bottom:16px}
.progress i{display:block;height:100%;width:0;border-radius:5px;background:linear-gradient(90deg,var(--accent),#38bdf8);transition:width .18s}
.progress.big{height:7px;margin-bottom:18px}
.progress.big i{background:linear-gradient(90deg,#f87171,#fbbf24,#2dd4bf);transition:width .9s linear}

.type-area{
  position:relative;background:#0c121b;border:1px solid var(--line);border-radius:12px;
  padding:22px 24px;min-height:150px;max-height:290px;overflow-y:auto;cursor:text;
}
.type-text{
  font-size:23px;line-height:2.05;letter-spacing:.5px;color:#5f6d80;
  word-break:break-word;white-space:pre-wrap;
}
.type-area.en .type-text{font-family:var(--mono);font-size:21px;letter-spacing:.6px;line-height:2}
.ch{transition:color .06s;border-radius:2px}
.ch.ok{color:#e8f2fa}
.ch.bad{color:#fecaca;background:rgba(248,113,113,.22);box-shadow:inset 0 -2px 0 var(--bad)}
.ch.sp.bad{background:rgba(248,113,113,.35)}
.ch.cur{
  color:#0a0e14;background:var(--accent);border-radius:3px;
  animation:blink 1.05s steps(1,end) infinite;
}
@keyframes blink{0%,55%{background:var(--accent);color:#0a0e14}56%,100%{background:rgba(45,212,191,.22);color:#9fe8de}}

.type-mask{
  position:absolute;inset:0;background:rgba(10,15,22,.72);backdrop-filter:blur(2px);
  display:flex;align-items:center;justify-content:center;border-radius:12px;
  font-size:13px;color:var(--txt2);cursor:pointer;transition:.2s;
}
.type-mask span{
  padding:8px 18px;border:1px dashed var(--line2);border-radius:20px;background:var(--surface);
}
.type-mask.gone{opacity:0;pointer-events:none}

.ghost-input{
  position:absolute;left:20px;bottom:20px;width:1px;height:1px;
  opacity:0;border:0;padding:0;background:transparent;
}
.ime-wrap{margin-top:14px}
.ime-input{
  width:100%;background:#0c121b;border:1px solid var(--line2);border-radius:11px;
  padding:12px 14px;font-size:17px;line-height:1.7;resize:none;outline:none;
  transition:.15s;color:var(--txt);
}
.ime-input:focus{border-color:rgba(45,212,191,.55);box-shadow:0 0 0 3px rgba(45,212,191,.1)}
.ime-input::placeholder{color:#4d5a6b}
.ime-tip{
  display:flex;align-items:center;gap:10px;margin-top:9px;font-size:11.5px;color:var(--muted);
}
.ime-tip button{margin-left:auto}
.ime-tip button+button{margin-left:0}

/* ---------- 虚拟键盘 ---------- */
.kb-card{padding:16px 18px 14px}
.kb{display:flex;flex-direction:column;gap:6px;user-select:none}
.kb-row{display:flex;gap:6px;justify-content:center}
.kbk{
  flex:1 1 0;min-width:0;height:42px;border-radius:8px;
  background:var(--surface2);border:1px solid var(--line);
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  font-size:11px;color:var(--muted);position:relative;transition:.12s;
  border-bottom-width:2px;
}
.kbk b{font-size:10.5px;font-weight:600;line-height:1.1}
.kbk span{font-size:12px;line-height:1.1}
.kbk .one{font-size:13px;font-weight:500;letter-spacing:.5px}
.kbk .one.mod{font-size:10.5px;letter-spacing:0}
.kbk.w15{flex:1.5 1 0}.kbk.w18{flex:1.8 1 0}.kbk.w2{flex:2 1 0}
.kbk.w22{flex:2.2 1 0}.kbk.w23{flex:2.3 1 0}.kbk.w27{flex:2.7 1 0}
.kbk.w6{flex:7 1 0}
.kbk.f1{border-color:rgba(248,113,113,.22)}
.kbk.f2{border-color:rgba(251,191,36,.22)}
.kbk.f3{border-color:rgba(52,211,153,.22)}
.kbk.f4{border-color:rgba(96,165,250,.22)}
.kbk.f5{border-color:rgba(167,139,250,.22)}
.kbk.f6{border-color:rgba(45,212,191,.22)}
.kbk.f7{border-color:rgba(244,114,182,.22)}
.kbk.f8{border-color:rgba(148,163,184,.25)}
.kbk.next{
  background:linear-gradient(180deg,#2dd4bf,#14b8a6);color:#04211e;border-color:#5eead4;
  transform:translateY(1px);box-shadow:0 0 0 3px rgba(45,212,191,.18);
}
.kbk.next b,.kbk.next span{color:#04211e;font-weight:700}
.kbk.next-mod{background:var(--surface3);border-color:rgba(45,212,191,.5);color:var(--accent)}
.kb-legend{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;margin-top:12px;font-size:10.5px;color:var(--muted)}
.kb-legend .dot{width:8px;height:8px;border-radius:3px;display:inline-block;margin-right:4px;vertical-align:middle}
.dot.f1{background:#f87171}.dot.f2{background:#fbbf24}.dot.f3{background:#34d399}
.dot.f4{background:#60a5fa}.dot.f5{background:#a78bfa}.dot.f6{background:#2dd4bf}
.dot.f7{background:#f472b6}.dot.f8{background:#94a3b8}.dot.f0{background:#64748b}

/* 儿童营教具：分区配色虚拟键盘（teach 课型） */
.kb-teach{margin:0 auto;max-width:680px}
.kb-teach .kbk{color:#0b1220;font-weight:700;border-color:rgba(255,255,255,.4);box-shadow:inset 0 0 0 1px rgba(255,255,255,.15)}
.kb-teach .kbk.f1{background:rgba(248,113,113,.85)}
.kb-teach .kbk.f2{background:rgba(251,191,36,.85)}
.kb-teach .kbk.f3{background:rgba(52,211,153,.85)}
.kb-teach .kbk.f4{background:rgba(96,165,250,.9)}
.kb-teach .kbk.f5{background:rgba(167,139,250,.9)}
.kb-teach .kbk.f6{background:rgba(45,212,191,.85)}
.kb-teach .kbk.f7{background:rgba(244,114,182,.85)}
.kb-teach .kbk.f8{background:rgba(148,163,184,.82)}
.kb-teach .kbk.f0{background:rgba(100,116,139,.85)}
.kb-teach .kbk.teach-mark{position:relative;transform:translateY(-3px);z-index:2;
  box-shadow:0 0 0 3px #fff,0 0 0 6px var(--accent),0 6px 14px rgba(0,0,0,.25)}
.kb-teach .kbk.teach-mark::after{content:"✔";position:absolute;top:-9px;right:-7px;width:16px;height:16px;
  border-radius:50%;background:var(--accent);color:#04211e;font-size:10px;line-height:16px;text-align:center;font-weight:800}
.kp-teach-cap{font-size:15px;line-height:1.75;color:var(--text);margin:8px 0 16px}
.kp-kb-wrap{overflow-x:auto;padding:6px 2px 10px}
.kp-teach .kb-legend{margin-top:4px}

/* ---------- 下一根手指提示（替代整块虚拟键盘） ---------- */
.finger-hint{
  display:flex;align-items:center;gap:12px;flex-wrap:wrap;
  padding:13px 16px;margin-top:14px;
  background:var(--surface2);border:1px solid var(--line);border-radius:14px;
  font-size:14px;
}
.fh-cap{color:var(--muted);font-size:12px;white-space:nowrap}
.fh-chip{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:36px;height:36px;padding:0 12px;border-radius:10px;
  font-weight:800;font-size:17px;color:#04211e;line-height:1;
  box-shadow:0 2px 0 rgba(0,0,0,.18);
}
.fh-chip.f1{background:#f87171}.fh-chip.f2{background:#fbbf24}.fh-chip.f3{background:#34d399}
.fh-chip.f4{background:#60a5fa}.fh-chip.f5{background:#a78bfa}.fh-chip.f6{background:#2dd4bf}
.fh-chip.f7{background:#f472b6}.fh-chip.f8{background:#94a3b8}.fh-chip.f0{background:#64748b}
.fh-chip .fh-shift{font-style:normal;font-size:11px;margin-left:3px;opacity:.85}
.fh-finger{display:inline-flex;align-items:center;gap:6px;font-weight:600;color:var(--txt)}
.fh-idle{color:var(--muted);font-size:13px}

/* ---------- 测验 ---------- */
.ti-grid{display:grid;grid-template-columns:1.35fr 1fr;gap:32px}
.ti-grid h3{font-size:14.5px;margin-bottom:12px}
.rules{list-style:none;display:flex;flex-direction:column;gap:9px}
.rules li{
  font-size:13px;color:var(--txt2);padding-left:20px;position:relative;line-height:1.7;
}
.rules li::before{
  content:"";position:absolute;left:2px;top:9px;width:6px;height:6px;border-radius:2px;background:var(--accent);
}
.rules b{color:#fff;font-weight:600}

.score-wrap{align-items:stretch}
.score-card{display:flex;flex-direction:column;position:relative;overflow:hidden}
.score-card::before{
  content:"";position:absolute;right:-60px;top:-60px;width:180px;height:180px;border-radius:50%;
  background:var(--gc);opacity:.10;filter:blur(10px);
}
.score-badge{
  display:inline-block;align-self:flex-start;padding:5px 15px;border-radius:20px;
  background:color-mix(in srgb,var(--gc) 18%,transparent);
  border:1px solid color-mix(in srgb,var(--gc) 45%,transparent);
  color:var(--gc);font-size:13px;font-weight:700;letter-spacing:1px;
}
.score-num{margin:14px 0 2px;display:flex;align-items:baseline;gap:9px}
.score-num strong{font-size:52px;font-weight:800;letter-spacing:-1px;line-height:1;color:var(--gc)}
.score-num i{font-style:normal;font-size:12.5px;color:var(--muted)}
.score-desc{font-size:12.5px;color:var(--muted);margin-bottom:18px}
.score-bars{display:flex;flex-direction:column;gap:12px;margin-top:auto}
.sbar{display:grid;grid-template-columns:64px 1fr 76px;align-items:center;gap:10px;font-size:12.5px}
.sbar-l{color:var(--muted)}
.sbar-t{height:7px;background:var(--surface3);border-radius:6px;overflow:hidden}
.sbar-t i{display:block;height:100%;border-radius:6px;transition:width .7s}
.sbar-v{text-align:right;color:var(--txt2);font-size:12px;font-variant-numeric:tabular-nums}

.advice{list-style:none;display:flex;flex-direction:column;gap:10px}
.advice li{
  font-size:13px;color:var(--txt2);line-height:1.75;padding:11px 14px;
  background:var(--surface2);border-left:2px solid var(--accent);border-radius:0 9px 9px 0;
}

/* ---------- 报告 ---------- */
.report-layout{display:grid;grid-template-columns:288px 1fr;gap:18px;align-items:start}
#report-body{display:flex;flex-direction:column;gap:18px;min-width:0}
.cal-card{position:sticky;top:76px}
.cal-hd{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.cal-hd strong{font-size:14px}
.cal-nav{
  width:26px;height:26px;border-radius:7px;background:var(--surface2);border:1px solid var(--line2);
  cursor:pointer;color:var(--txt2);font-size:15px;line-height:1;
}
.cal-nav:hover{background:var(--surface3);color:#fff}
.cal-dow{display:grid;grid-template-columns:repeat(7,1fr);gap:3px;margin-bottom:5px}
.cal-dow span{text-align:center;font-size:10.5px;color:#5d6b7d}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}
.cd{
  aspect-ratio:1;display:flex;align-items:center;justify-content:center;
  border-radius:8px;font-size:12px;font-style:normal;color:var(--muted);
  cursor:pointer;position:relative;border:1px solid transparent;transition:.13s;
}
.cd.empty{cursor:default}
.cd:not(.empty):hover{background:var(--surface2);color:var(--txt)}
.cd.has{background:rgba(45,212,191,.12);color:#a5f3ea}
.cd.has b{position:absolute;bottom:3px;width:4px;height:4px;border-radius:50%;background:var(--accent)}
.cd.today{border-color:var(--accent2);color:#bfdbfe}
.cd.sel{background:var(--accent);color:#04211e;font-weight:700}
.cd.sel b{background:#04211e}
.cd.fu{opacity:.35;cursor:default}
.cd.mini{width:14px;height:14px;aspect-ratio:auto;display:inline-block;vertical-align:-3px;margin-right:4px}
.cal-foot{display:flex;gap:14px;margin-top:12px;font-size:10.5px;color:var(--muted)}
.cal-sum{
  margin-top:14px;padding-top:14px;border-top:1px solid var(--line);
  display:flex;flex-direction:column;gap:9px;
}
.cal-sum div{display:flex;justify-content:space-between;align-items:baseline;font-size:12px;color:var(--muted)}
.cal-sum strong{font-size:13.5px;color:var(--txt)}

.rp-hd{display:flex;align-items:center;justify-content:space-between;gap:20px}
.rp-date{font-size:12px;color:var(--muted);margin-bottom:5px}
.rp-hd h3{font-size:20px;font-weight:600}
.rp-hd h3 em{
  font-style:normal;font-size:27px;font-weight:800;margin:0 4px;
  background:linear-gradient(135deg,#5eead4,#38bdf8);-webkit-background-clip:text;background-clip:text;color:transparent;
}
.rp-ring{position:relative;flex:0 0 auto}

.cmp{margin-top:14px;padding-top:13px;border-top:1px dashed var(--line);font-size:12px;color:var(--muted);line-height:1.8}
.cmp b{color:var(--txt2)}

.errs{display:flex;flex-wrap:wrap;gap:8px}
.errc{
  display:inline-flex;align-items:center;gap:5px;padding:6px 11px;border-radius:9px;
  background:rgba(248,113,113,.1);border:1px solid rgba(248,113,113,.24);
}
.errc b{font-size:16px;color:#fecaca;font-weight:600;font-family:var(--mono)}
.errc i{font-style:normal;font-size:11px;color:#f87171}

.tbl-wrap{overflow-x:auto}
.tbl{width:100%;border-collapse:collapse;font-size:12.5px}
.tbl th{
  text-align:left;padding:9px 10px;color:var(--muted);font-weight:500;font-size:11.5px;
  border-bottom:1px solid var(--line);white-space:nowrap;
}
.tbl td{padding:10px;border-bottom:1px solid rgba(33,44,59,.6);color:var(--txt2);white-space:nowrap}
.tbl tr:last-child td{border-bottom:0}
.tbl tr:hover td{background:rgba(255,255,255,.02)}
.tag{padding:2px 8px;border-radius:6px;font-size:11px}
.tag.cn{background:rgba(45,212,191,.14);color:#5eead4}
.tag.en{background:rgba(96,165,250,.14);color:#93c5fd}
.tag.test{background:rgba(167,139,250,.14);color:#c4b5fd}

.review p{font-size:13px;color:var(--txt2);line-height:1.95}
.review b{color:#fff}

.empty-big{text-align:center;padding:56px 20px}
.empty-ic{font-size:34px;margin-bottom:10px;opacity:.7}
.empty-big h3{font-size:16px;margin-bottom:6px}
.empty-big p{color:var(--muted);font-size:13px}

/* ---------- Modal ---------- */
.modal-mask{
  position:fixed;inset:0;background:rgba(4,7,11,.72);backdrop-filter:blur(6px);
  display:none;align-items:center;justify-content:center;z-index:100;padding:20px;
}
.modal-mask.show{display:flex;animation:fade .2s ease}
@keyframes fade{from{opacity:0}to{opacity:1}}
.modal{
  width:min(560px,100%);background:linear-gradient(180deg,#141d29,#101822);
  border:1px solid var(--line2);border-radius:18px;padding:26px 28px;
  box-shadow:0 24px 70px rgba(0,0,0,.6);animation:pop .22s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes pop{from{transform:translateY(14px) scale(.97);opacity:0}to{transform:none;opacity:1}}
.modal-hd h3{font-size:19px;font-weight:650}
.modal-sub{font-size:12.5px;color:var(--muted);margin-top:5px}
.modal-sub b{color:var(--accent);font-size:15px}
.res-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:11px;margin:20px 0 4px}
.res{background:var(--surface2);border:1px solid var(--line);border-radius:11px;padding:12px;text-align:center}
.res span{display:block;font-size:11px;color:var(--muted)}
.res strong{font-size:23px;font-weight:700;font-variant-numeric:tabular-nums}
.res i{font-style:normal;font-size:11px;color:var(--muted);margin-left:2px}
.err-line{margin-top:14px;font-size:12px;color:var(--muted);display:flex;flex-wrap:wrap;gap:7px;align-items:center}
.err-line b{
  display:inline-flex;align-items:center;gap:4px;padding:3px 9px;border-radius:7px;font-weight:500;
  background:rgba(248,113,113,.1);border:1px solid rgba(248,113,113,.22);color:#fecaca;font-family:var(--mono);
}
.err-line b i{font-style:normal;font-size:10px;color:#f87171}
.modal-ft{display:flex;gap:10px;justify-content:flex-end;margin-top:22px;flex-wrap:wrap}

/* ---------- 训练营页面「?」帮助按钮 ---------- */
.camps-help-btn{
  width:26px;height:26px;flex:none;border-radius:50%;
  border:1px solid var(--line);background:var(--surface2);color:var(--muted);
  font-size:14px;font-weight:700;line-height:1;cursor:pointer;padding:0;
  display:inline-flex;align-items:center;justify-content:center;transition:.15s;
}
.camps-help-btn:hover{background:var(--accent);color:#06222a;border-color:var(--accent)}

/* 训练营说明弹窗 */
.camps-help p{font-size:13.5px;line-height:1.72;color:var(--txt2);margin:0 0 12px}
.camps-help p:last-of-type{margin-bottom:0}
.camps-help b{color:var(--txt);font-weight:650}
.ch-grid{display:flex;flex-direction:column;gap:10px;margin-top:18px}
.ch-btn{width:100%;justify-content:center;text-align:center}

/* ---------- 响应式 ---------- */
@media (max-width:1180px){
  .grid-4{grid-template-columns:repeat(2,1fr)}
  .grid-3{grid-template-columns:1fr}
  .metrics{grid-template-columns:repeat(3,1fr)}
}
@media (max-width:1000px){
  .grid-2,.ti-grid,.report-layout{grid-template-columns:1fr}
  .cal-card{position:static}
  .hero{flex-direction:column;align-items:flex-start}
}
@media (max-width:760px){
  .sidebar{display:none}
  .view-root{padding:16px 14px 40px}
  .topbar{padding:0 14px}
  .grid-4,.metrics{grid-template-columns:repeat(2,1fr)}
  .hero-title{font-size:24px}
  .hero-title em{font-size:34px}
  .type-text{font-size:19px}
  .res-grid{grid-template-columns:repeat(2,1fr)}
  .kb-card{display:none}
}

/* ---------- 顶栏账号入口 ---------- */
.tb-account{
  display:flex;align-items:center;gap:8px;margin-left:14px;
  padding:5px 11px 5px 6px;border-radius:22px;
  background:var(--surface2);border:1px solid var(--line2);
  cursor:pointer;transition:.16s;
}
.tb-account:hover{background:var(--surface3);border-color:#3a4a5e}
.tb-ava{width:34px;height:34px;border-radius:50%;overflow:hidden;flex:0 0 34px;background:var(--surface3);display:flex;align-items:center;justify-content:center}
.tb-ava .avatar-svg{display:block}
.tb-name{font-size:13px;color:var(--txt);max-width:84px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tb-caret{font-size:9px;color:var(--muted)}
.ic-user{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E")}

/* ---------- 首页问候 ---------- */
.hero-greet{display:flex;align-items:center;gap:16px;margin-bottom:14px}
.hero-ava{
  width:66px;height:66px;border-radius:20px;overflow:hidden;flex:0 0 66px;
  background:var(--surface3);border:1px solid var(--line2);
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 6px 22px rgba(0,0,0,.35);
}
.hero-greet-t{min-width:0}
.hero-greet-t .hero-tag{margin-bottom:8px}
.hero-greet-t .hero-title{font-size:27px}

/* ---------- 表单输入 ---------- */
.inp{
  width:100%;padding:10px 13px;border-radius:9px;
  background:var(--surface2);border:1px solid var(--line2);color:var(--txt);
  font-size:13.5px;transition:.16s;
}
.inp:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px rgba(45,212,191,.16)}
.inp::placeholder{color:#5d6b7d}

/* ---------- 账号页 ---------- */
.account-welcome{
  text-align:center;padding:40px 24px;display:flex;flex-direction:column;align-items:center;gap:10px;
  background:
    radial-gradient(420px 200px at 50% 0%, rgba(167,139,250,.12), transparent 70%),
    linear-gradient(180deg,#121b26,#0e1520);
}
.aw-ava{width:120px;height:120px;border-radius:30px;overflow:hidden;margin-bottom:6px;border:1px solid var(--line2);background:var(--surface3)}
.account-welcome h3{font-size:19px;font-weight:650}
.aw-form{display:flex;gap:10px;width:100%;max-width:440px;margin-top:14px}
.aw-form .inp{flex:1}

.ac-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(186px,1fr));gap:16px}
.ac-card{
  padding:18px 16px;display:flex;flex-direction:column;align-items:center;text-align:center;gap:7px;
  transition:.16s;
}
.ac-card.on{border-color:rgba(45,212,191,.45);box-shadow:0 0 0 1px rgba(45,212,191,.25)}
.ac-del{
  position:absolute;top:9px;right:10px;width:24px;height:24px;border-radius:50%;
  background:var(--surface2);border:1px solid var(--line2);color:var(--muted);
  cursor:pointer;font-size:15px;line-height:1;transition:.15s;
}
.ac-del:hover{background:rgba(248,113,113,.16);color:var(--bad);border-color:rgba(248,113,113,.4)}
.ac-ava{width:92px;height:92px;border-radius:24px;overflow:hidden;margin-top:4px;border:1px solid var(--line2);background:var(--surface3);pointer-events:none}
.ac-name{font-size:15px;font-weight:600;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ac-sub{font-size:12px;color:var(--muted)}
.ac-sub b{color:var(--accent)}
.ac-acts{display:flex;gap:8px;margin-top:8px;flex-wrap:wrap;justify-content:center}
.ac-cur{font-size:12px;color:var(--accent);padding:6px 12px;background:rgba(45,212,191,.12);border-radius:8px}
.ac-add,.ac-full{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
  border:1.5px dashed var(--line2);background:transparent;cursor:pointer;color:var(--txt2);transition:.16s;
}
.ac-add:hover{border-color:var(--accent);color:var(--accent);background:rgba(45,212,191,.06)}
.ac-add-ic{font-size:30px;line-height:1;font-weight:300}
.ac-full{opacity:.6;cursor:default}
.ac-full .ac-add-ic{font-size:24px}

/* ---------- 学分管理（我的账号-普通模式） ---------- */
.credit-manage{margin-top:18px;display:flex;flex-direction:column;gap:14px}
.credit-manage .cm-hd{display:flex;align-items:center;gap:14px}
.credit-manage .cm-ic{font-size:30px;line-height:1}
.credit-manage .cm-hd strong{font-size:16px;display:block}
.credit-manage .cm-hd .muted{margin:2px 0 0}
.credit-manage .cm-credit{color:var(--accent);font-weight:700}
.credit-manage .cm-acts{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.credit-manage .cm-acts .muted{max-width:520px;line-height:1.5}

/* ---------- 自画像编辑器 ---------- */
.av-wrap{display:grid;grid-template-columns:300px 1fr;gap:18px;align-items:start}
.av-stage{position:sticky;top:74px;display:flex;flex-direction:column;align-items:center;gap:12px}
.av-preview{
  width:188px;height:188px;border-radius:26px;overflow:hidden;
  border:1px solid var(--line2);background:var(--surface3);
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 10px 30px rgba(0,0,0,.4);
}
.av-preview .avatar-svg{display:block}
.av-name-row{width:100%}
.av-acts{width:100%}

.av-panel{display:flex;flex-direction:column;gap:18px}
.pick-sec{
  background:linear-gradient(180deg,var(--surface),#0f1620);
  border:1px solid var(--line);border-radius:14px;padding:16px 18px;
}
.pick-sec h3{font-size:14.5px;font-weight:600;margin-bottom:12px;display:flex;align-items:center;gap:8px}
.pick-sec h3 small{font-size:11.5px;color:var(--muted);font-weight:400}
.pick-grp{margin-bottom:12px}
.pick-grp:last-child{margin-bottom:0}
.pick-grp-h{font-size:12px;color:var(--accent);margin-bottom:8px;font-weight:600}
.pick-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(64px,1fr));gap:8px}
.pick-grid.sm{grid-template-columns:repeat(auto-fill,minmax(56px,1fr));gap:6px}
.pick{
  display:flex;flex-direction:column;align-items:center;gap:3px;
  background:var(--surface2);border:1px solid var(--line);border-radius:11px;
  padding:6px 4px 5px;cursor:pointer;transition:.14s;
}
.pick:hover{background:var(--surface3);border-color:#3a4a5e;transform:translateY(-1px)}
.pick.sel{border-color:var(--accent);box-shadow:0 0 0 2px rgba(45,212,191,.3);background:rgba(45,212,191,.08)}
.pick .avatar-svg{display:block;width:48px;height:48px}
.pick-grid.sm .avatar-svg{width:42px;height:42px}
.pick span{font-size:9.5px;color:var(--muted);line-height:1.2;text-align:center;overflow:hidden;max-width:100%}
.pick.sel span{color:var(--accent)}

.detail-grp{margin-bottom:14px}
.detail-grp:last-child{margin-bottom:0}
.dg-h{display:block;font-size:12px;color:var(--muted);margin-bottom:7px}
.sw-row{display:flex;flex-wrap:wrap;gap:8px}
.sw{
  width:30px;height:30px;border-radius:9px;cursor:pointer;
  border:2px solid transparent;transition:.14s;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08);
}
.sw:hover{transform:scale(1.08)}
.sw.sel{border-color:#fff;box-shadow:0 0 0 2px var(--accent)}

/* ---------- 编辑器响应式 ---------- */
@media (max-width:920px){
  .av-wrap{grid-template-columns:1fr}
  .av-stage{position:static}
}

/* ============================================================
 * 学习模式 / 小键助手 / 动态特效
 * ============================================================ */

/* 工具类 */
.hidden{display:none !important}

/* 新导航图标 */
.ic-book{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5a2 2 0 0 1 2-2h12v16H6a2 2 0 0 0-2 2z'/%3E%3Cpath d='M20 5a2 2 0 0 0-2-2H8v16h12'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5a2 2 0 0 1 2-2h12v16H6a2 2 0 0 0-2 2z'/%3E%3Cpath d='M20 5a2 2 0 0 0-2-2H8v16h12'/%3E%3C/svg%3E")}
.ic-chat{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.9A8 8 0 1 1 21 12z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.9A8 8 0 1 1 21 12z'/%3E%3C/svg%3E")}
.ic-sword{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 3.5l6 6-3 3-6-6z'/%3E%3Cpath d='M8 13l3 3M3 21l4-4'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 3.5l6 6-3 3-6-6z'/%3E%3Cpath d='M8 13l3 3M3 21l4-4'/%3E%3C/svg%3E")}
.ic-ai{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.8 4.8L18 9.6l-4.2 1.8L12 16l-1.8-4.6L6 9.6l4.2-1.8z'/%3E%3Cpath d='M19 14l.9 2.4L22 17l-2.1.6L19 20l-.9-2.4L16 17l2.1-.6z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l1.8 4.8L18 9.6l-4.2 1.8L12 16l-1.8-4.6L6 9.6l4.2-1.8z'/%3E%3Cpath d='M19 14l.9 2.4L22 17l-2.1.6L19 20l-.9-2.4L16 17l2.1-.6z'/%3E%3C/svg%3E")}

/* 学习模式卡片 */
.learn-cards .learn-card{position:relative;overflow:hidden;transition:transform .18s,box-shadow .18s}
.learn-card:hover{transform:translateY(-4px);box-shadow:0 14px 36px rgba(0,0,0,.4)}
.lc-ic{width:46px;height:46px;border-radius:13px;margin-bottom:12px;display:flex;align-items:center;justify-content:center;
  background:color-mix(in srgb,var(--mc) 18%,transparent);position:relative}
.lc-ic::before{content:'';width:24px;height:24px;background:var(--mc);-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}
.lc-ic.ic-book::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5a2 2 0 0 1 2-2h12v16H6a2 2 0 0 0-2 2z'/%3E%3Cpath d='M20 5a2 2 0 0 0-2-2H8v16h12'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5a2 2 0 0 1 2-2h12v16H6a2 2 0 0 0-2 2z'/%3E%3Cpath d='M20 5a2 2 0 0 0-2-2H8v16h12'/%3E%3C/svg%3E")}
.lc-ic.ic-chat::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.9A8 8 0 1 1 21 12z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.9A8 8 0 1 1 21 12z'/%3E%3C/svg%3E")}
.lc-ic.ic-sword::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 3.5l6 6-3 3-6-6z'/%3E%3Cpath d='M8 13l3 3M3 21l4-4'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.5 3.5l6 6-3 3-6-6z'/%3E%3Cpath d='M8 13l3 3M3 21l4-4'/%3E%3C/svg%3E")}
.lc-ic.ic-en::before{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 19 6-14 6 14M8 14h6'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 19 6-14 6 14M8 14h6'/%3E%3C/svg%3E")}
.lc-prog{margin-top:14px;display:flex;align-items:center;gap:10px;font-size:12px;color:var(--muted)}
.lc-bar{flex:1;height:7px;border-radius:6px;background:var(--surface3);overflow:hidden}
.lc-bar i{display:block;height:100%;border-radius:6px;background:linear-gradient(90deg,var(--mc),color-mix(in srgb,var(--mc) 55%,#fff));transition:width .5s}
.learn-tip{display:flex;gap:18px;align-items:center;margin-top:18px;background:radial-gradient(400px 200px at 90% 0,rgba(45,212,191,.10),transparent 70%)}
.lt-ava{width:56px;height:56px;border-radius:18px;overflow:hidden;flex:0 0 56px;background:var(--surface3);display:flex;align-items:center;justify-content:center}
.learn-tip h3{margin-bottom:4px}
.learn-tip .btn{margin-top:10px}

/* 盲打课程列表 */
.blind-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
.blind-card{display:flex;align-items:center;gap:14px;padding:18px 20px;transition:transform .16s,box-shadow .16s}
.blind-card:hover{transform:translateY(-3px);box-shadow:0 12px 30px rgba(0,0,0,.35)}
.blind-card.done{border-color:rgba(52,211,153,.4)}
.blind-no{width:38px;height:38px;border-radius:11px;flex:0 0 38px;display:flex;align-items:center;justify-content:center;
  font-size:17px;font-weight:700;color:#06231f;background:var(--accent)}
.blind-info{display:flex;flex-direction:column;gap:3px;flex:1;min-width:0}
.blind-info strong{font-size:15px}
.blind-go{padding:6px 13px;border-radius:20px;background:var(--surface3);color:var(--txt);font-size:13px}
.blind-check{width:30px;height:30px;border-radius:50%;background:rgba(52,211,153,.18);color:#34d399;display:flex;align-items:center;justify-content:center;font-weight:700}

/* 手指图 */
.blind-hands{display:flex;justify-content:center;padding:18px}
.hands{width:340px;max-width:100%}
.hands .hf rect{fill:var(--surface3);stroke:var(--line2);stroke-width:1.5;transition:.18s}
.hands .hf text{fill:var(--muted);font-size:11px;text-anchor:middle;font-family:var(--sans)}
.hands .hf.lit rect{fill:var(--accent);stroke:#7defd9;filter:drop-shadow(0 0 8px rgba(45,212,191,.6))}
.hands .hf.lit text{fill:var(--muted)}
/* 手指配色（与键盘图例一致） */
.hands .hf[data-f="f1"] rect{fill:#f87171}
.hands .hf[data-f="f2"] rect{fill:#fb923c}
.hands .hf[data-f="f3"] rect{fill:#fbbf24}
.hands .hf[data-f="f4"] rect{fill:#34d399}
.hands .hf[data-f="f5"] rect{fill:#22d3ee}
.hands .hf[data-f="f6"] rect{fill:#60a5fa}
.hands .hf[data-f="f7"] rect{fill:#a78bfa}
.hands .hf[data-f="f8"] rect{fill:#f472b6}
.hands .hf[data-f="f0"] rect{fill:#94a3b8}
.hands .hf.lit rect{stroke:#fff;filter:drop-shadow(0 0 10px rgba(255,255,255,.5))}

/* 盲打区文字按手指着色（仅未判定对错时） */
.blind-area .ch[data-f]:not(.ok):not(.bad){color:var(--muted)}
.blind-area .ch[data-f="f1"]:not(.ok):not(.bad){color:#f87171}
.blind-area .ch[data-f="f2"]:not(.ok):not(.bad){color:#fb923c}
.blind-area .ch[data-f="f3"]:not(.ok):not(.bad){color:#fbbf24}
.blind-area .ch[data-f="f4"]:not(.ok):not(.bad){color:#34d399}
.blind-area .ch[data-f="f5"]:not(.ok):not(.bad){color:#22d3ee}
.blind-area .ch[data-f="f6"]:not(.ok):not(.bad){color:#60a5fa}
.blind-area .ch[data-f="f7"]:not(.ok):not(.bad){color:#a78bfa}
.blind-area .ch[data-f="f8"]:not(.ok):not(.bad){color:#f472b6}
.blind-area .ch[data-f="f0"]:not(.ok):not(.bad){color:#94a3b8}
.blind-area .ch.ok{color:#34d399 !important;background:rgba(52,211,153,.14)}
.blind-area .ch.bad{color:#f87171 !important;text-decoration:underline wavy rgba(248,113,113,.7)}

/* 聊天 AI 打字（对话式） */
.chat-app{display:flex;flex-direction:column;gap:0;height:calc(100vh - 190px);min-height:440px;
  border:1px solid var(--line2);border-radius:16px;overflow:hidden;background:var(--surface)}
.chat-practice{display:flex;flex-direction:column;height:calc(100vh - 190px);min-height:440px;
  border:1px solid var(--line2);border-radius:16px;overflow:hidden;background:var(--surface)}
.cp-hud{display:flex;flex-wrap:wrap;gap:8px 18px;padding:11px 16px;border-bottom:1px solid var(--line2);
  background:linear-gradient(135deg,rgba(167,139,250,.12),rgba(45,212,191,.08));font-size:12.5px;color:var(--muted)}
.cp-hud b{color:var(--txt);font-size:14px;font-weight:700}
.chat-list{flex:1;overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:12px}
.chat-msg{display:flex;gap:9px;max-width:86%;align-items:flex-end}
.chat-msg.me{align-self:flex-end;flex-direction:row-reverse}
.chat-msg.pop{animation:msgpop .26s cubic-bezier(.2,.9,.3,1.2)}
@keyframes msgpop{0%{opacity:0;transform:translateY(8px) scale(.96)}100%{opacity:1;transform:none}}
.chat-av{width:30px;height:30px;border-radius:50%;overflow:hidden;flex:0 0 30px;background:var(--surface3);display:flex;align-items:center;justify-content:center}
.chat-bub{padding:10px 13px;border-radius:14px;font-size:14px;line-height:1.5;white-space:pre-wrap;word-break:break-word}
.chat-msg.xj .chat-bub{background:var(--surface3);border:1px solid var(--line2);border-top-left-radius:4px}
.chat-msg.me .chat-bub{background:linear-gradient(135deg,var(--accent),#1fb6a0);color:#06231f;border-top-right-radius:4px}
.chat-msg.typing .chat-bub{display:flex;gap:4px;padding:14px;background:var(--surface3);border:1px solid var(--line2)}
.chat-msg.typing .chat-bub i{width:6px;height:6px;border-radius:50%;background:var(--muted);animation:dot 1.2s infinite}
.chat-msg.typing .chat-bub i:nth-child(2){animation-delay:.2s}
.chat-msg.typing .chat-bub i:nth-child(3){animation-delay:.4s}
@keyframes dot{0%,60%,100%{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
.chat-input{display:flex;gap:10px;padding:12px;border-top:1px solid var(--line2);background:var(--surface2)}
.chat-input textarea{flex:1;resize:none;padding:11px 13px;border-radius:12px;background:var(--bg);border:1px solid var(--line2);
  color:var(--txt);font-size:14px;line-height:1.5;max-height:140px;font-family:var(--sans)}
.chat-input textarea:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px rgba(45,212,191,.15)}
.chat-input button{flex:0 0 auto;padding:0 18px;border-radius:12px}
.chat-foot{display:flex;justify-content:space-between;gap:10px;padding:8px 12px;border-top:1px solid var(--line2);background:var(--surface2)}
.chat-stage{border-top:1px solid var(--line2);padding:14px 16px;background:var(--surface2)}
.chat-typing{margin-bottom:10px}
.chat-in{width:100%;margin:0}
.chat-metrics{display:flex;gap:18px;font-size:13px;color:var(--muted);margin-top:8px}
.chat-metrics b{color:var(--txt);font-size:15px}
.chat-wait{text-align:center;color:var(--muted);padding:12px;font-size:14px}

/* AI 对战 */
.battle-arena{display:grid;grid-template-columns:1fr auto 1fr;gap:16px;align-items:center;margin-bottom:18px}
.battle-side{padding:16px;border-radius:16px;background:var(--surface);border:1px solid var(--line2)}
.battle-side.you{border-color:rgba(45,212,191,.4)}
.battle-side.bot{border-color:rgba(244,114,182,.4)}
.bs-hd{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.bs-av{width:40px;height:40px;border-radius:50%;overflow:hidden;flex:0 0 40px;background:var(--surface3);display:flex;align-items:center;justify-content:center}
.bs-hd strong{display:block;font-size:15px}
.bs-hd span{font-size:12px;color:var(--muted)}
.bs-bar{height:14px;border-radius:8px;background:var(--surface3);overflow:hidden}
.bs-bar i{display:block;height:100%;width:0;border-radius:8px;background:linear-gradient(90deg,#2dd4bf,#34d399);transition:width .12s linear}
.bs-bar.bot i{background:linear-gradient(90deg,#f472b6,#fb7185)}
.bs-pct{margin-top:8px;font-size:13px;color:var(--muted);text-align:right}
.battle-vs{font-weight:800;font-size:20px;color:var(--muted);letter-spacing:1px}
.battle-diff{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.battle-diff>span{color:var(--muted);font-size:13px}
.battle-diff button{padding:7px 14px;border-radius:20px;background:var(--surface3);border:1px solid var(--line2);color:var(--txt);cursor:pointer;font-size:13px}
.battle-diff button.on{border-color:var(--accent);color:var(--accent);box-shadow:0 0 0 2px rgba(45,212,191,.15)}
.battle-stage.hidden{display:none}
.battle-stage .card{padding:18px}

/* 小键 悬浮助手 */
.xj-fab{position:fixed;right:22px;bottom:22px;z-index:60;width:60px;height:60px;border-radius:50%;border:none;cursor:pointer;
  background:linear-gradient(135deg,#2dd4bf,#7c3aed);box-shadow:0 10px 28px rgba(45,212,191,.4);
  display:flex;align-items:center;justify-content:center;animation:floaty 3.2s ease-in-out infinite}
.xj-fab:hover{transform:scale(1.06)}
.xj-fab.active{box-shadow:0 0 0 4px rgba(45,212,191,.3)}
.xj-fab-av{width:46px;height:46px;border-radius:50%;overflow:hidden;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.12)}
.xj-fab-av .avatar-svg{animation:bob 2.4s ease-in-out infinite}
.xj-fab-badge{position:absolute;top:-2px;right:-2px;background:#fb7185;color:#fff;font-size:10px;font-weight:700;
  padding:2px 6px;border-radius:10px;border:2px solid var(--bg)}
@keyframes floaty{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
@keyframes bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-2px)}}

.xj-panel{position:fixed;right:22px;bottom:92px;z-index:60;width:368px;max-width:calc(100vw - 28px);height:540px;max-height:calc(100vh - 120px);
  display:none;flex-direction:column;border-radius:18px;overflow:hidden;
  background:var(--surface);border:1px solid var(--line2);box-shadow:0 24px 60px rgba(0,0,0,.55);transform:translateY(14px);opacity:0;transition:.22s}
.xj-panel.show{display:flex;transform:translateY(0);opacity:1}
.xj-hd{display:flex;align-items:center;gap:11px;padding:14px 16px;border-bottom:1px solid var(--line2);
  background:linear-gradient(135deg,rgba(45,212,191,.16),rgba(124,58,237,.16))}
.xj-hd-av{width:40px;height:40px;border-radius:50%;overflow:hidden;flex:0 0 40px;background:var(--surface3);display:flex;align-items:center;justify-content:center}
.xj-hd-t{display:flex;flex-direction:column;flex:1;min-width:0}
.xj-hd-t strong{font-size:15px}
.xj-hd-t span{font-size:12px;color:var(--muted)}
.xj-close{border:none;background:none;color:var(--muted);font-size:22px;cursor:pointer;line-height:1}
.xj-list{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px}
.xj-msg{display:flex;gap:9px;max-width:88%}
.xj-msg.me{align-self:flex-end;flex-direction:row-reverse}
.xj-av{width:30px;height:30px;border-radius:50%;overflow:hidden;flex:0 0 30px;background:var(--surface3);display:flex;align-items:center;justify-content:center}
.xj-bub{padding:10px 13px;border-radius:14px;font-size:14px;line-height:1.5;white-space:pre-wrap;word-break:break-word}
.xj-msg.xj .xj-bub{background:var(--surface3);border:1px solid var(--line2);border-top-left-radius:4px}
.xj-msg.me .xj-bub{background:linear-gradient(135deg,#2dd4bf,#1fb6a0);color:#06231f;border-top-right-radius:4px}
.xj-msg.typing .xj-bub{display:flex;gap:4px;padding:14px}
.xj-msg.typing .xj-bub i{width:6px;height:6px;border-radius:50%;background:var(--muted);animation:dot 1.2s infinite}
.xj-msg.typing .xj-bub i:nth-child(2){animation-delay:.2s}
.xj-msg.typing .xj-bub i:nth-child(3){animation-delay:.4s}
@keyframes dot{0%,60%,100%{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
.xj-quick{display:flex;gap:7px;padding:8px 12px;border-top:1px solid var(--line2);flex-wrap:wrap}
.xj-quick button{flex:1;min-width:90px;padding:7px 8px;border-radius:10px;background:var(--surface3);border:1px solid var(--line2);color:var(--txt);font-size:12px;cursor:pointer}
.xj-quick button:hover{border-color:var(--accent);color:var(--accent)}
.xj-input{display:flex;gap:8px;padding:12px;border-top:1px solid var(--line2)}
.xj-input input{flex:1;padding:10px 12px;border-radius:10px;background:var(--surface2);border:1px solid var(--line2);color:var(--txt);font-size:13.5px}
.xj-input input:focus{outline:none;border-color:var(--accent)}
.xj-input button{padding:0 16px;border-radius:10px;border:none;background:var(--accent);color:#06231f;font-weight:600;cursor:pointer}

/* 小键 助手页 */
.assistant-page{text-align:center;display:flex;flex-direction:column;align-items:center;gap:8px;padding:40px 24px;
  background:radial-gradient(420px 220px at 50% 0,rgba(124,58,237,.14),transparent 70%)}
.ap-ava{width:96px;height:96px;border-radius:26px;overflow:hidden;background:var(--surface3);display:flex;align-items:center;justify-content:center;margin-bottom:6px}
.ap-list{text-align:left;display:inline-block;margin:6px 0 4px;color:var(--muted);line-height:2}
.ap-list b{color:var(--accent)}

/* 动态特效层 */
#fx-canvas{position:fixed;inset:0;pointer-events:none;z-index:80}
.fx-ripple{position:fixed;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;border:2px solid var(--accent);
  pointer-events:none;z-index:81;animation:ripple .6s ease-out forwards}
@keyframes ripple{0%{transform:scale(.4);opacity:.9}100%{transform:scale(3.4);opacity:0}}
.fx-popup{position:fixed;transform:translate(-50%,-50%);font-weight:800;font-size:22px;pointer-events:none;z-index:82;
  text-shadow:0 2px 10px rgba(0,0,0,.5);animation:pop 1s ease-out forwards}
@keyframes pop{0%{opacity:0;transform:translate(-50%,-30%) scale(.6)}25%{opacity:1}100%{opacity:0;transform:translate(-50%,-160%) scale(1.1)}}
.fx-shake{animation:shake .4s}
@keyframes shake{0%,100%{transform:translateX(0)}20%{transform:translateX(-8px)}40%{transform:translateX(8px)}60%{transform:translateX(-5px)}80%{transform:translateX(5px)}}

/* 新增响应式 */
@media (max-width:760px){
  .blind-grid{grid-template-columns:1fr}
  .battle-arena{grid-template-columns:1fr;gap:10px}
  .battle-vs{text-align:center}
  .xj-panel{right:10px;left:10px;width:auto}
  .chat-app,.chat-practice{height:calc(100vh - 170px)}
}

/* ============================================================
 * 训练营
 * ============================================================ */

/* 导航图标 */
.ic-camp{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h16M12 4 4 20M12 4l8 16M12 4v16'/%3E%3Cpath d='M8 12l4-3 4 3'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h16M12 4 4 20M12 4l8 16M12 4v16'/%3E%3Cpath d='M8 12l4-3 4 3'/%3E%3C/svg%3E")}
.ic-flash{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2 4 14h7l-1 8 9-12h-7z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2 4 14h7l-1 8 9-12h-7z'/%3E%3C/svg%3E")}
.ic-lang{-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.5 2.5 15 0 18M12 3c-2.5 2.5-2.5 15 0 18'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.5 2.5 15 0 18M12 3c-2.5 2.5-2.5 15 0 18'/%3E%3C/svg%3E")}

/* 报名总览卡 */
.camp-cards .camp-card{position:relative;overflow:hidden;transition:transform .18s,box-shadow .18s}
.camp-cards .camp-card:hover{transform:translateY(-4px);box-shadow:0 14px 36px rgba(0,0,0,.4)}
.camp-fee{display:flex;gap:14px;flex-wrap:wrap;margin:12px 0;font-size:12px;color:var(--muted)}
.camp-fee span{padding:3px 10px;border-radius:7px;background:var(--surface2);border:1px solid var(--line2)}
.camp-card .btn-primary{margin-top:6px;width:100%}

.camp-rules{margin-top:4px}
.camp-rules h3{font-size:14.5px;margin-bottom:12px}
.camp-rules .rules{margin-bottom:0}

/* 报名弹窗 */
.enr-body{padding-top:6px}
.enr-row{display:flex;align-items:center;gap:14px;margin-bottom:16px}
.enr-k{font-size:13px;color:var(--muted);width:42px;flex:0 0 42px}
.enr-val{font-size:13.5px;color:var(--txt2)}
.enr-sum{display:flex;gap:18px;flex-wrap:wrap;padding:14px;background:var(--surface2);border-radius:11px;border:1px solid var(--line)}
.enr-sum div{display:flex;flex-direction:column;gap:2px}
.enr-sum span{font-size:11px;color:var(--muted)}
.enr-sum b{font-size:18px;font-weight:700}
.enr-warn{margin:12px 0 0;font-size:12.5px;color:var(--bad);background:rgba(248,113,113,.1);border:1px solid rgba(248,113,113,.25);padding:9px 12px;border-radius:9px}

/* 进行中：每日进度 */
.camp-days{display:grid;grid-template-columns:repeat(7,1fr);gap:10px}
.camp-day{
  text-align:center;padding:14px 6px;border-radius:13px;
  background:var(--surface2);border:1px solid var(--line);transition:.18s;
}
.camp-day .cd-ic{font-size:20px;line-height:1;margin-bottom:7px}
.camp-day .cd-d{font-size:12.5px;font-weight:600;color:var(--txt)}
.camp-day .cd-t{font-size:11px;color:var(--muted);margin-top:3px}
.camp-day.done{border-color:rgba(52,211,153,.45);background:rgba(52,211,153,.1)}
.camp-day.done .cd-ic{color:var(--good)}
.camp-day.today{border-color:var(--accent);box-shadow:0 0 0 2px rgba(45,212,191,.22);background:rgba(45,212,191,.08)}
.camp-day.today .cd-ic{color:var(--accent)}
.camp-day.missed{border-color:rgba(248,113,113,.45);background:rgba(248,113,113,.1);opacity:.85}
.camp-day.missed .cd-ic{color:var(--bad)}
.camp-day.future .cd-ic{filter:grayscale(.3);opacity:.7}

/* 进行中：当日任务 */
.camp-today{display:flex;align-items:center;gap:16px}
.camp-task{display:flex;align-items:center;gap:16px;width:100%}
.camp-task .ct-ic{
  width:46px;height:46px;flex:0 0 46px;border-radius:13px;display:flex;align-items:center;justify-content:center;
  font-size:18px;background:linear-gradient(135deg,var(--accent),#14b8a6);color:#04211e;
}
.camp-task.done .ct-ic{background:rgba(52,211,153,.18);color:var(--good)}
.camp-task .ct-t{flex:1;min-width:0}
.camp-task .ct-t strong{display:block;font-size:15px;font-weight:600}
.camp-task .ct-t span{font-size:12.5px;color:var(--muted)}

/* 进行中：信息 */
.camp-info{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
.ci-row{display:flex;flex-direction:column;gap:4px}
.ci-row span{font-size:11.5px;color:var(--muted)}
.ci-row b{font-size:14px;font-weight:600}

/* 结果页 */
.camp-result{text-align:center;padding:36px 24px;display:flex;flex-direction:column;align-items:center;gap:10px}
.camp-result .cr-ic{width:84px;height:84px;border-radius:26px;display:flex;align-items:center;justify-content:center;font-size:40px;background:rgba(52,211,153,.12)}
.camp-result.fail .cr-ic{background:rgba(248,113,113,.12)}
.camp-result h3{font-size:20px;font-weight:650}
.camp-result p{font-size:13px;line-height:1.7}
.camp-result .row-actions{margin-top:10px}

/* 首页横幅 */
.camp-banner{
  display:flex;align-items:center;gap:16px;
  background:radial-gradient(420px 200px at 92% 0,rgba(45,212,191,.12),transparent 70%),linear-gradient(180deg,#121b26,#0e1520);
  border:1px solid rgba(45,212,191,.35);
}
.camp-banner.done{border-color:rgba(52,211,153,.4);background:radial-gradient(420px 200px at 92% 0,rgba(52,211,153,.1),transparent 70%),linear-gradient(180deg,#121b26,#0e1520)}
.camp-banner .cb-ic{font-size:30px;flex:0 0 auto}
.camp-banner .cb-t{flex:1;min-width:0}
.camp-banner .cb-t strong{display:block;font-size:16px;font-weight:650}
.camp-banner .cb-t span{font-size:12.5px;color:var(--muted)}

/* 英语营：单词 */
.camp-vocab .vocab-list{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.camp-vocab .vocab{display:flex;align-items:baseline;gap:10px;padding:11px 13px;background:var(--surface2);border:1px solid var(--line);border-radius:11px}
.camp-vocab .vocab b{font-size:15px;color:var(--accent2);font-family:var(--mono);font-weight:600}
.camp-vocab .vocab .ph{font-size:11px;color:var(--muted);font-family:var(--mono)}
.camp-vocab .vocab i{font-size:12.5px;color:var(--txt2);font-style:normal;margin-left:auto;text-align:right}
.camp-vocab-note{padding:11px 14px}

/* 顶栏训练营状态 */
.tb-camp{
  display:inline-flex;align-items:center;gap:5px;font-size:12px;padding:4px 11px;border-radius:20px;
  background:rgba(45,212,191,.12);border:1px solid rgba(45,212,191,.32);color:var(--accent);cursor:default;white-space:nowrap;
}
.tb-camp.done{background:rgba(52,211,153,.12);border-color:rgba(52,211,153,.32);color:var(--good)}

@media (max-width:1180px){
  .camp-info{grid-template-columns:repeat(2,1fr)}
  .camp-vocab .vocab-list{grid-template-columns:1fr}
}
@media (max-width:760px){
  .camp-days{grid-template-columns:repeat(3,1fr)}
  .camp-info{grid-template-columns:1fr 1fr}
  .camp-today{flex-direction:column;align-items:flex-start}
  .camp-today .btn{width:100%}
}

/* ============================================================
 * 训练营 R7 · 多轮任务 UI
 * ============================================================ */

/* ---------- 报名总览：每日任务长什么样 ---------- */
.camp-syllabus{margin-top:16px}
.syl-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:6px}
.syl{padding:16px;background:var(--surface2);border:1px solid var(--line);border-radius:12px}
.syl-t{display:block;font-size:14.5px;font-weight:650;margin-bottom:9px}
.syl p{font-size:13px;color:var(--txt2);line-height:1.75}
.syl b{color:var(--accent)}

/* ---------- 轮次进度点 ---------- */
.camp-roundbar{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.rd{
  width:27px;height:27px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  font-size:12px;font-weight:600;
  background:var(--surface2);color:var(--muted);border:1px solid var(--line2);
}
.rd.on{background:linear-gradient(135deg,var(--accent),#0e9c8e);color:#04141a;border-color:transparent}
.rd.cur{border-color:var(--accent);color:var(--accent);animation:rdpulse 1.2s infinite}
@keyframes rdpulse{0%,100%{box-shadow:0 0 0 3px rgba(45,212,191,.16)}50%{box-shadow:0 0 0 5px rgba(45,212,191,.04)}}

/* ---------- 一轮达标提示 ---------- */
.round-flash{
  margin:0 0 14px;padding:11px 15px;border-radius:11px;
  background:rgba(45,212,191,.12);border:1px solid rgba(45,212,191,.32);
  color:#9fe8de;font-size:13px;font-weight:600;animation:slidein .3s ease;
}
@keyframes slidein{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}

/* ---------- 任务页：第 N 轮 轨道 ---------- */
.round-track{margin-bottom:14px}
.round-track .rt-hd{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:10px}
.round-track .rt-hd b{font-size:15px}

/* ---------- 最强大脑：记忆阶段 ---------- */
.brain-memo{margin-bottom:14px}
.brain-memo .bm-hd{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;flex-wrap:wrap}
.bm-tag{display:inline-block;font-size:12.5px;color:var(--accent);background:rgba(45,212,191,.12);border:1px solid rgba(45,212,191,.25);padding:4px 11px;border-radius:8px;font-weight:600}
.bm-sec{font-size:13px;color:var(--txt2)}
.bm-sec b{font-size:18px;color:var(--warn);font-family:var(--mono);margin:0 2px}
.bm-bar{height:7px;background:var(--surface3);border-radius:6px;overflow:hidden;margin-bottom:16px}
.bm-bar i{display:block;height:100%;background:linear-gradient(90deg,var(--warn),var(--accent));transition:width 1s linear}
.bm-text{
  font-size:25px;line-height:1.9;letter-spacing:1px;color:#eaf2f8;
  text-align:center;padding:16px 10px;background:#0c121b;
  border:1px solid var(--line);border-radius:12px;font-weight:600;word-break:break-all;
}
.bm-ft{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:16px;flex-wrap:wrap}

/* ---------- 最强大脑：回忆阶段提示 ---------- */
.brain-recall-tip{
  display:flex;align-items:center;gap:13px;padding:13px 16px;border-radius:12px;
  background:rgba(96,165,250,.1);border:1px solid rgba(96,165,250,.28);margin-bottom:14px;
}
.brain-recall-tip .brt-ic{font-size:24px}
.brain-recall-tip strong{display:block;font-size:14px;color:#cfe2ff}
.brain-recall-tip span{font-size:12.5px;color:var(--txt2)}

/* ---------- 回忆模式：未打的字先藏起来 ---------- */
.type-text.recall .ch{color:transparent}
.type-text.recall .ch.ok{color:#e8f2fa}
.type-text.recall .ch.bad{color:#fecaca;background:rgba(248,113,113,.22);box-shadow:inset 0 -2px 0 var(--bad)}
.type-text.recall .ch.cur{color:transparent;background:transparent;animation:none;border-bottom:2px solid var(--accent)}

/* ---------- 未达标：原文 vs 你打的 ---------- */
.recall-cmp{margin:14px 0;display:flex;flex-direction:column;gap:8px}
.recall-cmp .rc-row{display:flex;gap:12px;align-items:baseline;padding:10px 13px;border-radius:10px;background:var(--surface2);border:1px solid var(--line)}
.recall-cmp .rc-row span{flex:0 0 52px;font-size:12px;color:var(--muted)}
.recall-cmp .rc-row b{font-size:15px;line-height:1.6;word-break:break-all}

/* ---------- 普通打字营：本轮目标 ---------- */
.round-goal{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:15px 18px;border-radius:13px;
  background:linear-gradient(135deg,rgba(45,212,191,.07),rgba(96,165,250,.04));
  border:1px solid var(--line2);margin-bottom:14px;flex-wrap:wrap;
}
.round-goal .rg-l{display:flex;flex-direction:column;gap:4px;min-width:0}
.rg-tag{font-size:12px;font-weight:600;color:var(--accent);letter-spacing:.4px}
.round-goal .rg-l strong{font-size:16px}
.round-goal .rg-r{display:flex;gap:10px;flex-wrap:wrap}
.rg-item{display:flex;flex-direction:column;gap:2px;align-items:flex-end;padding:8px 14px;border-radius:10px;background:var(--surface2);border:1px solid var(--line)}
.rg-item span{font-size:11px;color:var(--muted)}
.rg-item b{font-size:15px;color:var(--txt2)}
.rg-item.hot{background:rgba(251,191,36,.12);border-color:rgba(251,191,36,.32)}
.rg-item.hot b{color:var(--warn)}

/* ---------- 英语营：单词学习卡 ---------- */
.word-study{text-align:center;padding:26px 22px}
.word-study .ws-tag,.word-spell .ws-tag,.grammar-card .gc-tag{
  display:inline-block;font-size:12px;color:var(--accent2);
  background:rgba(96,165,250,.12);border:1px solid rgba(96,165,250,.25);
  padding:4px 12px;border-radius:8px;margin-bottom:18px;font-weight:600;
}
.word-study .ws-w{font-size:46px;font-family:var(--mono);font-weight:700;color:#eaf2f8;letter-spacing:1px}
.word-study .ws-ph{font-size:18px;color:var(--muted);font-family:var(--mono);margin-top:8px}
.word-study .ws-zh{font-size:20px;color:var(--txt);margin-top:6px;font-weight:600}
.word-study .ws-ex{margin:18px auto 0;max-width:560px;padding:14px 16px;background:var(--surface2);border-radius:11px;border:1px solid var(--line)}
.word-study .ws-en{font-size:15px;font-family:var(--mono);color:var(--txt2);line-height:1.7}
.word-study .ws-exzh{font-size:13px;color:var(--muted);margin-top:4px}
.word-study .ws-letters{display:flex;flex-wrap:wrap;gap:7px;justify-content:center;margin:18px 0 6px}
.word-study .ws-letters i{
  font-family:var(--mono);font-size:15px;width:30px;height:34px;font-style:normal;
  display:flex;align-items:center;justify-content:center;
  background:var(--surface3);border:1px solid var(--line2);border-radius:8px;color:var(--txt2);
}
.word-study .ws-go{margin-top:16px}

/* ---------- 英语营：单词遮蔽拼写 ---------- */
.word-spell{margin-bottom:14px}
.word-spell .wsp-clue{display:flex;align-items:center;gap:14px;flex-wrap:wrap;justify-content:center;margin-bottom:14px}
.word-spell .wsp-ph{font-family:var(--mono);font-size:17px;color:var(--accent2)}
.word-spell .wsp-zh{font-size:16px;color:var(--txt)}
.word-spell .wsp-len{font-size:12px;color:var(--muted);background:var(--surface2);border:1px solid var(--line);padding:3px 10px;border-radius:7px}
.word-spell .wsp-ex{font-family:var(--mono);font-size:15px;line-height:1.8;color:var(--txt2);text-align:center;padding:12px 14px;background:#0c121b;border:1px dashed var(--line2);border-radius:10px;letter-spacing:.5px}

/* ---------- 英语营：语法点卡片 ---------- */
.grammar-card{margin-bottom:14px;padding:22px}
.grammar-card .gc-t{font-size:21px;color:#eaf2f8;margin:6px 0 10px}
.grammar-card .gc-p{font-size:13.5px;color:var(--txt2);line-height:1.8;margin-bottom:12px}
.grammar-card .gc-f{
  font-size:14px;color:var(--accent);font-family:var(--mono);
  background:rgba(45,212,191,.08);border:1px solid rgba(45,212,191,.22);
  padding:9px 13px;border-radius:9px;display:inline-block;
}
.grammar-card .gc-ex{margin-top:16px;padding:14px 16px;background:var(--surface2);border:1px solid var(--line);border-radius:11px}
.grammar-card .gc-en{font-family:var(--mono);font-size:16px;color:var(--txt);line-height:1.7}
.grammar-card .gc-zh{font-size:13px;color:var(--muted);margin-top:5px}
.grammar-card.slim{padding:16px 22px}
.grammar-card.slim .gc-t{font-size:17px;margin:4px 0 8px}

/* ---------- 报名弹窗：每日任务简介 ---------- */
.enr-task{margin:6px 0 18px;padding:13px 15px;border-radius:11px;background:rgba(96,165,250,.08);border:1px solid rgba(96,165,250,.22)}
.enr-task .enr-k{display:block;font-size:12px;color:var(--muted);margin-bottom:6px;width:auto}
.enr-task p{font-size:13.5px;color:var(--txt2);line-height:1.7}

/* ---------- 小屏适配 ---------- */
@media (max-width:680px){
  .syl-grid{grid-template-columns:1fr}
  .round-goal{flex-direction:column;align-items:flex-start}
  .word-study .ws-w{font-size:38px}
}

/* ============================================================
 * 测试系统（管理员模式）
 * ============================================================ */
.test-panel{max-width:560px}
.test-form{display:flex;gap:10px;margin-top:6px}
.test-input{flex:1;background:var(--surface2);border:1px solid var(--line);color:var(--txt);
  border-radius:10px;padding:11px 14px;font-size:15px;outline:none;transition:.15s}
.test-input:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(45,212,191,.18)}
.test-err{color:var(--bad);font-size:13px;margin-top:10px}
.test-back-wrap{margin-top:16px}
.test-back-wrap .btn{min-width:120px}

.test-admin .test-banner{display:inline-block;background:rgba(52,211,153,.15);color:var(--good);
  border:1px solid rgba(52,211,153,.4);border-radius:999px;padding:6px 14px;
  font-size:14px;font-weight:600;margin-bottom:14px}
.test-info{display:flex;flex-direction:column;gap:10px;margin-bottom:16px}
.test-row{display:flex;justify-content:space-between;align-items:center;
  padding:10px 14px;background:var(--surface2);border:1px solid var(--line);border-radius:10px}
.test-row b{font-size:16px}
.test-credit{color:var(--accent);font-size:20px!important}
.test-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.test-actions .btn-primary{font-size:15px;padding:11px 18px}
.test-hint{margin-top:14px}

.side-test-link{display:inline-block;margin:10px 0 4px;font-size:12px;color:var(--muted);
  text-decoration:none;border:1px dashed var(--line);border-radius:8px;padding:4px 10px;transition:.15s}
.side-test-link:hover{color:var(--accent);border-color:var(--accent)}

@media (max-width:680px){
  .test-form{flex-direction:column}
  .test-form .btn{width:100%}
}

/* ============================================================
 * 新手教程 / 新手指引
 * ============================================================ */

/* 顶栏入口 */
.tb-guide{
  display:inline-flex;align-items:center;gap:5px;
  padding:5px 12px;border-radius:20px;margin-right:6px;
  background:rgba(45,212,191,.1);border:1px solid rgba(45,212,191,.32);
  color:var(--accent);font-size:12.5px;font-weight:600;
  transition:.16s;white-space:nowrap;
}
.tb-guide:hover{background:rgba(45,212,191,.18);border-color:var(--accent);color:#9fe8de}

/* 首页新手指引横幅 */
.guide-banner{
  display:flex;align-items:center;gap:16px;flex-wrap:wrap;
  background:radial-gradient(420px 200px at 92% 0,rgba(96,165,250,.12),transparent 70%),linear-gradient(180deg,#121b26,#0e1520);
  border:1px solid rgba(96,165,250,.35);
}
.guide-banner .gb-ic{font-size:30px;flex:0 0 auto}
.guide-banner .gb-t{flex:1;min-width:0}
.guide-banner .gb-t strong{display:block;font-size:16px;font-weight:650}
.guide-banner .gb-t span{font-size:12.5px;color:var(--muted)}
.guide-banner .gb-acts{display:flex;gap:10px;align-items:center;flex-wrap:wrap}

/* 教程页头部 */
.guide-head{align-items:flex-start}
.guide-head .guide-tag{
  display:inline-block;font-size:11px;padding:4px 11px;border-radius:20px;
  background:rgba(45,212,191,.12);border:1px solid rgba(45,212,191,.32);
  color:var(--accent);font-weight:600;margin-bottom:10px;letter-spacing:.4px;
}
.guide-head .page-title{font-size:24px}
.guide-head .page-sub{max-width:560px}
.guide-head-acts{display:flex;gap:10px;flex-wrap:wrap;margin-top:8px}

/* 教程主体布局 */
.guide-wrap{
  display:grid;grid-template-columns:200px 1fr;gap:32px;align-items:start;
}
.guide-toc{
  position:sticky;top:82px;align-self:start;
  background:linear-gradient(180deg,var(--surface),#0f1620);
  border:1px solid var(--line);border-radius:var(--radius);padding:16px 14px;
  display:flex;flex-direction:column;gap:4px;
}
.guide-toc strong{
  display:block;font-size:13px;color:var(--txt);font-weight:650;
  padding-bottom:10px;margin-bottom:6px;border-bottom:1px solid var(--line);
}
.gt-item{
  display:flex;align-items:center;gap:10px;
  padding:7px 8px;border-radius:8px;color:var(--txt2);font-size:12px;
  transition:.14s;line-height:1.4;
}
.gt-item:hover{background:var(--surface2);color:var(--txt)}
.gt-item span{
  width:22px;height:22px;border-radius:6px;flex:0 0 22px;
  display:flex;align-items:center;justify-content:center;
  background:var(--surface2);border:1px solid var(--line2);
  color:var(--muted);font-size:10.5px;font-weight:700;
}
.gt-item:hover span{background:var(--accent);color:#04211e;border-color:var(--accent)}
.gt-back{margin-top:8px;padding-top:10px;border-top:1px solid var(--line);color:var(--muted)}
.gt-back:hover{color:var(--accent)}

/* 教程内容区 */
.guide-body{min-width:0;display:flex;flex-direction:column;gap:38px}
.guide-intro{
  background:linear-gradient(90deg,rgba(45,212,191,.08),rgba(96,165,250,.06));
  border:1px solid var(--line);border-radius:var(--radius);padding:18px 20px;
  color:var(--txt2);font-size:13.5px;line-height:1.8;
}
.guide-intro p{max-width:760px}

/* 单步卡片 */
.guide-step{
  display:grid;grid-template-columns:1fr 1.12fr;gap:28px;align-items:center;
  background:linear-gradient(180deg,var(--surface),#0f1620);
  border:1px solid var(--line);border-radius:18px;padding:24px 26px;
  transition:.18s;
}
.guide-step:hover{border-color:var(--line2)}
.gs-text{min-width:0}
.gs-head{display:flex;align-items:center;gap:14px;margin-bottom:14px}
.gs-num{
  font-size:38px;font-weight:800;line-height:1;
  color:transparent;-webkit-text-stroke:1.2px rgba(45,212,191,.55);
  font-family:var(--mono);letter-spacing:-1px;
}
.gs-head h3{font-size:18px;font-weight:650;letter-spacing:.3px}
.gs-desc{
  font-size:13.5px;color:var(--txt2);line-height:1.85;margin-bottom:16px;
}
.gs-tips{list-style:none;display:flex;flex-direction:column;gap:9px}
.gs-tips li{display:flex;gap:9px;align-items:flex-start;font-size:12.5px;color:var(--muted);line-height:1.65}
.gs-tips li i{
  width:6px;height:6px;border-radius:50%;flex:0 0 6px;margin-top:7px;
  background:var(--accent);box-shadow:0 0 0 3px rgba(45,212,191,.12);
}
.gs-shot{min-width:0}
.gs-img-wrap{
  border-radius:12px;overflow:hidden;border:1px solid var(--line);
  background:var(--bg2);box-shadow:0 18px 50px rgba(0,0,0,.42);
  line-height:0;
}
.gs-img-wrap img{width:100%;height:auto;display:block}
.gs-cap{
  display:block;margin-top:10px;font-size:11.5px;color:var(--muted);text-align:center;
}

/* 底部 CTA */
.guide-cta{
  display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;
  background:radial-gradient(420px 200px at 0 0,rgba(45,212,191,.12),transparent 70%),linear-gradient(180deg,#121b26,#0e1520);
  border:1px solid rgba(45,212,191,.35);
  padding:22px 26px;
}
.gc-txt h3{font-size:17px;font-weight:650;margin-bottom:4px}
.gc-txt p{font-size:12.5px;color:var(--muted)}
.gc-acts{display:flex;gap:10px;flex-wrap:wrap}

/* 响应式 */
@media (max-width:1100px){
  .guide-wrap{grid-template-columns:1fr}
  .guide-toc{position:static;display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:4px}
  .guide-toc strong{grid-column:1/-1;margin-bottom:0;padding-bottom:8px}
  .gt-back{grid-column:1/-1;border-top:1px solid var(--line);margin-top:4px}
}
@media (max-width:920px){
  .guide-step{grid-template-columns:1fr}
  .guide-head{flex-direction:column;align-items:flex-start;gap:14px}
  .guide-head-acts{width:100%}
  .gs-shot{order:-1}
  .guide-banner{flex-direction:column;align-items:flex-start;gap:12px}
  .guide-banner .gb-acts{width:100%}
  .guide-banner .gb-acts .btn{flex:1}
}
@media (max-width:760px){
  .tb-guide span{display:none}
  .tb-guide{padding:5px 9px}
  .guide-step{padding:18px}
  .guide-cta{flex-direction:column;align-items:flex-start}
  .gc-acts{width:100%}
  .gc-acts .btn{flex:1}
}

/* ============================================================
 * 小白模式 / 从零学打字课程
 * ============================================================ */
/* 外壳：小白模式下只显示「课程 / 报告 / 退出」 */
#nav-exit-beginner{display:none}
body.beginner .nav-item[data-normal]{display:none !important}
body.beginner #nav-exit-beginner{display:flex}
body.beginner #tip-card,
body.beginner #side-test-link{display:none}
body.beginner #tb-account{display:none}

.btn-disabled{background:var(--surface2);color:var(--muted);cursor:not-allowed;border:1px solid var(--line)}

/* 教程页 Hero：最显眼的「我不会打字」入口 */
.guide-hero{
  display:flex;gap:22px;align-items:center;
  background:linear-gradient(135deg,#0e2a2b,#0c1a25);
  border:1px solid rgba(45,212,191,.4);
  border-radius:18px;padding:26px 28px;margin-bottom:22px;
  box-shadow:0 10px 30px rgba(45,212,191,.08);
}
.gh-emoji{font-size:54px;line-height:1;filter:drop-shadow(0 4px 10px rgba(0,0,0,.4))}
.gh-b{flex:1;min-width:0}
.gh-b h2{font-size:24px;margin-bottom:6px}
.gh-b p{font-size:14px;color:var(--txt2);line-height:1.7;margin-bottom:16px;max-width:660px}
.gh-btn{font-size:17px;padding:14px 26px;font-weight:700}

/* 教程页第二个 Hero：青少年模式（紫色游戏调） */
.guide-hero.teen-hero{
  background:linear-gradient(135deg,#241433,#0e1a25);
  border-color:rgba(167,139,250,.45);
  box-shadow:0 10px 30px rgba(167,139,250,.1);
}
.guide-hero.teen-hero .gh-btn{background:linear-gradient(135deg,#a78bfa,#7c5cff);border-color:transparent}

/* ===== 青少年模式落地页（#/teen） ===== */
.teen-wrap{max-width:860px;margin:0 auto}
.teen-hero{
  display:flex;gap:22px;align-items:center;
  background:linear-gradient(135deg,#241433,#102031);
  border:1px solid rgba(167,139,250,.45);
  border-radius:18px;padding:26px 28px;margin-bottom:20px;
  box-shadow:0 10px 30px rgba(167,139,250,.1);
}
.teen-emoji{font-size:54px;line-height:1;filter:drop-shadow(0 4px 10px rgba(0,0,0,.4))}
.teen-hero-b{flex:1;min-width:0}
.teen-tag{display:inline-block;background:rgba(167,139,250,.16);color:#c4b5fd;border:1px solid rgba(167,139,250,.4);padding:4px 12px;border-radius:20px;font-size:12px;font-weight:600;margin-bottom:10px}
.teen-hero-b .page-title{margin-bottom:6px}
.teen-hero-b .page-sub{max-width:640px}

.teen-actions{margin-bottom:18px;display:flex;flex-direction:column;align-items:stretch;gap:14px;padding:26px}
.teen-big{font-size:18px;padding:16px 28px;font-weight:700;width:100%}
.teen-link{font-size:14px;align-self:center;background:transparent;border:1px dashed var(--line);color:var(--muted)}
.teen-link:hover{color:var(--accent);border-color:var(--accent)}

.teen-test{margin-bottom:18px}
.teen-result{margin-bottom:18px}
.teen-result-h{font-size:19px;font-weight:700;margin-bottom:14px}
.teen-result .kp-result-stats{margin-bottom:12px}
.teen-result-acts{display:flex;gap:10px;flex-wrap:wrap;margin-top:6px}

@media (max-width:760px){
  .teen-hero{flex-direction:column;align-items:flex-start;gap:12px;text-align:left;padding:22px}
  .teen-emoji{font-size:46px}
  .teen-big{width:100%}
}

.kp-tag-badge{background:rgba(45,212,191,.15);color:var(--accent);border:1px solid rgba(45,212,191,.35);padding:4px 12px;border-radius:20px;font-size:12px;font-weight:600;display:inline-block;margin-bottom:8px}

.kp-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap}
.kp-head-acts{display:flex;gap:10px;align-items:center}
.kp-head .page-sub{max-width:680px}

/* 进度条 + 星星 */
.kp-progress{margin-top:18px;padding:18px 20px}
.kpp-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.kp-stars{display:flex;gap:6px;font-size:26px;color:var(--muted);line-height:1}
.kp-star.on{color:#fbbf24;text-shadow:0 0 12px rgba(251,191,36,.4)}

/* 课程表 */
.kp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px;margin-top:18px}
.kp-lesson{display:flex;gap:16px;padding:18px;align-items:flex-start;transition:.2s}
.kp-lesson.is-lock{opacity:.55}
.kp-emoji{font-size:38px;line-height:1}
.kp-lesson-b{flex:1;display:flex;flex-direction:column;gap:6px;min-width:0}
.kp-no{font-size:11.5px;color:var(--muted)}
.kp-lesson-b h3{font-size:16px}
.kp-tag{display:inline-block;font-size:11.5px;padding:2px 10px;border-radius:14px;background:rgba(148,163,184,.18);color:var(--muted);width:fit-content}
.kp-tag.done{background:rgba(52,211,153,.16);color:#34d399}
.kp-tag.pass{background:rgba(45,212,191,.16);color:var(--accent)}
.kp-tag.lock{background:rgba(248,113,113,.16);color:#f87171}
.kp-sub{font-size:12px;color:var(--txt2);margin:2px 0 6px}
.kp-lesson .btn{width:fit-content}
.kp-stage{display:inline-block;font-size:11px;font-weight:600;color:var(--accent);background:rgba(45,212,191,.12);border:1px solid rgba(45,212,191,.3);padding:2px 10px;border-radius:12px;width:fit-content;margin-bottom:2px}
.kp-truehint{margin:4px 0 12px;padding:14px 16px;border-radius:12px;background:rgba(167,139,250,.12);border:1px solid rgba(167,139,250,.35);color:#c4b5fd;font-size:13.5px;line-height:1.7}
.kp-footnote{margin-top:22px;line-height:1.6}

/* 课程分组（儿童营 50 大课程，扁平网格） */
.kp-units{display:flex;flex-direction:column;gap:16px;margin-top:18px}
.kp-unit{padding:18px;margin:0}
.kp-unit.is-lock{opacity:.6}
.kp-unit-h{display:flex;gap:14px;align-items:flex-start;margin-bottom:14px}
.kp-unit-emoji{font-size:34px;line-height:1;flex:none}
.kp-unit-hb{flex:1;min-width:0}
.kp-unit-hb h3{font-size:17px}
.kp-unit-hb .sm{margin-top:4px;line-height:1.5}
.kp-unit-prog{flex:none;align-self:flex-start;font-size:13px;font-weight:600;color:var(--accent);background:rgba(45,212,191,.12);border:1px solid rgba(45,212,191,.25);border-radius:12px;padding:4px 12px}
.kp-lessons{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px}
.kp-lesson-mini{display:flex;gap:12px;padding:14px;align-items:center;transition:.2s}
.kp-lesson-mini.is-lock{opacity:.55}
.kp-emoji-mini{font-size:26px;line-height:1;flex:none}
.kp-lesson-mini-b{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.kp-lesson-mini-b .kp-no{font-size:11px}
.kp-lesson-mini-b h4{font-size:14px;font-weight:600;margin:0}
.kp-lesson-mini .btn{width:fit-content;padding:6px 12px;font-size:12.5px}
.kp-lesson-mini.done{border-color:rgba(52,211,153,.4)}
.kp-lesson-mini.pass{border-color:rgba(45,212,191,.5)}

/* 认识课末尾找键小测 */
.kp-teach-test{margin-top:18px;border-top:1px dashed var(--line);padding-top:18px}
.kp-teach-test .kp-tip{margin-bottom:14px}

/* 青少年模式常驻课程目录 */
.teen-catalog .teen-hero{position:relative;padding-right:160px}
.teen-catalog .kp-head-acts{position:absolute;top:6px;right:0;display:flex;gap:8px}
.teen-catalog .kp-head-acts .btn{padding:6px 12px;font-size:12.5px}
.teen-result-banner{margin-top:18px;padding:18px}
.teen-result-banner .kp-result-stats{margin-bottom:8px}

.kp-goalbar{margin-top:14px;background:rgba(45,212,191,.1);border:1px solid rgba(45,212,191,.25);border-radius:10px;padding:10px 14px;font-size:13.5px;color:#9fe8de}

/* 认识课 / 提示 */
.kp-intro{margin-top:18px;padding:22px}
.kp-tip{background:rgba(251,191,36,.1);border-left:3px solid #fbbf24;padding:10px 14px;border-radius:8px;font-size:13.5px;color:#fde68a;margin-bottom:18px}
.kp-intro-actions{display:flex;gap:10px;flex-wrap:wrap}

/* 课前小测 */
.kp-quiz{margin-top:18px;padding:22px}
.kp-quiz-tip{font-size:13px;color:var(--txt2);margin:4px 0 18px}
.kp-quiz-box{background:#0c121b;border:1px solid var(--line);border-radius:12px;padding:26px;text-align:center;margin-bottom:18px}
.kp-quiz-prompt{font-size:16px;margin-bottom:16px}
.kp-quiz-prompt b{font-size:40px;color:var(--accent);display:inline-block;min-width:60px;font-family:var(--mono)}
.kp-quiz-prog{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-bottom:14px}
.kpq-dot{width:34px;height:34px;border-radius:8px;background:var(--surface2);border:1px solid var(--line);display:flex;align-items:center;justify-content:center;font-size:15px;font-weight:600;color:var(--muted);font-family:var(--mono)}
.kpq-dot.ok{background:rgba(52,211,153,.18);border-color:#34d399;color:#34d399}
.kpq-dot.cur{box-shadow:0 0 0 3px rgba(45,212,191,.3);border-color:var(--accent);color:var(--accent)}
.kp-quiz-msg{font-size:14px;color:var(--txt2);min-height:20px}
.kp-quiz-msg.err{color:#f87171}
.kp-quiz-msg.ok{color:#34d399}

/* 练习 / 测评 */
.kp-area{margin-top:6px}
.kp-area .type-text{font-size:24px;line-height:2.1}
.kp-kb .kbk{height:48px}
.kp-kb .kbk .one{font-size:18px}
.kp-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:14px}
.kp-stat{font-size:13px;color:var(--muted)}
.kp-result{margin-top:16px;padding:22px}
.kp-result-h{font-size:18px;font-weight:700;margin-bottom:12px}
.kp-result-stats{display:flex;gap:24px;margin-bottom:12px}
.kp-result-stats div{display:flex;flex-direction:column}
.kp-result-stats b{font-size:26px;color:var(--accent)}
.kp-result-stats span{font-size:11.5px;color:var(--muted)}
.kp-result-acts{display:flex;gap:10px;flex-wrap:wrap;margin-top:6px}

@media (max-width:760px){
  .guide-hero{flex-direction:column;align-items:flex-start;gap:12px;text-align:left;padding:22px}
  .gh-emoji{font-size:46px}
  .gh-btn{width:100%}
  .kp-result-stats{gap:16px}
}

/* ============================================================
 * 手机界面（移动端 ≤ 820px）：自动识别
 * 底部标签栏 + 左侧抽屉导航 + 可点按的彩色屏幕键盘
 * 桌面（宽屏 + 精确指针）路径完全不受影响。
 * ============================================================ */
.mb-burger, .mb-tabbar, .mb-backdrop { display: none; }

@media (max-width: 820px) {
  html, body { overflow-x: hidden; }
  .app { position: relative; }

  /* 侧边栏 → 左侧抽屉 */
  .sidebar {
    display: flex;
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 80;
    width: 82%; max-width: 300px; height: 100vh;
    transform: translateX(-105%);
    transition: transform .25s ease;
    box-shadow: 0 0 40px rgba(0,0,0,.5);
  }
  .app.drawer-open .sidebar { transform: none; }
  .mb-backdrop {
    display: block; position: fixed; inset: 0; z-index: 70;
    background: rgba(0,0,0,.5); opacity: 0; pointer-events: none;
    transition: opacity .2s;
  }
  .app.drawer-open .mb-backdrop { opacity: 1; pointer-events: auto; }

  /* 顶栏：汉堡按钮 + 精简 */
  .mb-burger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; margin-right: 8px; flex: 0 0 38px;
    border-radius: 10px; background: var(--surface2);
    border: 1px solid var(--line2); color: var(--txt); font-size: 18px; cursor: pointer;
  }
  .topbar { padding: 0 12px; height: 54px; }
  .tb-l { gap: 6px; }
  .tb-camp, .tb-streak { display: none; }
  .tb-guide span, .tb-name { display: none; }
  .view-root { padding: 14px 12px 92px; gap: 14px; max-width: 100%; }

  /* 底部标签栏 */
  .mb-tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 75;
    background: rgba(10,14,20,.96); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
  }
  .mb-tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 5px 2px; color: var(--muted); font-size: 11px; cursor: pointer;
    border-radius: 10px; transition: .15s; -webkit-tap-highlight-color: transparent;
  }
  .mb-tab .ni-ic { width: 21px; height: 21px; }
  .mb-tab.active { color: var(--accent); }
  .mb-tab.active .ni-ic { opacity: 1; }

  /* 通用布局：单列 */
  .grid-4, .grid-3, .grid-2, .ti-grid, .report-layout, .ac-grid { grid-template-columns: 1fr; }
  .card { padding: 14px 14px; }
  .hero { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero-title { font-size: 22px; }
  .hero-title em { font-size: 30px; }

  /* 课程卡片：手机两列更紧凑 */
  .kp-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kp-lesson { min-height: auto; padding: 12px; }
  .kp-lesson .kp-l-title { font-size: 13px; }
  .kp-stage { font-size: 10px; padding: 1px 8px; }

  /* 练习区 */
  .type-area { padding: 14px 12px; }
  .type-text { font-size: 20px; line-height: 1.9; min-height: 64px; }
  .kp-foot { flex-direction: column; align-items: stretch; gap: 8px; }
  .kp-foot .btn, .kp-result-acts .btn { width: 100%; }

  /* 虚拟键盘：手机上缩小、可点按 */
  .kp-kb-wrap { overflow-x: hidden; }
  .kb-teach, .kp-kb-wrap .kb { max-width: 100%; }
  .kb { gap: 5px; }
  .kb-row { gap: 4px; }
  .kbk { height: 38px; border-radius: 7px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .kbk .one { font-size: 12px; }
  .kbk.pressed {
    transform: translateY(2px);
    background: linear-gradient(180deg,#2dd4bf,#14b8a6);
    color: #04211e; border-color: #5eead4;
  }
  .kbk.pressed span, .kbk.pressed b { color: #04211e; }
  .kb-tap-hint { font-size: 12px; color: var(--muted); text-align: center; margin-bottom: 6px; }

  /* 测验 / 找键 */
  .kp-quiz-prompt { font-size: 16px; }
  .kp-quiz-prompt b { font-size: 22px; }
  .kp-quiz-box { padding: 14px; }
  .kp-result-stats { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .kp-truehint { font-size: 13px; }
  .finger-hint { font-size: 13px; }
  .kp-quiz-result .kp-result-acts { flex-direction: column; }
}
