/* ===========================================================
   培森题库 · 工具箱
   =========================================================== */
body.tools-page { background: #f7fbfb; }

.tnav-wrap { max-width: 1180px; margin: 0 auto; padding: 26px 24px 70px; display: grid; grid-template-columns: 200px 1fr; gap: 26px; }

.tside {
  position: sticky; top: 82px; align-self: start;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px;
}
.tside button {
  display: flex; align-items: center; gap: 9px; width: 100%; height: 38px; padding: 0 11px;
  border: none; background: transparent; border-radius: 9px; font-size: 13.5px; color: var(--ink-2);
  cursor: pointer; text-align: left;
}
.tside button:hover { background: #f2f8f8; }
.tside button.on { background: var(--pri-l); color: var(--pri-dd); font-weight: 600; }
.tside svg { width: 16px; height: 16px; flex-shrink: 0; }

.tmain { min-width: 0; }
.tpanel { display: none; }
.tpanel.on { display: block; }

.tcard {
  background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px;
  margin-bottom: 16px;
}
.tcard > h2 { margin: 0 0 6px; font-size: 20px; letter-spacing: -.3px; }
.tcard > .desc { margin: 0 0 20px; font-size: 13.5px; color: var(--muted); line-height: 1.8; }

.trow { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.trow.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .trow, .trow.three { grid-template-columns: 1fr; } }

.drop {
  border: 1.5px dashed #d5e5e6; border-radius: 14px; padding: 30px 20px; text-align: center;
  background: #fcfefe; cursor: pointer; transition: .18s;
}
.drop:hover { border-color: var(--pri); background: var(--pri-l2); }
.drop.over { border-color: var(--pri); background: var(--pri-l); }
.drop .ic { font-size: 26px; opacity: .55; margin-bottom: 8px; }
.drop b { font-size: 14px; display: block; margin-bottom: 4px; }
.drop span { font-size: 12.5px; color: var(--muted); }

.flist { margin-top: 14px; }
.fitem {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 10px; margin-bottom: 7px; font-size: 13px; background: #fff;
}
.fitem .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fitem .sz { font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.fitem .rm { border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 15px; }
.fitem .rm:hover { color: var(--danger); }
.fitem .mv { border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; }
.fitem .mv:hover { color: var(--pri-dd); }

.tool-btn {
  height: 42px; padding: 0 22px; border-radius: 11px; border: none; background: var(--pri);
  color: #fff; font-size: 14.5px; font-weight: 500; cursor: pointer; transition: .16s;
}
.tool-btn:hover { background: var(--pri-d); }
.tool-btn:disabled { opacity: .45; cursor: not-allowed; }

.range-row { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-2); }
.range-row input[type=range] { flex: 1; accent-color: var(--pri); }

/* LaTeX 符号 */
.sym-search { display: flex; gap: 10px; margin-bottom: 18px; }
.sym-group { margin-bottom: 22px; }
.sym-group h4 { font-size: 13px; color: var(--ink-2); margin: 0 0 10px; font-weight: 600; }
.sym-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)); gap: 8px; }
.sym {
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 8px; text-align: center;
  cursor: pointer; transition: .14s; background: #fff; overflow: hidden;
}
.sym:hover { border-color: var(--pri); background: var(--pri-l2); }
.sym .v { height: 30px; display: grid; place-items: center; font-size: 15px; overflow: hidden; }
.sym .k { font-size: 10px; color: var(--muted); font-family: var(--mono); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 画板 */
#plotCanvas {
  width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); background: #fff;
  display: block; touch-action: none;
}
.plot-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; }
.plot-legend span { display: inline-flex; align-items: center; gap: 6px; }
.plot-legend i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }

.imgs-out { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 16px; }
.imgs-out .ph {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fafcfc;
}
.imgs-out .ph img { width: 100%; display: block; }
.imgs-out .ph .bar {
  display: flex; align-items: center; justify-content: space-between; padding: 6px 10px;
  font-size: 11.5px; color: var(--muted); border-top: 1px solid var(--line);
}
.imgs-out .ph .bar a { color: var(--pri-dd); font-weight: 500; }

.meter { height: 4px; background: #eef4f5; border-radius: 3px; overflow: hidden; margin-top: 10px; }
.meter > div { height: 100%; width: 0; background: var(--pri); transition: width .2s; }

.note-line { font-size: 12.5px; color: var(--muted); margin-top: 10px; line-height: 1.8; }

/* ---------- 登录门禁 ---------- */
.gate {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  background: rgba(244, 249, 250, .96);
  backdrop-filter: blur(4px);
  padding: 20px;
}
.gate.hide { display: none; }
.gate-card {
  max-width: 430px; width: 100%; text-align: center;
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--sh-l); padding: 38px 34px 30px;
}
.gate-ic {
  width: 54px; height: 54px; margin: 0 auto 16px; border-radius: 16px;
  background: var(--pri-l); color: var(--pri-dd);
  display: grid; place-items: center;
}
.gate-ic svg { width: 26px; height: 26px; }
.gate-card h3 { font-size: 19px; margin: 0 0 10px; letter-spacing: -.3px; }
.gate-card p { font-size: 13.5px; color: var(--ink-2); line-height: 1.8; margin: 0 0 22px; }
.gate-card p b { color: var(--pri-dd); }
.gate-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.gate-note { font-size: 12px; color: var(--muted); margin-top: 18px; }
.gate-note a { color: var(--pri-dd); }
