/* Notion 式页面：课时页（学员）与后台编辑器共用 */
:root {
  --n-text: rgb(55, 53, 47); --n-muted: rgba(55, 53, 47, .65); --n-faint: rgba(55, 53, 47, .45);
  --n-line: rgba(55, 53, 47, .09); --n-hover: rgba(55, 53, 47, .06); --n-side: rgb(251, 251, 250);
  --n-gray-bg: rgb(241, 241, 239); --n-code-bg: rgb(247, 246, 243);
  --n-yellow-bg: rgb(251, 243, 219); --n-blue-bg: rgb(231, 243, 248); --n-red: #eb5757;
  /* 课时正文字体：霞鹜文楷（和 FlowUs 同款）。想换回系统字体，把这一行改成 var(--n-font) */
  --n-content-font: "LXGW WenKai", ui-sans-serif, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --n-font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* ---------- 布局：左侧目录 + 正文 ---------- */
.n-layout { display: grid; grid-template-columns: 264px 1fr; min-height: calc(100vh - 53px); font-family: var(--n-font); color: var(--n-text); }
.n-side { background: var(--n-side); border-right: 1px solid var(--n-line); padding: 18px 10px 40px; position: sticky; top: 53px; height: calc(100vh - 53px); overflow-y: auto; font-size: 14px; }
.n-side-title { display: block; padding: 4px 10px 2px; font-weight: 600; font-size: 14px; color: var(--n-text); }
.n-side-title:hover { text-decoration: underline; }
.n-progress { padding: 6px 10px 14px; font-size: 12px; color: var(--n-muted); }
.n-progress-bar { height: 4px; background: var(--n-line); border-radius: 4px; margin-top: 6px; overflow: hidden; }
.n-progress-bar i { display: block; height: 100%; background: var(--ink-green, #1e5b3a); border-radius: 4px; }
.n-side-label { padding: 12px 10px 4px; font-size: 12px; color: var(--n-faint); font-weight: 500; }
.n-nav a { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 6px; color: var(--n-muted); line-height: 1.35; }
.n-nav a:hover { background: var(--n-hover); }
.n-nav a.on { background: var(--n-hover); color: var(--n-text); font-weight: 500; }
.n-nav .ico { width: 18px; flex: none; text-align: center; font-size: 13px; opacity: .8; }
.n-nav .t { flex: 1; }
.n-nav .free { font-size: 11px; color: #448361; background: rgb(219, 237, 219); border-radius: 4px; padding: 0 5px; }

.n-main { min-width: 0; padding: 0 24px 120px; }
.n-page { max-width: 760px; margin: 0 auto; padding-top: 56px; }
.n-crumb { font-size: 14px; color: var(--n-muted); margin-bottom: 26px; display: flex; gap: 6px; flex-wrap: wrap; }
.n-crumb a:hover { color: var(--n-text); }
.n-title { font-family: var(--n-content-font); font-size: 40px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 8px; color: var(--n-text); }
.n-props { display: flex; gap: 14px; font-size: 14px; color: var(--n-muted); padding: 6px 0 20px; border-bottom: 1px solid var(--n-line); margin-bottom: 18px; flex-wrap: wrap; align-items: center; }
.n-page .n-toggle-side { display: none; }

/* ---------- 块内容（学员阅读）---------- */
.n-content { font-family: var(--n-content-font); font-size: 17px; line-height: 1.8; color: var(--n-text); word-wrap: break-word; }
.n-content > * { margin: 4px 0; }
.n-content p { margin: 2px 0; padding: 3px 2px; min-height: 1em; }
.n-content h1 { font-size: 30px; margin: 34px 0 6px; font-weight: 700; line-height: 1.3; letter-spacing: 0; }
.n-content h2 { font-size: 24px; margin: 28px 0 4px; font-weight: 700; line-height: 1.3; letter-spacing: 0; }
.n-content h3 { font-size: 20px; margin: 20px 0 2px; font-weight: 600; line-height: 1.3; letter-spacing: 0; }
/* 知识点（小标题）之间多留一行空白，页面不显得拥挤；紧跟在原句引用块后面的第一个知识点不用空那么多 */
.n-content h3 { margin-top: 44px; margin-bottom: 6px; color: #1f3fb0; }   /* 知识点标题默认品牌蓝 */
.n-content .n-h-bg { padding: 6px 12px; border-radius: 6px; }
.n-content .n-quote + h3 { margin-top: 24px; }
.n-content h4 { font-size: 18px; margin: 18px 0 2px; font-weight: 700; line-height: 1.4; letter-spacing: 0; }
.n-content h1, .n-content h2, .n-content h3, .n-content h4 { scroll-margin-top: 80px; }
/* 后台加的链接：蓝色 + 下划线，学员一眼能看出可以点，新窗口打开 */
.n-content a { color: var(--link, #1f3fb0); text-decoration: underline; text-decoration-color: rgba(31, 63, 176, .35); text-underline-offset: 3px; transition: text-decoration-color .15s; }
.n-content a:hover { text-decoration-color: currentColor; }
.n-content a.n-file { color: inherit; text-decoration: none; }
.n-content b, .n-content strong { font-weight: 600; }
.n-content mark, .n-content .cdx-marker { background: var(--n-yellow-bg); color: inherit; padding: 0 2px; border-radius: 3px; }
.n-content code, .n-content .inline-code { font-family: "SFMono-Regular", Menlo, Consolas, monospace; font-size: 85%; color: var(--n-red); background: rgba(135, 131, 120, .15); border-radius: 4px; padding: .2em .4em; }
.n-content ul, .n-content ol { padding-left: 1.6em; margin: 4px 0; }
.n-content li { padding: 2px 0; }
.n-content li::marker { color: var(--n-text); }
.n-check { list-style: none; padding-left: 2px !important; }
.n-check li { display: flex; gap: 8px; align-items: flex-start; }
.n-check .box { width: 16px; height: 16px; border: 1.5px solid var(--n-text); border-radius: 3px; margin-top: 6px; flex: none; display: grid; place-items: center; font-size: 11px; color: #fff; }
.n-check .done .box { background: #2383e2; border-color: #2383e2; }
.n-check .done .txt { text-decoration: line-through; color: var(--n-faint); }
.n-quote { border-left: 3px solid currentColor; padding: 2px 14px; margin: 8px 0 !important; font-size: 1.1em; }
.n-quote cite { display: block; font-size: 14px; color: var(--n-muted); font-style: normal; margin-top: 4px; }
.n-callout { display: flex; gap: 10px; background: var(--n-gray-bg); border-radius: 6px; padding: 16px 18px 16px 14px; margin: 8px 0 !important; }
.n-callout-title { font-weight: 600; }
.n-callout-body { flex: 1; }
.n-divider { border: 0; border-top: 1px solid var(--n-line); margin: 18px 0 !important; }
.n-figure { margin: 10px 0 !important; }
.n-figure img { border-radius: 4px; max-width: 100%; margin: 0 auto; }
.n-figure.bordered img { border: 1px solid var(--n-line); }
.n-figure.bg { background: var(--n-gray-bg); padding: 20px; border-radius: 6px; }
.n-figure.bg img { max-width: 60%; }
.n-figure figcaption, .n-caption-r { font-size: 14px; color: var(--n-muted); padding-top: 6px; }
.n-code { background: var(--n-code-bg); border-radius: 4px; padding: 30px 32px; font-family: "SFMono-Regular", Menlo, Consolas, monospace; font-size: 14px; line-height: 1.6; overflow-x: auto; white-space: pre; margin: 8px 0 !important; tab-size: 2; }
.n-table-wrap { overflow-x: auto; margin: 10px 0 !important; }
.n-table { border-collapse: collapse; font-size: 14px; width: 100%; }
.n-table td, .n-table th { border: 1px solid rgb(233, 233, 231); padding: 7px 10px; text-align: left; vertical-align: top; }
.n-table th { background: var(--n-side); font-weight: 600; }
.n-video { margin: 12px 0 !important; }
.n-video .player { aspect-ratio: 16/9; background: #191919; border-radius: 6px; overflow: hidden; position: relative; }
.n-video video { width: 100%; height: 100%; display: block; }
.n-video .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.75); font-size: 15px; text-align: center; padding: 20px; }
.n-audio { margin: 10px 0 !important; }
.n-audio audio { width: 100%; height: 44px; }
.n-file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 6px; margin: 6px 0 !important; transition: background .15s; }
.n-file:hover { background: var(--n-hover); }
.n-file .ic { font-size: 20px; }
.n-file .nm { flex: 1; font-weight: 500; }
.n-file .sz { font-size: 13px; color: var(--n-faint); }
.n-file.is-off { cursor: default; }
.n-file.is-off:hover { background: none; }
.n-file.is-off .nm { color: var(--n-faint); }
/* 关闭下载：手机上长按图片不弹「存储图像」 */
.no-save img, .no-save audio { -webkit-touch-callout: none; -webkit-user-drag: none; }
.n-protect-tip { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 60; background: rgba(30,30,30,.92); color: #fff;
  padding: 10px 18px; border-radius: 999px; font-size: 14px; pointer-events: none; animation: fade .2s; }
.n-vocab { border: 1px solid rgb(233, 233, 231); border-radius: 8px; padding: 16px 20px; margin: 36px 0 12px !important; position: relative; overflow: hidden; }
.n-vocab::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ink-yellow, #f3c234); }
.n-vocab-top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.n-vocab-word { font-size: 22px; font-weight: 700; color: var(--ink-blue, #1f3fb0); }
.n-vocab-phonetic { color: var(--n-muted); font-size: 15px; }
/* 词卡：英文释义小一号、灰色；下面的知识点讲解用正文大小，方便阅读 */
.n-vocab-meaning { margin-top: 4px; font-size: 14px; line-height: 1.65; color: var(--n-muted); }
.n-vocab-meaning:empty { display: none; }
.n-vocab-example { margin-top: 10px; font-size: 16.5px; line-height: 1.85; }
.n-toggle { margin: 2px 0 !important; }
.n-toggle summary { list-style: none; cursor: pointer; display: flex; gap: 6px; align-items: flex-start; padding: 3px 2px; border-radius: 4px; }
.n-toggle summary::-webkit-details-marker { display: none; }
.n-toggle summary::before { content: ""; width: 0; height: 0; border-left: 7px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; margin: 9px 6px 0 5px; transition: transform .15s; flex: none; }
.n-toggle[open] summary::before { transform: rotate(90deg); }
.n-toggle summary:hover { background: var(--n-hover); }
.n-toggle-body { padding: 2px 2px 4px 24px; }

/* ---------- 上一课/下一课 ---------- */
.n-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 56px 0 0; }
.n-pager a { border: 1px solid var(--n-line); border-radius: 8px; padding: 12px 16px; font-size: 14px; transition: background .15s; }
.n-pager a:hover { background: var(--n-hover); }
.n-pager small { display: block; color: var(--n-faint); font-size: 12px; }
.n-pager .next { text-align: right; grid-column: 2; }

/* ---------- 打卡 ---------- */
.ck { margin-top: 56px; border-top: 1px solid var(--n-line); padding-top: 32px; }
.ck h2 { font-size: 24px; font-weight: 700; margin: 0 0 4px; display: flex; align-items: center; gap: 10px; letter-spacing: 0; }
.ck .sub { color: var(--n-muted); font-size: 14px; margin: 0 0 18px; }
.ck-box { border: 1px solid rgb(227, 226, 224); border-radius: 10px; padding: 14px 16px 12px; background: #fff; box-shadow: 0 1px 2px rgba(15, 15, 15, .04); transition: border-color .15s, box-shadow .15s; }
.ck-box:focus-within { border-color: rgba(35, 131, 226, .6); box-shadow: 0 0 0 3px rgba(35, 131, 226, .12); }
.ck-box textarea { border: 0; padding: 0; min-height: 96px; font: 16px/1.7 var(--n-font); color: var(--n-text); resize: none; box-shadow: none !important; background: transparent; }
.ck-box textarea:focus { outline: none; }
.ck-attach { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.ck-attach:empty { display: none; }
.ck-thumb { position: relative; }
.ck-thumb img { width: 76px; height: 76px; object-fit: cover; border-radius: 6px; border: 1px solid var(--n-line); }
.ck-thumb audio { height: 36px; width: 240px; }
.ck-thumb .x { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%; background: rgb(55, 53, 47); color: #fff; border: 0; font-size: 12px; cursor: pointer; line-height: 20px; padding: 0; }
.ck-bar { display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--n-line); padding-top: 10px; margin-top: 8px; }
.ck-tool { background: none; border: 0; border-radius: 6px; padding: 6px 10px; font: 14px var(--n-font); color: var(--n-muted); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.ck-tool:hover { background: var(--n-hover); color: var(--n-text); }
.ck-tool.rec { color: var(--n-red); }
.ck-tool.rec::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--n-red); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.ck-bar .spacer { flex: 1; }
.ck-submit { background: #2383e2; color: #fff; border: 0; border-radius: 6px; padding: 7px 16px; font: 500 14px var(--n-font); cursor: pointer; }
.ck-submit:hover { background: #0077d4; }
.ck-submit:disabled { opacity: .5; cursor: default; }
.ck-msg { font-size: 13px; color: var(--n-red); margin-top: 8px; min-height: 18px; }
.ck-locked { background: var(--n-gray-bg); border-radius: 8px; padding: 18px 20px; color: var(--n-muted); font-size: 15px; }
.ck-entry { padding: 16px 0; border-bottom: 1px solid var(--n-line); }
.ck-entry:last-child { border-bottom: 0; }
.ck-head { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-bottom: 6px; }
.ck-avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--n-gray-bg); display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--n-muted); flex: none; }
.ck-name { font-weight: 600; }
.ck-time { color: var(--n-faint); font-size: 12px; }
.ck-text { white-space: pre-wrap; font-size: 15px; line-height: 1.7; padding-left: 34px; }
.ck-entry .ck-attach { padding-left: 34px; }
.ck-reply { margin: 10px 0 0 34px; background: var(--n-yellow-bg); border-radius: 6px; padding: 10px 14px; font-size: 14px; white-space: pre-wrap; }
.ck-reply b { display: block; font-size: 12px; color: rgb(145, 120, 50); margin-bottom: 2px; }
.ck-done { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: #448361; background: rgb(219, 237, 219); border-radius: 4px; padding: 1px 7px; }
.ck-mine { border: 1px solid var(--n-line); border-radius: 10px; padding: 4px 16px; }
.ck-mine .ck-head .edit { margin-left: auto; }
.ck-wall-title { font-size: 14px; font-weight: 600; color: var(--n-muted); margin: 36px 0 4px; }

/* ---------- 未解锁 ---------- */
.n-lock { text-align: center; padding: 56px 24px; background: var(--n-side); border-radius: 10px; margin-top: 12px; }
.n-lock .ic { font-size: 36px; }
.n-lock p { color: var(--n-muted); margin: 8px 0 20px; }

@media (max-width: 900px) {
  .n-layout { grid-template-columns: 1fr; }
  .n-side { position: fixed; top: 53px; left: 0; bottom: 0; width: 280px; z-index: 30; transform: translateX(-100%); transition: transform .25s; height: auto; box-shadow: 4px 0 24px rgba(0,0,0,.08); }
  .n-layout.side-open .n-side { transform: none; }
  .n-page .n-toggle-side { display: inline-flex; margin-bottom: 18px; }
  .n-page { padding-top: 24px; }
  .n-title { font-size: 32px; }
  .n-main { padding: 0 18px 80px; }
}

/* ---------- 右侧目录 ---------- */
.n-main.has-toc { display: grid; grid-template-columns: minmax(0, 1fr) 232px; gap: 24px; }
.n-toc { position: sticky; top: 77px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; padding: 56px 8px 24px 0; font-family: var(--n-content-font); }
.n-toc-title { font-size: 12px; color: var(--n-faint); padding: 0 10px 8px; font-family: var(--n-font); }
.n-toc a { display: flex; align-items: flex-start; gap: 4px; padding: 5px 10px; border-radius: 6px; font-size: 14px; line-height: 1.45; color: var(--n-muted);
  overflow: hidden; }
.n-toc a .lbl { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.n-toc a:hover { background: var(--n-hover); color: var(--n-text); }
.n-toc a.on { background: rgba(55, 53, 47, .08); color: var(--n-text); font-weight: 600; }
.n-toc .tg { width: 14px; flex: none; font-size: 9px; color: var(--n-faint); padding-top: 4px; cursor: pointer; transition: transform .15s; }
.n-toc .tg.closed { transform: rotate(-90deg); }
.n-toc a[hidden] { display: none; }
.n-toc-btn { display: none; position: fixed; right: 20px; bottom: 24px; z-index: 25; background: #fff; border: 1px solid var(--n-line); border-radius: 22px;
  padding: 9px 16px; font: 500 14px var(--n-font); color: var(--n-text); box-shadow: 0 6px 20px rgba(0,0,0,.1); cursor: pointer; }
@media (max-width: 1240px) {
  .n-main.has-toc { display: block; }
  .n-toc { display: none; position: fixed; right: 16px; bottom: 76px; top: auto; z-index: 26; width: 260px; max-height: 60vh; background: #fff;
    border: 1px solid var(--n-line); border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.14); padding: 12px 6px; }
  .n-toc.open { display: block; }
  .n-main.has-toc ~ .n-toc-btn, .n-toc-btn.show { display: inline-flex; }
}

/* ---------- 文字颜色 / 背景颜色 / 字号（Notion 配色，后台编辑器与前台共用） ---------- */
.tc-gray { color: #787774; } .tc-brown { color: #9f6b53; } .tc-orange { color: #d9730d; } .tc-yellow { color: #cb912f; }
.tc-green { color: #448361; } .tc-blue { color: #337ea9; } .tc-purple { color: #9065b0; } .tc-pink { color: #c14c8a; } .tc-red { color: #d44c47; }
.bg-gray { background: #f1f1ef; } .bg-brown { background: #f4eeee; } .bg-orange { background: #fbecdd; } .bg-yellow { background: #fbf3db; }
.bg-green { background: #edf3ec; } .bg-blue { background: #e7f3f8; } .bg-purple { background: #f6f3f9; } .bg-pink { background: #faf1f5; } .bg-red { background: #fdebec; }
[class*="bg-"]:is(span) { border-radius: 3px; padding: 0 2px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.fs-sm { font-size: .85em; } .fs-lg { font-size: 1.25em; } .fs-xl { font-size: 1.6em; line-height: 1.35; }

/* ---------- 学员划线 & 私人批注 ---------- */
.n-content { position: relative; }
mark.u-hl { color: inherit; border-radius: 2px; padding: 0; cursor: pointer; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
mark.u-yellow { background: rgba(255, 212, 0, .38); }
mark.u-green { background: rgba(91, 201, 120, .32); }
mark.u-blue { background: rgba(80, 160, 255, .28); }
mark.u-pink { background: rgba(255, 105, 180, .25); }
/* 下划线：不改背景，文字下面一条红色粗线 */
mark.u-underline { background: none; text-decoration: underline; text-decoration-color: #e5401b; text-decoration-thickness: 2px; text-underline-offset: 4px; }
mark.u-comment { background: rgba(255, 212, 0, .14); border-bottom: 2px solid rgba(255, 191, 0, .8); }
/* 问过 AI 的文字：淡紫色底 + 紫色细线（和单词「查过」的蓝色虚线、四色高亮都区分开） */
mark.u-asked { background: rgba(139, 92, 246, .13); border-bottom: 1.5px solid rgba(139, 92, 246, .55); }
mark.u-hl.has-note:not(.u-comment) { border-bottom: 2px dotted rgba(55, 53, 47, .45); }
mark.u-hl:hover { filter: brightness(.95); }
mark.u-hl:target { animation: u-flash 1.6s ease 2; }
@keyframes u-flash { 50% { box-shadow: 0 0 0 4px rgba(255, 191, 0, .45); } }
.u-margin { position: absolute; right: -52px; display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; cursor: pointer;
  font-size: 15px; padding: 2px 6px; border-radius: 6px; opacity: .75; font-family: var(--n-font); }
.u-margin:hover { background: var(--n-hover); opacity: 1; }
.u-margin span { font-size: 12px; color: var(--n-muted); }
@media (max-width: 1000px) { .u-margin { display: none; } }

.u-pop { position: fixed; z-index: 60; background: #fff; border-radius: 10px; font-family: var(--n-font); color: var(--n-text); max-width: 340px;
  max-height: calc(100vh - 16px); overflow-y: auto; overscroll-behavior: contain;
  box-shadow: 0 0 0 1px rgba(15,15,15,.05), 0 3px 6px rgba(15,15,15,.1), 0 9px 24px rgba(15,15,15,.2); animation: fade .12s; }
.u-bar { display: flex; align-items: center; gap: 6px; padding: 6px 8px; }
/* 卡片右上角的收起按钮：sticky，卡片往下滚动时一直在右上角 */
.u-close { position: sticky; top: 4px; float: right; z-index: 3; margin: 4px 4px -32px 0; width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .92); box-shadow: 0 0 0 1px rgba(15, 15, 15, .08), 0 1px 4px rgba(15, 15, 15, .1); color: var(--n-muted); font-size: 13px; cursor: pointer; }
.u-close:hover { background: var(--n-hover); color: var(--n-text); }
.u-pop > .u-bar, .u-pop > .u-note { padding-right: 40px; }
.u-pop > .u-dict:nth-child(2) .u-dict-entry:first-child .u-dict-head { padding-right: 34px; }
.u-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(55,53,47,.2); cursor: pointer; padding: 0; }
.u-dot.u-underline { background: #fff; color: #e5401b; font: 700 12px/1 var(--n-font); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; display: inline-flex; align-items: center; justify-content: center; }
.u-dot.u-yellow { background: #ffd400; } .u-dot.u-green { background: #5bc978; } .u-dot.u-blue { background: #50a0ff; } .u-dot.u-pink { background: #ff69b4; }
.u-dot.on { box-shadow: 0 0 0 2px var(--n-text); }
.u-sep { width: 1px; height: 18px; background: var(--n-line); margin: 0 2px; }
.u-btn { border: 0; background: none; padding: 5px 9px; border-radius: 6px; font: 500 13px var(--n-font); color: var(--n-text); cursor: pointer; white-space: nowrap; }
.u-btn:hover { background: var(--n-hover); }
.u-btn.danger { color: var(--n-red); }
.u-btn.primary { background: #2383e2; color: #fff; }
.u-btn.primary:hover { background: #0077d4; }
.u-note { padding: 12px 14px 4px; max-width: 320px; }
.u-note-head { font-size: 12px; color: var(--n-faint); margin-bottom: 4px; }
.u-note-head span { margin-left: 6px; background: var(--n-gray-bg); border-radius: 4px; padding: 0 5px; }
.u-note-text { font-size: 14px; line-height: 1.6; white-space: pre-wrap; font-family: var(--n-content-font); }
.u-edit { padding: 10px; width: 300px; }
.u-edit textarea { font: 14px/1.6 var(--n-content-font); border: 1px solid var(--n-line); border-radius: 6px; padding: 8px 10px; min-height: 72px; resize: vertical; box-shadow: none; }
.u-edit textarea:focus { border-color: rgba(35,131,226,.6); box-shadow: 0 0 0 3px rgba(35,131,226,.12); }
.u-edit-bar { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.u-edit-bar span { flex: 1; font-size: 11px; color: var(--n-faint); }

/* ---------- 课时讨论区 ---------- */
.dc { margin-top: 56px; border-top: 1px solid var(--n-line); padding-top: 32px; }
.dc h2 { font-size: 24px; font-weight: 700; margin: 0 0 4px; letter-spacing: 0; }
.dc .sub { color: var(--n-muted); font-size: 14px; margin: 0 0 18px; }
.dc-box { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.dc-box .ck-box { flex: 1; padding: 10px 14px 8px; }
.dc-box textarea { min-height: 44px !important; }
.dc-item { display: flex; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--n-line); }
.dc-item:last-child { border-bottom: 0; }
.dc-body { flex: 1; min-width: 0; }
.dc-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.dc-head .ck-name { font-weight: 600; }
.dc-teacher { font-size: 11px; font-weight: 600; color: #fff; background: var(--ink-blue, #1f3fb0); border-radius: 4px; padding: 0 6px; line-height: 18px; }
.dc-text { white-space: pre-wrap; font-size: 15px; line-height: 1.7; margin-top: 2px; word-break: break-word; }
.dc-del { margin-left: auto; opacity: 0; }
.dc-item:hover .dc-del { opacity: 1; }
@media (hover: none) { .dc-del { opacity: 1; } }
.dc-more { display: block; margin: 8px auto 0; }

/* 打卡：本节重点表达 */
.ck-exprs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -4px 0 12px; font-size: 13px; color: var(--n-muted); }
.ck-exprs > span { margin-right: 2px; }
.ck-expr { border: 1px solid rgba(55,53,47,.16); background: #fff; border-radius: 14px; padding: 3px 11px; font: 14px var(--n-content-font);
  color: var(--n-text); cursor: pointer; transition: background .15s, border-color .15s; }
.ck-expr:hover { background: var(--n-yellow-bg); border-color: rgba(203,145,47,.5); }

/* 打卡按钮不换行，窄屏时整行换行 */
.ck-tool, .ck-submit { white-space: nowrap; }
.ck-bar { flex-wrap: wrap; row-gap: 6px; }

/* 图片大小 & 位置（后台拖动设置） */
.n-figure { width: var(--w, 100%); }
.n-figure.align-center { margin-left: auto !important; margin-right: auto !important; }
.n-figure.align-left { margin-right: auto !important; }
.n-figure.align-right { margin-left: auto !important; }
.n-figure img { width: 100%; }
/* 手机上太小的图放大一点，保证看得清 */
@media (max-width: 700px) { .n-figure { width: max(var(--w, 100%), min(100%, 280px)); } }

/* 打卡：日期 + ID */
.ck-today { font-size: 14px; font-weight: 500; color: var(--n-muted); margin-left: 4px; }
.ck-id { font-size: 12px; color: var(--n-muted); background: var(--n-gray-bg); border-radius: 4px; padding: 0 6px; line-height: 20px; white-space: nowrap; }
.ck-date { font-size: 12px; color: var(--n-faint); white-space: nowrap; }
.ck-head { flex-wrap: wrap; row-gap: 4px; }
.ck-text { font-family: var(--n-content-font); font-size: 16px; }

/* 讨论 — 提问 */
.dc-kinds { display: inline-flex; background: var(--n-gray-bg); border-radius: 8px; padding: 3px; margin-bottom: 8px; }
.dc-kinds button { border: 0; background: none; border-radius: 6px; padding: 4px 12px; font: 500 13px var(--n-font); color: var(--n-muted); cursor: pointer; }
.dc-kinds button.on { background: #fff; color: var(--n-text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.dc-kind { font-size: 11px; font-weight: 600; border-radius: 4px; padding: 0 6px; line-height: 18px; background: rgb(253,236,200); color: rgb(140,90,20); white-space: nowrap; }
.dc-kind.done { background: rgb(219,237,219); color: rgb(28,100,60); }
.dc-answers { margin-top: 10px; border-left: 2px solid var(--ink-blue, #1f3fb0); padding-left: 12px; }
.dc-answer { display: flex; gap: 8px; padding: 6px 0; }
.dc-answer .ck-avatar { width: 22px; height: 22px; font-size: 11px; }
.dc-reply { margin-top: 8px; }
.dc-item.flash { animation: u-flash 1.6s ease 2; border-radius: 8px; }

/* 讨论区：名字、标签、时间不被挤断 */
.dc-head { flex-wrap: wrap; row-gap: 2px; }
.dc-head .ck-name, .dc-head .ck-time, .dc-teacher, .dc-kind { white-space: nowrap; }

/* 查词卡片（选中单词时出现在小工具条下面） */
.u-pop:has(.u-dict) { width: 340px; max-width: calc(100vw - 16px); }
.u-dict { border-top: 1px solid var(--n-line); padding: 12px 14px 10px; font-family: var(--n-font); }
.u-pop > .u-dict:first-child { border-top: 0; }
.u-dict-loading, .u-dict-none { font-size: 13px; color: var(--n-muted); padding: 2px 0 8px; }
.u-dict-entry + .u-dict-entry { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--n-line); }
.u-dict-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.u-dict-head b { font-size: 18px; color: var(--ink-blue, #1f3fb0); font-family: var(--n-content-font); }
.u-dict-entry.base .u-dict-head b { font-size: 15px; }
.u-dict-ph { font-size: 13px; color: var(--n-muted); }
.u-dict-say { border: 0; background: none; cursor: pointer; font-size: 14px; padding: 0 2px; opacity: .7; }
.u-dict-say:hover { opacity: 1; }
.u-dict-base { font-size: 11px; background: var(--n-gray-bg); color: var(--n-muted); border-radius: 4px; padding: 0 5px; }
.u-dict-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 2px; }
.u-dict-tags span { font-size: 11px; color: rgb(140, 90, 20); background: var(--n-yellow-bg); border-radius: 4px; padding: 0 6px; line-height: 18px; }
.u-dict ul { list-style: none; margin: 6px 0 0; padding: 0; font-size: 14px; line-height: 1.6; color: var(--n-text); }
.u-pop:has(.u-senses) { width: 380px; max-width: calc(100vw - 16px); }
.u-senses { margin-top: 10px; }
.u-sense { border-left: 3px solid #d3d1c7; padding: 2px 0 2px 10px; margin-bottom: 12px; }
.u-sense.more { display: none; }
.u-senses.all .u-sense.more { display: block; }
.u-sense.p-v { border-left-color: #378add; } .u-sense.p-n { border-left-color: #1d9e75; }
.u-sense.p-adj { border-left-color: #d85a30; } .u-sense.p-adv { border-left-color: #7f77dd; }
.u-sense-h { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.u-pos { font-size: 11px; border-radius: 4px; padding: 0 6px; line-height: 18px; background: var(--n-gray-bg); color: var(--n-muted); flex: none; }
.p-v .u-pos { background: #e6f1fb; color: #0c447c; } .p-n .u-pos { background: #e1f5ee; color: #085041; }
.p-adj .u-pos { background: #faece7; color: #712b13; } .p-adv .u-pos { background: #eeedfe; color: #3c3489; }
.u-sn { font-size: 12px; color: var(--n-faint); }
.u-zh { font-size: 15px; font-weight: 600; color: var(--n-text); line-height: 1.5; }
.u-sense-en { font-size: 13px; color: var(--n-muted); line-height: 1.5; margin-top: 2px; }
.u-sense-ex { font-family: var(--n-content-font); font-size: 14px; font-style: italic; color: var(--n-text); line-height: 1.55; margin-top: 5px; }
.u-sense-ex b { font-weight: 600; color: var(--ink-blue, #1f3fb0); }
.u-sense-exzh { font-size: 12.5px; color: var(--n-muted); line-height: 1.5; margin-top: 1px; }
.u-senses-more { border: 0; background: none; font: inherit; font-size: 13px; color: #2f6fde; padding: 0 0 4px; cursor: pointer; }
.u-senses-more:hover { text-decoration: underline; }
.u-sense-syn { font-size: 12.5px; color: var(--n-text); margin-top: 4px; line-height: 1.5; }
.u-sense-syn span { font-size: 11px; color: var(--n-muted); background: var(--n-gray-bg); border-radius: 4px; padding: 0 5px; margin-right: 6px; }
.u-ctx { margin-top: 10px; }
.u-ctx-btn { width: 100%; border: 1px dashed rgba(47, 111, 222, .45); background: #f5f8ff; color: #2f5bc4; border-radius: 7px; padding: 7px 10px; font: 500 13px var(--n-font); cursor: pointer; text-align: left; }
.u-ctx-btn:hover { background: #ebf1ff; }
.u-ctx-loading, .u-ctx-err { font-size: 13px; color: var(--n-muted); padding: 8px 10px; background: var(--n-gray-bg); border-radius: 7px; }
.u-ctx-err { color: #b35c00; background: #fff6e6; }
.u-ctx > .u-ctx-head { font-size: 13px; font-weight: 600; color: #2f5bc4; margin-bottom: 4px; }
.u-ctx-mean { font-size: 13px; color: var(--n-muted); margin-bottom: 6px; }
.u-ctx-mean b { color: var(--n-text); }
.u-ctx-list { list-style: none; margin: 0; padding: 0; }
.u-ctx-list li { padding: 6px 0; border-top: 1px solid var(--n-line); }
.u-ctx-list li:first-child { border-top: 0; }
.u-ctx-list b { font-size: 15px; color: var(--ink-blue, #1f3fb0); font-family: var(--n-content-font); }
.u-ctx-best { font-size: 11px; color: #085041; background: #e1f5ee; border-radius: 4px; padding: 0 5px; margin-left: 6px; }
.u-ctx-zh { font-size: 13px; color: var(--n-text); margin-left: 8px; }
.u-ctx-note { font-size: 12px; color: var(--n-muted); margin-top: 1px; line-height: 1.5; }
.u-ctx-rw { font-family: var(--n-content-font); font-size: 13.5px; line-height: 1.6; background: var(--n-gray-bg); border-radius: 7px; padding: 7px 9px; margin-top: 6px; }
.u-ctx-rw span { font-family: var(--n-font); font-size: 11px; color: var(--n-muted); margin-right: 6px; }
.u-ctx-rw b { color: #0b7a6c; }
.u-ctx-src { font-size: 11px; color: var(--n-faint); margin-top: 6px; }
.u-dict-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.u-dict-btn.eudic { background: #2f6fde; color: #fff; border-radius: 6px; padding: 5px 10px; font-size: 13px; font-weight: 500; }
.u-dict-btn.eudic:hover { background: #255fc4; }
.u-dict-link { font-size: 12px; color: var(--n-muted); }
.u-dict-link:hover { color: var(--n-text); text-decoration: underline; }
.u-dict-src { font-size: 11px; color: var(--n-faint); margin-top: 8px; }
.u-dict-note { font-size: 11px; line-height: 1.5; color: var(--n-faint); margin-top: 6px; }
.u-dict-note.warn { font-size: 12px; color: #b35c00; background: #fff6e6; border-radius: 6px; padding: 6px 8px; }
button.u-copy { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; cursor: pointer; }

/* 查过的词：浅蓝色虚线下划线，点一下再看释义 */
mark.u-lookup { background: rgba(80, 160, 255, .10); border-bottom: 1.5px dashed rgba(51, 126, 169, .7); }
/* 在别处查过的同一个词：和「查过」标记一样的样式，点一下看释义 */
.u-word { background: rgba(80, 160, 255, .10); border-bottom: 1.5px dashed rgba(51, 126, 169, .7); border-radius: 2px; cursor: pointer; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.u-word:hover { background: rgba(80, 160, 255, .18); }

/* 有右侧目录时，💬 图标靠近正文，不和目录重叠 */
.n-main.has-toc .u-margin { right: -30px; }

/* ---------- 收起目录 / 全屏学习 ---------- */
.n-side-head { display: flex; align-items: flex-start; gap: 4px; }
.n-side-head .n-side-title { flex: 1; }
.n-toc-title { display: flex; align-items: center; justify-content: space-between; }
.n-collapse { border: 0; background: none; color: var(--n-faint); font-size: 16px; line-height: 1; padding: 3px 7px; border-radius: 5px; cursor: pointer; }
.n-collapse:hover { background: var(--n-hover); color: var(--n-text); }
.n-view-bar { display: flex; align-items: center; gap: 6px; margin: -20px 0 14px; min-height: 30px; }
.n-view-bar .spacer { flex: 1; }
.n-show { display: none; }
.n-layout { transition: grid-template-columns .2s ease; }
@media (min-width: 901px) {
  .n-layout.hide-side { grid-template-columns: 0 1fr; }
  .n-layout.hide-side .n-side { visibility: hidden; padding: 0; border: 0; }
  .n-layout.hide-side .n-show[data-show="side"] { display: inline-flex; }
}
@media (min-width: 1241px) {
  .n-layout.hide-toc .n-main.has-toc { grid-template-columns: minmax(0, 1fr) 0; }
  .n-layout.hide-toc .n-toc { visibility: hidden; padding: 0; }
  .n-layout.hide-toc .n-main.has-toc .n-show[data-show="toc"] { display: inline-flex; }
  .n-layout.hide-toc .n-main.has-toc .n-page { max-width: 820px; }
}
/* 小屏幕上目录本来就是悬浮按钮，不显示这些开关 */
@media (max-width: 900px) { .n-view-bar, .n-side-head .n-collapse { display: none; } }
@media (max-width: 1240px) { .n-toc-title .n-collapse { display: none; } }

/* 目录底部：今日打卡、讨论 — 提问 */
.n-toc a.first-extra { margin-top: 10px; border-top: 1px solid var(--n-line); border-radius: 0 0 6px 6px; padding-top: 10px; }
.n-toc a.extra { color: var(--n-text); }
#checkin, #discuss { scroll-margin-top: 70px; }
/* 只有左侧目录收起时才显示「☰ 课程目录」这一栏 */
.n-view-bar { display: none; }
@media (min-width: 901px) { .n-layout.hide-side .n-view-bar { display: flex; } }

/* 完成学习 + 目录里已完成的 ✓ */
.n-nav .ico.done { color: #448361; font-weight: 700; opacity: 1; }
.done-box { padding-top: 24px; }
.done-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--n-side); border: 1px solid var(--n-line); border-radius: 10px; padding: 14px 16px; }
.done-row .sub { flex: 1; color: var(--n-muted); font-size: 15px; }
.done-badge { flex: 1; color: #448361; font-weight: 600; }
.done-row .ck-submit { text-decoration: none; }
#complete { scroll-margin-top: 70px; }

/* 问 AI：查词卡片下方一行，AI 直接在卡片里讲解 */
.u-ai { border-top: 1px solid var(--n-line); padding: 10px 14px 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--n-font); }
.u-ai-btn { border: 1px solid rgba(77, 107, 254, .35); background: #f2f5ff; color: #3554d1; border-radius: 6px; padding: 5px 12px; font: 500 13px var(--n-font); cursor: pointer; }
.u-ai-btn:hover { background: #e6ecff; }
.u-ai-tip { font-size: 11px; color: var(--n-faint); }
.u-ai-done { font-size: 12.5px; color: var(--n-muted); line-height: 1.6; }
.u-ai-answer { width: 100%; font-size: 13.5px; line-height: 1.65; color: var(--n-text); }
.u-ai-answer b { font-weight: 600; }
.u-ai-answer .md-h { font-weight: 600; margin-top: 4px; }
.u-ai-answer .md-li { padding-left: 1.1em; text-indent: -1.1em; }
.u-ai-answer .md-gap { height: 6px; }
.u-ai-wait { color: var(--n-muted); animation: u-ai-pulse 1.2s ease-in-out infinite; }
@keyframes u-ai-pulse { 50% { opacity: .45; } }
.u-ai-err { font-size: 13px; color: #b35c00; background: #fff6e6; border-radius: 6px; padding: 6px 8px; }
.u-ai-src { width: 100%; font-size: 11px; color: var(--n-faint); display: flex; align-items: center; gap: 8px; }
.u-ai-src span { flex: 1; }
.u-ai-copy { border: 1px solid var(--n-line); background: #fff; border-radius: 6px; padding: 3px 9px; font: inherit; font-size: 12px; color: var(--n-muted); cursor: pointer; white-space: nowrap; }
.u-ai-copy:hover { color: var(--n-text); background: var(--n-hover); }
/* 词卡释义和 AI 回答可以选中复制 */
.u-pop .u-dict-entry, .u-pop .u-ai-answer { user-select: text; -webkit-user-select: text; cursor: text; }
.u-ai-up { margin-top: 8px; width: 100%; border: 0; background: #6c4fd6; color: #fff; border-radius: 7px; padding: 8px 10px; font: 500 13px var(--n-font); cursor: pointer; }
.u-ai-up:hover { background: #5b3fc4; }
.u-ai-uptip { font-size: 11.5px; color: var(--n-muted); margin-top: 4px; text-align: center; }
