/* ==========================================================================
   ZTOJ 统一界面层（ztojui）
   目标：把后加的插件（总结 / 比赛硬币 / AI 分层题解 / 分层进度 / 讲义）
        拉到同一套视觉语言：克制的浅色底、细边、玻璃质感、主题蓝作为唯一强调色。
   约定：
     - 主色只有一种：站点蓝 --zt-blue；按下/选中态一律变成它，不做第二套彩色
     - 按钮字号 14px 起步（原来是 12~12.5px，手机上偏小）
     - 圆角 9~11px，阴影极轻，靠边框和留白分层，不靠投影堆叠
     - 手机上按钮高度不低于 36px，横向可滚动而不是压缩换行
   文件位置：插件静态目录 ztojuikit/public/ztojui/ztoj.css
   引用方式：<link rel="stylesheet" href="/ztojui/ztoj.css">
   ========================================================================== */

:root {
  --zt-blue: #0f3d75;
  --zt-blue-hi: #155a9e;
  --zt-blue-lo: #e8f0fa;
  --zt-ink: #0f172a;
  --zt-text: #334155;
  --zt-muted: #64748b;
  --zt-faint: #94a3b8;
  --zt-line: #e3e8f0;
  --zt-line-2: #eef2f7;
  --zt-card: #ffffff;
  --zt-radius: 10px;
  --zt-radius-sm: 8px;
  --zt-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 6px 18px rgba(15, 61, 117, .05);
  --zt-glass: rgba(255, 255, 255, .72);
  --zt-glass-line: rgba(15, 61, 117, .1);
}

/* ---------- 按钮：默认玻璃浅色，hover 加深，按下/选中变主题蓝 ---------- */
.zt-btn,
.zt-btn:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 16px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  line-height: 1;
  color: var(--zt-text);
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
  border: 1px solid var(--zt-glass-line);
  border-radius: 9px;
  background: var(--zt-glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.7);
  backdrop-filter: blur(14px) saturate(1.7);
  box-shadow: 0 1px 1px rgba(15, 23, 42, .03), inset 0 1px 0 rgba(255, 255, 255, .85);
  cursor: pointer;
  transition: background .16s ease, color .16s ease, border-color .16s ease, transform .08s ease;
  -webkit-tap-highlight-color: transparent;
}
.zt-btn:hover {
  color: var(--zt-blue);
  border-color: rgba(15, 61, 117, .26);
  background: rgba(255, 255, 255, .92);
}
.zt-btn:active {
  transform: scale(.985);
  color: #fff;
  border-color: var(--zt-blue);
  background: var(--zt-blue);
  box-shadow: none;
}
.zt-btn.is-active {
  color: #fff;
  border-color: var(--zt-blue);
  background: var(--zt-blue);
  box-shadow: 0 2px 8px rgba(15, 61, 117, .22);
}
.zt-btn.is-active:hover { background: var(--zt-blue-hi); border-color: var(--zt-blue-hi); }

