/* ============================================================
   CodeMentor · 布局与页面组件
   ============================================================ */

/* ---------------- 应用外壳 ---------------- */
.app{ display:flex; height:100vh; overflow:hidden }

.sidebar{
  width:240px;flex:0 0 240px;background:var(--card);border-right:1px solid var(--line);
  display:flex;flex-direction:column;padding:20px 12px 14px;overflow-y:auto;
  transition:background-color .25s ease,border-color .25s ease;
}
.brand{ display:flex;align-items:center;gap:10px;padding:0 8px 20px }
.brand-mark{
  width:34px;height:34px;border-radius:9px;flex:0 0 34px;
  background:linear-gradient(135deg,#165DFF,#4C8CFF);color:#fff;
  font-family:Consolas,monospace;font-size:13px;font-weight:700;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 4px 10px rgba(22,93,255,.32);
}
[data-theme="dark"] .brand-mark{ background:linear-gradient(135deg,#3B6FEB,#5C8CFF);box-shadow:0 4px 14px rgba(76,125,245,.3) }
.brand-name{ font-size:15px;font-weight:700;letter-spacing:.2px;line-height:1.2 }
.brand-tag{ font-size:11px;color:var(--t3);margin-top:2px;letter-spacing:.4px }
.nav-label{ font-size:11px;color:var(--t3);padding:10px 12px 6px;letter-spacing:1px }
.nav{ display:flex;flex-direction:column;gap:2px }
.nav-item{
  display:flex;align-items:center;gap:10px;height:40px;padding:0 12px;border-radius:8px;
  color:var(--t2);font-size:13.5px;cursor:pointer;position:relative;
  transition:background .18s,color .18s;user-select:none;
}
.nav-item svg{ width:17px;height:17px;flex:0 0 17px;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round }
.nav-item:hover{ background:var(--hover);color:var(--t1) }
.nav-item.active{ background:var(--brand-soft);color:var(--brand);font-weight:600 }
.nav-item.active::before{
  content:"";position:absolute;left:-12px;top:10px;bottom:10px;width:3px;
  border-radius:0 3px 3px 0;background:var(--brand);
}
.nav-badge{
  margin-left:auto;font-size:11px;line-height:1;padding:3px 6px;border-radius:9px;
  background:var(--danger-soft);color:var(--danger);font-weight:600;
}
.nav-badge.soft{ background:var(--brand-soft);color:var(--brand) }
.side-bottom{ margin-top:auto;padding-top:16px;display:flex;flex-direction:column;gap:10px }

.streak-card{
  border:1px solid var(--line);border-radius:9px;padding:12px;background:var(--bg);
  display:flex;flex-direction:column;gap:8px;transition:background .25s,border-color .25s;
}
.streak-top{ display:flex;align-items:center;justify-content:space-between;font-size:12px;color:var(--t2) }
.streak-days{ font-size:18px;font-weight:700;color:var(--t1);font-family:Consolas,monospace;line-height:1.1 }
.streak-days span{ font-size:11px;font-weight:400;color:var(--t3);margin-left:3px;font-family:inherit }
.dots{ display:flex;gap:4px }
.dots i{ height:5px;flex:1;border-radius:3px;background:var(--line) }
.dots i.on{ background:var(--warning) }

.user-entry{
  display:flex;align-items:center;gap:10px;padding:8px;border-radius:8px;cursor:pointer;
  transition:background .18s;text-align:left;border:0;background:transparent;width:100%;
}
.user-entry:hover{ background:var(--hover) }
.user-entry .u-meta{ min-width:0;flex:1 }
.user-entry .u-name{ font-size:13px;font-weight:600;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis }
.user-entry .u-role{ font-size:11px;color:var(--t3);line-height:1.3 }
.user-entry .chev{ color:var(--t4);flex:0 0 auto }
.avatar{
  width:32px;height:32px;border-radius:50%;flex:0 0 32px;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#165DFF,#63A0FF);color:#fff;font-size:13px;font-weight:600;
  text-transform:uppercase;user-select:none;
}
[data-theme="dark"] .avatar{ background:linear-gradient(135deg,#3B6FEB,#6E9BFF) }
.avatar.lg{ width:52px;height:52px;flex:0 0 52px;font-size:21px }
.avatar.sm{ width:24px;height:24px;flex:0 0 24px;font-size:11px }

.main{ flex:1;min-width:0;display:flex;flex-direction:column }
.topbar{
  height:60px;flex:0 0 60px;display:flex;align-items:center;gap:16px;
  padding:0 24px;background:var(--card);border-bottom:1px solid var(--line);
  transition:background-color .25s ease,border-color .25s ease;
}
.crumb h1{ font-size:16px;font-weight:600;line-height:1.2 }
.crumb .crumb-sub{ font-size:12px;color:var(--t3) }
.topbar-right{ margin-left:auto;display:flex;align-items:center;gap:10px }
.search{
  display:flex;align-items:center;gap:7px;height:34px;padding:0 12px;width:230px;
  border:1px solid var(--line);border-radius:7px;background:var(--bg);color:var(--t3);
  transition:.18s;
}
.search:focus-within{ border-color:var(--brand);background:var(--card);box-shadow:0 0 0 3px var(--brand-soft) }
.search svg{ width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.7 }
.search input{ border:0;outline:0;background:transparent;font-family:inherit;font-size:13px;color:var(--t1);width:100% }
.search input::placeholder{ color:var(--t3) }
.search kbd{
  font-size:10px;border:1px solid var(--line);border-bottom-width:2px;border-radius:4px;
  padding:1px 4px;color:var(--t3);background:var(--card);flex:0 0 auto;
}
.top-user{
  display:flex;align-items:center;gap:9px;padding-left:10px;margin-left:2px;
  border-left:1px solid var(--line);cursor:pointer;background:transparent;border-top:0;border-right:0;border-bottom:0;
}
.top-user .u-name{ font-size:13px;font-weight:600;line-height:1.25;text-align:left }
.top-user .u-role{ font-size:11px;color:var(--t3);line-height:1.25;text-align:left }
.content{ flex:1;overflow:auto;padding:20px 24px 28px;scroll-behavior:smooth }
.content-inner{ max-width:1200px;min-width:0;margin:0 auto }
.page{ display:none }
.page.active{ display:block;animation:fadeUp .28s ease both }
@keyframes fadeUp{ from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:none} }

.page-head{ display:flex;align-items:flex-start;gap:12px;margin-bottom:18px;flex-wrap:wrap }
.page-head h2{ font-size:20px;font-weight:700;line-height:1.3 }
.page-head p{ font-size:12.5px;color:var(--t3);margin-top:3px }
.page-head .actions{ margin-left:auto;display:flex;gap:8px;flex-wrap:wrap }

/* ---------------- 登录 / 注册 ---------------- */
.auth{ display:flex;min-height:100vh;background:var(--bg) }
.auth-brand{
  flex:1;min-width:0;position:relative;overflow:hidden;
  background:linear-gradient(150deg,#0B2A6F 0%,#165DFF 58%,#3E8BFF 100%);
  color:#fff;display:flex;align-items:center;padding:56px;
}
.auth-brand::before{
  content:"";position:absolute;inset:0;
  background:
    radial-gradient(600px 300px at 78% 18%,rgba(255,255,255,.18),transparent 70%),
    radial-gradient(500px 400px at 10% 88%,rgba(0,0,0,.28),transparent 70%);
}
.auth-brand::after{
  content:"";position:absolute;right:-120px;top:-80px;width:420px;height:420px;border-radius:50%;
  border:1px solid rgba(255,255,255,.18);box-shadow:0 0 0 40px rgba(255,255,255,.04),0 0 0 90px rgba(255,255,255,.03);
}
.auth-brand-inner{ position:relative;z-index:1;max-width:440px }
.auth-brand .brand{ padding:0 0 34px;color:#fff }
.auth-brand .brand-mark{ background:rgba(255,255,255,.16);box-shadow:none;backdrop-filter:blur(4px) }
.auth-brand .brand-tag{ color:rgba(255,255,255,.65) }
.auth-brand h1{ font-size:32px;line-height:1.35;font-weight:700;letter-spacing:-.4px;margin-bottom:14px }
.auth-brand .lead{ font-size:14px;color:rgba(255,255,255,.78);line-height:1.8;margin-bottom:28px }
.auth-points{ list-style:none;padding:0;margin:0 0 34px;display:flex;flex-direction:column;gap:14px }
.auth-points li{ display:flex;align-items:flex-start;gap:10px;font-size:13.5px;color:rgba(255,255,255,.9) }
.auth-points .pt-icon{
  width:26px;height:26px;flex:0 0 26px;border-radius:7px;background:rgba(255,255,255,.14);
  display:flex;align-items:center;justify-content:center;
}
.auth-points .pt-icon svg{ width:14px;height:14px;stroke:#fff;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round }
.auth-points b{ display:block;font-weight:600;font-size:13.5px;line-height:1.4 }
.auth-points span{ font-size:12px;color:rgba(255,255,255,.66) }
.auth-brand .auth-foot{
  font-size:11.5px;color:rgba(255,255,255,.58);border-top:1px solid rgba(255,255,255,.16);padding-top:16px;
  display:flex;align-items:center;gap:7px;
}

.auth-panel{
  width:520px;flex:0 0 520px;display:flex;flex-direction:column;justify-content:center;
  padding:32px 48px;position:relative;background:var(--bg);
}
.auth-top{ position:absolute;top:20px;right:24px;display:flex;gap:8px }
.auth-card{ padding:26px 28px;box-shadow:var(--shadow-2) }
.auth-card .auth-h{ font-size:19px;font-weight:700;margin-bottom:3px }
.auth-card .auth-sub{ font-size:12.5px;color:var(--t3);margin-bottom:20px }
.auth-tabs{
  display:flex;gap:4px;background:var(--bg);border:1px solid var(--line);
  padding:3px;border-radius:8px;margin-bottom:20px;
}
.auth-tabs button{
  flex:1;height:32px;border:0;background:transparent;border-radius:6px;
  font-size:13px;color:var(--t2);cursor:pointer;font-weight:500;transition:.18s;
}
.auth-tabs button.active{ background:var(--card);color:var(--t1);font-weight:600;box-shadow:var(--shadow-1) }
.auth-form .auth-row{ display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;font-size:12.5px }
.auth-form .link-btn{ border:0;background:transparent;color:var(--brand);cursor:pointer;font-size:12.5px;padding:0 }
.auth-form .link-btn:hover{ text-decoration:underline }
.auth-divider{ display:flex;align-items:center;gap:10px;margin:18px 0;color:var(--t3);font-size:11.5px }
.auth-divider::before,.auth-divider::after{ content:"";height:1px;background:var(--line);flex:1 }
.auth-note{ font-size:11px;color:var(--t3);text-align:center;margin-top:14px;line-height:1.6 }
.gh-icon{ width:16px;height:16px;fill:currentColor }

/* ---------------- 统计卡 ---------------- */
.stats-grid{ display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px }
.stat{
  background:var(--card);border:1px solid var(--line);border-radius:var(--r);padding:16px 18px;
  box-shadow:var(--shadow-1);transition:background .25s,border-color .25s,transform .2s,box-shadow .2s;
}
.stat:hover{ transform:translateY(-2px);box-shadow:var(--shadow-2) }
.stat .s-top{ display:flex;align-items:center;justify-content:space-between;margin-bottom:10px }
.stat .s-label{ font-size:12px;color:var(--t3) }
.stat .s-icon{
  width:28px;height:28px;border-radius:7px;display:flex;align-items:center;justify-content:center;
  background:var(--brand-soft);color:var(--brand);
}
.stat .s-icon svg{ width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round }
.stat .s-icon.green{ background:var(--success-soft);color:var(--success) }
.stat .s-icon.orange{ background:var(--warning-soft);color:var(--warning) }
.stat .s-icon.red{ background:var(--danger-soft);color:var(--danger) }
.stat .s-value{ font-size:24px;font-weight:700;line-height:1.2;font-family:Consolas,monospace;letter-spacing:-.5px }
.stat .s-value small{ font-size:12px;color:var(--t3);font-weight:400;font-family:inherit;margin-left:3px }
.stat .s-foot{ font-size:11.5px;color:var(--t3);margin-top:6px;display:flex;align-items:center;gap:5px }

.dash-grid{ display:grid;grid-template-columns:1.55fr 1fr;gap:16px;margin-bottom:16px }
.dash-col{ display:flex;flex-direction:column;gap:16px;min-width:0 }

/* 欢迎条 */
.hero{
  display:flex;align-items:center;gap:18px;padding:18px 22px;margin-bottom:16px;
  border-radius:var(--r);border:1px solid var(--line);background:var(--card);
  box-shadow:var(--shadow-1);position:relative;overflow:hidden;
}
.hero::after{
  content:"";position:absolute;right:-40px;top:-60px;width:220px;height:220px;border-radius:50%;
  background:radial-gradient(circle at 55% 45%,var(--brand-soft),transparent 70%);pointer-events:none;
}
.hero .h-avatar{ position:relative;z-index:1 }
.hero .h-main{ position:relative;z-index:1;min-width:0;flex:1 }
.hero h3{ font-size:16px;font-weight:600;margin-bottom:3px }
.hero p{ font-size:12.5px;color:var(--t3) }
.hero .h-goal{ position:relative;z-index:1;width:200px;flex:0 0 200px }
.hero .h-goal .g-row{ display:flex;justify-content:space-between;font-size:11.5px;color:var(--t3);margin-bottom:6px }
.hero .h-goal .g-row b{ color:var(--t1);font-family:Consolas,monospace;font-size:12.5px }
.progress{ height:6px;border-radius:4px;background:var(--line);overflow:hidden }
.progress i{ display:block;height:100%;border-radius:4px;background:var(--brand);transition:width .4s ease }
.progress.green i{ background:var(--success) }
.progress.orange i{ background:var(--warning) }

/* 进度条列表 */
.progress-list{ display:flex;flex-direction:column;gap:14px }
.pl-item .pl-top{ display:flex;align-items:center;justify-content:space-between;font-size:12.5px;margin-bottom:6px }
.pl-item .pl-top .name{ color:var(--t2);display:flex;align-items:center;gap:7px }
.pl-item .pl-top .num{ color:var(--t3);font-family:Consolas,monospace;font-size:11.5px }

/* 柱状图 */
.chart{
  display:flex;align-items:flex-end;gap:8px;height:136px;padding:8px 4px 0;
  border-bottom:1px solid var(--line);
}
.chart .bar-col{ flex:1;display:flex;flex-direction:column;align-items:center;gap:6px;height:100%;justify-content:flex-end }
.chart .bar{
  width:100%;max-width:34px;border-radius:4px 4px 0 0;background:var(--brand-soft);
  min-height:4px;position:relative;transition:height .5s ease,background .2s;
}
.chart .bar.has{ background:var(--brand) }
.chart .bar:hover{ background:var(--brand-hover) }
.chart .bar .tip{
  position:absolute;bottom:calc(100% + 5px);left:50%;transform:translateX(-50%);
  font-size:10.5px;color:var(--t2);background:var(--card);border:1px solid var(--line);
  padding:1px 5px;border-radius:4px;opacity:0;transition:opacity .18s;white-space:nowrap;pointer-events:none;
  font-family:Consolas,monospace;
}
.chart .bar:hover .tip{ opacity:1 }
.chart-labels{ display:flex;gap:8px;margin-top:7px }
.chart-labels span{ flex:1;text-align:center;font-size:10.5px;color:var(--t3) }

/* 最近动态 */
.feed{ display:flex;flex-direction:column }
.feed-item{ display:flex;align-items:flex-start;gap:10px;padding:10px 0;border-bottom:1px solid var(--line) }
.feed-item:last-child{ border-bottom:0 }
.feed-item .f-icon{
  width:24px;height:24px;flex:0 0 24px;border-radius:6px;display:flex;align-items:center;justify-content:center;
  background:var(--success-soft);color:var(--success);margin-top:1px;
}
.feed-item .f-icon.fail{ background:var(--danger-soft);color:var(--danger) }
.feed-item .f-icon svg{ width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round }
.feed-item .f-body{ flex:1;min-width:0;font-size:12.5px;line-height:1.5 }
.feed-item .f-body b{ font-weight:500;color:var(--t1) }
.feed-item .f-time{ font-size:11px;color:var(--t3);white-space:nowrap;margin-top:1px }

/* 推荐题目 */
.reco{ display:flex;flex-direction:column;gap:2px }
.reco-item{
  display:flex;align-items:center;gap:10px;padding:10px 8px;border-radius:7px;cursor:pointer;
  transition:background .18s;border:0;background:transparent;width:100%;text-align:left;
}
.reco-item:hover{ background:var(--hover) }
.reco-item .r-order{
  width:22px;height:22px;flex:0 0 22px;border-radius:6px;background:var(--hover);color:var(--t3);
  font-size:11px;font-family:Consolas,monospace;display:flex;align-items:center;justify-content:center;
}
.reco-item .r-main{ flex:1;min-width:0 }
.reco-item .r-title{ font-size:12.5px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis }
.reco-item .r-tags{ font-size:11px;color:var(--t3);margin-top:1px }

/* ---------------- 题库列表 ---------------- */
.filters{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:12px 16px;margin-bottom:16px;
  background:var(--card);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow-1);
}
.filters .f-group{ display:flex;align-items:center;gap:6px;flex-wrap:wrap }
.filters .f-sep{ width:1px;height:18px;background:var(--line);margin:0 4px }
.filters .f-label{ font-size:11.5px;color:var(--t3);margin-right:2px }
.filters .grow{ flex:1 }
.filters .input{ height:32px;max-width:200px;font-size:12.5px }

.q-list{ display:flex;flex-direction:column;gap:10px }
.q-row{
  display:flex;align-items:center;gap:14px;padding:14px 18px;background:var(--card);
  border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow-1);
  cursor:pointer;transition:border-color .18s,transform .18s,box-shadow .18s,background .25s;
  text-align:left;width:100%;
}
.q-row:hover{ transform:translateY(-1px);box-shadow:var(--shadow-2);border-color:var(--t4) }
.q-row .q-status{
  width:26px;height:26px;flex:0 0 26px;border-radius:50%;border:1px solid var(--line);
  display:flex;align-items:center;justify-content:center;color:var(--t4);
}
.q-row .q-status.done{ background:var(--success-soft);border-color:transparent;color:var(--success) }
.q-row .q-status.fail{ background:var(--danger-soft);border-color:transparent;color:var(--danger) }
.q-row .q-status svg{ width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round }
.q-row .q-main{ flex:1;min-width:0 }
.q-row .q-title{ font-size:14px;font-weight:600;margin-bottom:3px;display:flex;align-items:center;gap:8px;flex-wrap:wrap }
.q-row .q-tags{ display:flex;gap:6px;flex-wrap:wrap;align-items:center;font-size:11.5px;color:var(--t3) }
.q-row .q-tags .tag-sep{ color:var(--t4) }
.q-row .q-right{ display:flex;align-items:center;gap:10px;flex:0 0 auto }
.q-row .q-pct{ font-size:11.5px;color:var(--t3);font-family:Consolas,monospace }
.diff{ font-size:11px;padding:2px 7px;border-radius:4px;font-weight:500;white-space:nowrap }
.diff.easy{ background:var(--success-soft);color:var(--success) }
.diff.medium{ background:var(--warning-soft);color:var(--warning) }
.diff.hard{ background:var(--danger-soft);color:var(--danger) }

.list-meta{ display:flex;align-items:center;justify-content:space-between;margin:0 2px 10px;font-size:12px;color:var(--t3) }
.list-meta .lm-right{ display:flex;gap:10px }

/* ---------------- 题目详情 ---------------- */
.q-layout{ display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start }
.q-panel{ background:var(--card);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow-1);overflow:hidden }
.q-panel-head{
  display:flex;align-items:center;gap:10px;padding:13px 16px;border-bottom:1px solid var(--line);
  font-size:13px;font-weight:600;background:var(--bg);
}
.q-panel-head .right{ margin-left:auto;display:flex;gap:6px;align-items:center }
.q-panel-body{ padding:18px }
.q-desc{ font-size:13.5px;color:var(--t2);line-height:1.85 }
.q-desc p{ margin:0 0 10px }
.q-desc code{ background:var(--hover);border:1px solid var(--line);border-radius:4px;padding:1px 5px;font-size:12px;color:var(--brand) }
.q-desc pre{
  background:var(--code-bg);border:1px solid var(--code-line);border-radius:7px;
  padding:12px 14px;font-size:12px;line-height:1.7;overflow:auto;color:var(--code-txt);margin:0 0 12px;
}
.q-example{ margin-bottom:14px }
.q-example .ex-label{ font-size:11.5px;color:var(--t3);margin-bottom:4px;letter-spacing:.3px }
.q-meta-line{ display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px }
.q-tabs{ display:flex;gap:2px;padding:0 16px;border-bottom:1px solid var(--line);background:var(--bg) }
.q-tabs button{
  height:38px;padding:0 12px;border:0;background:transparent;font-size:12.5px;color:var(--t2);
  cursor:pointer;position:relative;font-weight:500;
}
.q-tabs button.active{ color:var(--brand) }
.q-tabs button.active::after{ content:"";position:absolute;left:10px;right:10px;bottom:-1px;height:2px;background:var(--brand);border-radius:2px }
.q-tab-body{ padding:16px }

.option-list{ display:flex;flex-direction:column;gap:9px }
.option{
  display:flex;align-items:flex-start;gap:10px;padding:11px 14px;border:1px solid var(--line);
  border-radius:8px;cursor:pointer;transition:.16s;font-size:13px;color:var(--t2);line-height:1.6;
  background:var(--card);text-align:left;width:100%;
}
.option:hover{ border-color:var(--t4);background:var(--hover) }
.option .o-key{
  width:22px;height:22px;flex:0 0 22px;border-radius:6px;border:1px solid var(--line);
  display:flex;align-items:center;justify-content:center;font-size:11.5px;font-family:Consolas,monospace;
  background:var(--bg);color:var(--t3);margin-top:1px;
}
.option.selected{ border-color:var(--brand);background:var(--brand-soft) }
.option.selected .o-key{ background:var(--brand);border-color:var(--brand);color:#fff }
.option.correct{ border-color:var(--success);background:var(--success-soft) }
.option.correct .o-key{ background:var(--success);border-color:var(--success);color:#fff }
.option.wrong{ border-color:var(--danger);background:var(--danger-soft) }
.option.wrong .o-key{ background:var(--danger);border-color:var(--danger);color:#fff }
.option[disabled]{ cursor:default }

.editor-wrap{ border:1px solid var(--line);border-radius:8px;overflow:hidden;background:var(--code-bg) }
.editor-bar{
  display:flex;align-items:center;gap:8px;padding:8px 12px;border-bottom:1px solid var(--code-line);
  background:var(--bg);font-size:11.5px;color:var(--t3);
}
.editor-bar .lang{ font-family:Consolas,monospace;color:var(--t2) }
.editor-bar .right{ margin-left:auto;display:flex;gap:6px }
.code-editor{
  width:100%;min-height:300px;border:0;outline:none;resize:vertical;display:block;
  background:var(--code-bg);color:var(--code-txt);padding:14px 16px;
  font-family:"Cascadia Code",Consolas,Menlo,monospace;font-size:13px;line-height:1.75;tab-size:2;
}
.code-editor:focus{ box-shadow:inset 0 0 0 1px var(--brand-soft) }
.q-actions{ display:flex;align-items:center;gap:8px;margin-top:14px;flex-wrap:wrap }
.q-actions .right{ margin-left:auto;display:flex;gap:8px }

.result-box{ margin-top:14px;border-radius:8px;border:1px solid var(--line);overflow:hidden }
.result-head{
  display:flex;align-items:center;gap:8px;padding:10px 14px;font-size:12.5px;font-weight:600;
  background:var(--success-soft);color:var(--success);
}
.result-head.fail{ background:var(--danger-soft);color:var(--danger) }
.result-head .right{ margin-left:auto;font-weight:400;font-size:11.5px;opacity:.8 }
.test-case{
  display:flex;align-items:flex-start;gap:9px;padding:9px 14px;font-size:11.5px;
  border-top:1px solid var(--line);font-family:Consolas,monospace;line-height:1.6;
}
.test-case .tc-icon{ flex:0 0 14px;margin-top:1px }
.test-case .tc-icon svg{ width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round }
.test-case.pass .tc-icon{ color:var(--success) }
.test-case.fail .tc-icon{ color:var(--danger) }
.test-case .tc-body{ min-width:0;flex:1;color:var(--t2);word-break:break-all }
.test-case .tc-body b{ color:var(--t3);font-weight:400 }
.tc-io{
  margin:6px 0 0;padding:8px 10px;border-radius:6px;background:var(--bg);border:1px solid var(--line);
  font-size:11.5px;line-height:1.6;white-space:pre-wrap;word-break:break-all;max-height:180px;overflow:auto;
}
.explain{
  margin-top:14px;padding:14px 16px;border-radius:8px;background:var(--bg);border:1px dashed var(--line);
  font-size:12.5px;color:var(--t2);line-height:1.8;
}
.explain b{ color:var(--t1) }
.saved-tip{ font-size:11px;color:var(--t3);display:flex;align-items:center;gap:5px }
.saved-tip .dot-status{ width:6px;height:6px;flex:0 0 6px }

/* 错题本 */
.wrong-item{
  display:flex;align-items:flex-start;gap:12px;padding:14px 18px;background:var(--card);
  border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow-1);
}
.wrong-item .w-main{ flex:1;min-width:0 }
.wrong-item .w-title{ font-size:13.5px;font-weight:600;margin-bottom:4px }
.wrong-item .w-meta{ display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:11.5px;color:var(--t3) }
.wrong-item .w-actions{ display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end }
.wrong-item .q-status{
  width:26px;height:26px;flex:0 0 26px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  background:var(--danger-soft);color:var(--danger);margin-top:1px;
}
.wrong-item .q-status svg{ width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round }

/* ---------------- 插件中心 ---------------- */
.plugin-grid{ display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px }
.plugin-card{ display:flex;flex-direction:column;gap:0;padding:0;overflow:hidden }
.pc-head{ display:flex;align-items:flex-start;gap:12px;padding:18px 18px 14px }
.pc-icon{
  width:42px;height:42px;flex:0 0 42px;border-radius:10px;display:flex;align-items:center;justify-content:center;
  font-size:14px;font-weight:700;color:#fff;font-family:Consolas,monospace;letter-spacing:.5px;
}
.pc-title{ display:flex;align-items:center;gap:8px;flex-wrap:wrap }
.pc-title h4{ font-size:14.5px;font-weight:600 }
.pc-meta{ font-size:11.5px;color:var(--t3);margin-top:3px;display:flex;gap:6px;align-items:center;flex-wrap:wrap }
.pc-desc{ font-size:12.5px;color:var(--t2);line-height:1.7;padding:0 18px 12px }
.pc-perms{ display:flex;gap:6px;flex-wrap:wrap;padding:0 18px 14px }
.pc-stat{
  display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:var(--line);
  border-top:1px solid var(--line);border-bottom:1px solid var(--line);
}
.pc-stat div{ background:var(--card);padding:10px 8px;text-align:center }
.pc-stat .v{ font-size:15px;font-weight:700;font-family:Consolas,monospace;line-height:1.3 }
.pc-stat .k{ font-size:10.5px;color:var(--t3);margin-top:1px }
.pc-foot{ display:flex;align-items:center;gap:8px;padding:12px 18px;margin-top:auto;flex-wrap:wrap }
.pc-foot .right{ margin-left:auto;display:flex;gap:6px;align-items:center }
.pc-config{ padding:0 18px 16px;border-top:1px dashed var(--line);margin:0 18px }
.pc-config .field:first-child{ margin-top:14px }
.perm-list{ display:flex;flex-direction:column;gap:8px;margin-top:8px }
.perm-item{ display:flex;align-items:flex-start;gap:8px;font-size:12px;color:var(--t2);line-height:1.5 }
.perm-item input{ margin:2px 0 0;accent-color:var(--brand);width:14px;height:14px;flex:0 0 14px }
.perm-item .p-desc{ font-size:11px;color:var(--t3) }
.plugin-log{
  max-height:190px;overflow:auto;background:var(--code-bg);border-top:1px solid var(--line);
  padding:10px 18px;font-family:Consolas,monospace;font-size:11px;line-height:1.8;
}
.plugin-log .ll{ display:flex;gap:8px;color:var(--t3) }
.plugin-log .ll .lt{ color:var(--t4);flex:0 0 auto }
.plugin-log .ll.info .lm{ color:var(--t2) }
.plugin-log .ll.ok .lm{ color:var(--success) }
.plugin-log .ll.warn .lm{ color:var(--warning) }
.plugin-log .ll.err .lm{ color:var(--danger) }
.plugin-log .lm{ word-break:break-word }

/* ---------------- 插件 · 社区资料 ---------------- */
.pc-summary{ padding:9px 18px;border-bottom:1px solid var(--line);font-size:11.5px;color:var(--t3);line-height:1.6 }
.gh-card{ margin:0 18px 14px;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--bg) }
.gh-profile{ display:flex;align-items:flex-start;gap:12px;padding:12px }
.gh-avatar{ width:46px;height:46px;flex:0 0 46px;border-radius:10px;object-fit:cover;background:var(--hover);border:1px solid var(--line) }
.gh-avatar-text{ display:flex;align-items:center;justify-content:center;font-family:Consolas,monospace;font-weight:700;color:var(--t2) }
.gh-info{ min-width:0 }
.gh-name{ font-size:13.5px;font-weight:600;display:flex;align-items:baseline;gap:6px;flex-wrap:wrap }
.gh-login{ font-size:11px;color:var(--t3);font-weight:400;font-family:Consolas,monospace }
.gh-bio{ font-size:11.5px;color:var(--t2);line-height:1.55;margin-top:3px }
.gh-meta{ font-size:11px;color:var(--t3);margin-top:4px;display:flex;gap:5px;flex-wrap:wrap;align-items:center }
.gh-sep{ color:var(--t4) }
.gh-block{ padding:10px 12px;border-top:1px dashed var(--line) }
.gh-label{ font-size:10.5px;color:var(--t3);letter-spacing:.5px;margin-bottom:7px }
.gh-langs{ display:flex;flex-direction:column;gap:6px }
.gh-lang{ display:flex;align-items:center;gap:8px;font-size:11px;color:var(--t2) }
.gh-lang-name{ flex:0 0 74px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:Consolas,monospace }
.gh-track{ flex:1;height:6px;border-radius:3px;background:var(--hover);overflow:hidden }
.gh-track i{ display:block;height:100%;border-radius:3px }
.gh-pct{ flex:0 0 34px;text-align:right;color:var(--t3);font-family:Consolas,monospace }
.gh-repos{ display:flex;flex-direction:column;gap:3px }
.gh-repo{ display:flex;align-items:center;gap:8px;padding:6px 7px;border-radius:6px;color:inherit;text-decoration:none }
.gh-repo:hover{ background:var(--hover);text-decoration:none }
.gh-repo-name{ display:block;font-size:12px;font-weight:500;color:var(--brand) }
.gh-repo-desc{ display:block;font-size:10.5px;color:var(--t3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:1px }
.gh-repo-meta{ font-size:10.5px;color:var(--t3);white-space:nowrap;font-family:Consolas,monospace }
.gh-events{ display:flex;flex-direction:column;gap:5px }
.gh-event{ display:flex;align-items:center;gap:7px;font-size:11px;color:var(--t2) }
.gh-dot{ width:5px;height:5px;flex:0 0 5px;border-radius:50%;background:var(--brand) }
.gh-at{ font-size:10px;color:var(--t3);white-space:nowrap }
.gh-gist{ display:flex;align-items:center;gap:6px;padding:9px 12px;border-top:1px solid var(--line);font-size:11.5px;color:var(--brand);text-decoration:none }
.gh-gist:hover{ background:var(--hover);text-decoration:none }
.gh-gist svg{ width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:1.8 }

.custom-plugin{ display:flex;align-items:center;gap:10px;padding:11px 14px;border:1px solid var(--line);border-radius:8px;background:var(--card);margin-bottom:8px }
.custom-plugin .cp-main{ flex:1;min-width:0 }
.custom-plugin .cp-name{ font-size:13px;font-weight:600;display:flex;align-items:center;gap:7px }
.custom-plugin .cp-meta{ font-size:11px;color:var(--t3) }

.code-area{
  width:100%;min-height:150px;border:1px solid var(--line);border-radius:7px;background:var(--code-bg);
  color:var(--code-txt);padding:12px;font-family:Consolas,monospace;font-size:12px;line-height:1.7;
  resize:vertical;outline:none;
}
.code-area:focus{ border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft) }
.section-title{ font-size:14px;font-weight:600;display:flex;align-items:center;gap:8px;margin-bottom:12px }
.section-title .bar{ width:3px;height:13px;border-radius:2px;background:var(--brand) }
.section-desc{ font-size:12px;color:var(--t3);margin-top:-6px;margin-bottom:12px;line-height:1.7 }

/* ---------------- 账号 ---------------- */
.account-grid{ display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start }
.profile-head{ display:flex;align-items:center;gap:14px;padding-bottom:16px;border-bottom:1px solid var(--line);margin-bottom:16px }
.profile-head .p-name{ font-size:16px;font-weight:600;display:flex;align-items:center;gap:8px;flex-wrap:wrap }
.profile-head .p-mail{ font-size:12px;color:var(--t3);margin-top:2px }
.kv{ display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px dashed var(--line);font-size:12.5px }
.kv:last-child{ border-bottom:0;padding-bottom:0 }
.kv .k{ color:var(--t3);flex:0 0 auto }
.kv .v{ color:var(--t1);text-align:right;word-break:break-all }
.kv .v.mono{ font-family:Consolas,monospace;font-size:12px }

/* ---------------- 隐私 ---------------- */
.notice{
  display:flex;gap:10px;padding:14px 16px;border-radius:9px;background:var(--brand-soft);
  border:1px solid transparent;font-size:12.5px;line-height:1.7;color:var(--t2);margin-bottom:16px;
}
.notice svg{ width:18px;height:18px;flex:0 0 18px;stroke:var(--brand);fill:none;stroke-width:1.7;margin-top:1px }
.notice b{ color:var(--t1) }
.toggle-row{
  display:flex;align-items:flex-start;gap:14px;padding:14px 0;border-bottom:1px solid var(--line);
}
.toggle-row:last-child{ border-bottom:0;padding-bottom:0 }
.toggle-row:first-child{ padding-top:0 }
.toggle-row .tr-main{ flex:1;min-width:0 }
.toggle-row .tr-title{ font-size:13px;font-weight:500;margin-bottom:2px;display:flex;align-items:center;gap:6px }
.toggle-row .tr-desc{ font-size:11.5px;color:var(--t3);line-height:1.6 }
.data-actions{ display:grid;grid-template-columns:1fr 1fr;gap:10px }
.data-action{
  display:flex;align-items:flex-start;gap:10px;padding:13px 14px;border:1px solid var(--line);
  border-radius:8px;background:var(--card);cursor:pointer;text-align:left;transition:.18s;
}
.data-action:hover{ border-color:var(--t4);background:var(--hover) }
.data-action.danger:hover{ border-color:var(--danger);background:var(--danger-soft) }
.data-action .da-icon{
  width:28px;height:28px;flex:0 0 28px;border-radius:7px;background:var(--hover);
  display:flex;align-items:center;justify-content:center;color:var(--t2);margin-top:1px;
}
.data-action.danger .da-icon{ background:var(--danger-soft);color:var(--danger) }
.data-action .da-icon svg{ width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round }
.data-action > span:last-child{ display:block;flex:1;min-width:0 }
.data-action .da-title{ display:block;font-size:12.5px;font-weight:500;margin-bottom:1px }
.data-action .da-desc{ display:block;font-size:11px;color:var(--t3);line-height:1.5 }
.policy{ font-size:12.5px;color:var(--t2);line-height:1.9 }
.policy h4{ font-size:13px;font-weight:600;color:var(--t1);margin:14px 0 4px }
.policy h4:first-child{ margin-top:0 }
.policy ul{ margin:4px 0 0;padding-left:18px }
.policy li{ margin-bottom:3px }
.policy code{ background:var(--hover);padding:1px 5px;border-radius:4px;font-size:11.5px }
.grant-item{ display:flex;align-items:flex-start;gap:10px;padding:10px 0;border-bottom:1px dashed var(--line) }
.grant-item:last-child{ border-bottom:0 }
.grant-item .g-main{ flex:1;min-width:0 }
.grant-item .g-name{ font-size:12.5px;font-weight:500 }
.grant-item .g-scope{ font-size:11px;color:var(--t3);margin-top:2px;word-break:break-word }
.usage-bar{ height:7px;border-radius:4px;background:var(--line);overflow:hidden;margin:8px 0 6px }
.usage-bar i{ display:block;height:100%;background:var(--brand);border-radius:4px }

/* ---------------- 设置 ---------------- */
.settings-grid{ display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start }
.theme-options{ display:grid;grid-template-columns:repeat(3,1fr);gap:10px }
.theme-option{
  border:1px solid var(--line);border-radius:8px;padding:10px;cursor:pointer;background:var(--card);
  display:flex;flex-direction:column;gap:8px;transition:.18s;text-align:left;
}
.theme-option:hover{ border-color:var(--t4) }
.theme-option.active{ border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft) }
.theme-preview{
  height:52px;border-radius:6px;border:1px solid var(--line);overflow:hidden;display:flex;
}
.theme-preview .tp-side{ width:30%;background:#fff;border-right:1px solid #E5E6EB }
.theme-preview .tp-main{ flex:1;background:#F7F8FA;padding:6px }
.theme-preview .tp-line{ height:5px;border-radius:3px;background:#E5E6EB;margin-bottom:4px }
.theme-preview .tp-line.w60{ width:60% }
.theme-preview.dark .tp-side{ background:#24272E;border-right-color:#3E4248 }
.theme-preview.dark .tp-main{ background:#1D2129 }
.theme-preview.dark .tp-line{ background:#3E4248 }
.theme-preview.auto .tp-side{ background:linear-gradient(135deg,#fff 50%,#24272E 50%) }
.theme-preview.auto .tp-main{ background:linear-gradient(135deg,#F7F8FA 50%,#1D2129 50%) }
.theme-preview.auto .tp-line{ background:linear-gradient(90deg,#E5E6EB 50%,#3E4248 50%) }
.theme-option .t-name{ font-size:12px;font-weight:500;display:flex;align-items:center;gap:5px }
.theme-option .t-check{ margin-left:auto;color:var(--brand);opacity:0;display:flex }
.theme-option .t-check svg{ width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round }
.theme-option.active .t-check{ opacity:1 }
.seg{ display:flex;gap:2px;background:var(--bg);border:1px solid var(--line);border-radius:7px;padding:3px }
.seg button{ flex:1;height:28px;border:0;background:transparent;border-radius:5px;font-size:12px;color:var(--t2);cursor:pointer }
.seg button.active{ background:var(--card);color:var(--t1);font-weight:500;box-shadow:var(--shadow-1) }

/* ---------------- 学习路径 ---------------- */
.home-cards{ display:grid;grid-template-columns:1.4fr 1fr;gap:16px;margin-bottom:16px }
.home-cards.single{ grid-template-columns:1fr }
.onboard .card-head{ margin-bottom:8px }
.onboard-list{ display:flex;flex-direction:column }
.onboard-item{
  display:flex;align-items:center;gap:10px;padding:8px;border-radius:7px;color:inherit;
  text-decoration:none;transition:background .18s;
}
.onboard-item:hover{ background:var(--hover);text-decoration:none }
.onboard-icon{
  width:24px;height:24px;flex:0 0 24px;border-radius:50%;background:var(--hover);color:var(--t3);
  display:flex;align-items:center;justify-content:center;
}
.onboard-item.is-done .onboard-icon{ background:var(--success-soft);color:var(--success) }
.onboard-icon svg{ width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round }
.onboard-title{ display:block;font-size:12.5px;font-weight:500 }
.onboard-hint{ display:block;font-size:11px;color:var(--t3);line-height:1.4 }
.onboard-go{ font-size:11px;color:var(--brand);white-space:nowrap }
.onboard-item.is-done .onboard-go{ color:var(--t3) }
.learn-cta .lc-title{ font-size:14px;font-weight:600;margin-bottom:2px }
.learn-cta .lc-meta{ font-size:11.5px;color:var(--t3) }

.learn-overview{ display:flex;gap:24px;align-items:flex-start;flex-wrap:wrap;margin-bottom:16px }
.lo-main{ flex:1;min-width:220px }
.lo-top{ display:flex;justify-content:space-between;font-size:12.5px;color:var(--t3);margin-bottom:8px }
.lo-top b{ color:var(--t1);font-family:Consolas,monospace }
.lo-next{ flex:0 0 250px;border-left:1px solid var(--line);padding-left:24px }
.lo-next-label{ font-size:11px;color:var(--t3);letter-spacing:.5px }
.lo-next-title{ font-size:14px;font-weight:600;margin:4px 0 2px }
.lo-next-meta{ font-size:11.5px;color:var(--t3);margin-bottom:10px }

.learn-guide{ margin-bottom:16px }

.stage-list{ display:flex;flex-direction:column;gap:16px }
.stage-card{ padding:0;overflow:hidden }
.stage-head{ display:flex;align-items:center;gap:14px;padding:18px;border-bottom:1px solid var(--line);background:var(--bg) }
.stage-index{
  width:34px;height:34px;flex:0 0 34px;border-radius:9px;background:var(--brand-soft);color:var(--brand);
  font-family:Consolas,monospace;font-weight:700;font-size:13px;display:flex;align-items:center;justify-content:center;
}
.stage-head h3{ font-size:14.5px;font-weight:600 }
.stage-head p{ font-size:11.5px;color:var(--t3);margin-top:2px }
.stage-meter{ flex:0 0 120px;text-align:right }
.stage-meter span{ font-size:11.5px;color:var(--t3);font-family:Consolas,monospace }
.stage-meter .progress{ margin-top:6px }
.stage-lessons{ padding:6px }
.lesson-row{ display:flex;align-items:center;gap:14px;padding:13px 12px;border-radius:8px;cursor:pointer;transition:background .18s }
.lesson-row:hover{ background:var(--hover) }
.lesson-status{
  width:26px;height:26px;flex:0 0 26px;border-radius:50%;border:1px solid var(--line);
  display:flex;align-items:center;justify-content:center;font-size:11.5px;color:var(--t3);font-family:Consolas,monospace;
}
.lesson-status.done{ background:var(--success-soft);border-color:transparent;color:var(--success) }
.lesson-status svg{ width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round }
.lesson-main{ flex:1;min-width:0;display:flex;flex-direction:column;gap:2px }
.lesson-title{ font-size:13.5px;font-weight:600 }
.lesson-sub{ font-size:11.5px;color:var(--t3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis }
.lesson-meta{ font-size:11.5px;color:var(--t3);white-space:nowrap }
.lesson-row .btn{ pointer-events:none }

.lesson-layout{ display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px;align-items:start }
.lesson-col{ min-width:0;display:flex;flex-direction:column;gap:16px }
.lesson-card{ padding:24px }
.lesson-badges{ display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px }
.lesson-summary{ font-size:13.5px;line-height:1.9;color:var(--t2) }
.lesson-section{ margin-top:20px }
.lesson-section h4{ font-size:13.5px;font-weight:600;margin-bottom:10px;display:flex;align-items:center;gap:8px }
.lesson-section h4::before{ content:"";width:3px;height:13px;border-radius:2px;background:var(--brand) }
.lesson-points{ margin:0;padding-left:20px;font-size:13px;line-height:1.9;color:var(--t2) }
.lesson-points li{ margin-bottom:6px }
.lesson-code{
  min-height:auto;max-height:420px;overflow:auto;margin:0;padding:14px 16px;
  background:var(--code-bg);color:var(--code-txt);font-size:12.5px;line-height:1.75;white-space:pre;
}
.lesson-tip{
  display:flex;gap:9px;margin-top:18px;padding:12px 14px;border-radius:8px;
  background:var(--warning-soft);font-size:12.5px;line-height:1.7;color:var(--t2);
}
.lesson-tip svg{ width:16px;height:16px;flex:0 0 16px;stroke:var(--warning);fill:none;stroke-width:1.8;margin-top:1px }
.lesson-actions{ margin-top:20px;flex-wrap:wrap }
.lesson-toc{ display:flex;flex-direction:column;gap:2px }
.toc-item{ display:flex;align-items:center;gap:10px;padding:8px;border-radius:7px;color:inherit;text-decoration:none;transition:background .18s }
.toc-item:hover{ background:var(--hover);text-decoration:none }
.toc-item.active{ background:var(--brand-soft) }
.toc-num{
  width:24px;height:24px;flex:0 0 24px;border-radius:6px;background:var(--hover);color:var(--t3);
  display:flex;align-items:center;justify-content:center;font-size:11px;font-family:Consolas,monospace;
}
.toc-item.active .toc-num{ background:var(--card);color:var(--brand) }
.toc-num svg{ width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round }
.toc-num .diff{ height:18px;padding:0 5px;font-size:10px }
.toc-title{ display:block;font-size:12.5px;font-weight:500;line-height:1.4 }
.toc-sub{ display:block;font-size:11px;color:var(--t3);line-height:1.4 }

/* ---------------- AI 助手 ---------------- */
.ai-layout{ display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:16px;align-items:start }
.ai-chat{ padding:0;display:flex;flex-direction:column;overflow:hidden }
.ai-head{
  display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;
  padding:12px 16px;border-bottom:1px solid var(--line);background:var(--bg);
}
.ai-status{ display:flex;align-items:center;gap:7px;font-size:12.5px }
.ai-msgs{ flex:1;min-height:380px;max-height:calc(100vh - 340px);overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:16px }
.msg{ display:flex;gap:10px;align-items:flex-start }
.msg-avatar{
  width:28px;height:28px;flex:0 0 28px;border-radius:8px;background:var(--brand);color:#fff;
  font-size:11px;font-weight:600;display:flex;align-items:center;justify-content:center;
}
.msg.user .msg-avatar{ background:var(--hover);color:var(--t2);border:1px solid var(--line) }
.msg-main{ min-width:0;flex:1 }
.msg-role{ font-size:11px;color:var(--t3);margin-bottom:4px }
.msg-body{
  font-size:13px;line-height:1.8;color:var(--t1);background:var(--bg);
  border:1px solid var(--line);border-radius:10px;padding:10px 14px;word-break:break-word;
}
.msg.user .msg-body{ background:var(--brand-soft);border-color:transparent }
.msg-body code{ background:var(--hover);border:1px solid var(--line);border-radius:4px;padding:1px 5px;font-size:12px;color:var(--brand) }
.ai-code{
  position:relative;background:var(--code-bg);border:1px solid var(--code-line);border-radius:8px;
  padding:12px;margin:10px 0;overflow:auto;font-size:12px;line-height:1.7;color:var(--code-txt);white-space:pre;
}
.ai-code code{ background:none;border:0;padding:0;color:inherit;font-size:inherit }
.ai-code-lang{ font-size:10px;color:var(--t3);font-family:Consolas,monospace;margin-bottom:6px;text-transform:uppercase }
.ai-li{ display:block;padding-left:6px }
.typing{ display:inline-flex;gap:4px;padding:4px 0 }
.typing i{ width:6px;height:6px;border-radius:50%;background:var(--t3);animation:typing 1s infinite }
.typing i:nth-child(2){ animation-delay:.15s }
.typing i:nth-child(3){ animation-delay:.3s }
@keyframes typing{ 0%,60%,100%{opacity:.25;transform:translateY(0)} 30%{opacity:1;transform:translateY(-3px)} }
.ai-error{ display:flex;gap:8px;font-size:12.5px;color:var(--danger);line-height:1.7 }
.ai-error svg{ width:16px;height:16px;flex:0 0 16px;stroke:currentColor;fill:none;stroke-width:1.8;margin-top:2px }
.ai-quick{ display:flex;gap:6px;flex-wrap:wrap;padding:0 16px 10px }
.ai-context{
  display:flex;align-items:center;gap:8px;margin:0 16px 10px;padding:8px 12px;
  border-radius:7px;background:var(--brand-soft);font-size:12px;color:var(--t2);
}
.ai-context svg{ width:14px;height:14px;stroke:var(--brand);fill:none;stroke-width:1.8 }
.ai-context .link-btn{ margin-left:auto;border:0;background:transparent;color:var(--brand);cursor:pointer;font-size:11.5px }
.ai-context .link-btn:hover{ text-decoration:underline }
.ai-composer{ border-top:1px solid var(--line);padding:12px 16px }
.ai-composer .textarea{ min-height:64px;background:var(--bg) }
.ai-composer-bar{ display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px }
.ai-composer-bar .right{ display:flex;gap:8px }
.ai-side .field:last-of-type{ margin-bottom:10px }
.ai-side input[type="range"]{ width:100%;accent-color:var(--brand);height:24px }
.model-row{ display:flex;align-items:center;gap:8px }
.model-row .input{ flex:1;min-width:0 }
.model-row .btn{ flex:0 0 auto;height:36px;white-space:nowrap }
.ai-side .link-btn{ display:inline-block;margin-top:6px;padding:0;border:0;background:none;color:var(--brand);font-size:11.5px;cursor:pointer }
.ai-side .link-btn:hover{ text-decoration:underline }
.ai-privacy{
  display:flex;gap:8px;margin-top:14px;padding-top:12px;border-top:1px dashed var(--line);
  font-size:11px;color:var(--t3);line-height:1.6;
}
.ai-privacy svg{ width:14px;height:14px;flex:0 0 14px;stroke:var(--t3);fill:none;stroke-width:1.7;margin-top:2px }
.ai-privacy code{ background:var(--hover);padding:1px 4px;border-radius:3px }

/* ---------------- 我的题库 ---------------- */
.custom-grid{ display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:16px;align-items:start }
.opt-row{ display:flex;align-items:center;gap:8px;margin-bottom:8px }
.opt-key{
  width:24px;height:24px;flex:0 0 24px;border-radius:6px;background:var(--hover);color:var(--t2);
  font-size:11.5px;font-family:Consolas,monospace;display:flex;align-items:center;justify-content:center;
}
.opt-row .input{ height:34px }
.custom-list{ display:flex;flex-direction:column;gap:2px }
.custom-item{ display:flex;align-items:flex-start;gap:12px;padding:11px;border-radius:8px;border-bottom:1px solid var(--line) }
.custom-item:last-child{ border-bottom:0 }
.ci-main{ flex:1;min-width:0 }
.ci-title{ font-size:13px;font-weight:500;display:flex;align-items:center;gap:6px;flex-wrap:wrap }
.ci-meta{ display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:11px;color:var(--t3);margin-top:4px }
.ci-actions{ display:flex;gap:6px;flex:0 0 auto }

/* ---------------- AI 工具入口 ---------------- */
.ai-tools{ display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:16px }
.ai-tool{
  display:flex;align-items:center;gap:12px;padding:13px 16px;border:1px solid var(--line);border-radius:10px;
  background:var(--card);color:inherit;text-decoration:none;box-shadow:var(--shadow-1);
  transition:border-color .18s,transform .18s;
}
.ai-tool:hover{ border-color:var(--brand);transform:translateY(-1px);text-decoration:none }
.at-icon{
  width:36px;height:36px;flex:0 0 36px;border-radius:9px;background:var(--brand-soft);color:var(--brand);
  display:flex;align-items:center;justify-content:center;
}
.at-icon svg{ width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round }
.at-main{ flex:1;min-width:0;display:flex;flex-direction:column;gap:2px }
.at-title{ font-size:13.5px;font-weight:600 }
.at-sub{ font-size:11.5px;color:var(--t3);line-height:1.5 }
.at-go{ color:var(--t3);display:flex;transform:rotate(180deg) }
.at-go svg{ width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round }

/* ---------------- 学习规划 ---------------- */
.plan-layout{ display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px;align-items:start }
.plan-main{ min-width:0;display:flex;flex-direction:column;gap:16px }
.plan-title{ font-size:16px;font-weight:600;margin-bottom:4px }
.plan-summary{ font-size:12.5px;line-height:1.75;color:var(--t2) }
.plan-meta-line{
  display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:12px 0 4px;padding-bottom:12px;
  border-bottom:1px solid var(--line);font-size:11.5px;color:var(--t3);
}
.plan-meta-line .btn{ margin-left:auto }
.plan-weeks{ display:flex;flex-direction:column;gap:12px;margin-top:12px }
.plan-week{ border:1px solid var(--line);border-radius:10px;padding:14px 16px;background:var(--bg) }
.pw-head{ display:flex;align-items:flex-start;gap:12px }
.pw-num{
  width:36px;height:26px;flex:0 0 36px;border-radius:6px;background:var(--brand-soft);color:var(--brand);
  font-family:Consolas,monospace;font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center;
}
.pw-theme{ font-size:13.5px;font-weight:600 }
.pw-project{ font-size:11.5px;color:var(--t3);margin-top:2px;line-height:1.6 }
.pw-goals{ margin:10px 0 0;padding-left:18px;font-size:12.5px;line-height:1.8;color:var(--t2) }
.pw-block{ margin-top:10px }
.pw-label{ font-size:11px;color:var(--t3);letter-spacing:.5px;margin-bottom:4px }
.pw-link{ display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:6px;color:inherit;text-decoration:none;font-size:12.5px }
.pw-link:hover{ background:var(--hover);text-decoration:none }
.pw-link svg{ width:14px;height:14px;flex:0 0 14px;stroke:var(--brand);fill:none;stroke-width:1.8 }
.pw-tag{ font-size:10.5px;color:var(--t3);white-space:nowrap }
.plan-hist-list{ display:flex;flex-direction:column;gap:2px }
.plan-hist{ display:flex;align-items:center;gap:4px;border-radius:8px }
.plan-hist.active{ background:var(--brand-soft) }
.ph-main{
  flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;padding:8px;border:0;border-radius:8px;
  background:none;color:inherit;text-align:left;cursor:pointer;
}
.ph-main:hover{ background:var(--hover) }
.ph-title{ font-size:12.5px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis }
.ph-meta{ font-size:10.5px;color:var(--t3) }
.plan-hist .icon-btn{ flex:0 0 auto;width:28px;height:28px }
.plan-hist .icon-btn svg{ width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:1.8 }

/* ---------------- 模拟面试 ---------------- */
.iv-layout{ display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px;align-items:start }
.iv-main{ min-width:0;display:flex;flex-direction:column;gap:16px }
.iv-setup .notice{ margin:0 0 16px }
.chip-group{ display:flex;gap:8px;flex-wrap:wrap }
.iv-chat{ padding:0;display:flex;flex-direction:column;overflow:hidden }
.iv-progress{ height:3px;background:var(--line) }
.iv-progress i{ display:block;height:100%;background:var(--brand);transition:width .3s }
.iv-msgs{
  flex:1;min-height:320px;max-height:calc(100vh - 360px);overflow-y:auto;padding:18px;
  display:flex;flex-direction:column;gap:14px;
}
.iv-q{ display:flex;align-items:flex-start;gap:10px }
.iv-q-num{
  width:28px;height:22px;flex:0 0 28px;border-radius:5px;background:var(--brand-soft);color:var(--brand);
  font-family:Consolas,monospace;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center;
}
.iv-q-body{
  flex:1;min-width:0;font-size:13px;line-height:1.8;background:var(--bg);border:1px solid var(--line);
  border-radius:10px;padding:11px 14px;word-break:break-word;
}
.iv-composer{ border-top:1px solid var(--line);padding:12px 16px }
.iv-composer-bar{ display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:8px;flex-wrap:wrap }
.iv-composer-bar .right{ display:flex;gap:8px }
.iv-hist-list{ display:flex;flex-direction:column }
.iv-hist{ display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid var(--line) }
.iv-hist:last-child{ border-bottom:0 }
.iv-hist-title{ font-size:12.5px;font-weight:500 }
.iv-hist-meta{ font-size:10.5px;color:var(--t3);margin-top:2px }
.iv-total{ display:flex;align-items:baseline;gap:6px;padding-bottom:14px;border-bottom:1px solid var(--line) }
.iv-total-num{ font-size:42px;font-weight:700;font-family:Consolas,monospace;color:var(--brand);line-height:1 }
.iv-total-max{ font-size:13px;color:var(--t3) }
.iv-report-body{ margin-top:16px;font-size:13px;line-height:1.8;color:var(--t2) }
.iv-report-body b{ color:var(--t1) }
.iv-report-body code{ background:var(--hover);border:1px solid var(--line);border-radius:4px;padding:1px 5px;font-size:12px }
.iv-recap{ margin-top:20px;padding-top:16px;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:8px }
.iv-recap-title{ font-size:12px;color:var(--t3);letter-spacing:.5px }
.iv-recap-item{ border:1px solid var(--line);border-radius:8px;padding:10px 12px;background:var(--bg) }
.iv-recap-head{ display:flex;align-items:center;gap:8px;font-size:12.5px;font-weight:500 }
.iv-recap-answer{ font-size:11.5px;color:var(--t3);line-height:1.7;margin-top:4px }

/* ---------------- 多语言中心 ---------------- */
.lang-pick{
  display:flex;align-items:center;gap:6px;height:30px;padding:0 8px;border:1px solid var(--line);
  border-radius:7px;background:var(--bg);color:var(--t2);flex:0 0 auto;
}
.lang-pick svg{ width:14px;height:14px;stroke:var(--t3);fill:none;stroke-width:1.8;flex:0 0 14px }
.lang-pick select{
  border:0;background:none;color:inherit;font-size:12px;outline:none;cursor:pointer;max-width:112px;
}
.mini-select{
  height:26px;border:1px solid var(--line);border-radius:6px;background:var(--card);color:var(--t2);
  font-size:11.5px;padding:0 4px;outline:none;cursor:pointer;
}
.editor-host{ background:var(--code-bg);min-height:80px }
.editor-loading{ padding:18px;font-size:12px;color:var(--t3) }
.editor-host .CodeMirror{
  height:auto;min-height:320px;background:var(--code-bg);color:var(--code-txt);
  font-family:Consolas,"SF Mono",Menlo,monospace;font-size:13px;line-height:1.7;
}
.editor-host .CodeMirror-gutters{ background:var(--code-bg);border-right:1px solid var(--code-line) }
.editor-host .CodeMirror-linenumber{ color:var(--code-gutter) }
.editor-host .CodeMirror-cursor{ border-left-color:var(--code-txt) }
.editor-host .CodeMirror-selected{ background:var(--brand-soft) }
.editor-plain{ width:100%;height:320px;resize:vertical;border:0;outline:none;background:var(--code-bg);color:var(--code-txt) }

.lang-layout{ display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px;align-items:start }
.lang-main{ min-width:0;display:flex;flex-direction:column;gap:16px }
.lang-chips{ display:flex;gap:6px;flex-wrap:wrap;margin-bottom:16px }
.lang-chip{
  display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 9px;border:1px solid var(--line);
  border-radius:999px;background:var(--bg);color:var(--t2);font-size:11.5px;cursor:pointer;
}
.lang-chip:hover{ border-color:var(--t4);color:var(--t1) }
.lang-chip.active{ background:var(--brand-soft);border-color:transparent;color:var(--brand);font-weight:500 }
.lc-dot{ width:7px;height:7px;border-radius:50% }
.lc-ext{ font-size:10px;color:var(--t3) }
.lang-hero-main{ display:flex;align-items:center;gap:14px;padding:14px 0;border-top:1px solid var(--line) }
.lang-mark{
  width:44px;height:44px;flex:0 0 44px;border-radius:11px;display:flex;align-items:center;justify-content:center;
  color:#fff;font-family:Consolas,monospace;font-size:14px;font-weight:700;
}
.lang-hero-main h3{ font-size:16px;font-weight:600 }
.lang-hero-main p{ font-size:12px;color:var(--t3);margin-top:2px;line-height:1.6 }
.lang-facts{ display:flex;gap:16px;flex-wrap:wrap;font-size:11.5px;color:var(--t3) }
.lang-facts b{ color:var(--t2);font-weight:500 }
.lang-topics{ display:flex;flex-direction:column;gap:14px;margin-top:4px }
.topic-card{ border:1px solid var(--line);border-radius:10px;padding:14px 16px;background:var(--bg) }
.topic-head{ display:flex;align-items:center;gap:10px }
.topic-head h4{ flex:1;font-size:13.5px;font-weight:600 }
.topic-num{
  font-family:Consolas,monospace;font-size:11px;color:var(--brand);background:var(--brand-soft);
  border-radius:5px;padding:2px 6px;
}
.topic-summary{ font-size:12.5px;line-height:1.8;color:var(--t2);margin-top:8px }
.topic-points{ margin:8px 0 0;padding-left:18px;font-size:11.5px;line-height:1.8;color:var(--t3) }
.code-sample-wrap{ margin-top:12px;border:1px solid var(--code-line);border-radius:8px;overflow:hidden }
.code-sample-bar{
  display:flex;align-items:center;justify-content:space-between;padding:6px 10px;
  background:var(--card);border-bottom:1px solid var(--line);font-size:11px;color:var(--t3);
}
.code-sample-bar .link-btn{ border:0;background:none;color:var(--brand);font-size:11px;cursor:pointer }
.code-sample{
  margin:0;padding:12px 14px;border:0;max-height:320px;overflow:auto;white-space:pre;
  background:var(--code-bg);color:var(--code-txt);font-family:Consolas,"SF Mono",Menlo,monospace;
  font-size:12.5px;line-height:1.75;
}
.code-sample code{ background:none;border:0;padding:0;color:inherit;font-size:inherit }
.tok-k{ color:#165DFF }
.tok-s{ color:#00A870 }
.tok-n{ color:#FF7D00 }
.tok-c{ color:var(--t3) }
.tok-f{ color:#722ED1 }
.tok-b{ color:#D4380D }
[data-theme="dark"] .tok-k{ color:#7FA4FF }
[data-theme="dark"] .tok-s{ color:#4CD48C }
[data-theme="dark"] .tok-n{ color:#FFB066 }
[data-theme="dark"] .tok-f{ color:#B99BFF }
[data-theme="dark"] .tok-b{ color:#FF8F6B }
.lang-sandbox .editor-host{ border:1px solid var(--line);border-radius:8px;overflow:hidden }
.lang-side-note{
  display:flex;gap:8px;margin-top:14px;padding-top:12px;border-top:1px dashed var(--line);
  font-size:11px;color:var(--t3);line-height:1.7;
}
.lang-side-note svg{ width:14px;height:14px;flex:0 0 14px;stroke:var(--brand);fill:none;stroke-width:1.7;margin-top:2px }
.lang-side-note code{ background:var(--hover);padding:1px 4px;border-radius:3px }

/* ---------------- 响应式 ---------------- */
@media (max-width:1180px){
  .stats-grid{ grid-template-columns:repeat(2,minmax(0,1fr)) }
  .dash-grid{ grid-template-columns:1fr }
  .q-layout{ grid-template-columns:1fr }
  .account-grid,.settings-grid{ grid-template-columns:1fr }
  .search{ width:170px }
}
@media (max-width:1080px){
  .auth-brand{ display:none }
  .auth-panel{ width:100%;flex:1;padding:72px 24px 32px;display:flex }
  .auth-card{ max-width:440px;margin:0 auto;width:100% }
}
@media (max-width:820px){
  .sidebar{ position:fixed;left:0;top:0;bottom:0;z-index:60;transform:translateX(-100%);transition:transform .24s ease;box-shadow:var(--shadow-2) }
  .app.side-open .sidebar{ transform:none }
  .sidebar-mask{ position:fixed;inset:0;background:rgba(17,20,26,.42);z-index:55 }
  .topbar{ padding:0 14px;gap:8px }
  .crumb{ min-width:0;flex:1 1 auto;overflow:hidden }
  .crumb h1{ font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis }
  .topbar .crumb .crumb-sub{ display:none }
  .topbar-right{ flex:0 0 auto;min-width:0;gap:6px }
  .search{ width:auto;flex:0 1 130px;min-width:0;max-width:130px;padding:0 9px }
  .search kbd{ display:none }
  .top-user{ display:none }
  .content{ padding:14px }
  .plugin-grid{ grid-template-columns:minmax(0,1fr) }
  .stats-grid{ gap:10px }
  .stat{ padding:13px 14px;min-width:0 }
  .stat .s-value{ font-size:21px }
  .stat .s-foot{ line-height:1.4 }
  .q-row{ padding:12px 14px;gap:10px }
  .q-row .q-pct{ display:none }
  .data-actions{ grid-template-columns:1fr }
  .form-row{ grid-template-columns:1fr }
  .hero{ flex-wrap:wrap;gap:12px;padding:16px 18px }
  .hero .h-main{ flex:1 1 0;min-width:0 }
  .hero .h-main p{ word-break:break-word }
  .hero .h-goal{ width:100%;flex:1 0 100%;min-width:0 }
  .hero .h-avatar{ width:44px;height:44px;flex:0 0 44px;font-size:18px }
  .modal-mask{ padding:14px;align-items:flex-end }
  .modal{ max-width:none }
  .auth{ display:block;min-height:100vh }
  .auth-panel{ display:block;width:100%;max-width:100%;padding:64px 16px 28px }
  .auth-card{ width:100%;max-width:100%;margin:0 auto;padding:22px 18px }
  .auth-top{ top:16px;right:16px }
}

/* ---------------- 扩展页面响应式 ---------------- */
@media (max-width:1180px){
  .home-cards{ grid-template-columns:1fr }
  .lesson-layout{ grid-template-columns:minmax(0,1fr) }
  .ai-layout{ grid-template-columns:minmax(0,1fr) }
  .ai-msgs{ max-height:none;min-height:320px }
  .ai-side{ order:2 }
  .custom-grid{ grid-template-columns:minmax(0,1fr) }
  .ai-tools{ grid-template-columns:1fr }
  .plan-layout,.iv-layout,.lang-layout{ grid-template-columns:minmax(0,1fr) }
  .iv-msgs{ max-height:none;min-height:300px }
}
@media (max-width:820px){
  .learn-overview{ padding:16px;gap:16px }
  .lo-next{ flex:1 0 100%;border-left:0;padding-left:0;border-top:1px solid var(--line);padding-top:14px }
  .stage-head{ flex-wrap:wrap;gap:10px }
  .stage-meter{ flex:1 0 100%;text-align:left }
  .lesson-row{ gap:10px;padding:11px 8px }
  .lesson-meta{ display:none }
  .lesson-sub{ white-space:normal;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden }
  .lesson-card{ padding:16px }
  .lesson-points{ padding-left:18px }
  .ai-head{ padding:10px 12px }
  .ai-msgs{ padding:12px;gap:14px }
  .ai-quick{ padding:0 12px 8px }
  .ai-context{ margin:0 12px 8px }
  .ai-composer{ padding:10px 12px }
  .ai-composer-bar{ flex-wrap:wrap }
  .msg-avatar{ width:24px;height:24px;flex:0 0 24px;font-size:10px;border-radius:6px }
  .msg-body{ padding:9px 12px;font-size:12.5px }
  .custom-item{ flex-wrap:wrap }
  .ci-actions{ width:100%;justify-content:flex-end }
  .ai-tool{ padding:12px }
  .at-icon{ width:32px;height:32px;flex:0 0 32px }
  .ai-tools{ gap:10px }
  .plan-week{ padding:12px }
  .plan-meta-line .btn{ margin-left:0 }
  .iv-msgs{ padding:12px;gap:12px }
  .iv-composer{ padding:10px 12px }
  .iv-total-num{ font-size:34px }
  .lang-pick{ display:none }
  .lang-hero-main{ flex-wrap:wrap;gap:10px }
  .lang-mark{ width:38px;height:38px;flex:0 0 38px;font-size:12px }
  .lang-facts{ gap:10px }
  .topic-card{ padding:12px }
  .lang-chip{ height:26px;font-size:11px }
}

/* ============================================================
   1.9.0 · 做题体验、成长与复习
   ============================================================ */
.q-actions-main{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.q-actions-note{font-size:12px;line-height:18px;color:var(--t3);margin:8px 0 10px}
.hint-panel{border:1px solid var(--line);background:var(--hover);border-radius:var(--r);padding:10px 12px;margin:0 0 10px}
.hint-head{display:flex;align-items:center;justify-content:space-between;font-size:13px;margin-bottom:6px}
.hint-step{display:flex;gap:8px;font-size:13px;line-height:20px;color:var(--t2);padding:3px 0}
.hint-no{flex:0 0 18px;height:18px;border-radius:50%;background:var(--brand);color:#fff;font-size:11px;display:flex;align-items:center;justify-content:center}
.hidden-summary{display:flex;flex-wrap:wrap;align-items:center;gap:10px;border-top:1px dashed var(--line);padding:8px 10px;font-size:13px;color:var(--t2)}
.q-extra{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:16px}
.q-extra .card{margin:0}
.rec-list{display:flex;flex-direction:column;gap:6px}
.rec-item{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--t2);padding:4px 0;border-bottom:1px dashed var(--line)}
.rec-item:last-child{border-bottom:0}
.rec-badge{font-size:11px;padding:1px 6px;border-radius:999px;background:var(--success-soft);color:var(--success)}
.rec-badge.fail{background:var(--danger-soft);color:var(--danger)}
.rec-lang{font-family:ui-monospace,Consolas,monospace;color:var(--t3)}
.rec-meta{color:var(--t3)}
.rec-time{margin-left:auto;color:var(--t3)}
.note-area{width:100%;min-height:96px;border:1px solid var(--line);border-radius:var(--r);background:var(--card);color:var(--t1);padding:10px 12px;font:13px/20px inherit;resize:vertical}
.note-area:focus{outline:none;border-color:var(--brand)}
.grow-top{display:flex;align-items:center;gap:14px}
.lv-ring{flex:0 0 64px;height:64px;border-radius:50%;border:3px solid var(--brand);display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--brand)}
.lv-ring b{font-size:15px}
.lv-ring .sub{font-size:10px}
.grow-main{flex:1;min-width:0}
.grow-meta{display:flex;flex-wrap:wrap;gap:12px;font-size:12px;color:var(--t3);margin-top:6px}
.goal-line a{color:var(--brand);text-decoration:none}
.badge-row{display:flex;flex-wrap:wrap;gap:6px;margin:12px 0}
.badge-item{font-size:12px;padding:3px 8px;border-radius:999px;border:1px dashed var(--line);color:var(--t3)}
.badge-item.on{border-style:solid;border-color:var(--brand);background:var(--brand-soft);color:var(--brand)}
.heat-wrap{margin-top:6px}
.heat{display:flex;gap:3px}
.heat-col{display:flex;flex-direction:column;gap:3px}
.heat-cell{width:11px;height:11px;border-radius:2px;background:var(--hover)}
.heat-cell.lv1{background:var(--brand-soft)}
.heat-cell.lv2{background:var(--brand);opacity:.55}
.heat-cell.lv3{background:var(--brand);opacity:.78}
.heat-cell.lv4{background:var(--brand)}
.report-grid{display:flex;gap:10px;margin-bottom:10px}
.rep-item{flex:1;border:1px solid var(--line);border-radius:var(--r);padding:10px}
.rep-item .k{display:block;font-size:12px;color:var(--t3)}
.rep-item b{font-size:18px}
.rep-line{display:flex;gap:10px;font-size:13px;color:var(--t2);padding:4px 0}
.rep-line .k{flex:0 0 84px;color:var(--t3)}
.review-list{display:flex;flex-direction:column;gap:6px;margin-top:4px}
.review-item{display:flex;justify-content:space-between;gap:10px;padding:6px 8px;border:1px solid var(--line);border-radius:8px;text-decoration:none;color:var(--t1);font-size:13px}
.review-item:hover{border-color:var(--brand)}
.review-item .r-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fail-code{margin-top:6px}
.fail-code summary{cursor:pointer;color:var(--brand);font-size:12px}
.fail-code pre{margin:6px 0 0;padding:8px 10px;background:var(--code-bg);border:1px solid var(--line);border-radius:8px;font-size:12px;overflow:auto;max-height:220px}
.error-boundary{padding:24px}
.error-boundary h3{margin:0 0 6px}
.error-boundary .q-actions{margin-top:14px}
@media (max-width:900px){
  .q-layout{grid-template-columns:1fr !important}
  .q-extra{grid-template-columns:1fr}
  .heat{overflow-x:auto;padding-bottom:4px}
}

/* 判题结果区图标：避免 SVG 缺失尺寸时被渲染成大色块 */
.result-head svg{width:18px;height:18px;flex:0 0 18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.test-case .tc-icon svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8}
