/* ===== 基础变量 ===== */
:root {
  --tbs-primary: #4f46e5;
  --tbs-primary-light: #eef2ff;
  --tbs-accent: #0ea5e9;
  --tbs-text: #0f172a;
  --tbs-text-sub: #334155;
  --tbs-text-muted: #64748b;
  --tbs-border: #e2e8f0;
  --tbs-bg: #f8fafc;
  --tbs-radius: 16px;
  --tbs-radius-sm: 10px;
  --tbs-shadow: 0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --tbs-shadow-hover: 0 8px 24px rgba(15,23,42,.10);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  color: var(--tbs-text);
  background: var(--tbs-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

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

/* 统一的键盘焦点样式 */
:focus-visible {
  outline: 2px solid var(--tbs-primary);
  outline-offset: 2px;
  border-radius: 6px;
}

/* 数字等宽，工具计数/价格类不跳动 */
.tab-count, .meta-tag { font-variant-numeric: tabular-nums; }

/* 尊重系统的减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ===== 导航 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--tbs-border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  flex: 0 0 auto;
  box-shadow: 0 3px 10px rgba(79, 70, 229, .28);
}
.brand-text { display: flex; align-items: baseline; gap: 7px; }
.brand-name { color: var(--tbs-text); font-size: 19px; font-weight: 800; letter-spacing: .06em; }
.brand-cn {
  color: var(--tbs-primary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
}
.nav-links { display: flex; gap: 8px; }
.nav-links a {
  position: relative;
  color: var(--tbs-text-sub);
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--tbs-primary); background: var(--tbs-primary-light); }

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #4f46e5 0%, #2563eb 55%, #0ea5e9 100%);
  padding: 72px 0 60px;
  text-align: center;
  color: #fff;
}
/* 装饰光斑 */
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 70%);
  pointer-events: none;
}
.hero::before { width: 480px; height: 480px; top: -220px; left: -140px; }
.hero::after { width: 560px; height: 560px; bottom: -300px; right: -160px; }
.hero-inner { position: relative; z-index: 1; }
.hero-title {
  font-size: 38px;
  font-weight: 800;
  margin: 0 0 14px;
  letter-spacing: -.02em;
  text-shadow: 0 2px 12px rgba(0,0,0,.12);
}
.hero-sub {
  font-size: 16px;
  opacity: .92;
  margin: 0 0 30px;
  letter-spacing: .04em;
}
.hero-search {
  max-width: 580px;
  margin: 0 auto 22px;
  position: relative;
}
.hero-search input {
  width: 100%;
  padding: 15px 20px 15px 50px;
  border: 2px solid transparent;
  border-radius: 16px;
  font-size: 16px;
  outline: none;
  box-shadow: 0 6px 24px rgba(0,0,0,.16);
  transition: box-shadow .2s, border-color .2s;
}
.hero-search input:focus {
  border-color: rgba(255,255,255,.85);
  box-shadow: 0 8px 32px rgba(0,0,0,.22);
}
.hero-search input::placeholder { color: #94a3b8; }
.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--tbs-text-muted);
  font-size: 18px;
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.hero-tag {
  background: rgba(255,255,255,.18);
  color: #fff;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  transition: background .15s;
}
.hero-tag:hover { background: rgba(255,255,255,.30); }

/* ===== 工具区 ===== */
.tools-section { padding: 40px 0 64px; }