/* 主按钮：一直是主题蓝 */
.zt-btn--primary,
.zt-btn--primary:visited {
  color: #fff;
  border-color: var(--zt-blue);
  background: linear-gradient(180deg, #17558f 0%, var(--zt-blue) 100%);
  box-shadow: 0 1px 2px rgba(15, 61, 117, .22), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.zt-btn--primary:hover { background: var(--zt-blue-hi); border-color: var(--zt-blue-hi); color: #fff; }
.zt-btn--primary:active { background: #0c3262; border-color: #0c3262; }

/* 危险：只在文字上体现，不铺红底 */
.zt-btn--danger { color: #b91c1c; border-color: rgba(185, 28, 28, .2); }
.zt-btn--danger:hover { color: #fff; background: #dc2626; border-color: #dc2626; }
.zt-btn--danger:active { background: #b91c1c; border-color: #b91c1c; }

/* 小号：表格里、标签旁 */
.zt-btn--sm { height: 28px; padding: 0 11px; font-size: 13px; border-radius: 7px; }
/* 只放图标 */
.zt-btn--icon { width: 34px; padding: 0; }

.zt-btn[disabled], .zt-btn.is-disabled {
  opacity: .42;
  pointer-events: none;
  box-shadow: none;
}

/* ---------- 卡片 / 区块 ---------- */
.zt-card {
  background: var(--zt-card);
  border: 1px solid var(--zt-line);
  border-radius: var(--zt-radius);
  box-shadow: var(--zt-shadow);
}
.zt-card__hd {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-bottom: 1px solid var(--zt-line-2);
}
/* 标题统一加粗，靠字重而不是图标来分级 */
.zt-title { font-size: 15px; font-weight: 700; color: var(--zt-ink); letter-spacing: .2px; }
.zt-sub { font-size: 12.5px; color: var(--zt-muted); }

/* ---------- 标签 ---------- */
.zt-tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  font-size: 12px;
  border-radius: 6px;
  background: #eef2f7;
  color: #475569;
}
.zt-tag--blue { background: var(--zt-blue-lo); color: var(--zt-blue); }

/* ---------- 表单控件 ---------- */
.zt-input, .zt-select {
  height: 34px;
  padding: 0 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--zt-ink);
  background: #fff;
  border: 1px solid var(--zt-line);
  border-radius: 9px;
  outline: none;
  box-sizing: border-box;
}
.zt-input:focus, .zt-select:focus {
  border-color: var(--zt-blue);
  box-shadow: 0 0 0 3px rgba(15, 61, 117, .12);
}

/* ---------- 提示条 ---------- */
.zt-note { font-size: 12.5px; color: var(--zt-muted); }
.zt-note--ok { color: #15803d; }
.zt-note--bad { color: #b91c1c; }

/* ---------- 手机端：字与触控目标都要够大 ---------- */
@media (max-width: 768px) {
  .zt-btn { height: 38px; padding: 0 15px; font-size: 14.5px; }
  .zt-btn--sm { height: 32px; font-size: 13.5px; }
  .zt-btn--icon { width: 38px; }
  .zt-input, .zt-select { height: 38px; font-size: 15px; }
  .zt-title { font-size: 15.5px; }
  /* 按钮多的工具条：横向滑动，不挤成两行 */
  .zt-toolbar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .zt-toolbar::-webkit-scrollbar { display: none; }
  .zt-toolbar > * { flex: 0 0 auto; }
}

/* ---------- 深色主题兜底（站点可切暗色） ---------- */
.theme--dark .zt-btn {
  color: #dbe6f3;
  background: rgba(255, 255, 255, .07);
  border-color: rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.theme--dark .zt-btn:hover { background: rgba(255, 255, 255, .13); color: #fff; }
.theme--dark .zt-btn:active { background: var(--zt-blue-hi); border-color: var(--zt-blue-hi); color: #fff; }
.theme--dark .zt-btn--primary { background: linear-gradient(180deg, #1d6bb8 0%, #174e8c 100%); }
.theme--dark .zt-card { background: #151b24; border-color: rgba(255, 255, 255, .1); }
.theme--dark .zt-title { color: #e8eef6; }
.theme--dark .zt-input, .theme--dark .zt-select { background: #10161e; color: #e8eef6; border-color: rgba(255, 255, 255, .14); }

/* ==========================================================================
   AI 题解 / 学习报告里的 Markdown 正文
   站点 /markdown 返回的是完整排版（h1、table、pre、katex），直接塞进卡片会过大，
   这里统一压到卡片正文的尺寸；类名只在本插件生成的内容上出现，不影响正文页面。
   ========================================================================== */
.aidiag-md { font-size: 14.5px; line-height: 1.85; color: #1e293b; word-break: break-word; overflow-wrap: break-word; }
.aidiag-md > *:first-child { margin-top: 0 !important; }
.aidiag-md > *:last-child { margin-bottom: 0 !important; }
.aidiag-md h1, .aidiag-md h2 {
  font-size: 15.5px; font-weight: 700; margin: 14px 0 6px;
  border: none; padding: 0; color: #0f172a;
}
.aidiag-md h3, .aidiag-md h4, .aidiag-md h5, .aidiag-md h6 {
  font-size: 14.5px; font-weight: 700; margin: 12px 0 5px; color: #0f172a;
}
.aidiag-md p { margin: 7px 0; line-height: 1.85; }
/* 站点主题有 34 处 list-style:none（含 !important）会把序号吃掉，这里必须用 !important 抢回来 */
.aidiag-md ul, .aidiag-md ol { margin: 7px 0; padding-left: 26px !important; list-style-position: outside !important; }
.aidiag-md ul { list-style-type: disc !important; }
.aidiag-md ol { list-style-type: decimal !important; }
.aidiag-md li { display: list-item !important; }
.aidiag-md li { margin: 4px 0; line-height: 1.8; }
.aidiag-md li > p { margin: 2px 0; }
.aidiag-md code {
  background: #f1f5f9; color: #0F3D75; padding: 1px 5px;
  border-radius: 4px; font-size: 13px;
}
.aidiag-md pre {
  background: #f8fafc; border: 1px solid #e3e8f0; border-radius: 8px;
  padding: 10px 12px; overflow-x: auto; margin: 10px 0;
  font-size: 12.5px; line-height: 1.6;
}
.aidiag-md pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.aidiag-md table { border-collapse: collapse; width: 100%; font-size: 13.5px; margin: 10px 0; display: table; }
.aidiag-md th, .aidiag-md td { border: 1px solid #e3e8f0; padding: 5px 9px; text-align: left; }
.aidiag-md th { background: #f8fafc; font-weight: 600; }
.aidiag-md blockquote {
  margin: 10px 0; padding: 6px 12px; border-left: 3px solid #cbd5e1;
  background: #f8fafc; color: #475569;
}
.aidiag-md img { max-width: 100%; height: auto; }
.aidiag-md hr { border: none; border-top: 1px solid #e2e8f0; margin: 14px 0; }
/* 公式不要撑破卡片 */
.aidiag-md .katex { font-size: 1.02em; }
.aidiag-md .katex-display { margin: 8px 0; padding: 2px 0; overflow-x: auto; overflow-y: hidden; }

/* ==========================================================================
   记录页：测试点方格（洛谷式）+ 评测信息 / 源代码 标签页
   方格由模板 record_detail_status.html 直接输出，不经过 JS 二次渲染，所以不会闪。
   编号用 CSS 计数器，跨子任务连续：#1、#2、#3 …（与洛谷一致）
   ========================================================================== */
.zt-cases { padding: 14px 16px 16px; counter-reset: ztc; }
.zt-st + .zt-st { margin-top: 20px; }
.zt-st__hd {
  display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px;
  font-size: 14.5px; font-weight: 700; color: #0f172a; letter-spacing: .2px;
}
.zt-st__score { font-size: 12.5px; font-weight: 500; color: #94a3b8; }
.zt-st__grid { display: flex; flex-wrap: wrap; gap: 8px; }

.zt-case {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  /* 原来 96×92，整体缩到 3/4：72×69，字也跟着降一档，一屏能多放一行 */
  width: 72px; height: 69px; padding: 5px 6px 5px; border-radius: 3px; box-sizing: border-box;
  color: #fff; background: #1aa14a; cursor: default; user-select: none;
  counter-increment: ztc;
  transition: transform .12s ease, box-shadow .12s ease;
}
.zt-case:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(15,23,42,.18); }
.zt-case__no { font-size: 9.5px; line-height: 1; opacity: .92; }
.zt-case__no::before { content: "#" counter(ztc); }
.zt-case__st {
  font-size: 15px; font-weight: 600; line-height: 1; text-align: center;
  letter-spacing: .4px; overflow: hidden; white-space: nowrap;
}
.zt-case__meta {
  font-size: 9.5px; line-height: 1.2; text-align: center; opacity: .92;
  white-space: nowrap; overflow: hidden;
}
.zt-case.pass { background: #1aa14a; }
.zt-case.fail { background: #e04a3f; }
.zt-case.pending, .zt-case.progress { background: #e0a32e; }
.zt-case.ignored { background: #94a3b8; }

/* 标签页与下面的 section 连成一张卡片 */
.zt-tabs {
  display: flex; align-items: center; gap: 26px; padding: 0 16px;
  background: rgba(255,255,255,.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8);
  /* 和下面的玻璃卡片同一套边框色，别在这里留一条灰线 */
  border: 1px solid rgba(255,255,255,.72);
  border-bottom: 1px solid rgba(15,23,42,.06);
  border-radius: 14px 14px 0 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}
/* 标签栏 + 内容 = 一张卡（两个标签页必须长得一样）
   要点：
   1. `#zt-rec-code` 是标签栏的兄弟，但中间隔着 detail 面板，用 `+` 命不中，必须用 `~`；
   2. 全局 `.section` 是 `border-radius:14px !important` + `border:1px !important`，
      这里要同权重压过去，否则上沿会留圆角「缺口」和一条白边；
   3. 顶部内高光去掉，改成只有下方投影，接缝处才没有亮线。 */
#zt-rec-tabs ~ .zt-panel > .section:first-child,
#zt-rec-tabs ~ .section.zt-panel {
  margin-top: 0 !important;
  border-top: 1px solid transparent !important;
  border-radius: 0 0 14px 14px !important;
  box-shadow: 0 0 0 1px rgba(15,23,42,.055),
              0 2px 4px rgba(15,23,42,.04),
              0 18px 44px rgba(15,23,42,.10) !important;
}

/* AI 分层题解槽位：收起时是一叠卡片，展开后并入评测信息卡片 */
.zt-panel > .section:has(+ #zt-aidiag-slot:not(:empty)) { margin-bottom: 0; }
.zt-panel > .section:has(+ #zt-aidiag-slot.is-expanded) {
  border-bottom: none; border-radius: 10px 10px 0 0; margin-bottom: 0;
}
#zt-aidiag-slot.is-expanded > #aidiag-box {
  margin: 0 !important; border-top: none; border-radius: 0 0 10px 10px;
}
/* 标签：选中态给一个淡蓝底块（以前只有一条下划线，看不出「当前在哪个标签」） */
.zt-tab {
  position: relative; margin: 6px 0; padding: 7px 13px; border-radius: 8px;
  font-size: 14.5px; font-weight: 600; color: #64748b;
  background: none; border: none; cursor: pointer; font-family: inherit; line-height: 1;
  transition: background .14s ease, color .14s ease;
}
.zt-tab:hover { color: #0F3D75; background: rgba(15,61,117,.06); }
.zt-tab.on { color: #0F3D75; background: rgba(15,61,117,.10); }
.zt-tab.on::after { display: none; }

@media (max-width: 768px) {
  .zt-cases { padding: 12px; }
  .zt-st + .zt-st { margin-top: 16px; }
  .zt-st__hd { font-size: 14px; margin-bottom: 8px; }
  .zt-st__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .zt-case { width: auto; height: 62px; }
  .zt-case__st { font-size: 14px; }
  .zt-tabs { gap: 18px; padding: 0 12px; }
  .zt-tab { font-size: 14.5px; padding: 12px 2px 11px; }
}

/* ==========================================================================
   测试点：点格子弹出的信息气泡（玻璃质感）
   ========================================================================== */
.zt-case { cursor: pointer; }
.zt-case:focus-visible { outline: 2px solid rgba(255,255,255,.9); outline-offset: -3px; }

.zt-pop {
  position: fixed; z-index: 9000; min-width: 168px; max-width: 264px;
  padding: 12px 14px; border-radius: 14px;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(22px) saturate(1.9); backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid rgba(15,61,117,.10);
  box-shadow: 0 14px 38px rgba(15,23,42,.16), inset 0 1px 0 rgba(255,255,255,.9);
  font-size: 13px; color: #1e293b; line-height: 1.5;
  animation: ztPopIn .14s cubic-bezier(.2,.9,.3,1);
}
@keyframes ztPopIn { from { opacity: 0; transform: translateY(4px) scale(.98); } to { opacity: 1; transform: none; } }
.zt-pop__hd { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.zt-pop__no { font-size: 12px; font-weight: 700; color: #94a3b8; letter-spacing: .4px; font-variant-numeric: tabular-nums; }
.zt-pop__st { font-size: 13px; font-weight: 700; letter-spacing: .2px; }
.zt-pop__st--pass { color: #15803d; }
.zt-pop__st--fail { color: #dc2626; }
.zt-pop__st--progress, .zt-pop__st--pending { color: #b45309; }
.zt-pop__st--ignored, .zt-pop__st--other { color: #64748b; }
.zt-pop__rows { display: flex; flex-direction: column; gap: 6px; }
.zt-pop__row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.zt-pop__row span { color: #94a3b8; font-size: 12.5px; }
.zt-pop__row b { font-weight: 600; color: #0f172a; font-variant-numeric: tabular-nums; }
.zt-pop__msg {
  margin-top: 9px; padding-top: 9px; border-top: 1px solid rgba(15,23,42,.08);
  font-size: 12.5px; color: #475569; line-height: 1.55;
  word-break: break-word; max-height: 120px; overflow: auto;
}

/* ==========================================================================
   全站统一：苹果式玻璃、简洁、圆角一致
   ========================================================================== */
/* 顶部导航：一条浅色玻璃条 */
nav.nav {
  background: rgba(255,255,255,.72) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.8); backdrop-filter: blur(20px) saturate(1.8);
  box-shadow: 0 1px 0 rgba(15,23,42,.06), 0 8px 28px rgba(15,23,42,.05) !important;
}
/* 导航项：只有文字，鼠标移上去字变色，背景不动（只借这一点，不做别的装饰）
   默认是偏冷的深灰，悬停换一档更饱和的蓝，对比拉开才看得出来 */
nav.nav .nav__item {
  color: #57616f; font-size: 15px; font-weight: 500; letter-spacing: .2px;
  background: none !important; border-radius: 0; margin: 0; padding: 0 13px;
  line-height: 42px; transition: color .14s ease;
}
nav.nav .nav__item:hover { color: #1a6fd4 !important; }
nav.nav .nav__item.nav--active { color: #0F3D75; font-weight: 600; }
nav.nav .nav__item.nav--active:hover { color: #1a6fd4 !important; }
/* 主题给导航项留了 3px 的彩色上边框（粉=当前页、蓝=悬停）和一个发光伪元素，全部去掉 */
nav.nav .nav__item,
nav.nav .nav__item:hover,
nav.nav .nav__item.nav--active { border-color: transparent !important; }
nav.nav .nav__item::before,
nav.nav .nav__item.nav--active::before,
nav.nav .nav__item:hover::before { box-shadow: none !important; }
nav.nav .nav__item.nav--active::after { display: none !important; }
nav.nav .nav__logo { border-radius: 6px; }

/* 右侧设置菜单：当前项 = 主题蓝浅色块（原来主题粉底 #ed5f82）；
   主题还给当前项挂了红边 #d11845、悬停挂蓝边 #5f9fd6，这两条彩边一律去掉 */
/* 主题给所有 .menu__link 一条 3px 左边条：hover 蓝 #4690d0、active 红 #d11845。
   配合圆角就是截图里那道「蓝色弧线」。全站一律去边，状态只用底色表达。 */
html a.menu__link, html button.menu__link,
html a.menu__link:not(.disabled):hover, html button.menu__link:not(.disabled):hover,
html a.menu__link.active, html button.menu__link.active {
  border: 0 !important;
}
/* 右上角用户下拉里的条目：悬停整行刷淡蓝底 */
html .drop-content .menu__link, html .dropdown-target.menu .menu__link { border-radius: 8px; }
html .drop-content .menu__link:hover,
html .dropdown-target.menu .menu__link:hover {
  background: rgba(15,61,117,.07) !important;
  color: #0F3D75 !important;
}

.section.side .menu__link {
  color: #475569;
  border: 0 !important;
  border-radius: 9px;
  background: none;
  transition: background .14s ease, color .14s ease;
}
.section.side .menu__link:hover { color: #0F3D75; background: rgba(15,61,117,.07); }
.section.side .menu__link.active,
.section.side .menu__link.active:hover {
  color: #fff !important;
  background: #0F3D75 !important;
  border: 0 !important;
}

/* 右上角用户下拉：玻璃面板 + 统一条目 */
.dropdown-target.menu {
  background: rgba(255,255,255,.88) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.8); backdrop-filter: blur(24px) saturate(1.8);
  border: 1px solid rgba(15,23,42,.07) !important;
  border-radius: 14px !important; padding: 8px !important;
  box-shadow: 0 20px 56px rgba(15,23,42,.18) !important;
  min-width: 200px;
}
.dropdown-target.menu .menu__item { margin: 0; }
.dropdown-target.menu .menu__link {
  display: flex; align-items: center; gap: 9px;
  height: 36px; padding: 0 10px !important; border-radius: 9px;
  font-size: 13.5px; color: #3f4c5c; background: none !important;
  transition: background .14s ease, color .14s ease;
}
.dropdown-target.menu .menu__link .icon { color: #9aa8b8; font-size: 15px; transition: color .14s ease; }
.dropdown-target.menu .menu__link:hover { background: rgba(15,61,117,.07); color: #0F3D75; }
.dropdown-target.menu .menu__link:hover .icon { color: #0F3D75; }
.dropdown-target.menu .menu__seperator {
  height: 1px; margin: 6px 4px !important; padding: 0 !important;
  background: rgba(15,23,42,.07); border: none !important;
}
/* 手机端头部：同样做成玻璃条（原来是一整条灰蓝） */
.header--mobile {
  background: rgba(255,255,255,.82) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.8); backdrop-filter: blur(18px) saturate(1.8);
  box-shadow: 0 1px 0 rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.05);
}
.header--mobile .hamburger-inner,
.header--mobile .hamburger-inner::before,
.header--mobile .hamburger-inner::after { background-color: #334155; }

/* 卡片：统一圆角 + 柔和阴影 */
.section {
  border-radius: 14px !important;
  box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06) !important;
}
.section__title { font-weight: 600; letter-spacing: .2px; color: #0f172a; }

/* 按钮与表单控件 */
.button, a.button, button.button, .button.rounded { border-radius: 10px; }
/* 主要按钮统一用主题蓝，不再各页面一个蓝 */
.button.primary, a.button.primary, button.button.primary {
  background: #0F3D75 !important; border-color: #0F3D75 !important; color: #fff !important;
  box-shadow: 0 2px 10px rgba(15,61,117,.18);
}
.button.primary:hover, a.button.primary:hover, button.button.primary:hover {
  background: #155a9e !important; border-color: #155a9e !important;
}
input[type="text"], input[type="password"], input[type="number"], input[type="email"],
input[type="search"], input[type="url"], input[type="tel"], select, textarea {
  border-radius: 10px; border-color: rgba(15,23,42,.12);
}

/* ---------- 表单控件统一：注册 / 账户设置 / 偏好设置 / 域设置都用这一套 ----------
   高度 38、圆角 9、1px 冷灰边、白底；聚焦时边框变主题蓝 + 3px 淡蓝光圈。
   复选框 / 单选框 / 按钮 / 文件框不参与，避免把按钮也套成输入框的样子。 */
input.textbox,
textarea.textbox,
span.textbox,
input[type="text"]:not(.button):not(.checkbox):not(.radio),
input[type="password"],
input[type="number"],
input[type="email"],
input[type="search"],
input[type="url"],
input[type="tel"] {
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--zt-ink);
  background-color: #fff;
  border: 1px solid rgba(15,23,42,.18);
  border-radius: 9px;
  outline: 2px solid transparent;
  box-shadow: none;
  transition: border-color .16s ease, outline-color .16s ease;
  box-sizing: border-box;
}
textarea.textbox,
textarea {
  height: auto;
  min-height: 120px;
  padding: 10px 12px;
  line-height: 1.7;
  resize: vertical;
}
input.textbox:focus,
textarea.textbox:focus,
span.textbox:focus,
input[type="text"]:not(.button):focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="search"]:focus {
  border-color: var(--zt-blue) !important;
  outline: 2px solid rgba(15,61,117,.12) !important;
  outline-offset: 0;
}
input.textbox:disabled,
textarea.textbox:disabled,
input.textbox:read-only,
textarea.textbox:read-only { background-color: #f6f8fb; color: #64748b; }

/* 下拉：主题已经用 SVG 箭头并且去掉了原生外观，这里只统一尺寸与配色 */
select.select,
select {
  height: 36px;
  padding: 0 34px 0 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--zt-ink);
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  border: 1px solid rgba(15,23,42,.18);
  border-radius: 9px;
  outline: 2px solid transparent;
  transition: border-color .16s ease, outline-color .16s ease;
  box-sizing: border-box;
}
select.select:focus,
select:focus {
  border-color: var(--zt-blue) !important;
  outline: 2px solid rgba(15,61,117,.12) !important;
}
select option { color: #0f172a; background: #fff; }

/* 占位符统一压淡一档，和卡片里的说明文字同色 */
input::placeholder, textarea::placeholder { color: #9aa8b8; }

/* 复选框 / 单选框：主题勾选态是粉色（#ed5f82），统一成主题蓝 */
html .checkbox input,
html .radio input {
  border-color: rgba(15,23,42,.3) !important;
  border-radius: 3px;
}
html .checkbox input:enabled:hover,
html .radio input:enabled:hover { border-color: rgba(15,61,117,.6) !important; }
html .checkbox input:checked,
html .radio input:checked {
  background: var(--zt-blue) !important;
  border-color: var(--zt-blue) !important;
}
html input[type="checkbox"], html input[type="radio"] { accent-color: var(--zt-blue); }

/* 文件选择：浏览器默认样式太跳，这里压成一条浅灰线 */
input[type="file"] { font-size: 13px; color: #64748b; }
input[type="file"]::file-selector-button {
  height: 32px; margin-right: 10px; padding: 0 12px;
  font-size: 13px; font-family: inherit; color: var(--zt-text);
  background: #fff; border: 1px solid rgba(15,23,42,.14);
  border-radius: 8px; cursor: pointer;
}
input[type="file"]::file-selector-button:hover { border-color: rgba(15,61,117,.3); color: var(--zt-blue); }

/* 右侧信息栏：左列标签加粗（参考洛谷） */
.section dl.horizontal dt,
.section dl.large.horizontal dt { font-weight: 600; color: #0f172a; }

/* ==========================================================================
   背景：苹果式的「玻璃」底
   —— 一层非常淡的竖向渐变（顶部接近白，往下过渡到冷灰蓝）+ 两团极淡柔光，
      没有网格、没有色块、没有动画；卡片与导航都是半透明白，靠 backdrop-filter
      把底色透出来，所以看起来是一整块玻璃，而不是「白卡贴在会上」。
   ========================================================================== */
/* 注意：主题的 Mantine 样式在 ztoj.css 之后还会再加载一次（body{background:#fff}），
   同选择器比顺序必输，所以这里必须 !important。 */
body {
  background-color: #eef3fa !important;
  background-image:
    linear-gradient(180deg, #ffffff 0px, #ffffff 48px, rgba(255,255,255,0) 280px),
    radial-gradient(100vmax 62vmax at 46% -16%, #e2eefc 0%, rgba(226,238,252,0) 64%),
    radial-gradient(70vmax 50vmax at 100% 0%, #e8f3f0 0%, rgba(232,243,240,0) 58%) !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed, fixed, fixed !important;
}

/* 旧的柔光 + 网格底图去掉（留空规则，防止其它样式表把伪元素又画出来） */
body::before, body::after { content: none !important; }

/* 页面底板原来是整块 #edf0f2，改成透明，让玻璃底透上来 */
.slideout-panel { background: transparent !important; position: relative; z-index: 1; }

/* 卡片：磨砂玻璃（半透明白 + 模糊 + 内高光），底色从玻璃后面透出来。
   注意排除两类：.section--contest（比赛页「正在进行/即将开始」的重点卡是彩色渐变底 +
   白字，被这里的 !important 白底一盖就全白了）与 .immersive--content（沉浸式卡片）。 */
.section:not(.section--contest):not(.immersive--content) {
  background: rgba(255,255,255,.82) !important;
  -webkit-backdrop-filter: blur(30px) saturate(1.9); backdrop-filter: blur(30px) saturate(1.9);
  border: 1px solid rgba(255,255,255,.95) !important;
  /* 0 0 0 1px 的淡描边让卡片边缘在浅底上「立」起来，这是玻璃卡片的轮廓线 */
  box-shadow: inset 0 1px 0 rgba(255,255,255,1),
              0 0 0 1px rgba(15,23,42,.055),
              0 2px 4px rgba(15,23,42,.04),
              0 18px 44px rgba(15,23,42,.10) !important;
}
/* 卡片里的表头 / 白底小块也跟着半透明，否则会是一片片突兀的实白 */
.section .data-table thead th,
.section table thead th,
.section .data-table th { background: rgba(255,255,255,.42) !important; }

/* 顶栏与手机头部：更透的玻璃，并且去掉那条「分割线」，让导航和内容连成一片 */
/* 主题在固定导航下面还放了一个 .nav--shadow 占位块（height 45），
   它自带 0 0 6px 的黑投影 —— 页面上那条「突兀的分界线」就是它打的。
   占位块要留（否则内容会顶到导航底下），但投影必须去掉。 */
nav.nav--shadow, .nav--shadow {
  box-shadow: none !important;
  border: none !important;
  background: none !important;
}
nav.nav {
  height: 46px;
  background: rgba(255,255,255,.6) !important;
  -webkit-backdrop-filter: blur(30px) saturate(2); backdrop-filter: blur(30px) saturate(2);
  box-shadow: none !important;
}
.header--mobile {
  background: rgba(255,255,255,.55) !important;
  -webkit-backdrop-filter: blur(24px) saturate(1.9); backdrop-filter: blur(24px) saturate(1.9);
  box-shadow: 0 1px 0 rgba(15,23,42,.04) !important;
}

/* 页脚：原来是一条纯白（#fff），和上面的冷灰蓝断层，改成透明 + 同色系文字
   （沉浸式页是深底白字，单独留在下面那条规则里，别被这里压成灰色） */
html:not(.layout--immersive) .footer {
  background: transparent !important;
  border-top: none !important;
  color: #8b98a9 !important;
}
html:not(.layout--immersive) .footer a,
html:not(.layout--immersive) .footer a:visited { color: #8b98a9 !important; }
html:not(.layout--immersive) .footer a:hover { color: #0F3D75 !important; }

/* ==========================================================================
   登录 / 注册等沉浸式页：深色纯色底 + 深色玻璃卡
   这些页的文字是白色的（inverse 主题），浅色玻璃会把字冲掉，必须压深底。
   ========================================================================== */
html.theme--dark.layout--immersive body { background: #0f1c31 !important; }
/* 沉浸式页的顶栏：保持透明，文字转白，不要在深底上盖一条浅灰 */
html.theme--dark.layout--immersive nav.nav {
  background: transparent !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
html.theme--dark.layout--immersive nav.nav .nav__item { color: rgba(255,255,255,.72); }
html.theme--dark.layout--immersive nav.nav .nav__item:hover,
html.theme--dark.layout--immersive nav.nav .nav__item.nav--active { color: #fff !important; }
/* 主题的 immersive 背景是一张照片，换成纯色 */
html.theme--dark.layout--immersive #panel { background: none !important; background-color: #0f1c31 !important; }
html.theme--dark.layout--immersive .immersive--content {
  background: rgba(255,255,255,.06);
  -webkit-backdrop-filter: blur(26px) saturate(1.6); backdrop-filter: blur(26px) saturate(1.6);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  padding: 26px 24px;
  box-shadow: 0 24px 70px rgba(2,8,20,.42);
}
/* 主题把登录框固定成 270px，加了内边距后太挤，放宽一点 */
html.theme--dark.layout--immersive .immersive--center { width: min(360px, 92vw); }
html.theme--dark.layout--immersive .immersive--center h1 { margin: 0 0 20px; font-size: 22px; font-weight: 600; letter-spacing: .5px; }

/* ---------- 沉浸式页的表单：主题是「浮动标签 + 下划线」，这里改成和站内一致的盒子 ----------
   label.material 本身是容器（文字 + input 都在里面），把 label 做成输入框外框。 */
html.theme--dark.layout--immersive label.textbox.material,
html.theme--dark.layout--immersive label.textbox.material.inverse,
html.theme--dark.layout--immersive label.textbox.material.focus,
html.theme--dark.layout--immersive label.textbox.material.inverse.focus {
  display: block;
  margin: 0 0 16px;
  padding: 7px 12px 2px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .2px;
  color: rgba(255,255,255,.6) !important;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 10px;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
html.theme--dark.layout--immersive label.textbox.material:focus-within {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.42);
  box-shadow: 0 0 0 3px rgba(255,255,255,.07);
}
html.theme--dark.layout--immersive label.textbox.material input {
  display: block;
  width: 100%;
  height: 27px !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 15px !important;
  font-family: inherit;
  color: #fff !important;
  background: none !important;
  border: none !important;
  border-radius: 0;
  outline: none !important;
  box-sizing: border-box;
}
/* 沉浸式页里没有 label 包裹的裸输入框，同样给深色底 */
html.theme--dark.layout--immersive input.textbox:not(.button),
html.theme--dark.layout--immersive input[type="text"]:not(.button):not(.checkbox),
html.theme--dark.layout--immersive input[type="password"],
html.theme--dark.layout--immersive textarea.textbox {
  color: #fff;
  background-color: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.16);
}
html.theme--dark.layout--immersive input.textbox:focus,
html.theme--dark.layout--immersive input[type="password"]:focus {
  border-color: rgba(255,255,255,.45) !important;
  outline-color: rgba(255,255,255,.08) !important;
}

/* ==========================================================================
   亮色主题下的沉浸式页（登录 / 注册 / 找回密码）：跟全站同一套浅色语言
   上面的深色玻璃样式全部限定在 .theme--dark，这里补齐浅色版本。
   ========================================================================== */
html.theme--light.layout--immersive body {
  background: #eef3fa !important;
  background-image: linear-gradient(180deg, #ffffff 0, #ffffff 48px, rgba(255,255,255,0) 100%) !important;
}
html.theme--light.layout--immersive nav.nav {
  background: rgba(255,255,255,.92) !important;
  box-shadow: 0 1px 0 rgba(15,23,42,.06) !important;
}
html.theme--light.layout--immersive #panel { background: none !important; background-color: transparent !important; }
html.theme--light.layout--immersive .immersive--content {
  background: rgba(255,255,255,.9);
  -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 18px;
  padding: 26px 24px;
  box-shadow: 0 18px 50px rgba(15,61,117,.10), 0 1px 2px rgba(15,23,42,.04);
}
html.theme--light.layout--immersive .immersive--center { width: min(360px, 92vw); }
html.theme--light.layout--immersive .immersive--center h1 {
  margin: 0 0 20px; font-size: 22px; font-weight: 600; letter-spacing: .5px; color: var(--zt-ink);
}
html.theme--light.layout--immersive label.textbox.material,
html.theme--light.layout--immersive label.textbox.material.inverse,
html.theme--light.layout--immersive label.textbox.material.focus,
html.theme--light.layout--immersive label.textbox.material.inverse.focus {
  display: block;
  margin: 0 0 16px;
  padding: 7px 12px 2px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .2px;
  color: var(--zt-muted) !important;
  background: #fff;
  border: 1px solid rgba(15,23,42,.14);
  border-radius: 10px;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
html.theme--light.layout--immersive label.textbox.material:focus-within {
  border-color: var(--zt-blue);
  box-shadow: 0 0 0 3px rgba(15,61,117,.10);
}
html.theme--light.layout--immersive label.textbox.material input {
  display: block;
  width: 100%;
  height: 27px !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 15px !important;
  font-family: inherit;
  color: var(--zt-ink) !important;
  background: none !important;
  border: none !important;
  outline: none !important;
}
html.theme--light.layout--immersive input.textbox:not(.button),
html.theme--light.layout--immersive input[type="text"]:not(.button):not(.checkbox),
html.theme--light.layout--immersive input[type="password"],
html.theme--light.layout--immersive textarea.textbox {
  color: var(--zt-ink);
  background-color: #fff;
  border-color: rgba(15,23,42,.14);
}
html.theme--light.layout--immersive input.textbox:focus,
html.theme--light.layout--immersive input[type="password"]:focus {
  border-color: var(--zt-blue) !important;
  outline-color: rgba(15,61,117,.10) !important;
}
html.theme--light.layout--immersive input[type="submit"],
html.theme--light.layout--immersive button[type="submit"],
html.theme--light.layout--immersive .button.primary {
  background: var(--zt-blue) !important;
  border: 1px solid var(--zt-blue) !important;
  color: #fff !important;
  border-radius: 10px !important;
  font-weight: 500 !important;
}
html.theme--light.layout--immersive input[type="submit"]:hover,
html.theme--light.layout--immersive .button.primary:hover {
  background: var(--zt-blue-hi) !important;
  border-color: var(--zt-blue-hi) !important;
}
html.theme--light.layout--immersive .immersive--content a,
html.theme--light.layout--immersive .immersive--footer a { color: var(--zt-blue) !important; }
html.theme--light.layout--immersive .immersive--content .help-text,
html.theme--light.layout--immersive .immersive--content p { color: var(--zt-text); }
/* 「记住我」：模板给它写死了内联 style="color:#fff"，浅底上要压回正文色 */
html.theme--light.layout--immersive label.material.checkbox,
html.theme--light.layout--immersive label.material.checkbox.inverse { color: var(--zt-text) !important; }
/* 沉浸式页的页脚：浅色主题下别再留白字 */
html.theme--light.layout--immersive .footer,
html.theme--light.layout--immersive .footer a,
html.theme--light.layout--immersive .footer a:visited { color: #8b98a9 !important; }
html.theme--light.layout--immersive .footer a:hover { color: var(--zt-blue) !important; }


/* 分页：当前页/悬停不再用粉色，统一主题蓝 */
html .pager__item.current { color: #0F3D75 !important; border-color: #0F3D75 !important; }
html .pager__item.link:hover { color: #0F3D75 !important; border-color: #0F3D75 !important; }

/* 主题里剩下的粉色强调（未读高亮条、消息选中、标签页下划线、分类标签）也归到主题蓝，
   避免同一页面里蓝、粉两套强调色打架 */
html .section__list__item.highlight { border-left-color: #0F3D75 !important; }
html .messagepad__list-item.active { border-color: #0F3D75 !important; background: rgba(15,61,117,.06) !important; }
html .section__tab-container:not(.immersive) .section__tab-header-item.selected,
html .section__tab-container:not(.immersive) .section__tab-header-item.tab--active { border-color: #0F3D75 !important; }
html .section__tab-container.immersive .section__tab-header-item.selected:after { background: #0F3D75 !important; }
html .widget--category-filter__tag.selected { background: #0F3D75 !important; }

/* ==========================================================================
   「我的文件」（mydrive 插件）：字体 / 字号 / 颜色跟站内正文同一套
   插件把样式表插在 ztoj.css 之后（<style id="md-style">），同优先级一定是它赢，
   所以这里每条都带 html body / #md-root 前缀，靠优先级压过去。
   只改外观，不动插件的任何行为与权限。
   ========================================================================== */
html body #md-root { font-family: inherit; color: var(--zt-text); }

html body #md-root #md-crumb { font-size: 13.5px; color: var(--zt-muted); }
html body #md-root #md-crumb a,
html body #md-root #md-crumb a:visited { color: var(--zt-blue); text-decoration: none; }
html body #md-root #md-crumb a:hover { color: var(--zt-blue-hi); }
html body #md-root #md-crumb .sep { color: #cbd5e1; }
html body #md-root #md-crumb .cur { font-size: 14px; font-weight: 600; color: var(--zt-ink); }

html body #md-root #md-head {
  padding: 8px 6px;
  font-size: 12.5px; font-weight: 500; color: var(--zt-muted);
  background: rgba(248,250,252,.72);
  border-bottom: 1px solid rgba(15,23,42,.08);
}

/* 行：行高按站内列表来，名字是正文级字号、常规字重，不再用合成粗体 */
html body #md-root .md-row {
  padding: 9px 6px;
  font-size: 13.5px;
  color: var(--zt-text);
  border-bottom: 1px solid rgba(15,23,42,.06);
  transition: background .14s ease;
}
html body #md-root .md-row:hover { background: rgba(15,61,117,.045); }
html body #md-root .md-row.sel { background: rgba(15,61,117,.08); }

html body #md-root .md-ico { color: #94a3b8; }
/* 名字用站内列表的规格：13.5px、常规字重（原来是 13px + 合成粗体，看着比站内重一档） */
html body #md-root .md-nm { font-family: inherit; font-size: 13.5px; font-weight: 400; color: #334155; }
html body #md-root .md-nm a,
html body #md-root .md-nm a:visited { font-family: inherit; font-size: 13.5px; font-weight: 400; color: #334155 !important; }
html body #md-root .md-row.folder .md-nm { font-weight: 400; color: var(--zt-ink); }
html body #md-root .md-row.folder .md-nm:hover { color: var(--zt-blue); }
html body #md-root .md-row.folder .md-nm:hover a { color: var(--zt-blue) !important; }
html body #md-root .md-sz { font-size: 12.5px; color: var(--zt-muted); }
html body #md-root .md-tm { font-size: 12.5px; color: var(--zt-faint); }
html body #md-root .md-path { font-size: 12px; color: var(--zt-faint); }

html body #md-root .md-ops a { font-size: 12.5px; color: var(--zt-muted); border-radius: 6px; }
html body #md-root .md-ops a:hover { background: rgba(15,61,117,.08); color: var(--zt-blue); }
html body #md-root .md-ops a.del:hover { background: #fee2e2; color: #b91c1c; }

/* 工具条：按钮与输入框和站内其它表单控件一致 */
html body #md-root .md-btn {
  height: 34px; padding: 0 14px;
  font-family: inherit; font-size: 13.5px; font-weight: 500;
  color: var(--zt-text);
  background: #fff;
  border: 1px solid rgba(15,23,42,.14);
  border-radius: 9px;
  transition: border-color .16s ease, color .16s ease, background .16s ease;
}
html body #md-root .md-btn:hover { border-color: rgba(15,61,117,.3); color: var(--zt-blue); background: #fff; }
html body #md-root .md-btn.pri { color: #fff; background: var(--zt-blue); border-color: var(--zt-blue); }
html body #md-root .md-btn.pri:hover { color: #fff; background: var(--zt-blue-hi); border-color: var(--zt-blue-hi); }

html body #md-search, html body #md-target,
html body #md-move-target, html body #md-pwd-input {
  height: 34px;
  padding: 0 11px;
  font-family: inherit; font-size: 13.5px;
  color: var(--zt-ink);
  background: #fff;
  border: 1px solid rgba(15,23,42,.14);
  border-radius: 9px;
  outline: 2px solid transparent;
  box-sizing: border-box;
}
html body #md-search:focus, html body #md-target:focus,
html body #md-move-target:focus, html body #md-pwd-input:focus {
  border-color: var(--zt-blue);
  outline: 2px solid rgba(15,61,117,.12);
}
html body #md-tip, html body #md-msg { font-size: 12px; color: var(--zt-faint); }

@media (max-width: 768px) {
  html body #md-root .md-row { font-size: 14px; padding: 11px 6px; gap: 6px; }
  html body #md-root .md-nm,
  html body #md-root .md-nm a { font-size: 14px; }
  html body #md-root .md-btn { height: 36px; font-size: 14px; }
  /* 手机上列宽放不下：面包屑独占一行，隐藏创建时间，操作列按内容收窄 */
  html body #md-root #md-bar { gap: 8px; padding: 6px 0 4px; }
  html body #md-root #md-crumb { flex: 1 0 100%; font-size: 13px; }
  html body #md-search { flex: 1 1 120px; width: auto; min-width: 0; }
  html body #md-target { flex: 1 1 120px; max-width: none; }
  html body #md-root #md-head { padding: 7px 6px; }
  html body #md-root #md-head .md-h-tm,
  html body #md-root .md-tm { display: none; }
  html body #md-root #md-head .md-h-ops { width: auto; flex: 0 0 auto; }
  html body #md-root .md-sz { width: 64px; flex: 0 0 64px; font-size: 12px; }
  html body #md-root .md-ops { flex: 0 0 auto; min-width: 0; gap: 2px; opacity: 1; }
  html body #md-root .md-ops a { font-size: 12px; padding: 3px 5px; }
}

/* ==========================================================================
   比赛列表：置顶的「正在进行 / 即将开始」卡片超过 3 张时折叠
   折叠加的是 frontend/contest_main.page.ts，这里只管样式。
   ========================================================================== */
.zt-contest-more { display: none; }
.zt-contest-more.is-open { display: block; }

.zt-contest-toggle {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 42px; margin: 2px 0 14px;
  font-family: inherit; font-size: 13.5px; color: var(--zt-muted);
  background: rgba(255,255,255,.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.7); backdrop-filter: blur(20px) saturate(1.7);
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 14px;
  cursor: pointer;
  transition: background .14s ease, color .14s ease;
}
.zt-contest-toggle:hover { background: rgba(255,255,255,.88); color: var(--zt-text); }
.zt-contest-toggle b { font-weight: 600; color: var(--zt-blue); }

/* 比赛重点卡片：主题原本给的是粉（#e98696）+ 浅蓝（#469dcf）+ 黄按钮，
   和全站的「一种蓝」不搭。这里换成同一套语义色：
   正在进行=偏正的红（警示），即将开始=主题蓝；按钮改白底彩字。 */
html.page--contest_main .section--contest.live {
  background: #cf4a3e !important;
  background-image: linear-gradient(135deg, #e05a4c 0%, #c8402f 100%) !important;
}
html.page--contest_main .section--contest.ready {
  background: #155a9e !important;
  background-image: linear-gradient(135deg, #1c66ab 0%, #0f3d75 100%) !important;
}
html.page--contest_main .section--contest {
  border: none !important;
  box-shadow: 0 10px 30px rgba(15,23,42,.12) !important;
  overflow: hidden;
}
html.page--contest_main .section--contest .status_title {
  font-size: 12px; font-weight: 600; letter-spacing: .2px;
  color: #fff; background: rgba(0,0,0,.22);
  padding: 5px 10px; border-radius: 6px;
}
html.page--contest_main .section--contest h1 { color: #fff; font-weight: 700; letter-spacing: .3px; }
html.page--contest_main .section--contest .info { color: rgba(255,255,255,.88); }
html.page--contest_main .section--contest .info .icon { color: rgba(255,255,255,.72); }
html.page--contest_main .section--contest .typo { color: rgba(255,255,255,.88); }
html.page--contest_main .section--contest .detail-button {
  background: #fff; color: #0F3D75; font-weight: 600; border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
html.page--contest_main .section--contest .detail-button:hover {
  background: #fff; color: #155a9e; box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
html.page--contest_main .section--contest .detail-button:after { display: none; }

/* 页面高度不同 → 竖向滚动条时有时无 → 从题库（长）点到比赛（短）时，
   内容整体往右跳 8px。给 html 常驻一条滚动条槽位，宽度就稳定了。
   老浏览器不支持 scrollbar-gutter 时退回「常驻滚动条」。 */
html { overflow-y: scroll !important; }

/* 首帧防闪：主导航项在 nav.js 分好组之前先不显示。
   服务端会把「训练 / 作业 / 排名 / 讨论 / 反馈 …」全渲染出来，脚本再把它们收进「更多」；
   这段时间一旦已经绘制，用户就会看见一堆马上消失的项（实测 60~70ms 那一帧）。
   用 visibility 是为了保留占位、导航条宽度不跳；nav.js 分组完立刻把这个类撤掉。
   万一脚本没加载，0.6s 后动画兜底强制显示，绝不会一直空着。 */
html.zt-nav-pending .nav__list--main a.nav__item {
  visibility: hidden;
  animation: ztNavReveal 0s linear .6s forwards;
}
@keyframes ztNavReveal { to { visibility: visible; } }

/* 导航「更多」：脚本 ztojui/nav.js 搬进来的项就挂在这里。
   故意不用 .nav__list-item —— Hydro 每 3 秒的自动溢出逻辑只认那个类，
   用别的类它就不会把我们的按钮也搬走。 */
.zt-nav-more { float: left; position: relative; }
.zt-nav-more > .nav__item { display: inline-block; }
/* 面板自己渲染，不再交给 Hydro 的 dropdown（它会把面板搬走，和我们改 DOM 打架）。
   左边缘对齐「更多」两个字（按钮有 13px 内边距）。 */
.zt-nav-more .zt-menu-panel {
  display: none; position: absolute; left: 13px; top: 100%; z-index: 80;
  min-width: 148px; padding: 6px; text-align: left;
  border-radius: 12px; background: rgba(255,255,255,.98);
  border: 1px solid rgba(15,23,42,.08);
  box-shadow: 0 16px 36px rgba(15,23,42,.16);
}
.zt-nav-more:hover .zt-menu-panel,
.zt-nav-more:focus-within .zt-menu-panel,
.zt-nav-more.open .zt-menu-panel { display: block; }
/* 鼠标滑过就展开；.open 只给触屏（没有 hover）兜底 */
.zt-nav-more .zt-nav-more__trigger .icon { transition: transform .16s ease; }
.zt-nav-more:hover .zt-nav-more__trigger .icon { transform: rotate(180deg); }
.zt-nav-more .zt-menu-panel ul { margin: 0; padding: 0; list-style: none; }
.zt-nav-more .zt-menu-panel li { list-style: none; margin: 0; }
.zt-nav-more .zt-menu-panel a {
  display: block; padding: 7px 12px; border-radius: 8px; line-height: 1.7;
  font-size: 14px; color: #334155; text-decoration: none; white-space: nowrap;
}
.zt-nav-more .zt-menu-panel a:hover { background: rgba(15,61,117,.08); color: #0F3D75; }
.zt-nav-more .zt-menu-panel a.nav--active { color: #0F3D75; font-weight: 600; background: rgba(15,61,117,.06); }

/* 数据表：主题给表格本身一层近实白底（.95），把卡片玻璃全盖住了；
   去掉它，让玻璃透上来，斑马纹也才有意义。
   斑马纹原来是中性灰 #f4f4f4，压在蓝底上像一层脏灰 → 换成同一色系的淡蓝，
   奇偶照样可辨，但整张表是「一片蓝调」而不是「白纸贴灰条」。 */
html .data-table { background: transparent !important; }
html .data-table tr:nth-child(2n) { background: rgba(15,61,117,.032) !important; }
html .data-table thead tr { background: transparent !important; }

/* 正文/题面：原来的灰（#555）压在浅底上久看发累，
   统一压到近黑的墨色；行高也放宽一点，长题面更好读。 */
.problem-content,
.problem-content p,
.problem-content li,
.problem-content td,
.problem-content blockquote { color: #1f2937; }
.problem-content p,
.problem-content li { line-height: 1.9; }
.problem-content h1, .problem-content h2, .problem-content h3,
.problem-content h4, .problem-content h5, .problem-content h6 { color: #0f172a; }
html:not(.layout--immersive) .section:not(.section--contest) .typo { color: #1f2937; }
html:not(.layout--immersive) .section:not(.section--contest) .typo h1,
html:not(.layout--immersive) .section:not(.section--contest) .typo h2,
html:not(.layout--immersive) .section:not(.section--contest) .typo h3 { color: #0f172a; }

/* 导航字号放大后，窄屏容易挤成两行 —— 一行放不下时 Hydro 会把末尾几项
   搬进它自己的「更多」，页面上就会出现两个「更多」。这里按宽度收一档字号，
   保证 1024 宽也能一行放下。 */
@media (max-width: 1240px) {
  nav.nav .nav__item { font-size: 14.5px; padding: 0 10px; letter-spacing: .15px; }
  nav.nav .nav__logo { height: 26px; }
}
/* 1024 左右的窄屏：主栏 8 项 + 右侧域/用户，18px 会顶到换行，
   一换行 Hydro 就再塞一个「更多」，所以再收一档。 */
@media (max-width: 1120px) {
  nav.nav .nav__item { font-size: 14px; padding: 0 9px; letter-spacing: .1px; }
  nav.nav .nav__list--secondary .nav__item { font-size: 14px; padding: 0 7px; }
}
@media (max-width: 1000px) {
  nav.nav .nav__item { font-size: 13.5px; padding: 0 8px; letter-spacing: 0; }
}

/* ==========================================================================
   列表 hover：整行刷一层极淡的主题蓝
   （不是左侧色条——色条是「我的讲义」那一列的样式，这里不采用）
   ========================================================================== */
html .data-table tbody tr { transition: background-color .12s ease; }
/* 悬停要比斑马纹明显深一档，否则「滑过去」和「本来就是条纹行」分不出来 */
html .data-table tbody tr:hover { background: rgba(15,61,117,.115) !important; }

/* 列表里的题名：一律不要下划线。
   主题的 a:hover / a:focus 会给下划线，看着像「已通过」的标记，和状态列混淆；
   行本身已经有整行底色反馈，不需要再靠下划线提示可点。 */
html .data-table .col--problem-name a,
html .data-table .col--problem-name a:link,
html .data-table .col--problem-name a:visited,
html .data-table .col--problem-name a:hover,
html .data-table .col--problem-name a:focus,
html .data-table .col--problem-name a:active,
html .data-table tbody tr:hover .col--problem-name a,
html .data-table tbody tr:hover .col--problem-name a:hover {
  text-decoration: none !important;
  border-bottom: 0 !important;
}

html .section__list__item { transition: background-color .12s ease; }
html .section__list__item:hover { background: rgba(15,61,117,.045); }

html .hd-book, html .hd-tree .hd-row { transition: background-color .12s ease; }
html .hd-book:hover, html .hd-tree .hd-row:hover { background: rgba(15,61,117,.06); }

/* ==========================================================================
   比赛置顶：状态页签 + 卡片（由 frontend/contest_main.page.ts 渲染）
   ========================================================================== */
.zt-contests { margin: 0 0 14px; }
.zt-ctabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.zt-ctab {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 15px;
  font-family: inherit; font-size: 13.5px; font-weight: 500;
  color: #475569; background: rgba(255,255,255,.62);
  border: 1px solid rgba(15,61,117,.10); border-radius: 999px;
  cursor: pointer; transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.zt-ctab b { font-weight: 600; color: #94a3b8; font-variant-numeric: tabular-nums; }
.zt-ctab:hover { color: #0F3D75; border-color: rgba(15,61,117,.24); background: #fff; }
.zt-ctab.on { color: #fff; background: #0F3D75; border-color: #0F3D75; }
.zt-ctab.on b { color: rgba(255,255,255,.72); }

.zt-cgrid > * + * { margin-top: 12px; }
.zt-ccard {
  display: flex; align-items: center; gap: 18px;
  padding: 14px 18px 15px; border-radius: 14px; color: #fff;
  box-shadow: 0 12px 32px rgba(15,23,42,.14);
  background-image: linear-gradient(135deg, #1c66ab 0%, #0f3d75 100%);
}
/* 左侧文字区：内容多时自己换行，不挤压右侧按钮 */
.zt-ccard__main { flex: 1 1 auto; min-width: 0; }
.zt-ccard.is-live   { background-image: linear-gradient(135deg, #e05a4c 0%, #c8402f 100%); }
.zt-ccard.is-ready  { background-image: linear-gradient(135deg, #1c66ab 0%, #0f3d75 100%); }
.zt-ccard.is-done {
  color: #334155; background: rgba(255,255,255,.72);
  border: 1px solid rgba(15,23,42,.08); box-shadow: 0 6px 20px rgba(15,23,42,.06);
}
.zt-ccard__hd { display: flex; align-items: center; gap: 12px; margin-bottom: 9px; }
.zt-ccard__badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px;
  font-size: 12px; font-weight: 600; letter-spacing: .2px;
  color: #fff; background: rgba(0,0,0,.22); border-radius: 6px;
}
.zt-ccard.is-done .zt-ccard__badge { color: #475569; background: #eef2f7; }
.zt-ccard__go {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; height: 42px; padding: 0 22px;
  font-size: 20px; font-weight: 600; text-decoration: none;
  color: #0F3D75; background: #fff; border-radius: 9px;
  box-shadow: 0 2px 8px rgba(0,0,0,.10);
  transition: transform .1s ease, box-shadow .14s ease;
}
.zt-ccard__go:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.16); }
.zt-ccard.is-done .zt-ccard__go { border: 1px solid rgba(15,61,117,.18); box-shadow: none; }
.zt-ccard__title {
  display: block; margin-bottom: 8px;
  font-size: 17px; font-weight: 700; letter-spacing: .2px;
  color: #fff; text-decoration: none;
}
.zt-ccard__title:hover { color: #fff; text-decoration: underline; }
/* 点过的比赛会被浏览器按 a:visited 上色（全局链接色），在红底上就是一团黑，必须显式盖掉 */
.zt-ccard__title:visited { color: #fff; }
.zt-ccard.is-done .zt-ccard__title { color: #0f172a; }
.zt-ccard.is-done .zt-ccard__title:visited { color: #0f172a; }
.zt-ccard.is-done .zt-ccard__title:hover { color: #0F3D75; }
.zt-ccard__meta {
  display: flex; flex-wrap: wrap; gap: 6px 16px;
  font-size: 12.5px; color: rgba(255,255,255,.84);
}
.zt-ccard__meta .ok { color: #fff; font-weight: 600; }
.zt-ccard.is-done .zt-ccard__meta { color: #64748b; }
.zt-ccard.is-done .zt-ccard__meta .ok { color: #15803d; }
.zt-cempty {
  padding: 18px; text-align: center;
  font-size: 13px; color: #94a3b8;
  background: rgba(255,255,255,.55); border-radius: 12px;
}
@media (max-width: 768px) {
  .zt-ccard__title { font-size: 15.5px; }
  .zt-ccard { gap: 12px; }
  .zt-ccard__go { height: 34px; padding: 0 14px; font-size: 14px; }
  .zt-ccard__meta { font-size: 12px; gap: 4px 12px; }
  .zt-ctab { height: 30px; padding: 0 12px; font-size: 13px; }
}

/* ==========================================================================
   布局：右侧没有内容的页面，主内容吃掉空位并居中
   （标记由 ztojui/layout.js 打上：只有主列、或者其余列都没可见内容时加 .zt-solo）
   ========================================================================== */
@media (min-width: 769px) {
  .row.zt-solo > .columns {
    float: none !important;
    margin-left: auto !important;
    margin-right: auto !important;
    /* 兜底：任何栅格最多 1120，别在宽屏上拉成一条 */
    max-width: 1120px;
  }
  /* 按原来占的栅格给一个上限，别让表格在宽屏上拉成一条 */
  .row.zt-solo > .medium-9.columns { width: 100% !important; max-width: 1120px; }
  .row.zt-solo > .medium-8.columns { width: 100% !important; max-width: 1040px; }
  .row.zt-solo > .medium-7.columns { width: 100% !important; max-width: 940px; }
  .row.zt-solo > .medium-6.columns { width: 100% !important; max-width: 820px; }
  .row.zt-solo > .medium-5.columns { width: 100% !important; max-width: 720px; }
}

/* 比赛页：页签行最右的「创建一个比赛」（原来是右侧一张卡，见 layout.js） */
.zt-cnew {
  margin-left: auto;
  display: inline-flex; align-items: center;
  height: 32px; padding: 0 16px;
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  color: #fff !important; background: #0F3D75;
  border: 1px solid #0F3D75; border-radius: 999px;
  text-decoration: none; white-space: nowrap;
  transition: background .14s ease, box-shadow .14s ease;
}
.zt-cnew:hover { background: #16508f; box-shadow: 0 6px 18px rgba(15,61,117,.22); }
@media (max-width: 768px) {
  /* 换行后仍然靠这一行的右端（margin-left:auto 在换行后依旧有效） */
  .zt-cnew { height: 30px; padding: 0 13px; font-size: 13px; }
}

/* ==========================================================================
   总结页条目：隔行淡蓝底 + 悬停更深（和题库/排名同一套配色）
   置顶（.is-pinned）自带语义底色，不参与斑马纹。
   插件把样式内联在模板 <style> 里，所以这里要 !important 压过去。
   ========================================================================== */
/* 由 layout.js 按「第 2、4、6…条」打上 .zt-alt。
   不用 nth-child(even)：容器里前面还有标题/说明节点，序号会整体偏一位，
   结果变成第 1、3 条变色。 */
html .sm-card.zt-alt:not(.is-pinned) { background: rgba(15,61,117,.045) !important; }
html .sm-card:not(.is-pinned):hover { background: rgba(15,61,117,.095) !important; border-color: #c7d6e8 !important; }
html .sm-card.is-star:not(.is-pinned) { background-image: none !important; }
html .sm-card.is-star:not(.is-pinned).zt-alt { background: rgba(15,61,117,.045) !important; }

/* 文件预览/密码弹窗被移到 body 之后，按钮样式要跟着补一份 */
html body #md-pv-mask .md-btn, html body #md-pwd-mask .md-btn {
  height: 32px; padding: 0 13px;
  font-family: inherit; font-size: 13px; font-weight: 500;
  color: var(--zt-text); background: #fff;
  border: 1px solid rgba(15,23,42,.14); border-radius: 9px;
  transition: border-color .16s ease, color .16s ease, background .16s ease;
}
html body #md-pv-mask .md-btn:hover, html body #md-pwd-mask .md-btn:hover {
  border-color: rgba(15,61,117,.3); color: var(--zt-blue); background: #fff;
}
html body #md-pv-mask .md-btn.pri, html body #md-pwd-mask .md-btn.pri {
  color: #fff; background: var(--zt-blue); border-color: var(--zt-blue);
}
html body #md-pv-mask .md-btn.pri:hover, html body #md-pwd-mask .md-btn.pri:hover {
  color: #fff; background: var(--zt-blue-hi); border-color: var(--zt-blue-hi);
}

/* 「所有比赛」列表行右侧的「复制该比赛」（脚本见 frontend/contest_main.page.ts） */
.contest__item .media { display: flex; align-items: center; gap: 12px; }
.contest__item .media__body { flex: 1 1 auto; min-width: 0; }
.zt-ccopy {
  flex: 0 0 auto; margin-left: auto;
  display: inline-flex; align-items: center; height: 32px; padding: 0 14px;
  font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap;
  color: #0F3D75 !important; background: rgba(255,255,255,.9);
  border: 1px solid rgba(15,61,117,.22); border-radius: 8px;
  transition: background .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.zt-ccopy:hover {
  background: #0F3D75; color: #fff !important; border-color: #0F3D75;
  box-shadow: 0 6px 16px rgba(15,61,117,.18);
}
@media (max-width: 768px) {
  .contest__item .media { flex-wrap: wrap; }
  /* 放不下就换到下一行，但仍靠右（不要掉到左边和日期块挤在一起） */
  .zt-ccopy { height: 30px; font-size: 12.5px; padding: 0 12px; }
}

/* ==========================================================================
   难度徽章：由 difficulty.js 把「难度: 10」这种数字换成文字标签
   颜色照洛谷：入门红 / 普及橙黄 / 提高绿蓝 / 省选紫 / NOI 深蓝
   ========================================================================== */
.zt-diff {
  display: inline-block;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 11.5px;
  line-height: 1.75;
  font-weight: 500;
  white-space: nowrap;
  vertical-align: middle;
}
.zt-diff--none { color: #94a3b8; background: rgba(148,163,184,.1); border-color: rgba(148,163,184,.2); }
html.theme--dark .zt-diff { filter: brightness(1.45) saturate(1.05); }

/* ---------- 题库表格：难度列放宽（徽章要放得下），AC 列收窄（那根竖线跟着左移） ---------- */
.data-table col.col--ac-tried { width: 5.75rem !important; }
.data-table col.col--difficulty { width: 7.25rem !important; }
.data-table td.col--difficulty,
.data-table th.col--difficulty,
.data-table th.col--ac-tried { white-space: nowrap; }
/* 还没被 difficulty.js 换成徽章的单元格先藏起来，避免「数字闪一下再变汉字」 */
.data-table td.col--difficulty:not([data-ztd]) { visibility: hidden; }

/* 题目页信息栏里的「难度」徽章：
   主题给 .problem__tag-item>* 加了 margin-right:8px，会把徽章顶出容器；
   而清成 0 之后「难度」两个字又和徽章贴在一起。改成「左边留距 + 容器右边留白 + 徽章自身加高」 */
.problem__tag-item:has(.zt-diff) {
  padding: 3px 13px 3px 10px !important;
  min-height: 32px !important;
  max-width: none !important;
}
.problem__tag-item > .zt-diff {
  margin: 0 0 0 6px !important;
  padding: 2px 9px !important;
  line-height: 17px !important;
  flex: none;
}

/* ---------- 正文列表：缩进加大、序号与文字留白、长条目换行后和正文对齐 ---------- */
.typo ol, .typo ul { padding-left: 2.4em; margin: .55em 0; }
.typo li { margin: .32em 0; line-height: 1.85; }
.typo li::marker { color: #64748b; font-weight: 500; }
.typo ol > li > p, .typo ul > li > p { margin: .2em 0; }

/* ---------- 题库「默认排序」下拉：原宽度 120px + 右侧 34px 内边距，中文刚好被截 ---------- */
select.search-sort {
  min-width: 138px !important;
  width: auto !important;
  padding-right: 30px !important;
  font-size: 14px !important;
}

/* ----------------------------- 评测设置(Beta) ----------------------------- */
/* monaco 容器（div.textbox）默认 height:auto：初始化那一刻量到多少就定死多少，
   结果编辑器只有 228px 高、下面一大片空白。给整列高度，初始化时就能量对。 */
#ProblemConfig .textbox { height: 100%; }
/* 编辑器自己只在初始化时量一次高度（那时 Allotment 还没排完，量到 228px 就定死），
   之后不会重排。这里把可见高度撑满，内容照常滚动；不撑的话下面一大片空白。 */
#ProblemConfig .monaco-editor,
#ProblemConfig .monaco-editor .overflow-guard,
#ProblemConfig .monaco-editor .monaco-scrollable-element { height: 100% !important; }
#ProblemConfig .monaco-editor { border-radius: 8px; }
/* 右侧表单在窄屏时标签行会挤爆，允许换行 */
#ProblemConfig .problem-config-form { flex-wrap: wrap; row-gap: 8px; }

/* ---------- 题库页侧栏：分类标题 / 弹层遮挡 ---------- */

/* 分类卡片挪到「创建题目」上面之后，编辑模式一开标题就被 .edit-mode-hide 藏掉，
   只剩一列分类名，认不出这是哪一块。侧栏卡片的标题始终显示。 */
.edit-mode .section.side > .section__header.edit-mode-hide { display: block !important; }

/* 弹层：不管父级高度算成什么，卡片都相对视口居中。
   theme 里 .dialog 是 position:fixed + height:100% + flex 居中，
   但页面上的玻璃卡片（backdrop-filter）会改变层叠与合成结果，
   弹窗经常缩在页面顶部、被侧栏卡片压住。这里直接钉住：
   遮罩铺满视口，卡片用 50% + translate 居中，纯 CSS，不依赖 JS。 */
.dialog {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  z-index: 9999 !important;
}
.dialog__content {
  position: fixed !important;
  left: 50% !important;
  top: 50% !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
  max-height: 88vh;
  z-index: 10000 !important;
}


/* ==========================================================================
   课程（ztojcourse）—— 统一的玻璃卡 + 主题蓝，亮/暗两套
   页面：课程首页（书封） / 模块 / 板块 / 课时 / 后台
   ========================================================================== */

/* ---------- 首页：桌面书封 ---------- */
.ztb-wrap { max-width: 1080px; margin: 0 auto; }
.ztb-head { display: flex; align-items: center; gap: 10px; margin: 0 2px 18px; }
.ztb-head h1 { font-size: 24px; font-weight: 650; letter-spacing: -.2px; margin: 0 0 5px; color: #0f172a; }
.ztb-head .meta { font-size: 13px; color: #94a3b8; margin: 0; }
.ztb-head .sp { flex: 1; }
.ztb-search { display: flex; gap: 8px; }
.ztb-search input {
  width: 220px; height: 36px; padding: 0 13px; font-size: 13.5px; color: #1f2937;
  background: rgba(255,255,255,.72); border: 1px solid rgba(15,23,42,.1); border-radius: 10px;
  outline: none; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: border-color .16s, box-shadow .16s;
}
.ztb-search input:focus { border-color: rgba(15,61,117,.4); box-shadow: 0 0 0 3px rgba(15,61,117,.08); }
.ztb-search button {
  height: 36px; padding: 0 16px; font-size: 13px; font-weight: 500; color: #fff;
  background: #0F3D75; border: 1px solid #0F3D75; border-radius: 10px; cursor: pointer;
  transition: background .16s;
}
.ztb-search button:hover { background: #155a9e; border-color: #155a9e; }
.ztb-manage {
  display: inline-flex; align-items: center; height: 36px; padding: 0 15px; font-size: 13px;
  color: #0F3D75; background: rgba(255,255,255,.72); border: 1px solid rgba(15,61,117,.18);
  border-radius: 10px; text-decoration: none; white-space: nowrap;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: background .16s, border-color .16s;
}
.ztb-manage:hover { background: #fff; border-color: rgba(15,61,117,.35); }

.ztb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 30px 24px; }
.ztb-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .18s ease; }
.ztb-card:hover { transform: translateY(-4px); }

/* 封面：液态玻璃（Liquid Glass）——多层高光 + 折射边 + 透光渐变
   有自定义封面图时由内联 background-image 覆盖，仍保留外阴影与描边 */
.ztb-cover {
  position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden;
  background:
    radial-gradient(120% 72% at 22% -4%, rgba(255,255,255,.95) 0%, rgba(255,255,255,.28) 34%, rgba(255,255,255,0) 62%),
    radial-gradient(90% 60% at 90% 108%, rgba(255,255,255,.5) 0%, rgba(255,255,255,0) 58%),
    linear-gradient(158deg, rgba(198,220,244,.80) 0%, rgba(232,241,251,.60) 36%, rgba(178,205,236,.76) 100%);
  background-size: cover; background-position: center;
  -webkit-backdrop-filter: blur(14px) saturate(185%) brightness(1.04);
  backdrop-filter: blur(14px) saturate(185%) brightness(1.04);
  border: 1px solid rgba(255,255,255,.78);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,1),
    inset 2px 0 3px rgba(255,255,255,.65),
    inset -2px 0 5px rgba(150,190,236,.38),
    inset 0 -3px 7px rgba(140,182,232,.30),
    0 1px 2px rgba(15,23,42,.05),
    0 12px 32px rgba(31,58,95,.13);
  display: flex; align-items: center; justify-content: center;
  transition: box-shadow .2s ease, transform .2s ease;
}
/* 顶部镜面高光 + 书脊反光：液态玻璃的「上缘发亮」 */
.ztb-cover::before {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.72) 0%, rgba(255,255,255,.16) 16%, rgba(255,255,255,0) 36%),
    linear-gradient(90deg, rgba(255,255,255,.62) 0, rgba(255,255,255,.10) 3.5%, rgba(255,255,255,0) 9%);
}
/* 底部折射：光线在玻璃下缘的聚拢感 */
.ztb-cover::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(0deg, rgba(255,255,255,.5) 0%, rgba(255,255,255,.12) 10%, rgba(255,255,255,0) 22%),
    radial-gradient(80% 50% at 50% 100%, rgba(255,255,255,.28), rgba(255,255,255,0) 70%);
}
.ztb-card:hover .ztb-cover {
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,1),
    inset 2px 0 4px rgba(255,255,255,.75),
    inset -2px 0 6px rgba(150,190,236,.45),
    inset 0 -4px 9px rgba(140,182,232,.36),
    0 2px 4px rgba(15,23,42,.06),
    0 20px 44px rgba(31,58,95,.18);
}
/* 书名：纯文字，字号放大，居中；不继承链接的蓝色与下划线 */
.ztb-cover-t {
  position: relative; z-index: 3; display: block; width: 100%; text-align: center;
  font-size: 21px; font-weight: 650; color: #1b3a63; line-height: 1.5; letter-spacing: .3px;
  padding: 0 12px; word-break: keep-all;
  text-shadow: 0 1px 0 rgba(255,255,255,.65);
}
/* 封面以下的文字一律居中，且保持普通文字观感 */
.ztb-card { text-align: center; }
.ztb-title {
  margin-top: 11px; font-size: 15.5px; font-weight: 600; color: #1f2937; line-height: 1.4;
  text-align: center; text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ztb-author {
  margin-top: 5px; font-size: 12.5px; color: #94a3b8; text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ztb-empty {
  grid-column: 1 / -1; padding: 64px 16px; text-align: center; color: #94a3b8; font-size: 13.5px;
  background: rgba(255,255,255,.62); border: 1px dashed rgba(15,23,42,.14); border-radius: 14px;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}

/* ---------- 模块页：一张大卡片 + 课程列表 ---------- */
.ztm-wrap { max-width: 1000px; margin: 0 auto; }
.ztm-back { font-size: 14.5px; margin: 2px 2px 16px; }
.ztm-back a { color: #64748b; text-decoration: none; }
.ztm-back a:hover { color: #0F3D75; }
.ztm-back a:hover { color: #0F3D75; }
.ztm-head { display: flex; align-items: center; gap: 18px; margin: 0 2px 20px; }
.ztm-head__cover {
  flex: none; width: 84px; height: 112px; border-radius: 10px; background-size: cover; background-position: center;
  background:
    radial-gradient(120% 72% at 22% -4%, rgba(255,255,255,.95) 0%, rgba(255,255,255,.28) 34%, rgba(255,255,255,0) 62%),
    radial-gradient(90% 60% at 90% 108%, rgba(255,255,255,.5) 0%, rgba(255,255,255,0) 58%),
    linear-gradient(158deg, rgba(214,230,247,.80) 0%, rgba(240,247,253,.60) 36%, rgba(196,217,240,.76) 100%);
  -webkit-backdrop-filter: blur(14px) saturate(185%); backdrop-filter: blur(14px) saturate(185%);
  border: 1px solid rgba(255,255,255,.78);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,1),
    inset 2px 0 3px rgba(255,255,255,.65),
    inset -2px 0 5px rgba(150,190,236,.38),
    inset 0 -3px 7px rgba(140,182,232,.30),
    0 1px 2px rgba(15,23,42,.05), 0 12px 28px rgba(31,58,95,.13);
  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
/* 顶部高光 + 书脊反光，缩小的同款液态玻璃 */
.ztm-head__cover::before {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.72) 0%, rgba(255,255,255,.16) 16%, rgba(255,255,255,0) 38%),
    linear-gradient(90deg, rgba(255,255,255,.62) 0, rgba(255,255,255,.10) 4%, rgba(255,255,255,0) 10%);
}
.ztm-head__cover span {
  position: relative; z-index: 3; font-size: 11.5px; font-weight: 650; color: #1b3a63;
  text-align: center; padding: 0 6px; line-height: 1.4; word-break: keep-all;
  text-shadow: 0 1px 0 rgba(255,255,255,.65);
}
.ztm-head__text h1 { font-size: 25px; font-weight: 650; letter-spacing: -.2px; margin: 0 0 6px; color: #0f172a; }
.ztm-head__text p { margin: 0; font-size: 13px; color: #94a3b8; }
.ztm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(288px, 1fr)); gap: 18px; }
.ztm-card {
  display: flex; flex-direction: column; min-height: 112px; padding: 18px 20px 18px;
  text-decoration: none; border-radius: 14px;
  background: rgba(255,255,255,.72); border: 1px solid rgba(255,255,255,.9);
  -webkit-backdrop-filter: blur(22px) saturate(1.7); backdrop-filter: blur(22px) saturate(1.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,1), 0 0 0 1px rgba(15,23,42,.05),
              0 2px 4px rgba(15,23,42,.04), 0 12px 30px rgba(15,23,42,.07);
  transition: transform .16s ease, box-shadow .16s ease;
}
.ztm-card:hover {
  transform: translateY(-2px);
  background: rgba(15,61,117,.055);
  box-shadow: inset 0 1px 0 rgba(255,255,255,1), 0 0 0 1px rgba(15,61,117,.12),
              0 4px 8px rgba(15,23,42,.05), 0 18px 40px rgba(15,23,42,.12);
}
.ztm-card__t { display: flex; align-items: center; gap: 10px; }
.ztm-card__t b { flex: 1; min-width: 0; font-size: 17px; font-weight: 650; color: #1f2937;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ztm-card:hover .ztm-card__t b { color: #0F3D75; }
.ztm-card__t .go {
  flex: none; font-size: 12px; font-weight: 400; color: #b6c2d2;
  transition: color .16s ease;
}
.ztm-card:hover .ztm-card__t .go { color: #0F3D75; }
.ztm-card__d { margin: 8px 0 10px; font-size: 13px; color: #94a3b8; line-height: 1.6;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ztm-card__m { display: flex; align-items: center; gap: 16px; margin-top: 12px; font-size: 12.5px; color: #94a3b8; }
.ztm-card__m em { font-style: normal; font-weight: 600; color: #0F3D75; font-variant-numeric: tabular-nums; }
.ztm-prog { display: block; width: 100%; margin-top: 14px; height: 5px; border-radius: 4px;
  background: rgba(15,23,42,.07); overflow: hidden; }
.ztm-prog i { display: block; height: 100%; border-radius: 4px; background: #0F3D75; }
.ztm-empty {
  padding: 56px 16px; text-align: center; color: #94a3b8; font-size: 13.5px;
  background: rgba(255,255,255,.62); border: 1px dashed rgba(15,23,42,.14); border-radius: 14px;
}

/* ---------- 板块页：专题目录 + 概况 ---------- */
.ztd-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 236px; gap: 22px; align-items: start; }
.ztd-back { grid-column: 1 / -1; margin: 2px 0 10px; }
/* 返回按钮：苹果风胶囊（‹ + 书名），玻璃底 + 立体边 */
.ztd-back-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 15px 0 10px;
  border-radius: 17px; font-size: 13.5px; font-weight: 500; color: #16365f; text-decoration: none;
  background: rgba(255,255,255,.74); border: 1px solid rgba(255,255,255,.92);
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(15,23,42,.06), 0 6px 18px rgba(15,23,42,.09);
  -webkit-backdrop-filter: blur(18px) saturate(1.7); backdrop-filter: blur(18px) saturate(1.7);
  transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.ztd-back-btn:hover {
  background: #fff; transform: translateX(-1px);
  box-shadow: inset 0 1px 0 #fff, 0 2px 4px rgba(15,23,42,.08), 0 10px 26px rgba(15,23,42,.13);
}
.ztd-back-chev { font-size: 20px; line-height: 1; font-weight: 400; color: #0F3D75; margin-top: -1px; }

.ztd-hd { grid-column: 1 / -1; margin: 2px 0 2px; }
.ztd-hd h1 { font-size: 26px; font-weight: 650; letter-spacing: -.2px; margin: 0 0 6px; color: #0f172a; }
.ztd-hd p { margin: 0; font-size: 13px; color: #94a3b8; }
.ztd-bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin: 16px 0 8px;
  font-size: 13px; color: #64748b; }
.ztd-bar .sp { flex: 1; }
.ztd-bar .end { color: #94a3b8; }

.ztd-list {
  background: rgba(255,255,255,.72); border: 1px solid rgba(255,255,255,.9); border-radius: 14px;
  overflow: hidden;
  -webkit-backdrop-filter: blur(22px) saturate(1.7); backdrop-filter: blur(22px) saturate(1.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,1), 0 0 0 1px rgba(15,23,42,.05),
              0 2px 4px rgba(15,23,42,.04), 0 12px 30px rgba(15,23,42,.07);
}
/* 固定列宽：进度条 / 题数 / 讲义 / 视频 每行左边都对齐 */
.ztd-row {
  display: grid; grid-template-columns: 28px minmax(0,1fr) 96px 62px 58px 58px;
  align-items: center; gap: 13px; padding: 13px 18px; text-decoration: none;
  border-bottom: 1px solid rgba(15,23,42,.045); transition: background .14s ease;
}
.ztd-row:last-child { border-bottom: 0; }
.ztd-row.is-alt { background: rgba(15,23,42,.022); }
.ztd-row:hover { background: rgba(15,61,117,.07); }
.ztd-row:hover .ztd-row__t { color: #0F3D75; }
.ztd-row:hover .ztd-row__n { background: #0F3D75; color: #fff; }
.ztd-row__n {
  width: 27px; height: 27px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 500; color: #94a3b8; background: rgba(15,23,42,.05);
  border-radius: 50%; font-variant-numeric: tabular-nums;
  transition: background .16s ease, color .16s ease;
}
/* 课程名：最多两行，超两行才省略号 —— 宁可这一行高一点，也别把名字切掉 */
.ztd-row__t {
  min-width: 0; font-size: 16px; font-weight: 600; color: #1f2937; letter-spacing: .2px;
  line-height: 1.42;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; text-overflow: ellipsis; white-space: normal;
  transition: color .14s ease;
}
.ztd-row__p { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #94a3b8;
  font-variant-numeric: tabular-nums; }
.ztd-row__p i {
  display: block; width: 46px; height: 5px; border-radius: 3px; background: rgba(15,23,42,.09);
  overflow: hidden; position: relative;
}
.ztd-row__p i::after {
  content: ''; position: absolute; left: 0; top: 0; height: 100%; width: var(--p, 0%);
  background: #0F3D75; border-radius: 3px;
}
.ztd-row__p i.is-zero::after { background: #cbd5e1; }
.ztd-row__c { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #475569;
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.ztd-row__c .icon { font-size: 14px; color: #64748b; }
/* 没设置内容 → 浅色，不再用透明度（透明度会把字号也压小） */
.ztd-row__c.is-off { color: #cbd5e1; }
.ztd-row__c.is-off .icon { color: #cbd5e1; }
/* 讲义/视频标记可点：进这一讲的讲义页 */
.ztd-jump { cursor: pointer; padding: 2px 7px; margin: -2px -7px; border-radius: 7px;
  transition: background .14s ease, color .14s ease; }
.ztd-jump:hover:not(.is-off) { background: rgba(15,61,117,.09); color: #0F3D75; }
.ztd-jump:hover:not(.is-off) .icon { color: #0F3D75; }

.ztd-side {
  background: rgba(255,255,255,.72); border: 1px solid rgba(255,255,255,.9); border-radius: 14px;
  padding: 16px 18px;
  -webkit-backdrop-filter: blur(22px) saturate(1.7); backdrop-filter: blur(22px) saturate(1.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,1), 0 0 0 1px rgba(15,23,42,.05),
              0 2px 4px rgba(15,23,42,.04), 0 12px 30px rgba(15,23,42,.07);
}
.ztd-side h3 { font-size: 12px; font-weight: 600; color: #94a3b8; letter-spacing: .4px; margin: 0 0 12px; }
.ztd-stats { display: grid; gap: 11px; }
.ztd-stats div { display: flex; align-items: baseline; justify-content: space-between; font-size: 13px; color: #94a3b8; }
.ztd-stats dd { margin: 0; font-size: 20px; font-weight: 650; color: #0f172a; font-variant-numeric: tabular-nums; }
.ztd-stats dd small { font-size: 11.5px; font-weight: 400; color: #94a3b8; }
.ztd-empty { padding: 48px 16px; text-align: center; color: #94a3b8; font-size: 13.5px; }

/* ---------- 课时页 ---------- */
/* 课时页比其它页宽一些：讲义正文 + 右侧目录都放得下 */
.row.ztl-row { max-width: 1400px; }
.ztl-wrap { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 24px; align-items: start; }

/* 左 rail：固定贴屏幕左边，图标在上、文字在下（参考 218） */
.ztl-rail {
  position: fixed; left: 14px; top: 84px; width: 92px; z-index: 6;
  display: grid; gap: 14px;
}
.ztl-rail__back {
  display: grid; justify-items: center; gap: 3px; padding: 4px 2px;
  font-size: 12.5px; color: #64748b; text-decoration: none; text-align: center;
  line-height: 1.35; transition: color .15s ease;
}
.ztl-rail__back:hover { color: #0F3D75; }
.ztl-rail__chev { font-size: 20px; line-height: 1; }
.ztl-rail__back-t { display: block; max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ztl-tabs { display: grid; gap: 4px; }
.ztl-tab {
  position: relative; display: grid; justify-items: center; gap: 6px;
  padding: 11px 4px; border-radius: 12px; text-decoration: none;
  font-size: 13px; color: #64748b; transition: background .15s ease, color .15s ease;
}
.ztl-tab .icon { font-size: 21px; color: #94a3b8; transition: color .15s ease; }
.ztl-tab small { font-size: 11px; color: #b6c2d2; line-height: 1; }
.ztl-tab:hover { background: rgba(15,61,117,.06); color: #0F3D75; }
.ztl-tab:hover .icon { color: #0F3D75; }
.ztl-tab.on { background: rgba(15,61,117,.1); color: #0F3D75; font-weight: 600; }
.ztl-tab.on .icon { color: #0F3D75; }
.ztl-tab.on::before {
  content: ''; position: absolute; left: -6px; top: 10px; bottom: 10px; width: 3px;
  border-radius: 2px; background: #0F3D75;
}
.ztl-tab__l { line-height: 1.2; }

/* 专注模式开关 */
.ztl-focus {
  display: grid; justify-items: center; gap: 6px; padding: 10px 4px; border-radius: 12px;
  border: 1px dashed rgba(15,61,117,.24); background: transparent; cursor: pointer;
  font-size: 12.5px; color: #64748b; font-family: inherit;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.ztl-focus__ic { display: inline-flex; color: #94a3b8; transition: color .15s ease; }
.ztl-focus__ic svg { display: block; }
.ztl-focus:hover { background: rgba(15,61,117,.06); color: #0F3D75; border-color: rgba(15,61,117,.42); }
.ztl-focus:hover .ztl-focus__ic { color: #0F3D75; }
.ztl-focus.on { background: rgba(15,61,117,.1); color: #0F3D75; border-style: solid; border-color: rgba(15,61,117,.26); }
.ztl-focus.on .ztl-focus__ic { color: #0F3D75; }

/* rail 是 fixed（脱离流），不指定列的话 .ztl-stage 会落到第 1 列（100px）里 */
.ztl-stage { min-width: 0; grid-column: 2; }
.ztl-head { margin: 2px 0 18px; }
.ztl-head .k { font-size: 13px; color: #94a3b8; margin-bottom: 7px; }
.ztl-head h1 { font-size: 26px; font-weight: 650; letter-spacing: -.3px; margin: 0; color: #0f172a; line-height: 1.35; }
.ztl-badge {
  display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 400; color: #b45309; background: rgba(180,83,9,.1);
  vertical-align: 2px;
}

.ztl-panel {
  background: rgba(255,255,255,.72); border: 1px solid rgba(255,255,255,.9); border-radius: 14px;
  overflow: hidden;
  -webkit-backdrop-filter: blur(22px) saturate(1.7); backdrop-filter: blur(22px) saturate(1.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,1), 0 0 0 1px rgba(15,23,42,.05),
              0 2px 4px rgba(15,23,42,.04), 0 12px 30px rgba(15,23,42,.07);
}
.ztl-plist { display: grid; grid-template-columns: 26px minmax(0,1fr) 88px 78px; align-items: center; gap: 12px; padding: 0 18px; }
.ztl-plist__hd {
  height: 40px; font-size: 12.5px; color: #94a3b8; letter-spacing: .2px;
  border-bottom: 1px solid rgba(15,23,42,.06); background: rgba(255,255,255,.35);
}
.ztl-p {
  display: grid; grid-template-columns: 26px minmax(0,1fr) 88px 78px; align-items: center; gap: 12px;
  padding: 12px 18px; text-decoration: none; border-bottom: 1px solid rgba(15,23,42,.045);
  transition: background .14s ease;
}
.ztl-p:last-of-type { border-bottom: 0; }
.ztl-p.is-alt { background: rgba(15,23,42,.02); }
.ztl-p:hover { background: rgba(15,61,117,.07); }
/* 状态符号：通过=实心圆对勾，未通过=浅灰短横（原来的空心圈太花） */
.ztl-p__s {
  width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; line-height: 1; font-weight: 600; color: #cbd5e1; background: transparent;
  transition: all .14s ease;
}
.ztl-p__s.on { color: #fff; background: #0F3D75; font-size: 11px; }
.ztl-p__t { min-width: 0; font-size: 15px; color: #1f2937; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ztl-p__t b { display: inline-block; min-width: 1.5em; margin-right: 8px; text-align: right; font-weight: 500; font-size: 12.5px; color: #94a3b8; font-variant-numeric: tabular-nums; }
.ztl-p:hover .ztl-p__t { color: #0F3D75; }
.ztl-p__d { font-size: 13px; color: #94a3b8; }
.ztl-p__r { text-align: right; font-size: 13px; color: #94a3b8; font-variant-numeric: tabular-nums; }
.ztl-p__r b { font-weight: 600; color: #0F3D75; }
.ta-r { text-align: right; }

/* 成绩表：多两列（状态 / 提交次数） */
.ztl-glist {
  display: grid; grid-template-columns: 26px minmax(0,1fr) 78px 70px 56px 72px;
  align-items: center; gap: 12px; padding: 0 18px;
}
.ztl-g {
  padding: 12px 18px; text-decoration: none; border-bottom: 1px solid rgba(15,23,42,.045);
  transition: background .14s ease;
}
.ztl-g:last-of-type { border-bottom: 0; }
.ztl-g.is-alt { background: rgba(15,23,42,.02); }
.ztl-g:hover { background: rgba(15,61,117,.07); }
.ztl-g:hover .ztl-p__t { color: #0F3D75; }
.ztl-g__st { font-size: 13px; color: #94a3b8; }
.ztl-g__st.is-ac { color: #0F3D75; font-weight: 600; }
.ztl-g__st.is-wa { color: #b45309; }
.ztl-g__n { text-align: right; font-size: 13px; color: #94a3b8; font-variant-numeric: tabular-nums; }

/* 题单右侧：概况 + 成绩表入口 */
.ztl-prob { display: grid; grid-template-columns: minmax(0,1fr) 226px; gap: 22px; align-items: start; }
.ztl-prob__main { min-width: 0; }
.ztl-side {
  padding: 16px 18px; border-radius: 14px;
  background: rgba(255,255,255,.72); border: 1px solid rgba(255,255,255,.9);
  -webkit-backdrop-filter: blur(22px) saturate(1.7); backdrop-filter: blur(22px) saturate(1.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,1), 0 0 0 1px rgba(15,23,42,.05),
              0 2px 4px rgba(15,23,42,.04), 0 12px 30px rgba(15,23,42,.07);
}
.ztl-side__hd { font-size: 13px; font-weight: 600; color: #64748b; margin-bottom: 10px; }
.ztl-side__num { display: flex; align-items: baseline; gap: 6px; }
.ztl-side__num b { font-size: 30px; font-weight: 650; color: #0f172a; line-height: 1; font-variant-numeric: tabular-nums; }
.ztl-side__num span { font-size: 13px; color: #94a3b8; }
.ztl-side__bar { margin: 12px 0 9px; height: 5px; border-radius: 3px; background: rgba(15,23,42,.08); overflow: hidden; }
.ztl-side__bar i { display: block; height: 100%; background: #0F3D75; border-radius: 3px; }
.ztl-side__meta { font-size: 12.5px; color: #94a3b8; }
.ztl-side__link {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin-top: 14px; padding: 9px 11px; border-radius: 10px; text-decoration: none;
  font-size: 13.5px; color: #0F3D75; background: rgba(255,255,255,.62);
  border: 1px solid rgba(15,61,117,.18);
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.ztl-side__link .icon { font-size: 15px; }
.ztl-side__link:hover { background: rgba(15,61,117,.09); border-color: rgba(15,61,117,.3); }
.ztl-side__link.on { background: #0F3D75; border-color: #0F3D75; color: #fff; }

.ztl-body { padding: 30px 38px; }
.ztl-body .typo { font-size: 15.5px; line-height: 1.9; color: #1f2937; }
.ztl-body img { max-width: 100%; border-radius: 8px; }
.ztl-pdf { background: #525659; }
.ztl-pdf iframe { display: block; width: 100%; height: 78vh; min-height: 520px; border: 0; }
.ztl-video { padding: 16px 16px 0; }
.ztl-video video, .ztl-video iframe { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; background: #000; border: 0; display: block; }
.ztl-empty { padding: 52px 16px; text-align: center; color: #94a3b8; font-size: 13.5px; }

/* 专注模式：只留内容卡片，其余全隐藏 */
html.zt-focus .nav.slideout-menu,
html.zt-focus .footer,
html.zt-focus .header--mobile,
html.zt-focus .slideout-overlay,
html.zt-focus .omnibar-toggle,
html.zt-focus .omnibar { display: none !important; }
html.zt-focus .main { padding: 26px 0 40px; }
html.zt-focus .ztl-rail,
html.zt-focus .ztl-head,
html.zt-focus .ztl-side,
html.zt-focus .ztl-nav,
html.zt-focus .ztl-toc { display: none !important; }
html.zt-focus .ztl-wrap { grid-template-columns: 1fr; }
html.zt-focus .ztl-stage { grid-column: 1; }
html.zt-focus .ztl-panel { max-width: 980px; margin: 0 auto; }
html.zt-focus .ztl-lecture { grid-template-columns: 1fr; }
html.zt-focus .ztl-lecture__main { max-width: 860px; margin: 0 auto; }
html.zt-focus .ztl-body { padding: 34px 46px; }

/* 右上角「退出专注」：很淡，悬停才变实 */
.ztl-exit {
  /* 之前 z-index:30 被顶部导航压住，按钮上半截点不到；下移到导航下方并抬高层级 */
  position: fixed; right: 20px; top: 62px; z-index: 9000;
  display: none; align-items: center; gap: 7px;
  min-height: 38px; padding: 8px 15px; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: 13px; color: #64748b;
  background: rgba(255,255,255,.62); border: 1px solid rgba(15,23,42,.08);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  opacity: .68; transition: opacity .18s ease, color .18s ease, background .18s ease, border-color .18s ease;
}
.ztl-exit > * { pointer-events: none; }
html.zt-focus .ztl-exit { display: inline-flex; }
.ztl-exit:hover { opacity: 1; color: #0F3D75; background: rgba(255,255,255,.95); border-color: rgba(15,61,117,.2); }
.ztl-exit kbd {
  font-family: inherit; font-size: 11px; line-height: 1; padding: 3px 5px; border-radius: 5px;
  border: 1px solid rgba(15,23,42,.12); background: rgba(255,255,255,.7); color: #94a3b8;
}
html.theme--dark .ztl-exit {
  color: #9fb0c4; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1);
}
html.theme--dark .ztl-exit:hover { color: #dbe9fa; background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.22); }
html.theme--dark .ztl-exit kbd { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: #b3bfcd; }

/* 讲义：正文居中 + 右侧自动目录 */
.ztl-lecture { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: 26px; align-items: start; }
.ztl-lecture__main { max-width: 900px; margin: 0; min-width: 0; }
/* 讲义正文：不加白卡，文字直接浮在页面背景上（视频/PDF 仍按自己的块显示） */
.ztl-lecture .ztl-panel {
  background: transparent; border-color: transparent; border-radius: 0;
  box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; overflow: visible;
}
.ztl-lecture .ztl-panel .ztl-body { padding: 4px 6px 8px; }
.ztl-lecture .ztl-pdf { border-radius: 12px; overflow: hidden; }
/* 目录：粘住右侧，太长时自己滚；滚到哪一节，目录就跟到哪一节 */
.ztl-toc {
  position: sticky; top: 80px; min-width: 0;
  max-height: calc(100vh - 100px); display: flex; flex-direction: column;
}
.ztl-toc__hd { flex: 0 0 auto; font-size: 11.5px; font-weight: 600; color: #94a3b8; letter-spacing: .4px; margin-bottom: 9px; }
.ztl-toc__list {
  display: grid; gap: 1px; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain; padding-right: 3px;
  scrollbar-width: thin; scrollbar-color: rgba(15,23,42,.16) transparent;
}
.ztl-toc__list::-webkit-scrollbar { width: 6px; }
.ztl-toc__list::-webkit-scrollbar-thumb { background: rgba(15,23,42,.16); border-radius: 3px; }
.ztl-toc__list::-webkit-scrollbar-track { background: transparent; }
/* 点目录跳转时，别让标题被顶部导航条挡住 */
.ztl-body .typo h1, .ztl-body .typo h2, .ztl-body .typo h3 { scroll-margin-top: 88px; }
.ztl-toc__i {
  display: block; padding: 5px 10px; border-left: 2px solid rgba(15,23,42,.08);
  font-size: 12.5px; color: #64748b; text-decoration: none; line-height: 1.45;
  transition: color .15s ease, border-color .15s ease;
}
.ztl-toc__i.lv2 { padding-left: 20px; font-size: 12px; }
.ztl-toc__i.lv3 { padding-left: 30px; font-size: 11.5px; color: #94a3b8; }
.ztl-toc__i:hover { color: #0F3D75; }
.ztl-toc__i.on { color: #0F3D75; border-left-color: #0F3D75; font-weight: 600; }

/* 讲义读完 → 去做题 */
.ztl-goto {
  display: flex; align-items: center; gap: 16px; margin-top: 16px; padding: 18px 22px;
  border-radius: 14px; background: rgba(15,61,117,.055); border: 1px solid rgba(15,61,117,.14);
  text-decoration: none; transition: background .15s ease, border-color .15s ease;
}
.ztl-goto:hover { background: rgba(15,61,117,.09); border-color: rgba(15,61,117,.26); }
.ztl-goto__t b { display: block; font-size: 15px; font-weight: 650; color: #0f172a; margin-bottom: 3px; }
.ztl-goto__t span { font-size: 12.5px; color: #94a3b8; }
.ztl-goto__btn {
  margin-left: auto; padding: 9px 18px; border-radius: 10px; background: #0F3D75;
  color: #fff; font-size: 13px; font-weight: 500; white-space: nowrap;
}

.ztl-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 2px 10px; font-size: 13.5px; }
.ztl-nav a {
  display: inline-flex; align-items: center; max-width: 48%; padding: 8px 14px; border-radius: 10px;
  color: #0F3D75; text-decoration: none; background: rgba(255,255,255,.7);
  border: 1px solid rgba(15,61,117,.16);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: background .14s ease, border-color .14s ease;
}
.ztl-nav a:hover { background: #fff; border-color: rgba(15,61,117,.32); }
.ztl-nav .ph { flex: 1; }

/* 整卡是链接，但卡内文字一律不要下划线：主题的 a:hover{text-decoration:underline}
   优先级 (0,1,1) 高于单个类，必须显式压掉 */
.ztb-card, .ztb-card:hover,
.ztb-card:hover .ztb-cover-t,
.ztb-card:hover .ztb-title,
.ztb-card:hover .ztb-author,
.ztm-card, .ztm-card:hover,
.ztm-card:hover b, .ztm-card:hover p, .ztm-card:hover span,
.ztm-back a, .ztm-back a:hover,
.ztd-back a, .ztd-back a:hover,
.ztd-back-btn, .ztd-back-btn:hover,
.ztd-row, .ztd-row:hover,
.ztd-row:hover .ztd-row__t,
.ztd-row:hover .ztd-row__n,
.ztl-nav a, .ztl-nav a:hover,
.ztl-rail__back, .ztl-rail__back:hover,
.ztl-tab, .ztl-tab:hover,
.ztl-p, .ztl-p:hover, .ztl-p:hover .ztl-p__t,
.ztl-g, .ztl-g:hover, .ztl-g:hover .ztl-p__t,
.ztl-side a, .ztl-side a:hover,
.ztl-side__link, .ztl-side__link:hover,
.ztb-manage, .ztb-manage:hover,
.zta-btn, .zta-btn:hover,
.zte-btn, .zte-btn:hover,
.zte-back, .zte-back:hover { text-decoration: none !important; }

/* ---------- 暗色 ---------- */
html.theme--dark .ztb-head h1,
html.theme--dark .ztm-head__text h1,
html.theme--dark .ztd-hd h1,
html.theme--dark .ztl-head h1 { color: #e8eef6; }
html.theme--dark .ztb-title,
html.theme--dark .ztm-card__t b,
html.theme--dark .ztd-row__t,
html.theme--dark .ztl-p__t { color: #dbe4ee; }
html.theme--dark .ztm-card:hover .ztm-card__t b,
html.theme--dark .ztd-row:hover .ztd-row__t,
html.theme--dark .ztl-p:hover .ztl-p__t,
html.theme--dark .ztl-side a.on,
html.theme--dark .ztl-side a:hover { color: #7db4ee; }
html.theme--dark .ztb-search input {
  background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); color: #e2e8f0;
}
html.theme--dark .ztb-cover {
  background:
    radial-gradient(120% 72% at 22% -4%, rgba(255,255,255,.30) 0%, rgba(255,255,255,.06) 34%, rgba(255,255,255,0) 62%),
    radial-gradient(90% 60% at 90% 108%, rgba(255,255,255,.12) 0%, rgba(255,255,255,0) 58%),
    linear-gradient(158deg, rgba(120,160,214,.34) 0%, rgba(255,255,255,.06) 38%, rgba(96,136,196,.38) 100%);
  border-color: rgba(255,255,255,.16);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.22),
    inset 0 -2px 3px rgba(255,255,255,.1),
    0 10px 30px rgba(0,0,0,.34);
}
html.theme--dark .ztb-cover-t { color: #dbe9fa; text-shadow: 0 1px 2px rgba(0,0,0,.35); }
html.theme--dark .ztb-manage,
html.theme--dark .ztl-nav a {
  background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: #7db4ee;
}
html.theme--dark .ztb-manage:hover,
html.theme--dark .ztl-nav a:hover { background: rgba(255,255,255,.1); }
html.theme--dark .ztm-card,
html.theme--dark .ztd-list,
html.theme--dark .ztd-side,
html.theme--dark .ztl-panel,
html.theme--dark .ztl-side,
html.theme--dark .ztb-empty {
  background: rgba(30,41,59,.62); border-color: rgba(255,255,255,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 0 0 1px rgba(0,0,0,.2), 0 12px 30px rgba(0,0,0,.28);
}
html.theme--dark .ztd-row,
html.theme--dark .ztl-p,
html.theme--dark .ztl-side a,
html.theme--dark .ztl-side__hd,
html.theme--dark .ztl-plist__hd { border-bottom-color: rgba(255,255,255,.07); }
html.theme--dark .ztd-row:hover,
html.theme--dark .ztl-p:hover,
html.theme--dark .ztl-side a:hover { background: rgba(125,180,238,.09); }
html.theme--dark .ztd-row.is-alt { background: rgba(255,255,255,.025); }
html.theme--dark .ztd-row:hover .ztd-row__t { color: #7db4ee; }
html.theme--dark .ztd-row:hover .ztd-row__n { background: rgba(125,180,238,.22); }
html.theme--dark .ztl-plist__hd { background: rgba(255,255,255,.03); }
html.theme--dark .ztd-row__n { background: rgba(255,255,255,.07); color: #94a3b8; }
html.theme--dark .ztd-row:hover .ztd-row__n { background: #4a86c8; color: #fff; }
html.theme--dark .ztd-row__t { color: #dbe4ee; }
html.theme--dark .ztd-row__p i { background: rgba(255,255,255,.1); }
html.theme--dark .ztd-row__p i::after { background: #4a86c8; }
html.theme--dark .ztd-row__p i.is-zero::after { background: rgba(255,255,255,.22); }
html.theme--dark .ztd-row__c { color: #c3cfdd; }
html.theme--dark .ztd-row__c .icon { color: #7f8fa3; }
html.theme--dark .ztd-row__c.is-off { color: #4b5a6b; }
html.theme--dark .ztd-row__c.is-off .icon { color: #4b5a6b; }
html.theme--dark .ztd-jump:hover:not(.is-off) { background: rgba(125,180,238,.14); color: #7db4ee; }
html.theme--dark .ztd-jump:hover:not(.is-off) .icon { color: #7db4ee; }
html.theme--dark .ztd-row:hover .ztd-row__c:not(.is-off) .icon { color: #7db4ee; }
html.theme--dark .ztd-back-btn {
  background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: #cfe2f7;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 6px 18px rgba(0,0,0,.3);
}
html.theme--dark .ztd-back-btn:hover { background: rgba(255,255,255,.13); }
html.theme--dark .ztd-back-chev { color: #7db4ee; }
html.theme--dark .ztd-stats dd { color: #e8eef6; }
html.theme--dark .ztm-card__m em,
html.theme--dark .ztl-p__r b { color: #7db4ee; }
html.theme--dark .ztm-prog,
html.theme--dark .ztd-prog i { background: rgba(255,255,255,.1); }
html.theme--dark .ztm-prog i,
html.theme--dark .ztd-prog i::after { background: #4a86c8; }
html.theme--dark .ztl-tab { color: #b3bfcd; }
html.theme--dark .ztl-tab .icon { color: #7f8fa3; }
html.theme--dark .ztl-tab:hover { background: rgba(255,255,255,.06); color: #7db4ee; }
html.theme--dark .ztl-tab:hover .icon { color: #7db4ee; }
html.theme--dark .ztl-tab.on { background: rgba(125,180,238,.24); color: #d6e7fa; }
html.theme--dark .ztl-tab.on .icon { color: #7db4ee; }
html.theme--dark .ztl-tab.on::before { background: #7db4ee; }
html.theme--dark .ztl-tab small { color: #7f8fa3; }
html.theme--dark .ztl-rail__back { color: #94a3b8; }
html.theme--dark .ztl-rail__back:hover { color: #7db4ee; }
html.theme--dark .ztl-p.is-alt { background: rgba(255,255,255,.025); }
html.theme--dark .ztm-card:hover { background: rgba(125,180,238,.09); }
html.theme--dark .ztl-goto { background: rgba(125,180,238,.08); border-color: rgba(125,180,238,.2); }
html.theme--dark .ztl-goto:hover { background: rgba(125,180,238,.13); }
html.theme--dark .ztl-goto__t b { color: #e8eef6; }
html.theme--dark .ztl-goto__btn { background: #2b5c96; }
html.theme--dark .ztl-toc__hd { color: #7f8fa3; }
html.theme--dark .ztl-toc__i { color: #94a3b8; border-left-color: rgba(255,255,255,.1); }
html.theme--dark .ztl-toc__i:hover { color: #7db4ee; }
html.theme--dark .ztl-toc__i.on { color: #7db4ee; border-left-color: #7db4ee; }
html.theme--dark .ztl-body .typo { color: #dbe4ee; }
html.theme--dark .ztl-p__s { border-color: rgba(255,255,255,.22); }
html.theme--dark .ztl-p__s.on { background: #4a86c8; border-color: #4a86c8; }

/* 课时页新增块：暗色 */
html.theme--dark .ztl-side { background: rgba(30,41,59,.62); border-color: rgba(255,255,255,.08); }
html.theme--dark .ztl-side__hd { color: #94a3b8; }
html.theme--dark .ztl-side__num b { color: #e8eef6; }
html.theme--dark .ztl-side__bar { background: rgba(255,255,255,.1); }
html.theme--dark .ztl-side__bar i { background: #4a86c8; }
html.theme--dark .ztl-side__meta { color: #7f8fa3; }
html.theme--dark .ztl-side__link {
  background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: #7db4ee;
}
html.theme--dark .ztl-side__link:hover { background: rgba(255,255,255,.1); }
html.theme--dark .ztl-side__link.on { background: #2b5c96; border-color: #2b5c96; color: #fff; }
html.theme--dark .ztl-focus { border-color: rgba(255,255,255,.16); color: #b3bfcd; }
html.theme--dark .ztl-focus__ic { color: #7f8fa3; }
html.theme--dark .ztl-focus:hover,
html.theme--dark .ztl-focus.on { background: rgba(125,180,238,.14); color: #7db4ee; border-color: rgba(125,180,238,.36); }
html.theme--dark .ztl-focus:hover .ztl-focus__ic,
html.theme--dark .ztl-focus.on .ztl-focus__ic { color: #7db4ee; }
html.theme--dark .ztl-badge { background: rgba(251,191,36,.14); color: #fbbf24; }
html.theme--dark .ztl-g { border-bottom-color: rgba(255,255,255,.07); }
html.theme--dark .ztl-g.is-alt { background: rgba(255,255,255,.025); }
html.theme--dark .ztl-g:hover { background: rgba(125,180,238,.09); }
html.theme--dark .ztl-g__st { color: #7f8fa3; }
html.theme--dark .ztl-g__st.is-ac { color: #7db4ee; }
html.theme--dark .ztl-g__st.is-wa { color: #fbbf24; }
html.theme--dark .ztl-g__n { color: #7f8fa3; }

/* ---------- 窄屏 ---------- */
@media (max-width: 767px) {
  .ztd-row { grid-template-columns: 26px minmax(0,1fr) 86px; gap: 10px; padding: 11px 14px; }
  .ztd-row__c { display: none; }
  .ztb-head { flex-direction: column; align-items: stretch; gap: 10px; }
  .ztb-search input { width: 100%; }
  .ztb-grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 20px 14px; }
  .ztm-grid { grid-template-columns: 1fr; }
  .ztl-wrap { grid-template-columns: 1fr; gap: 14px; }
  .ztl-stage { grid-column: 1; }
  .ztl-rail { position: static; width: auto; display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
  .ztl-focus { padding: 6px 10px; display: inline-flex; align-items: center; gap: 5px; }
  .ztl-tabs { flex: 1 1 auto; }
  .ztl-rail__back { display: inline-flex; align-items: center; gap: 3px; padding: 0 2px; }
  .ztl-tabs { display: flex; gap: 6px; overflow-x: auto; }
  .ztl-tab { flex: 1; min-width: 76px; padding: 8px 4px; }
  .ztl-tab.on::before { display: none; }
  .ztl-lecture { grid-template-columns: 1fr; }
  .ztl-toc { display: none; }
  .ztl-goto { flex-direction: column; align-items: stretch; gap: 12px; }
  .ztl-goto__btn { margin-left: 0; text-align: center; }
  .ztl-plist, .ztl-p { grid-template-columns: 22px minmax(0,1fr) 62px; }
  .ztl-p__d, .ztl-plist__hd > span:nth-child(3) { display: none; }
  .ztl-prob .ztl-side { display: block; padding: 14px 16px; }
  .ztl-side__hd { margin-bottom: 8px; }
  .ztl-side__bar { margin: 10px 0 8px; }
  .ztl-side__link { margin-top: 12px; }
  .ztl-glist { grid-template-columns: 22px minmax(0,1fr) 64px 52px; }
  .ztl-glist > span:nth-child(3),
  .ztl-glist > span:nth-child(4) { display: none; }
  .ztl-body { padding: 18px 16px; }
  .ztl-nav { flex-direction: column; align-items: stretch; }
  .ztl-nav a { max-width: none; }
  .ztl-nav .ph { display: none; }
}
@media (max-width: 1180px) {
  .ztl-lecture { grid-template-columns: 1fr; }
  .ztl-toc { display: none; }
  .ztl-prob { grid-template-columns: 1fr; }
  .ztl-side { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
  .ztl-side__hd { margin: 0; }
  .ztl-side__bar { flex: 1 1 120px; margin: 0; }
  .ztl-side__link { margin: 0 0 0 auto; padding: 7px 14px; }
}
@media (max-width: 900px) {
  .ztd-wrap { grid-template-columns: 1fr; }
  .ztd-side { order: 2; }
  .ztd-row__m { gap: 8px; }
}

/* ---------- 按钮 / 卡片型链接：任何状态都不要下划线 ---------- */
a.ztd-back-btn, a.ztd-back-btn:hover, a.ztd-back-btn:focus,
a.ztb-manage, a.ztb-manage:hover, a.ztb-manage:focus,
a.ztb-gear, a.ztb-gear:hover,
a.ztb-card, a.ztb-card:hover,
a.ztm-manage, a.ztm-manage:hover,
a.zta-btn, a.zta-btn:hover,
a.zta-book, a.zta-book:hover,
a.zta-book *, a.zta-book *:hover,
a.ztd-row, a.ztd-row:hover,
a.ztd-row *, a.ztd-row *:hover,
a.ztl-tab, a.ztl-tab:hover,
a.ztl-tab *, a.ztl-tab *:hover,
a.ztl-side__link, a.ztl-side__link:hover,
a.ztl-goto, a.ztl-goto:hover,
a.ztl-goto *, a.ztl-goto *:hover,
.ztl-nav a, .ztl-nav a:hover,
a.ztb-search button, a.ztb-search button:hover {
  text-decoration: none !important;
}

/* ===== 全局：按钮 / 分页这类「看起来是按钮」的链接一律不要下划线 =====
   站点全局的 a:hover 会给下划线，套在按钮上非常突兀（总结列表、分页器都中招） */
a.button, a.button:hover, a.button:focus,
a.rounded, a.rounded:hover, a.rounded:focus,
a.primary, a.primary:hover, a.primary:focus,
a.small, a.small:hover,
/* 注意：这里只去掉下划线。以前顺手写了 border-bottom:0 !important，
   把 .sm-btn / .zta-btn 这些带边框按钮的底边一起抹了，表现为「上左右有线、下面没有」。 */
a[class*="btn"], a[class*="-btn"], a[class*="_btn"], a[class*="button"],
a[class*="btn"]:hover, a[class*="-btn"]:hover, a[class*="_btn"]:hover, a[class*="button"]:hover,
a[class*="btn"]:focus, a[class*="-btn"]:focus, a[class*="_btn"]:focus, a[class*="button"]:focus,
a[class*="btn"]:active, a[class*="-btn"]:active, a[class*="_btn"]:active,
.pager a, .pager a:hover, .pager a:focus,
.paginator a, .paginator a:hover, .paginator a:focus,
a.pager__item, a.pager__item:hover,
a.menu__link, a.menu__link:hover {
  text-decoration: none !important;
}

/* ===== 下拉箭头统一 =====
   Chrome 的原生箭头又粗又靠外，和站点的圆角输入框不搭；这里去掉原生外观，自绘一个细 chevron。
   多选（multiple）和 size>1 的列表框不能动，排除掉。 */
select:not([multiple]) {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  padding-right: 30px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  /* background-origin 默认是 padding-box，但表单控件上会被浏览器按 content-box 计算，
     导致箭头被 padding-right 顶到框中间。显式用 border-box 让它永远贴着右边缘。 */
  background-origin: border-box;
  background-position: right 10px center;
  background-size: 12px 12px;
}
select:not([multiple]):disabled {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23b6c2cf' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}
/* 暗色主题换浅一点的箭头 */
html.theme--dark select:not([multiple]) {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239fb4c9' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}

/* ===== 全站链接不带下划线 =====
   主题的 a:hover / a:focus 会给链接加下划线，导航、卡片、表格里到处冒，
   和「已通过」「当前页」这类状态标记混在一起。统一去掉，靠颜色和底色反馈；
   只有正文（讲义 / 题面）里的链接保留下划线，否则正文中段落的链接认不出来。 */
html a,
html a:hover,
html a:focus,
html a:active,
html a:visited {
  text-decoration: none !important;
}
html .typo a,
html .typo a:hover,
html .problem-content a,
html .problem-content a:hover,
#problem-content a,
#problem-content a:hover {
  text-decoration: underline !important;
}

/* 正文里的「按钮形链接」例外：.typo 的下划线规则会盖掉全站的 no-underline，
   首页「今日运势 → 抽取今日运势」这类 <a class="expanded button"> 就带上了下划线。
   按钮本来就靠边框和底色表达可点，不需要下划线。 */
html .typo a.button, html .typo a.button:hover, html .typo a.button:focus, html .typo a.button:active,
html .typo a.rounded, html .typo a.rounded:hover, html .typo a.rounded:focus,
html .typo a.primary, html .typo a.primary:hover, html .typo a.primary:focus,
html .typo a.small, html .typo a.small:hover,
html .typo a[class*="btn"], html .typo a[class*="btn"]:hover, html .typo a[class*="btn"]:focus,
html .typo a[class*="button"], html .typo a[class*="button"]:hover, html .typo a[class*="button"]:focus,
html .typo a.expanded, html .typo a.expanded:hover, html .typo a.expanded:focus {
  text-decoration: none !important;
}

/* ==========================================================================
   沉浸式页（确认授权 / 登录 / 注册 / 重置密码）
   卡片原来靠 .main 的上内边距定位，视觉上偏上。改成 flex：
   #panel 撑满一屏，.main 吃掉顶栏与页脚之间的全部空间，卡片在中间垂直居中。
   ========================================================================== */
html.layout--immersive #panel {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
html.layout--immersive .main {
  flex: 1 1 auto;
  display: flex;
  width: 100%;
}
/* margin:auto 在 flex 里同时做水平和垂直居中；
   矮屏装不下时 margin 会自动收缩成 0，卡片顶部不会被裁掉 */
html.layout--immersive .main > .row {
  width: 100%;
  margin: auto;
}
html.layout--immersive .immersive--content {
  margin-left: auto;
  margin-right: auto;
}

/* 按钮底边补齐：站点默认给 <a> 的 hover 加下划线（text-decoration），
   但个别主题规则会用 border-bottom 画线，被上面的规则去掉后按钮就只剩上左右三条边。
   这里统一把「带边框的按钮」底边补回来，颜色跟随各自 border-color。 */
a.sm-btn, a.zta-btn, a.zt-btn, a.button, a.rounded {
  border-bottom-width: 1px;
  border-bottom-style: solid;
}

/* ===== 登录弹窗的输入框：用户名/密码统一成同一种外框 =====
   ui 默认给密码框用的是 material 下划线（只有底部 2px），
   和用户名的圆角边框摆在一起像「少了一条边」。这里统一成 1px 四边圆角框。 */
.dialog--signin input[type="text"],
.dialog--signin input[type="password"],
.dialog--signin input[type="email"] {
  box-sizing: border-box;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(15, 23, 42, .18) !important;
  border-radius: 9px;
  background: #fff;
  color: #1f2937;
  font-size: 14px;
  line-height: 34px;
  outline: none;
  box-shadow: none;
}
.dialog--signin input[type="text"]:focus,
.dialog--signin input[type="password"]:focus,
.dialog--signin input[type="email"]:focus {
  border-color: #0F3D75 !important;
  box-shadow: 0 0 0 3px rgba(15, 61, 117, .1);
}
html.theme--dark .dialog--signin input[type="text"],
html.theme--dark .dialog--signin input[type="password"],
html.theme--dark .dialog--signin input[type="email"] {
  background: rgba(255, 255, 255, .06);
  color: #e6eef8;
  border-color: rgba(255, 255, 255, .18) !important;
}

/* ==========================================================================
   登录界面统一
   站内有两处登录：独立页 /login（html.layout--immersive）和导航里的弹窗（.dialog--signin）。
   两边标记几乎一样，只是各有一套默认样式，看起来像两个站。这里统一成同一张卡片：
   同宽、同标题、同字段、同按钮、同链接颜色。
   注册 / 找回密码用的是同一套 immersive 结构，一并统一。
   注意：.layout--immersive 是加在 <html> 上的，选择器必须写 html.layout--immersive。
   沉浸式页原有的两段表单样式带 !important，所以这里的选择器要和它同级或更高。
   ========================================================================== */

/* 卡片 */
html.layout--immersive .immersive--content.immersive--center,
html.theme--light.layout--immersive .immersive--content.immersive--center,
html.theme--dark.layout--immersive .immersive--content.immersive--center,
html .dialog--signin .dialog--signin__main {
  width: min(380px, 92vw) !important;
  box-sizing: border-box !important;
  margin: 0 auto !important;
  padding: 26px 26px 20px !important;
  background: #fff !important;
  border: 1px solid rgba(15, 23, 42, .06) !important;
  border-radius: 16px !important;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .12) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  position: relative;
}
html.theme--dark.layout--immersive .immersive--content.immersive--center,
html.theme--dark .dialog--signin .dialog--signin__main {
  background: #101a28 !important;
  border-color: rgba(255, 255, 255, .1) !important;
}
/* 弹窗的外壳只负责定位，别再画一层卡片 */
html .dialog--signin .dialog__content {
  background: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* 标题 */
html.layout--immersive .immersive--content h1,
html.theme--light.layout--immersive .immersive--content h1,
html.theme--dark.layout--immersive .immersive--content h1,
html .dialog--signin .dialog--signin__title {
  margin: 0 0 18px !important;
  font-size: 21px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  letter-spacing: .5px !important;
  text-align: center !important;
  color: #0F3D75 !important;
}
html.theme--dark.layout--immersive .immersive--content h1,
html.theme--dark .dialog--signin .dialog--signin__title { color: #9dc4ef !important; }

/* 弹窗副标题去掉，和独立页一致 */
html .dialog--signin .dialog--signin__note { display: none !important; }

/* 关闭入口：小字放右上角 */
html .dialog--signin .dialog--signin__close-container {
  position: absolute !important;
  top: 12px !important;
  right: 16px !important;
  margin: 0 !important;
  font-size: 12.5px !important;
  line-height: 1 !important;
}
html .dialog--signin .dialog--signin__close-container a { color: #94a3b8 !important; }
html .dialog--signin .dialog--signin__close-container a:hover { color: #0F3D75 !important; }

/* 字段行间距 */
html.layout--immersive form .row + .row,
html .dialog--signin form .row + .row { margin-top: 12px !important; }

/* 字段容器：标签在上、输入框在下 */
html.layout--immersive label.material.textbox,
html.layout--immersive label.material.textbox.inverse,
html.layout--immersive label.material.textbox.focus,
html.layout--immersive label.material.textbox.inverse.focus,
html.theme--light.layout--immersive label.textbox.material,
html.theme--light.layout--immersive label.textbox.material.inverse,
html.theme--dark.layout--immersive label.textbox.material,
html.theme--dark.layout--immersive label.textbox.material.inverse,
html .dialog--signin label.material.textbox {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  width: 100% !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  line-height: 1.3 !important;
  color: #475569 !important;
  transition: none !important;
}
html.theme--dark.layout--immersive label.material.textbox,
html.theme--dark.layout--immersive label.textbox.material,
html.theme--dark .dialog--signin label.material.textbox { color: #a9bacd !important; }

/* 浮动标签的位移、下划线全部去掉 */
html.layout--immersive label.material.textbox::before,
html.layout--immersive label.material.textbox::after,
html .dialog--signin label.material.textbox::before,
html .dialog--signin label.material.textbox::after { display: none !important; content: none !important; }
html.layout--immersive label.material.textbox > span,
html .dialog--signin label.material.textbox > span {
  position: static !important;
  display: block !important;
  transform: none !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  color: inherit !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* 输入框本体：42px 高、1px 边、10px 圆角（覆盖沉浸式页原来那套「无边框透明框」） */
html.layout--immersive label.material.textbox input,
html.layout--immersive label.material.textbox.inverse input,
html.layout--immersive label.material.textbox.focus input,
html.theme--light.layout--immersive label.textbox.material input,
html.theme--dark.layout--immersive label.textbox.material input,
html .dialog--signin label.material.textbox input {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  height: 42px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  font-size: 14px !important;
  font-family: inherit !important;
  line-height: 40px !important;
  color: #1f2937 !important;
  background: #fff !important;
  border: 1px solid rgba(15, 23, 42, .18) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  outline: none !important;
}
html.layout--immersive label.material.textbox input:focus,
html.theme--light.layout--immersive label.textbox.material input:focus,
html.theme--dark.layout--immersive label.textbox.material input:focus,
html .dialog--signin label.material.textbox input:focus {
  border-color: #0F3D75 !important;
  box-shadow: 0 0 0 3px rgba(15, 61, 117, .1) !important;
}
html.theme--dark.layout--immersive label.material.textbox input,
html.theme--dark.layout--immersive label.textbox.material input,
html.theme--dark .dialog--signin label.material.textbox input {
  background: rgba(255, 255, 255, .06) !important;
  color: #e6eef8 !important;
  border-color: rgba(255, 255, 255, .18) !important;
}

/* 「记住我」：模板给独立页写死了白色，浅底上要压回正文色 */
html.layout--immersive label.checkbox,
html.theme--light.layout--immersive label.checkbox,
html.theme--dark.layout--immersive label.checkbox,
html .dialog--signin label.checkbox {
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  margin: 0 !important;
  font-size: 13px !important;
  color: #475569 !important;
}
html.theme--dark.layout--immersive label.checkbox,
html.theme--dark .dialog--signin label.checkbox { color: #a9bacd !important; }

/* 主按钮 */
html.layout--immersive input[type="submit"],
html.theme--light.layout--immersive input[type="submit"],
html.theme--dark.layout--immersive input[type="submit"],
html .dialog--signin input[type="submit"] {
  width: 100% !important;
  height: 42px !important;
  padding: 0 !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  color: #fff !important;
  background: #0F3D75 !important;
  border: 1px solid #0F3D75 !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: background .15s ease;
}
html.layout--immersive input[type="submit"]:hover,
html .dialog--signin input[type="submit"]:hover { background: #0b2f5b !important; }

/* 底部辅助链接 */
html.layout--immersive .supplementary a,
html .dialog--signin .supplementary a { color: #0F3D75 !important; font-size: 13px !important; }
html.theme--dark.layout--immersive .supplementary a,
html.theme--dark .dialog--signin .supplementary a { color: #9dc4ef !important; }