.subject-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 28px;
}
.subject-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--tbs-border);
  background: #fff;
  border-radius: 999px;
  font-size: 14px;
  color: var(--tbs-text-sub);
  cursor: pointer;
  transition: all .15s;
}
.subject-tab:hover { border-color: var(--tbs-primary); color: var(--tbs-primary); }
.subject-tab.is-on {
  background: var(--tbs-primary);
  border-color: var(--tbs-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(79,70,229,.30);
}
.tab-count {
  margin-left: auto;
  font-size: 13px;
  color: var(--tbs-text-muted);
}

/* ===== 学段 / 年级 / 类型 筛选条 ===== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: -12px 0 28px;
}
.filter-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.filter-label {
  font-size: 13px;
  color: var(--tbs-text-muted);
  white-space: nowrap;
}
.filter-item select {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--tbs-border);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  border-radius: 999px;
  padding: 7px 32px 7px 14px;
  font-size: 13px;
  color: var(--tbs-text-sub);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  max-width: 160px;
}
.filter-item select:hover { border-color: var(--tbs-primary); }
.filter-item select:focus {
  outline: none;
  border-color: var(--tbs-primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.15);
}
.filter-item select.is-on {
  border-color: var(--tbs-primary);
  color: var(--tbs-primary);
  font-weight: 600;
}

.tools-group { margin-bottom: 36px; }
.group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.group-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--tbs-text);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.group-title i { font-size: 18px; color: var(--tbs-primary); }
.group-head .group-title { margin-bottom: 0; }

.link-btn {
  background: none;
  border: none;
  color: var(--tbs-text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
}
.link-btn:hover { color: var(--tbs-primary); }

/* ===== 工具卡片网格 ===== */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 20px;
}
.card-wrap {
  position: relative;
  min-width: 0;
}
.tool-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--tbs-border);
  border-radius: var(--tbs-radius);
  padding: 20px 18px 16px;
  height: 100%;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  position: relative;
  animation: cardIn .4s ease both;
  animation-delay: calc(min(var(--i, 0), 10) * 30ms);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@media (hover: hover) {
  .tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--tbs-shadow-hover);
    border-color: #c7d2fe;
  }
}
.tool-card:active { transform: translateY(-1px); }
.tool-ico {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  background: linear-gradient(135deg, #6366f1, #2563eb);
}
.ico-preschool { background: linear-gradient(135deg, #f472b6, #ec4899); }
.ico-chinese { background: linear-gradient(135deg, #fb923c, #f97316); }
.ico-math { background: linear-gradient(135deg, #6366f1, #2563eb); }
.ico-english { background: linear-gradient(135deg, #34d399, #10b981); }
.ico-science { background: linear-gradient(135deg, #38bdf8, #0ea5e9); }
.ico-general { background: linear-gradient(135deg, #a78bfa, #8b5cf6); }
.ico-method { background: linear-gradient(135deg, #fbbf24, #f59e0b); }

.tool-name {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
  margin-bottom: 6px;
  /* 名称最多两行，保证卡片高度整齐 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tool-card .tool-desc {
  font-size: 13px;
  color: var(--tbs-text-muted);
  line-height: 1.55;
  /* 描述固定两行，长短不一的卡片也能对齐 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.55em * 2);
}
.tool-meta { margin-top: auto; padding-top: 12px; }
.meta-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--tbs-primary-light);
  color: var(--tbs-primary);
}

.fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 18px;
  color: #cbd5e1;
  padding: 0;
  line-height: 1;
  z-index: 2;
  transition: color .15s, background .15s;
}
.fav-btn:hover { color: #f59e0b; background: #fff7ed; }
.fav-btn.is-on { color: #f59e0b; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--tbs-text-muted);
}
.empty-state i { font-size: 48px; display: block; margin-bottom: 12px; }

/* ===== 工具页布局 ===== */
.tbs-wrap {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 991px) {
  .tbs-wrap { grid-template-columns: 1fr; }
}
.tbs-panel { position: sticky; top: 76px; }
@media (max-width: 991px) { .tbs-panel { position: static; } }

.tbs-preview {
  background: #fff;
  border: 1px solid var(--tbs-border);
  border-radius: var(--tbs-radius);
  padding: 16px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tbs-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  width: 100%;
}

/* 控制面板卡片 */
.card {
  background: #fff;
  border: 1px solid var(--tbs-border);
  border-radius: var(--tbs-radius);
  padding: 18px;
  box-shadow: var(--tbs-shadow);
}
.card h6 { margin: 0 0 16px; font-size: 15px; }
.form-label { display: block; font-size: 13px; color: var(--tbs-text-sub); margin-bottom: 6px; }
.form-select, .form-control {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--tbs-border);
  border-radius: var(--tbs-radius-sm);
  font-size: 14px;
  background: #fff;
  outline: none;
  transition: border-color .15s;
}
.form-select:focus, .form-control:focus { border-color: var(--tbs-primary); }
.form-control-color { height: 38px; padding: 4px; cursor: pointer; }

.row { display: flex; flex-wrap: wrap; }
.row.g-2 { gap: 8px; }
.row > .col-6 { width: calc(50% - 4px); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
}
.btn-primary { background: var(--tbs-primary); color: #fff; }
.btn-primary:hover { background: #4338ca; }
.btn-outline-secondary {
  background: #fff;
  color: var(--tbs-text-sub);
  border-color: var(--tbs-border);
}
.btn-outline-secondary:hover { border-color: var(--tbs-primary); color: var(--tbs-primary); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.w-100 { width: 100%; }
.flex-fill { flex: 1; }
.d-flex { display: flex; }
.gap-2 { gap: 8px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.p-3 { padding: 12px; }

.text-primary { color: var(--tbs-primary); }
.text-secondary { color: var(--tbs-text-muted); }
.text-bg-light {
  background: #f1f5f9;
  color: var(--tbs-text-sub);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.form-check { display: flex; align-items: center; gap: 8px; }
.form-check-input { width: 18px; height: 18px; cursor: pointer; }
.form-check-label { font-size: 13px; cursor: pointer; }
.form-switch .form-check-input { width: 36px; }

hr { border: none; border-top: 1px solid var(--tbs-border); margin: 14px 0; }

/* SVG 图纸 */
.tbs-svg-box { width: 100%; overflow: auto; display: flex; justify-content: center; }
.tbs-svg-box svg { max-width: 100%; height: auto; background: #fff; }

/* 面包屑 & 子导航 */
.breadcrumb { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--tbs-primary); }
.mx-1 { margin: 0 4px; }

.tbs-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--tbs-border);
  border-radius: var(--tbs-radius);
}
.subnav-label { font-size: 13px; color: var(--tbs-text-muted); }
.tbs-subnav-item {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--tbs-text-sub);
  background: var(--tbs-bg);
  transition: all .15s;
}
.tbs-subnav-item:hover { background: var(--tbs-primary-light); color: var(--tbs-primary); }

/* 工具页标题 */
.tool-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.tool-head-ico {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #2563eb);
  margin-top: 2px;
}
.tool-head-main { min-width: 0; }
.tool-title { font-size: 22px; font-weight: 700; margin: 0; line-height: 1.35; }
.tool-desc { color: var(--tbs-text-muted); margin: 6px 0 0; font-size: 14px; line-height: 1.6; }

/* 互链 */
.cross-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #eef2ff, #e0f2fe);
  border-radius: var(--tbs-radius);
  font-size: 14px;
  color: var(--tbs-text-sub);
}
.cross-link a { color: var(--tbs-primary); font-weight: 600; }

/* 相关工具 */
.related-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--tbs-border);
}
.tool-grid-mini {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.tool-card-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--tbs-border);
  border-radius: 12px;
  transition: all .15s;
}
.tool-card-mini:hover { border-color: var(--tbs-primary); transform: translateY(-2px); }
.tool-card-mini .tool-ico { width: 36px; height: 36px; font-size: 17px; margin: 0; border-radius: 10px; }
.tool-name-mini { font-size: 13px; font-weight: 500; line-height: 1.3; }

/* ===== 页脚 ===== */
.site-footer {
  background: linear-gradient(180deg, #1e293b, #0f172a);
  color: #cbd5e1;
  padding: 40px 0 0;
  margin-top: 60px;
  position: relative;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #0ea5e9, #10b981);
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
}
@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; }
}
.footer-brand { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.footer-domain {
  -webkit-text-fill-color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
  margin-left: 6px;
}
.footer-desc { font-size: 13px; color: #94a3b8; margin: 0; }
.footer-title { font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 12px; }
.footer-col a {
  display: block;
  font-size: 13px;
  color: #94a3b8;
  margin-bottom: 8px;
  transition: color .15s;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #334155;
  padding: 16px 0;
  font-size: 13px;
  color: #64748b;
  text-align: center;
}

/* ===== 答案显隐 ===== */
/* .tbs-fill-blank（补全算式的空位）里写的也是答案，必须跟着开关走 */
.tbs-print-area:not(.tbs-show-ans) .tbs-ans,
.tbs-print-area:not(.tbs-show-ans) .tbs-fill-blank,
.tbs-print-area.tbs-show-ans.tbs-ans-separate .tbs-ans,
.tbs-print-area.tbs-show-ans.tbs-ans-separate .tbs-fill-blank {
  color: transparent !important;
  border-bottom: 1px solid #64748b;
  font-weight: 400;
  display: inline-block;
  min-width: 3rem;
  min-height: 1.1em;
}
.tbs-print-area:not(.tbs-show-ans) .tbs-ans-block,
.tbs-print-area.tbs-show-ans.tbs-ans-separate .tbs-ans-block { visibility: hidden; }
.tbs-ans { color: #1d4ed8; font-weight: 600; }
.tbs-fill-blank { color: #1d4ed8; font-weight: 700; }

/* 水印：屏幕不显示，打印时出现 */
.tbs-watermark { display: none; }

/* ===== 题单 / 纸张预览（A4 拟真） ===== */
.tbs-sheet {
  box-sizing: border-box;
  width: min(100%, 210mm);
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e7ecf3;
  box-shadow: 0 3px 18px rgba(15,23,42,.08);
  padding: 9mm 11mm 14mm;
  line-height: 1.8;
  text-align: left;
}
.tbs-sheet-title {
  font-weight: 700;
  font-size: 19px;
  text-align: center;
  margin: 0 0 1rem;
  letter-spacing: .04em;
  color: var(--tbs-text);
}

/* 题目网格 */
.tbs-prob-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: .95rem 1.7rem;
  align-items: stretch;
}
.tbs-prob {
  font-size: 16px;
  line-height: 1.7;
  padding: .55rem .4rem .6rem;
  min-height: 2.3em;
  min-width: 0;
  overflow-wrap: break-word;
}
.tbs-prob-no { color: #94a3b8; font-size: .85em; margin-right: .5rem; }

/* 表格 */
.tbs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbs-table th, .tbs-table td {
  border: 1px solid #cbd5e1;
  text-align: center;
  padding: .45rem .3rem;
  vertical-align: middle;
}
.tbs-table thead th { background: #f1f5f9; font-weight: 600; }

/* 分数显示 */
.tbs-frac { display: inline-flex; flex-direction: column; text-align: center; vertical-align: middle; line-height: 1.05; }
.tbs-frac > .tbs-frac-num { border-bottom: 1.5px solid currentColor; padding: 0 .4em .08em; }
.tbs-frac > .tbs-frac-den { padding: .08em .4em 0; }

/* ===== 移动端工具页：参数折叠 + 底部操作条 ===== */
.tbs-panel-toggle,
.tbs-mobile-bar { display: none; }

@media (max-width: 768px) {
  .tbs-mobile-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    gap: 8px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, .94);
    backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--tbs-border);
  }
  .tbs-mobile-bar .btn { flex: 1; }
  .tbs-mobile-bar .btn-primary { flex: 1.4; }
  /* 给底部操作条留出空间，避免遮住内容（仅工具页 body 带 has-tool-bar） */
  body.has-tool-bar { padding-bottom: 76px; }

  .tbs-panel-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--tbs-border);
    border-radius: var(--tbs-radius);
    font-size: 14px;
    color: var(--tbs-text-sub);
    cursor: pointer;
  }
  .tbs-panel-toggle .chev { margin-left: auto; transition: transform .2s; }
  .tbs-panel-toggle.is-open .chev { transform: rotate(180deg); }
  .tbs-panel.is-collapsed { display: none; }

  .tbs-preview { padding: 12px; }
  .tbs-panel { margin-bottom: 0; }
}

/* ===== 响应式收尾 ===== */
@media (max-width: 991px) {
  .subject-tabs { gap: 6px; }
  .subject-tab { padding: 7px 13px; font-size: 13px; }
  .tab-count { margin-left: 0; width: 100%; }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .hero { padding: 36px 0 32px; }
  .hero-title { font-size: 25px; line-height: 1.35; }
  .hero-sub { font-size: 14px; margin-bottom: 22px; }
  .hero-search input { padding: 12px 16px 12px 44px; font-size: 15px; }
  .hero-tag { font-size: 12px; padding: 5px 12px; }

  .tools-section { padding: 28px 0 48px; }
  .filter-bar { gap: 8px 12px; margin: 0 0 22px; }
  .filter-item { flex: 1 1 45%; min-width: 0; }
  .filter-item select { flex: 1; max-width: none; min-width: 0; width: 100%; }
  .tools-group { margin-bottom: 28px; }
  .tool-grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
  .tool-card { padding: 14px 13px 12px; border-radius: 14px; }
  .tool-ico { width: 38px; height: 38px; font-size: 18px; border-radius: 10px; margin-bottom: 10px; }
  .tool-name { font-size: 14px; }
  .tool-card .tool-desc { font-size: 12px; }
  .tool-meta { padding-top: 8px; }
  .fav-btn { width: 32px; height: 32px; top: 6px; right: 4px; }

  .tool-title { font-size: 19px; }
  .tool-head-ico { width: 40px; height: 40px; font-size: 18px; border-radius: 10px; }
  .tool-desc { font-size: 13px; }

  .tbs-subnav { padding: 8px 10px; }
  .tbs-subnav-item { font-size: 12px; padding: 4px 10px; }

  .site-footer { margin-top: 40px; }
  .footer-inner { gap: 24px; padding-bottom: 24px; }
}

@media (max-width: 420px) {
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tool-card .tool-desc { -webkit-line-clamp: 3; min-height: calc(1.55em * 3); }
}

/* 空状态：加一个重置按钮更友好 */
.empty-state .btn { margin-top: 16px; }

/* ===== 多页图纸 ===== */
.tbs-svg-box.tbs-multi {
  flex-direction: column;
  gap: 18px;
  align-items: center;
}
.tbs-svg-box.tbs-multi svg {
  border: 1px solid #e7ecf3;
  box-shadow: 0 3px 18px rgba(15, 23, 42, .08);
}

/* ===== 题单通用排版 ===== */
.ws-sheet-head {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #cbd5e1;
  font-size: 14px;
}
.ws-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #334155;
}
.ws-field .ws-underline {
  display: inline-block;
  min-width: 96px;
  border-bottom: 1px solid #94a3b8;
  height: 1.2em;
}
.ws-section { margin-bottom: 18px; }
.ws-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 8px;
}
/* 手写横线 */
.ws-write-line {
  border-bottom: 1px dashed #cbd5e1;
  height: 34px;
}
.ws-write-line.grid {
  border-bottom: 1px dashed #dbe1ea;
  height: 34px;
  background-image: linear-gradient(to right, #eef2f7 1px, transparent 1px);
  background-size: 34px 34px;
}
.ws-tip {
  font-size: 12px;
  color: var(--tbs-text-muted);
}

/* ===== 视觉增强层 ===== */
/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
  border: 2px solid var(--tbs-bg);
}
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
::-webkit-scrollbar-track { background: transparent; }

/* 文本选中 */
::selection { background: #c7d2fe; color: #1e1b4b; }

/* 卡片图标立体感 */
.tool-card .tool-ico, .tool-head-ico {
  box-shadow: 0 4px 10px rgba(15, 23, 42, .18);
}

/* 分组标题左侧强调条 */
.group-title {
  padding-left: 12px;
  position: relative;
}
.group-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #6366f1, #0ea5e9);
}

/* 页脚品牌渐变字 */
.footer-brand {
  background: linear-gradient(90deg, #a5b4fc, #7dd3fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hero 标签玻璃质感 */
.hero-tag {
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.14);
}

/* About 页 */
.about-card {
  background: #fff;
  border: 1px solid var(--tbs-border);
  border-radius: var(--tbs-radius);
  padding: 28px;
  box-shadow: var(--tbs-shadow);
  margin-bottom: 20px;
}
.about-card h3 {
  margin: 0 0 14px;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.about-card h3 i { color: var(--tbs-primary); }
.about-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--tbs-text-sub);
  font-size: 14px;
  line-height: 2;
}
.about-card a { color: var(--tbs-primary); font-weight: 600; }
.about-card a:hover { text-decoration: underline; }
.about-hero {
  text-align: center;
  padding: 48px 0 8px;
}
.about-hero h1 {
  font-size: 30px;
  font-weight: 800;
  margin: 0 0 10px;
}
.about-hero p {
  color: var(--tbs-text-muted);
  font-size: 15px;
  max-width: 560px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .hero { padding: 48px 0 44px; }
  .hero-title { font-size: 26px; }
  .nav-links a { padding: 6px 8px; }
  .about-card { padding: 20px; }
}

/* ===== 数数涂色 ===== */
.cc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 4px;
  border-bottom: 1px dashed #e2e8f0;
  font-size: 14px;
  color: #334155;
}
.cc-shapes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.cc-shape {
  font-size: 30px;
  line-height: 1;
  color: #b7c0cd;
}
.cc-answer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* ===== 听写纸 ===== */
.dc-grid {
  display: grid;
  gap: 12px;
}
.dc-item {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 8px 10px 10px;
  min-height: 74px;
  position: relative;
}
.dc-no {
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 11px;
  color: #94a3b8;
}
.dc-pinyin {
  border-bottom: 1px dashed #dbe1ea;
  height: 22px;
  margin-bottom: 8px;
}
.dc-word {
  border-bottom: 1px solid #94a3b8;
  height: 26px;
}

/* ===== 古诗填空：横线空位 ===== */
.po-line {
  font-size: 18px;
  line-height: 2.4;
  letter-spacing: .06em;
  color: #0f172a;
  text-align: center;
}
.po-title { font-size: 20px; font-weight: 700; text-align: center; margin-bottom: 4px; }
.po-author { font-size: 13px; color: var(--tbs-text-muted); text-align: center; margin-bottom: 18px; }

/* =====================================================================
 * 实现层补齐（2026-11-07 全站审计）
 *
 * 工具页 markup 沿用了 Bootstrap 工具类和一批 .tbs-* 结构类，但本项目只
 * 手写了 CSS 子集，审计发现约 60 个工具类、约 40 个结构类「用到却没有实现」，
 * 小字号、图标间距、三列参数、结果块、数独/课程表/打卡表的表格线全都退化成
 * 浏览器默认样式。其中影响功能的是导出舞台 .tbs-export-*：tools-export.js
 * 依赖它提供 A4 版心，之前没有 CSS，导出的 PNG 版式与屏幕预览并不一致。
 *
 * 本节只新增规则，不改上面已有的规则。间距沿用站点已有的 4px 步进
 * （1=4 2=8 3=12 4=16 5=32，与已定义的 .mt-2 / .p-3 一致）。
 * ===================================================================== */

/* ---------- 1. 字号与文本 ---------- */
.small { font-size: .85em; }
.fs-4 { font-size: 1.5rem; }
.fs-5 { font-size: 1.25rem; }
.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.fw-normal { font-weight: 400; }
.text-center { text-align: center; }
.text-start { text-align: left; }
.text-end { text-align: right; }
.text-nowrap { white-space: nowrap; }
.text-break { word-break: break-word; }
.align-middle { vertical-align: middle; }
.text-danger { color: #dc2626; }
.text-success { color: #047857; }
.text-warning { color: #b45309; }
.text-dark { color: var(--tbs-text); }
.bg-light { background: #f1f5f9; }
.bg-white { background: #fff; }

/* 徽章底色：text-bg-* = 深底 + 高对比文字 */
.text-bg-primary { background: var(--tbs-primary); color: #fff; }
.text-bg-success { background: #059669; color: #fff; }
.text-bg-danger { background: #dc2626; color: #fff; }
.text-bg-warning { background: #f59e0b; color: #3d2b06; }
.text-bg-secondary { background: #64748b; color: #fff; }

/* ---------- 2. 间距 ---------- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 4px; }
.mb-1 { margin-bottom: 4px; }
.ms-1 { margin-left: 4px; }
.me-1 { margin-right: 4px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.ms-2 { margin-left: 8px; }
.me-2 { margin-right: 8px; }
.mt-5 { margin-top: 32px; }
.mb-5 { margin-bottom: 32px; }
.me-3 { margin-right: 12px; }
.my-1 { margin-block: 4px; }
.my-2 { margin-block: 8px; }
.my-3 { margin-block: 12px; }
.p-0 { padding: 0; }
.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-4 { padding: 16px; }
.px-2 { padding-inline: 8px; }
.px-3 { padding-inline: 12px; }
.py-1 { padding-block: 4px; }
.py-2 { padding-block: 8px; }
.py-3 { padding-block: 12px; }
.py-4 { padding-block: 16px; }
.py-5 { padding-block: 32px; }
.pt-2 { padding-top: 8px; }
.pt-3 { padding-top: 12px; }
.pb-2 { padding-bottom: 8px; }
.pb-3 { padding-bottom: 12px; }
.pb-4 { padding-bottom: 16px; }
.gap-1 { gap: 4px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

/* ---------- 3. Flex / 栅格 ---------- */
.d-none { display: none !important; }
.d-block { display: block; }
.d-inline-block { display: inline-block; }
.d-grid { display: grid; }
.flex-wrap { flex-wrap: wrap; }
.flex-column { flex-direction: column; }
.flex-grow-1 { flex-grow: 1; }
.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }
.align-items-baseline { align-items: baseline; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-end { justify-content: flex-end; }
.h-100 { height: 100%; }
.ms-auto { margin-left: auto; }
.me-auto { margin-right: auto; }

/* 控制面板里的参数列：.row.g-2 有 8px 间隙，宽度按同排间隙数扣掉，避免换行 */
.row > .col-2 { width: calc(16.6667% - 7px); }
.row > .col-3 { width: calc(25% - 6px); }
.row > .col-4 { width: calc(33.3333% - 5px); }
.row > .col-5 { width: calc(41.6667% - 4px); }
.row > .col-7 { width: calc(58.3333% - 4px); }
.row > .col-8 { width: calc(66.6667% - 4px); }
.row > .col-9 { width: calc(75% - 4px); }
.row > .col-10 { width: calc(83.3333% - 4px); }
.row > .col-12 { width: 100%; }
.row > .col-auto { width: auto; }
.row > [class*="col-"] { min-width: 0; }

/* ---------- 4. 边框与圆角 ---------- */
.border { border: 1px solid var(--tbs-border); }
.border-top { border-top: 1px solid var(--tbs-border); }
.border-bottom { border-bottom: 1px solid var(--tbs-border); }
.border-0 { border: 0 !important; }
.rounded { border-radius: 10px; }
.rounded-3 { border-radius: 12px; }
.rounded-pill { border-radius: 999px; }
.shadow-none { box-shadow: none !important; }

/* ---------- 5. 表单尺寸与组合 ---------- */
.form-control-sm, .form-select-sm {
  padding: 5px 10px;
  font-size: 13px;
  border-radius: 8px;
}
.input-group { display: flex; align-items: stretch; gap: 8px; width: 100%; }
.input-group > .form-control, .input-group > .form-select { flex: 1 1 auto; min-width: 0; }
.input-group > .btn { flex: 0 0 auto; }
.input-group-text {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--tbs-border);
  border-radius: var(--tbs-radius-sm);
  background: var(--tbs-bg);
  font-size: 13px;
  color: var(--tbs-text-muted);
  white-space: nowrap;
}
.form-text { display: block; margin-top: 4px; font-size: 12px; color: var(--tbs-text-muted); }
.form-check-inline { display: inline-flex; margin-right: 12px; }

/* ---------- 6. 按钮补全 ---------- */
.btn-secondary { background: #e2e8f0; color: var(--tbs-text); }
.btn-secondary:hover { background: #cbd5e1; }
.btn-success { background: #059669; color: #fff; }
.btn-success:hover { background: #047857; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-warning { background: #f59e0b; color: #3d2b06; }
.btn-warning:hover { background: #d97706; }
.btn-outline-primary { background: #fff; color: var(--tbs-primary); border-color: #c7d2fe; }
.btn-outline-primary:hover { background: var(--tbs-primary); color: #fff; border-color: var(--tbs-primary); }
.btn-outline-success { background: #fff; color: #047857; border-color: #a7f3d0; }
.btn-outline-success:hover { background: #059669; color: #fff; border-color: #059669; }
.btn-outline-danger { background: #fff; color: #dc2626; border-color: #fecaca; }
.btn-outline-danger:hover { background: #dc2626; color: #fff; border-color: #dc2626; }
.btn-lg { padding: 12px 22px; font-size: 15px; }
.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn:disabled:hover { background: var(--tbs-primary); border-color: transparent; }

/* ---------- 7. 通用表格 ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td {
  border: 1px solid var(--tbs-border);
  padding: 6px 10px;
  text-align: left;
  vertical-align: middle;
}
.table thead th { background: #f1f5f9; font-weight: 600; }
.table.text-center th, .table.text-center td { text-align: center; }
.table-sm th, .table-sm td { padding: 4px 8px; font-size: 13px; }
.table-light, .table-light th, .table-light td { background: #f8fafc; }
.table-primary, .table-primary th, .table-primary td { background: var(--tbs-primary-light); }
.table-bordered th, .table-bordered td { border: 1px solid #cbd5e1; }

/* ---------- 8. 面板页签（计算器/质数等多功能页） ---------- */
.nav { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; list-style: none; }
.nav-item { display: flex; min-width: 0; }
.nav-link {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--tbs-text-sub);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.nav-link:hover { color: var(--tbs-primary); background: var(--tbs-primary-light); }
.nav-pills .nav-link.active {
  background: var(--tbs-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, .28);
}
.nav-sm .nav-link { padding: 4px 10px; font-size: 12px; }
.tbs-tab-pane { display: block; }

/* ---------- 9. 加载转圈（导出遮罩用） ---------- */
.spinner-border {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: .25em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: tbs-spin .75s linear infinite;
}
.spinner-border-sm { width: 1rem; height: 1rem; border-width: .2em; }
@keyframes tbs-spin { to { transform: rotate(360deg); } }

/* ---------- 10. 题单结构类 ---------- */
/* 抬头「班级/姓名/日期」的下划线空位 */
.tbs-sheet-meta { display: block; margin-bottom: 4px; }
.tbs-exam-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  padding-bottom: 6px;
  border-bottom: 1px solid #cbd5e1;
  font-size: 14px;
  color: var(--tbs-text-sub);
}
.tbs-underline {
  display: inline-block;
  min-width: 6em;
  height: 1.15em;
  border-bottom: 1px solid #94a3b8;
  vertical-align: baseline;
}

/* 口算题单容器：mental_math 用它代替 .tbs-sheet，需要同款纸张版心 */
.tbs-prob-sheet {
  width: min(100%, 210mm);
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e7ecf3;
  box-shadow: 0 3px 18px rgba(15, 23, 42, .08);
  padding: 10mm 12mm 14mm;
  line-height: 1.8;
  text-align: left;
}

/* 计算/随机结果的数字胶囊；button 版本是计算器键盘 */
.tbs-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tbs-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1em;
  padding: 5px 10px;
  border: 1px solid var(--tbs-border);
  border-radius: 10px;
  background: #fff;
  color: var(--tbs-text);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}
button.tbs-chip { cursor: pointer; padding: 6px 12px; transition: all .12s; }
button.tbs-chip:hover { border-color: var(--tbs-primary); color: var(--tbs-primary); background: var(--tbs-primary-light); }

/* 分步过程与结果块 */
.tbs-steps { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--tbs-text-sub); }
.tbs-step {
  padding: 6px 10px;
  background: var(--tbs-bg);
  border-left: 3px solid #c7d2fe;
  border-radius: 0 8px 8px 0;
  overflow-wrap: break-word;
}
.tbs-result {
  padding: 12px 14px;
  border: 1px solid #dbe3ff;
  border-radius: 12px;
  background: linear-gradient(135deg, #eef2ff, #f8fafc);
  font-size: 16px;
  overflow-wrap: break-word;
}
.tbs-sub-hint { font-size: 13px; color: var(--tbs-text-muted); }
.tbs-ans-hint { font-size: 12px; color: var(--tbs-text-muted); }

/* 行与书写线 */
.tbs-line { display: block; min-height: 1.9em; font-size: 16px; line-height: 1.9; overflow-wrap: break-word; }
.tbs-wline {
  display: block;
  min-height: 34px;
  border-bottom: 1px dashed #cbd5e1;
  line-height: 1.8;
  overflow-wrap: break-word;
}

/* 图形题（看图列式 / 数方格） */
.tbs-pic-grid { display: grid; gap: 14px 18px; align-items: start; }
.tbs-pic-item { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.tbs-pic-svg { width: 100%; overflow: hidden; }
.tbs-pic-svg svg { display: block; width: 100%; height: auto; }
.tbs-pic-eq { font-size: 17px; line-height: 1.8; text-align: center; }

/* 比大小 */
.tbs-compare-grid { display: grid; gap: .6rem 1.2rem; align-items: center; }
.tbs-compare-item {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .3rem;
  font-size: 17px;
  min-height: 2.2em;
}

/* 24 点：四张数字牌 + 解法行 */
.tbs-cards { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
.tbs-card-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 60px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .10);
  font-size: 24px;
  font-weight: 700;
  color: var(--tbs-text);
  font-variant-numeric: tabular-nums;
}
.tbs-24sol {
  padding: 3px 8px;
  font-size: 15px;
  color: var(--tbs-text-sub);
  font-variant-numeric: tabular-nums;
}

/* 数独：3×3 宫加粗，给出的数字更深 */
.tbs-sudoku {
  border-collapse: collapse;
  width: min(100%, 340px);
  margin: 0 auto;
  background: #fff;
}
.tbs-sudoku td {
  width: 11.1111%;
  height: 11.1111%;
  min-height: 34px;
  border: 1px solid #94a3b8;
  text-align: center;
  vertical-align: middle;
  font-size: 18px;
  font-weight: 600;
  color: #1d4ed8;
}
.tbs-sudoku td.b { border-top: 2px solid #334155; }
.tbs-sudoku td.r { border-left: 2px solid #334155; }
.tbs-sudoku td.given { color: var(--tbs-text); }

/* 课程表 / 座位表 / 打卡表 */
.tbs-timetable td { height: 3em; }
.tbs-timetable .tbs-tt-cell { font-size: 13px; }
.tbs-tt-group {
  background: #f1f5f9 !important;
  font-weight: 600;
  letter-spacing: .08em;
}
.tbs-tl {
  text-align: left !important;
  font-weight: 600;
  background: #f8fafc;
  white-space: normal;
}
.tbs-seat-table td { height: 2.4em; }
.tbs-seat { position: relative; vertical-align: middle; }
.tbs-seat.no-num .tbs-seat-no { display: none; }
.tbs-seat-blank { background: #f8fafc; }
.tbs-seat-no { display: block; font-size: 11px; color: var(--tbs-text-muted); }
.tbs-seat-name {
  display: block;
  min-height: 1.2em;
  font-size: 13px;
  color: var(--tbs-text);
  outline: none;
}
.tbs-seat-name:focus { background: var(--tbs-primary-light); border-radius: 4px; }
.tbs-seat-aisle {
  width: 14px;
  min-width: 14px;
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
}
.tbs-stage {
  width: 42%;
  margin: 0 auto 10px;
  padding: 5px 0;
  text-align: center;
  font-weight: 700;
  letter-spacing: .5em;
  text-indent: .5em;
  border-bottom: 2px solid #334155;
}
.tbs-stage.is-bottom { border-bottom: none; border-top: 2px solid #334155; margin: 10px auto 0; }
.tbs-ck-tip { font-size: 13px; color: var(--tbs-text-muted); margin-bottom: 10px; }
.tbs-ck-week { margin-bottom: 18px; }
.tbs-ck-week-cap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}
.tbs-checkin td { height: 2.4em; }
.tbs-ck-cell { cursor: pointer; font-size: 18px; text-align: center; }
.tbs-ck-cell.is-on { color: #059669; font-weight: 700; background: #ecfdf5; }
/* 勾选只加 is-on 类，勾本身由这里画出来，打印时同样保留 */
.tbs-ck-cell.is-on::after { content: "✓"; }
.tbs-ck-total { font-weight: 600; background: #f8fafc; }
.tbs-ck-foot { font-size: 12px; color: var(--tbs-text-muted); margin-top: 8px; }
.tbs-ck-daterow th, .tbs-ck-daterow td { font-size: 12px; font-weight: 500; background: #f8fafc; }

/* 竖式（除法厂字框、分数） */
.tbs-ld-prob { display: flex; align-items: flex-start; gap: .3rem; }
.tbs-ld-note { min-height: 1.2em; font-size: 12px; color: var(--tbs-text-muted); }
.tbs-ld-frame {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
  line-height: 1.5;
  white-space: pre;
  overflow-x: auto;
  max-width: 100%;
}
.tbs-fr-frac { display: inline-flex; }
.tbs-fr-fracidx { color: var(--tbs-text-muted); font-size: 13px; min-width: 1.4em; }
.tbs-fr-slash { color: var(--tbs-text-muted); padding: 0 2px; }
.fd-frac { display: inline-flex; align-items: center; vertical-align: middle; }
.fd-frac-slash { padding: 0 .12em; color: var(--tbs-text-muted); }
.fd-expr { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .25rem; font-size: 16px; }
.fd-tag { font-size: 12px; color: var(--tbs-text-muted); background: var(--tbs-bg); border-radius: 999px; padding: 1px 8px; }
.fd-op { color: var(--tbs-text-muted); padding: 0 .1em; }
.fd-sep { color: var(--tbs-text-muted); }
.fd-slot {
  display: inline-flex;
  align-items: center;
  min-width: 3.2em;
  padding: 0 .3em;
  border-bottom: 1px dashed #94a3b8;
}
.fd-instruction { font-size: 12px; color: var(--tbs-text-muted); margin-bottom: 8px; }
.fd-grid { display: grid; gap: .5rem 1.4rem; }
.fd-prob { font-size: 16px; }

/* 指数对数练习（高中） */
.el-note { font-size: 12px; color: var(--tbs-text-muted); margin-bottom: 8px; }
.el-op { color: var(--tbs-text-muted); }
.el-slot { display: inline-flex; align-items: center; min-width: 4em; padding: 0 .3em; }
.el-root { white-space: nowrap; }
.el-root-body { border-top: 1.5px solid currentColor; padding: 0 .15em; }
.el-prob sup, .el-prob sub { line-height: 0; }

/* 分数/计算器输入行 */
.tbs-calc-tabs { margin-bottom: 12px; }
.tbs-calc-fracs { display: flex; flex-direction: column; gap: 6px; }
.tbs-calc-frac-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tbs-calc-frac-row > .form-control { width: auto; flex: 0 0 auto; max-width: 92px; }
.tbs-calc-frac-lbl { min-width: 1.6em; color: var(--tbs-text-muted); }
.tbs-calc-op-label { min-width: 3.2em; font-size: 13px; color: var(--tbs-text-sub); }

/* ---------- 11. 面板与交互控件 ---------- */
/* 控制面板卡片：顶部一道渐变强调条，与页脚呼应 */
.x-card { position: relative; overflow: hidden; }
.x-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #0ea5e9, #10b981);
  pointer-events: none;
}

/* 「恢复默认 / 复制分享链接」工具条（tools-params.js 注入） */
.tbs-param-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--tbs-border);
}
.tbs-param-tip {
  flex: 1 1 100%;
  min-height: 1em;
  font-size: 12px;
  color: var(--tbs-text-muted);
}
.tbs-param-tip.is-ok { color: #047857; }
.tbs-param-tip.is-err { color: #dc2626; }

/* 几何画板 */
.tbs-geo-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.tbs-geo-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 34px;
  border: 1px solid var(--tbs-border);
  border-radius: 10px;
  background: #fff;
  color: var(--tbs-text-sub);
  font-size: 17px;
  cursor: pointer;
  transition: all .12s;
}
.tbs-geo-tool:hover { border-color: var(--tbs-primary); color: var(--tbs-primary); }
.tbs-geo-tool.is-on {
  background: var(--tbs-primary);
  border-color: var(--tbs-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, .28);
}
.tbs-geo-canvas-wrap { width: 100%; overflow: auto; }
.tbs-geo-canvas-wrap svg { display: block; max-width: 100%; height: auto; }
.tbs-wrap--canvas { grid-template-columns: 300px 1fr; }
/* 窄屏回到单列：上面的双栏规则会覆盖前面的 .tbs-wrap 响应式规则，
   不补这条的话手机上画布只剩 36px 宽 */
@media (max-width: 991px) {
  .tbs-wrap--canvas { grid-template-columns: 1fr; }
}

/* 专注练习卡（番茄钟） */
.tbs-fc-timer {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--tbs-border);
  border-radius: 14px;
  background: linear-gradient(160deg, #f8fafc, #eef2ff);
}
.tbs-fc-clock {
  margin: 6px 0 10px;
  text-align: center;
  font-size: 44px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  color: var(--tbs-text);
}
.tbs-fc-bar {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.tbs-fc-bar > div {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #0ea5e9);
  transition: width .3s linear;
}
.tbs-fc-timer.is-rest .tbs-fc-clock { color: #047857; }
.tbs-fc-timer.is-rest .tbs-fc-bar > div { background: linear-gradient(90deg, #34d399, #10b981); }
.tbs-fc-timer.is-done .tbs-fc-clock { color: #b45309; }

/* ---------- 12. 题单变体 ---------- */
.tbs-prob-grid--tall { row-gap: 1.6rem; }
.tbs-prob-grid--tall .tbs-prob { min-height: 3.6em; }
.tbs-prob--check { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; }
.tbs-prob-q { font-size: 16px; }
.tbs-mark {
  display: inline-block;
  min-width: 3.2em;
  padding: 1px 8px;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  font-size: 12px;
  color: var(--tbs-text-muted);
  text-align: center;
}
/* 整页图纸以外的题单：屏幕预览留出与打印一致的页边距 */
.tbs-preview.tbs-print-margin { padding: 16px 12px 20px; }

/* ---------- 13. 导出舞台（tools-export.js 依赖） ---------- */
/* 舞台是导出瞬间生成的静态副本：放在屏幕外，opacity:0 只影响祖先，
   html2canvas 直接渲染 .tbs-export-page，因此截图不受影响。
   尺寸一律用 mm，保证与 210×297 A4 的版心契约一致，
   也与 tools-export.js 里的 PAGE_W/PAGE_H、PAD_X/PAD_Y 对得上。 */
.tbs-export-stage {
  position: fixed;
  left: -99999px;
  top: 0;
  z-index: -1;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}
.tbs-export-page {
  position: relative;
  box-sizing: border-box;
  width: 210mm;
  height: 297mm;
  padding: 10mm 12mm;
  overflow: hidden;
  background: #fff;
  color: var(--tbs-text);
}
/* 整页图纸：无页边距，画布自己铺满 A4 */
.tbs-export-page.is-bleed { padding: 0; }
.tbs-export-clip { position: relative; width: 100%; overflow: hidden; }
.tbs-export-flow { width: 100%; }
.tbs-export-flow .tbs-sheet,
.tbs-export-flow .tbs-prob-sheet { box-shadow: none; border: none; width: 100%; }
.tbs-export-wm {
  position: absolute;
  right: 6mm;
  bottom: 5mm;
  font-size: 11px;
  line-height: 1;
  color: #9aa0a6;
  pointer-events: none;
}

/* 导出进度遮罩 */
.tbs-export-mask {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(2px);
}
.tbs-export-mask-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 30px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .28);
}
.tbs-export-tip { font-size: 14px; color: var(--tbs-text-sub); }

/* ---------- 14. 零星补齐 ---------- */
/* 竖式：grid 容器与 <pre> 都要显式定义，否则厂字框会退化成浏览器默认字号/外边距 */
.tbs-ld-grid { display: grid; gap: 12px 18px; align-items: start; }
.tbs-ld-pre {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
  line-height: 1.5;
  white-space: pre;
  overflow-x: auto;
}
.input-group-sm { gap: 6px; }
/* 各工具自己拼的问题块：统一避免跨页断裂，长题单分页更整齐 */
.bd-q, .cr-q, .cd-q, .iv-q, .pt-q, .pl-q, .bn-q, .tr-q, .lg-item {
  break-inside: avoid;
  page-break-inside: avoid;
}

/* ---------- 15. 第一批新增工具（2026-11） ---------- */
/* 拼音拼读：四线三格（用边框线，打印不依赖背景图形） */
.pb-q { font-size: 15px; }
.pb-four-title { font-size: 13px; font-weight: 600; margin: 22px 0 8px; color: #334155; }
.pb-four { margin-top: 6px; }
.pb-four-row { position: relative; height: 32px; margin-bottom: 10px; }
.pb-four-row i { position: absolute; left: 0; right: 0; border-top: 1px solid #94a3b8; }
.pb-four-row i:nth-child(1) { top: 0; }
.pb-four-row i:nth-child(2) { top: 33%; border-top: 1px dashed #cbd5e1; }
.pb-four-row i:nth-child(3) { top: 66%; border-top: 1px dashed #cbd5e1; }
.pb-four-row i:nth-child(4) { top: 100%; }

/* 听写 / 默写纸 */
.ds-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 18px 14px; }
.ds-item { position: relative; border: 1px solid #e2e8f0; border-radius: 6px; padding: 10px 8px 12px; min-height: 96px; break-inside: avoid; }
.ds-no { font-size: 11px; color: #94a3b8; margin-bottom: 4px; }
.ds-py { font-size: 11px; color: #64748b; margin-bottom: 5px; }
.ds-tians { display: flex; gap: 5px; justify-content: center; }
.ds-tian { position: relative; width: 44px; height: 44px; border: 1px solid #f97316; flex: 0 0 auto; }
.ds-tian i { position: absolute; }
.ds-tian i.h { left: 0; right: 0; top: 50%; border-top: 1px dashed #fbd5b5; }
.ds-tian i.v { top: 0; bottom: 0; left: 50%; border-left: 1px dashed #fbd5b5; }
.ds-line { border-bottom: 1px solid #94a3b8; height: 38px; margin: 8px 4px 0; }
.ds-parent { padding-top: 6px; break-before: page; }
.ds-parent-list { columns: 2; font-size: 15px; line-height: 2.2; padding-left: 26px; }
.ds-parent-list li { break-inside: avoid; }

/* 六栏错题表 */
.er-table { table-layout: fixed; }
.er-table th, .er-table td { font-size: 12px; padding: .35rem .3rem; }
.er-cell-left { text-align: left !important; vertical-align: top; line-height: 1.55; }
/* 错因两列排，避免四个勾选项把行撑高、把复盘统计挤到第二页 */
.er-reasons { columns: 2; column-gap: 2px; }
.er-chk { display: block; white-space: nowrap; font-size: 10px; line-height: 1.6; color: #475569; }
.er-stat { margin-top: 12px; border: 1px solid #cbd5e1; border-radius: 8px; padding: 10px 14px; break-inside: avoid; }
.er-stat-title { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.er-stat-row { font-size: 13px; color: #334155; line-height: 2; }

/* 阅读记录单 */
.rl-card { border: 1px solid #cbd5e1; border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; break-inside: avoid; }
.rl-head { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 13px; color: #334155; margin-bottom: 8px; }
.rl-blank { display: inline-block; border-bottom: 1px solid #94a3b8; height: 1.1em; vertical-align: middle; }
.rl-stars { font-size: 13px; color: #334155; margin-bottom: 8px; }
.rl-star { font-size: 20px; color: #f59e0b; margin: 0 2px; }
.rl-hint { font-size: 11px; color: #94a3b8; margin-left: 8px; }
.rl-junior { display: grid; grid-template-columns: 46% 1fr; gap: 14px; }
.rl-draw { border: 1px dashed #cbd5e1; height: 96px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #94a3b8; }
.rl-label { font-size: 12px; color: #475569; margin: 6px 0 2px; }
.rl-lines { margin-bottom: 4px; }
.rl-line { border-bottom: 1px solid #dbe1ea; height: 24px; }
.rl-sign { font-size: 12px; color: #64748b; margin-top: 8px; text-align: right; }
/* 每页 4 条以上：收紧卡片内距与横线，保证整页装得下 */
.rl-compact { padding: 8px 12px; margin-bottom: 9px; }
.rl-compact .rl-head { margin-bottom: 4px; }
.rl-compact .rl-stars { margin-bottom: 4px; }
.rl-compact .rl-star { font-size: 17px; }
.rl-compact .rl-label { margin: 4px 0 1px; }
.rl-compact .rl-line { height: 20px; }
.rl-compact .rl-draw { height: 76px; }
.rl-compact .rl-sign { margin-top: 4px; }
/* 每页 5 条：极简档，仍保证一页装得下 */
.rl-ultra { padding: 6px 10px; margin-bottom: 7px; }
.rl-ultra .rl-head { margin-bottom: 2px; font-size: 12px; }
.rl-ultra .rl-stars { margin-bottom: 2px; font-size: 12px; }
.rl-ultra .rl-star { font-size: 15px; }
.rl-ultra .rl-label { margin: 2px 0 1px; font-size: 11px; }
.rl-ultra .rl-line { height: 18px; }
.rl-ultra .rl-draw { height: 56px; }
.rl-ultra .rl-sign { margin-top: 2px; font-size: 11px; }

@media (max-width: 768px) {
  .ds-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rl-junior { grid-template-columns: 1fr; }
  .ds-parent-list { columns: 1; }
}

/* ---------- 16. 奖励贴纸表 / 寒暑假计划表 ---------- */
.rw-sheet { text-align: center; }
.rw-head { margin-bottom: 14px; }
.rw-title { font-size: 26px; font-weight: 800; color: #0f172a; letter-spacing: .04em; }
.rw-sub { font-size: 12px; color: #64748b; margin-top: 4px; }
.rw-info { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; text-align: left; }
.rw-info > div { border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px 10px; min-height: 54px; }
.rw-label { display: block; font-size: 11px; color: #94a3b8; }
.rw-val { display: block; font-size: 14px; font-weight: 600; color: #1e293b; border-bottom: 1px solid #e2e8f0; min-height: 23px; }
.rw-grid, .rw-ladder { display: grid; grid-template-columns: repeat(var(--cols, 7), minmax(0, 1fr)); gap: 12px; justify-items: center; margin: 20px 0 22px; }
/* 圆形贴纸位：虚线边框，打印出来可以直接往上贴贴纸 */
.rw-slot {
  width: 56px; height: 56px; border: 2px dashed #f59e0b; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: #fcd34d; font-size: 30px; line-height: 1;
  background: #fff; user-select: none; transition: transform .12s;
}
.rw-slot:hover { transform: scale(1.08); }
.rw-slot-sm { width: 30px; height: 30px; font-size: 17px; border-width: 1.5px; }
.rw-slot.is-on { border-style: solid; color: #f59e0b; background: #fffbeb; }
.rw-compact .rw-slot { width: 44px; height: 44px; font-size: 24px; }
.rw-table { table-layout: fixed; }
.rw-table th, .rw-table td { font-size: 12px; height: 44px; text-align: center; }
.rw-task { text-align: left !important; font-size: 13px; }
.rw-total { font-size: 11px; color: #64748b; }
.rw-marks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; text-align: left; font-size: 12px; color: #475569; margin-top: 14px; }
.rw-reward { border: 2px solid #f59e0b; border-radius: 10px; padding: 10px; font-size: 15px; color: #78350f; margin-top: 14px; }
.rw-reward-star { color: #f59e0b; font-size: 20px; margin-right: 6px; }
.rw-sign { font-size: 12px; color: #64748b; margin-top: 14px; text-align: right; }

.hp-goal { font-size: 12px; color: #475569; border: 1px solid #e2e8f0; border-radius: 6px; padding: 6px 10px; margin-bottom: 12px; text-align: center; }
.hp-table { table-layout: fixed; }
.hp-table th, .hp-table td { font-size: 12px; height: 34px; text-align: center; }
.hp-cell { cursor: pointer; font-size: 16px; }
.hp-cell.is-on::after { content: "✓"; color: #059669; font-weight: 700; }
.hp-day { font-weight: 600; font-size: 12px !important; white-space: nowrap; }
.hp-date { color: #94a3b8; }
/* 每页 20/30 天：td 会被 line-height + padding 撑高，必须一起压，
   只改 height 不生效（30 行会溢出到第二页） */
.hp-dense .hp-table th, .hp-dense .hp-table td {
  height: 20px; padding: 1px 2px; font-size: 11px; line-height: 1.2;
}
.hp-dense .hp-cell { font-size: 12px; line-height: 1.2; }
.hp-dense .hp-day { font-size: 11px !important; }
.hp-dense .ws-sheet-head { margin-bottom: 8px; padding-bottom: 6px; }
.hp-dense .tbs-sheet-title { font-size: 17px; margin-bottom: 8px; }
.hp-dense .hp-goal { padding: 4px 8px; margin-bottom: 8px; }
.hp-dense .hp-foot { margin-top: 6px; }
.hp-foot { font-size: 12px; color: #64748b; margin-top: 10px; }
.hp-blank { display: inline-block; border-bottom: 1px solid #94a3b8; height: 1.1em; vertical-align: middle; }
.hp-review { border: 1px solid #cbd5e1; border-radius: 8px; padding: 14px 16px; }
.hp-review-row { font-size: 14px; color: #334155; line-height: 2; }
.hp-line { border-bottom: 1px solid #dbe1ea; height: 30px; }
.hp-review-sign { text-align: right; font-size: 12px; color: #64748b; margin-top: 12px; }

@media (max-width: 768px) {
  .rw-slot { width: 42px; height: 42px; font-size: 22px; }
  .rw-info { grid-template-columns: 1fr; }
  .rw-marks { grid-template-columns: 1fr; }
}

/* ---------- 17. 第二批：差异化与增长品类 ---------- */
/* 分级识字自测 */
.sw-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.sw-item { position: relative; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 6px 6px; text-align: center; min-height: 96px; break-inside: avoid; }
.sw-no { position: absolute; top: 3px; left: 6px; font-size: 10px; color: #94a3b8; }
.sw-char { display: block; font-size: 30px; font-weight: 700; line-height: 1.3; font-family: "KaiTi", "STKaiti", serif; }
.sw-write { display: block; border-bottom: 1px solid #cbd5e1; height: 18px; margin: 4px 6px; }
.sw-actions { display: flex; gap: 4px; justify-content: center; margin-top: 4px; }
.sw-btn { font-size: 11px; padding: 2px 8px; border: 1px solid #cbd5e1; border-radius: 999px; background: #fff; cursor: pointer; color: #64748b; }
.sw-item.is-yes { border-color: #10b981; background: #f0fdf4; }
.sw-item.is-yes .sw-yes { background: #10b981; color: #fff; border-color: #10b981; }
.sw-item.is-no { border-color: #ef4444; background: #fef2f2; }
.sw-item.is-no .sw-btn-no { background: #ef4444; color: #fff; border-color: #ef4444; }
.sw-summary { margin-top: 14px; padding: 12px; background: #fff; border: 1px solid var(--tbs-border); border-radius: 10px; }
.sw-stat { font-size: 13px; font-weight: 600; color: var(--tbs-text-sub); }
.sw-miss { font-size: 15px; line-height: 1.9; color: #b91c1c; margin-top: 6px; word-break: break-all; }

/* 单词 / 成语搜索 */
.wg-words { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 14px; font-size: 13px; color: #334155; }
.wg-word { white-space: nowrap; }
.wg-grid { display: grid; grid-template-columns: repeat(var(--n, 10), minmax(0, 1fr)); width: min(100%, 520px); margin: 0 auto; border: 1px solid #94a3b8; }
.wg-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-right: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; font-size: 14px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.wg-cell.is-hit { font-weight: 700; color: #4338ca; background: #eef2ff; }

/* 购物找零情境单 */
.sp-price-title { font-size: 13px; font-weight: 700; margin-bottom: 6px; color: #334155; }
.sp-price td { font-size: 12px; padding: 6px 2px; }
.sp-list { margin-top: 14px; }
.sp-prob { padding: .35rem .2rem; min-height: 0; }
.sp-work { font-size: 12px; color: #64748b; margin: 0 0 10px 1.6rem; }
.sp-answers { columns: 2; font-size: 14px; line-height: 2; }
.sp-ans-row { break-inside: avoid; }

/* 开学卡 / 情绪温度计 */
.sel-blank { display: inline-block; border-bottom: 1px solid #94a3b8; height: 1.1em; vertical-align: middle; }
.sel-line { border-bottom: 1px solid #dbe1ea; height: 26px; }
.sel-about { display: grid; grid-template-columns: 1fr 38%; gap: 14px; }
.sel-nodraw { grid-template-columns: 1fr; }
.sel-field { font-size: 14px; color: #334155; line-height: 2.2; display: flex; align-items: center; gap: 6px; }
.sel-block { display: block; }
.sel-draw { border: 2px dashed #cbd5e1; border-radius: 8px; min-height: 260px; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 12px; }
.sel-note { font-size: 13px; margin-top: 14px; }
.sel-sign { text-align: right; font-size: 12px; color: #64748b; margin-top: 14px; }
.sel-week { margin-bottom: 18px; break-inside: avoid; }
.sel-week-cap { font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #334155; }
.sel-week-cap span { font-weight: 400; color: #64748b; }
.sel-mood-table td { height: 38px; font-size: 12px; }
.sel-moods { white-space: nowrap; }
.sel-mood { display: inline-flex; align-items: center; gap: 3px; margin-right: 6px; font-size: 11px; color: #475569; }
.sel-dot { width: 14px; height: 14px; border: 1.5px solid #94a3b8; border-radius: 50%; display: inline-block; }
.sel-week-foot { font-size: 12px; color: #475569; margin-top: 6px; }

@media (max-width: 768px) {
  .sw-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sel-about { grid-template-columns: 1fr; }
  .sp-answers { columns: 1; }
}

