/* A stable icon rail; hovering labels never changes the conversation width. */
.center { --conversation-width: 820px; }
.chat { scrollbar-gutter: stable both-edges; }
.chat-inner { max-width: calc(var(--conversation-width) + 56px); padding-inline: 28px; }
.composer { padding-inline: 28px; }
.composer-inner { max-width: var(--conversation-width); }
/* ---------- 左栏：悬浮圆按钮 + 气泡（t-20261009-htuw） ----------
   左边 56px 一列只放圆按钮（和原来收起时同宽，对话区的位置与宽度不变）；面板是浮在对话上的气泡，
   打开、收起都不推动版面。气泡和圆按钮同一层（--z-drawer），账户菜单和下拉菜单在它上面（--z-menu）。 */
.left-side { --sidebar-paper: var(--surface); --rail-w: 56px; --bubble-w: 320px; position: relative; z-index: var(--z-drawer); width: var(--rail-w); isolation: isolate; }
.left-side .abar { position: absolute; inset: 0 auto 0 0; width: var(--rail-w); align-items: center; gap: 10px; padding: 14px 0 14px 8px; overflow: visible; border: 0; background: transparent; }
.sidebar-item { position: relative; flex: none; }
.sidebar-item--close { display: none; }
/* 圆按钮：白纸小圆片浮在画布上（浮层阴影；深色是一圈描边） */
.sidebar-item :is(.abar-btn, .activity-utility-button, .drawer-close) { position: relative; display: grid; place-items: center; width: 40px; height: 40px; min-height: 40px; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--muted); box-shadow: var(--shadow-pop); cursor: pointer; transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, transform 150ms ease; }
.sidebar-item :is(.abar-btn, .activity-utility-button, .drawer-close) .icon { flex: none; width: 19px; height: 19px; }
.sidebar-item :is(.abar-btn, .activity-utility-button, .drawer-close):hover { color: var(--ink); border-color: var(--border-strong); background: var(--surface); transform: scale(1.04); }
.sidebar-item :is(.abar-btn, .activity-utility-button, .drawer-close):focus-visible { color: var(--ink); outline: 2px solid var(--accent); outline-offset: 2px; }
/* 正在看的那一栏（气泡开着）和开着的设置窗口：蓝笔点亮 */
.sidebar-item :is(.abar-btn, .activity-utility-button)[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); transform: none; }
/* 名字和快捷键：停一会儿才出来；气泡开着的那一个不再出（气泡标题就是它）。学习计时的小圆用同一种提示 */
.sidebar-item :is(.abar-btn, .study-timer) .abar-tip { position: absolute; z-index: 4; left: calc(100% + 10px); top: 50%; display: inline-flex; align-items: center; gap: 8px; min-width: max-content; padding: 6px 8px 6px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop); font-size: var(--fs-caption); font-weight: 600; line-height: 1.5; white-space: nowrap; opacity: 0; visibility: hidden; pointer-events: none; transform: translate(-4px, -50%); transition: opacity 120ms ease, transform 140ms ease, visibility 120ms; }
.sidebar-item :is(.abar-btn, .study-timer):is(:hover, :focus-visible) .abar-tip { opacity: 1; visibility: visible; transform: translate(0, -50%); transition-delay: 380ms; }
.sidebar-item .abar-btn[aria-expanded="true"] .abar-tip { display: none; }
/* 学习计时（t-20261012-j9hs）：圆里写本单元分钟数。
   t-20261026-wybz game：和圆按钮一样大，一眼看出在走还是停——在走是一圈蓝边、数字墨色，右下角一枚蓝色小章写两道竖线（点一下暂停）；
   停着是一圈灰虚线、数字淡下去，右下角换成更大的蓝色播放三角（点一下继续）。开、停那一下小章翻一下（T0）；暂停时桌宠趴下睡觉 */
.study-timer-item[hidden] { display: none; }
.sidebar-item .study-timer { position: relative; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 2px solid var(--accent); border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop); font: 700 13px/1 var(--font-sans); font-variant-numeric: tabular-nums; cursor: pointer; transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease, transform var(--motion-t0) var(--ease-back); }
.sidebar-item .study-timer[data-digits="3"] { font-size: 11px; letter-spacing: -0.03em; }
.sidebar-item .study-timer:hover { transform: scale(1.06); }
.sidebar-item .study-timer:active { transform: scale(.92); transition-duration: 80ms; }
.sidebar-item .study-timer:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.study-timer__state { position: absolute; right: -5px; bottom: -5px; display: grid; place-items: center; width: 18px; height: 18px; border: 2px solid var(--canvas); border-radius: 50%; background: var(--accent); color: var(--on-accent); }
.study-timer__state svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.study-timer__play { display: none; fill: currentColor !important; stroke-width: 1 !important; }
.sidebar-item .study-timer:not(.is-running) { border: 2px dashed var(--border-strong); background: var(--surface-subtle); color: var(--faint); }
/* 停着：播放章大一号、再往外挪一点，整枚落在数字右下角外面，不咬住数字 */
.sidebar-item .study-timer:not(.is-running) .study-timer__state { right: -10px; bottom: -10px; width: 22px; height: 22px; }
.sidebar-item .study-timer:not(.is-running) .study-timer__state svg { width: 12px; height: 12px; margin-left: 1px; }
.sidebar-item .study-timer:not(.is-running) .study-timer__play { display: block; }
.sidebar-item .study-timer:not(.is-running) .study-timer__pause { display: none; }
.study-timer.is-flipping .study-timer__state { animation: timer-flip 340ms var(--ease-back); }
@keyframes timer-flip { 0% { transform: scale(.3) rotate(-120deg); } 100% { transform: none; } }
/* 知识地图入口画成一张游戏地图（t-20261026-wybz game）：折起来的图纸（上下沿的折角）、两个粗点走成的小路、路尽头一枚实心蓝图钉；
   左栏实际 19px，只留这三样。图钉是一整块实心的形状，离图纸右沿 4 个单位以上，19px 和 24px 的 1 倍像素下都认得出是标记点 */
.icon-game-map__trail { stroke-width: 1.9; }
.icon-game-map__pin { fill: var(--accent); stroke: none; }
.sidebar-item .study-timer .study-timer__tip { flex-direction: column; align-items: stretch; gap: 1px; padding: 6px 10px; font-weight: 400; text-align: left; }
.study-timer__row { display: flex; justify-content: space-between; gap: 14px; }
.study-timer__row > span { color: var(--muted); }
.study-timer__row > strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
/* 补记问句开着时，悬停提示不再叠在它上面 */
.left-side:has(.study-timer-gap:not([hidden])) .study-timer__tip { display: none; }
/* 补记问句：白纸小浮层像气泡挂在小计时右侧，竖直对齐它的中线（workspace.js 写 --study-timer-top）；不抢焦点、不挡输入区 */
.study-timer-gap { --study-timer-top: 0px; position: absolute; z-index: 5; top: var(--study-timer-top); left: calc(var(--rail-w) + 4px); width: max-content; max-width: min(340px, calc(100vw - var(--rail-w) - 24px)); padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--shadow-pop); transform: translateY(-50%); cursor: default; white-space: normal; }
.study-timer-gap::before { content: ''; position: absolute; left: -5px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-bottom: 1px solid var(--border); border-left: 1px solid var(--border); background: var(--surface); transform: rotate(45deg); }
.study-timer-gap[hidden] { display: none; }
.study-timer-gap__text { margin: 0 0 8px; color: var(--ink); font-size: var(--fs-ui); font-weight: 400; line-height: 1.5; }
.study-timer-gap__actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* 提醒黄点（计划待决、待确认的改动）贴在圆片右上缘 */
.sidebar-item .abar-btn .abar-pending-dot, .sidebar-item .activity-utility-button.has-pending::after { inset: 1px 1px auto auto; top: 1px; right: 1px; outline-color: var(--surface); }
.abar-key, .sidebar-heading__key { display: inline-block; min-width: 0; padding: 0 5px; border: 1px solid var(--border); border-radius: var(--r-xs); background: var(--surface-subtle); color: var(--muted); font: 600 11px/18px var(--font-sans); font-variant-numeric: tabular-nums; }
/* 气泡：和原来的左栏差不多大，浮在对话上；进出 180ms */
.left-side > .lp { position: fixed; top: calc(var(--topbar-h) + 8px); bottom: 12px; left: calc(var(--rail-w) + 10px); width: var(--bubble-w); max-width: calc(100vw - var(--rail-w) - 22px); margin: 0; flex: none; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--sidebar-paper); box-shadow: var(--shadow-pop); opacity: 1; transform: none; transition: opacity 180ms ease, transform 200ms cubic-bezier(.2,.8,.2,1), display 200ms allow-discrete; }
.left-side > .lp[hidden] { opacity: 0; transform: translateX(-10px); pointer-events: none; }
@starting-style { .left-side > .lp:not([hidden]) { opacity: 0; transform: translateX(-10px); } }
.left-side > .lp[hidden] { display: none !important; }
@keyframes sidebar-panel-enter { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
.sidebar-heading { position: sticky; top: 0; z-index: 3; display: flex; flex: none; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; padding: 8px 8px 8px 14px; border: 0; border-radius: 0; background: var(--sidebar-paper); }
.sidebar-heading h2 { display: flex; align-items: center; gap: 9px; min-width: 0; margin: 0; color: var(--ink); font-size: var(--fs-ui); font-weight: 600; }
.sidebar-heading h2 .icon { width: 18px; height: 18px; flex: none; color: var(--accent-strong); }
.sidebar-heading h2 span { overflow-wrap: anywhere; }
/* 右上角：快捷键 · 展开成窗口 · 收起 */
.sidebar-heading__actions { display: flex; flex: none; align-items: center; gap: 2px; }
.sidebar-heading__key { margin-right: 4px; }
.sidebar-heading__btn { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); cursor: pointer; }
.sidebar-heading__btn:hover { background: var(--surface-subtle); color: var(--ink); }
.sidebar-heading__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sidebar-heading__btn[hidden] { display: none; }
/* 各栏自己的展开按钮都换成栏头右上角这一个 */
.left-side > .lp :is(.km-maximize, .km-head.is-bare, .lr-head) { display: none; }
/* 计划栏头的那一行只剩展开按钮时整行不留空 */
.left-side > .lp :is(.lp-pane[data-mode="tasks"] > .lp-head, .sidebar-plan-summary:has(.plan-home__body:empty)) { display: none; }
#leftPanel > .lp-pane { padding: 8px 14px 12px; }
#leftPanel .lp-head { flex-wrap: wrap; gap: 8px; justify-content: flex-start; }
#leftPanel .lp-head h2 { display: none; }
#leftPanel .lp-head .material-search { box-sizing: border-box; height: var(--control-h-sm); flex: 1 1 140px; min-width: 0; margin: 0; }
#leftPanel .file-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: var(--fs-ui); line-height: 1.5; }
#leftPanel .file-row { grid-template-columns: 28px minmax(0, 1fr) 20px; gap: 12px; padding: 8px; }
#leftPanel .learning-overview { min-height: 0; }
#leftPanel .knowledge-map-overview { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#leftPanel .lp-pane.is-on:is([data-mode="overview"], [data-mode="timeline"]) { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-bottom: 0; }
#leftPanel .lp-pane.is-on[data-mode="overview"] { padding: 0; }
#leftPanel .lp-pane:is([data-mode="overview"], [data-mode="timeline"]) > .lp-head { display: none; }
/* ---------- 设置窗口（个性化 + 设置，t-20261009-htuw） ----------
   左边分类、右边一类一页，像桌面应用的设置页：一行一项，标签在左、控件在右；分组只用细线和小标题，不套卡片。
   窄屏（≤600px）先是分类列表，点进去是这一类，左上角返回。 */
dialog.settings-window { width: min(880px, calc(100vw - 48px)); height: min(640px, calc(100dvh - 48px)); max-width: none; max-height: none; margin: auto; padding: 0; overflow: visible; border: 0; border-radius: var(--r-md); background: transparent; color: var(--ink); }
dialog.settings-window::backdrop { background: var(--scrim); }
.settings-window__panel { display: grid; grid-template-columns: 216px minmax(0, 1fr); width: 100%; height: 100%; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-modal); }
.settings-nav { display: flex; flex-direction: column; gap: 14px; min-height: 0; padding: 20px 12px; overflow-y: auto; border-right: 1px solid var(--border); background: var(--canvas); }
.settings-nav__title { margin: 0; padding: 0 10px; color: var(--ink); font-size: var(--fs-body); font-weight: 600; line-height: var(--lh-title); }
.settings-nav__list { display: grid; gap: 2px; }
.settings-tab { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 7px 10px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); font: inherit; font-size: var(--fs-ui); font-weight: 400; text-align: left; cursor: pointer; }
.settings-tab .icon { flex: none; width: 18px; height: 18px; }
.settings-tab:hover { background: var(--surface-subtle); color: var(--ink); }
.settings-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.settings-tab[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--border); }
.settings-tab[aria-selected="true"] .icon { color: var(--accent); }
/* 开发者模式只给开了它的账号；个性化、课程有待你确认的改动时，分类名后面一个提醒黄点 */
.settings-window:has(#rlhfFeedbackSettings[hidden]) [data-settings-tab="developer"] { display: none; }
.settings-window:has(#personalPane .pz-pending) [data-settings-tab="personal"]::after,
.settings-window:has(#settingsPending .pz-pending) [data-settings-tab="course"]::after { content: ''; width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: var(--marker); }
.settings-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.settings-main__bar { display: flex; flex: none; align-items: center; gap: 8px; min-height: 56px; padding: 12px 12px 4px 32px; }
.settings-main__title { flex: 1; min-width: 0; color: var(--ink); font-size: var(--fs-h2); font-weight: 600; line-height: var(--lh-title); }
.settings-window__icon-btn { display: inline-grid; flex: none; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--muted); cursor: pointer; }
.settings-window__icon-btn .icon { width: 18px; height: 18px; }
.settings-window__icon-btn:hover { background: var(--surface-subtle); color: var(--ink); }
.settings-window__icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.settings-back { display: none; }
.settings-main__body { flex: 1; min-height: 0; padding: 8px 32px 32px; overflow-y: auto; outline: none; }
.settings-section[hidden] { display: none; }
.settings-section { max-width: 600px; }
.settings-window .reading-style-preference { margin: 0 0 8px; padding-bottom: 20px; }
.settings-window #displayNameRow { margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.settings-window .reading-style-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 600px) { .settings-window .reading-style-picker { grid-template-columns: minmax(0, 1fr); } }

/* 控件语言：五种控件（workspace-setting-controls.js）
   ① 值 + 铅笔  ② 值 + 下拉箭头  ③ 开关  ④ 只读值  ⑤ 分段；外加右对齐的动作按钮（开发者模式的「查看」）。
   每行左格是标签（14px/500 墨色，可带一行 12px 说明），右格是值；值一律 14px 墨色右对齐，
   图标都在最右一列 14px：所有值的右缘对齐、所有图标对齐，开关、分段的右缘和图标右缘对齐。
   行间 1px 分割线；分组只用 12px/600 灰标题，不套卡片。 */
.settings-window .set-group { margin: 28px 0 4px; color: var(--muted); font-size: var(--fs-caption); font-weight: 600; line-height: 1.5; }
.settings-window .set-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; min-height: 48px; padding: 8px 0; border-top: 1px solid var(--border); color: var(--ink); }
.settings-window :is(.settings-section > .set-row:first-child, .set-pending-slot:empty + .set-row, .set-group + .set-row, .set-group + .set-rows > .set-row:first-child, .set-group + .ctrl-row[hidden] + .set-rows > .set-row:first-child, .ctrl-row[hidden]:first-child + .set-rows > .set-row:first-child, .set-group + .set-long-row, .set-group + .set-rows > .set-long-row:first-child, #rlhfFeedbackSettings > .set-row:first-child) { border-top: 0; }
.settings-window .set-row:has(> .set-label > .set-hint:not([hidden]):not(:empty)) { min-height: 56px; }
.settings-window .set-label { display: grid; min-width: 0; }
.settings-window .set-title { color: var(--ink); font-size: var(--fs-ui); font-weight: 500; line-height: 1.45; }
.settings-window .set-hint { margin-top: 2px; color: var(--muted); font-size: var(--fs-caption); line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settings-window .set-hint:empty { display: none; }
.settings-window .v { justify-self: end; display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; height: 32px; max-width: 240px; margin-right: -6px; padding: 0 6px 0 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); font: inherit; font-size: var(--fs-ui); line-height: 1.2; cursor: pointer; }
.settings-window .v .vt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settings-window .v .vt.is-empty { color: var(--faint); }
.settings-window .v .ti { flex: 0 0 14px; width: 14px; height: 14px; fill: none; stroke: var(--faint); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.settings-window .v:hover:not(:disabled), .settings-window .v[aria-expanded="true"] { background: var(--surface-subtle); }
.settings-window .v:hover:not(:disabled) .ti, .settings-window .v[aria-expanded="true"] .ti { stroke: var(--ink); }
.settings-window .v:disabled { cursor: default; color: var(--faint); }
.settings-window .v[aria-busy="true"] { cursor: progress; }
.settings-window .v:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.settings-window .v-ro { cursor: default; padding-right: 26px; }
.settings-window .v-icon-only { padding: 0 6px; }
.settings-window .v-inp { justify-self: end; width: 200px; height: 32px; padding: 0 10px; border: 1px solid var(--accent); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--fs-ui); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.settings-window .v-inp.hours { width: 80px; }
/* 「其他…」的输入框开在这一行下面，整行宽 */
.settings-window .v-inp.wide { display: block; width: 100%; margin: 0 0 8px; }
.settings-window .v-inp.wide[hidden] { display: none; }
/* 选了「其他」时一直显示的输入框：平时是普通细边，点进去才是蓝色聚焦 */
.settings-window textarea.v-inp.set-other-inp { height: auto; min-height: 32px; padding: 5px 10px; line-height: 1.5; resize: none; overflow: hidden; }
.settings-window .set-other-inp:not(:focus) { border-color: var(--border); box-shadow: none; }
.settings-window .set-other-inp:not(:focus):hover { border-color: var(--border-strong); }
.settings-window textarea.v-inp { display: block; width: 100%; height: 96px; margin: 0 0 8px; padding: 8px 10px; line-height: 1.6; resize: vertical; }
.settings-window .set-long-row { border-top: 1px solid var(--border); }
.settings-window .set-long-row > .set-row { border-top: 0; }
.settings-window .set-long { margin: -2px 0 10px; color: var(--muted); font-size: var(--fs-ui); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.settings-window .set-long.is-empty { color: var(--faint); }
.settings-window .set-action { justify-self: end; height: 32px; margin-right: -8px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: none; color: var(--accent-strong); font: inherit; font-size: var(--fs-ui); font-weight: 600; cursor: pointer; }
.settings-window .set-action:hover { background: var(--accent-soft); }
.settings-window .set-action:disabled { color: var(--faint); background: none; cursor: default; }
.settings-window .set-error { margin: 0 0 6px; color: var(--danger); font-size: var(--fs-caption); line-height: 1.45; }
.settings-window .set-error:empty { display: none; }
/* 模型三档滑块（workspace-provider-configuration.js）：行样式同其他设置，左边名称与说明，右边紧凑控件。
   控件是一条圆角轨道，三个停靠点在三个等宽列的中心；选中档是实心圆角滑钮，滑钮左边的轨道用 --accent-soft 填充。
   强弱只靠滑钮位置和填充表达，颜色只用现有 token，深色模式跟着 token 走。 */
.settings-window .tier-row .set-hint { white-space: normal; }
.settings-window .tier-control { justify-self: end; display: grid; gap: 4px; width: 232px; max-width: 100%; }
.settings-window .tier-ends { display: flex; justify-content: space-between; padding: 0 2px; color: var(--faint); font-size: 11px; line-height: 1.2; }
.settings-window .tier-slider { position: relative; box-sizing: border-box; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; height: 28px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-subtle); overflow: hidden; cursor: pointer; touch-action: pan-y; user-select: none; }
.settings-window .tier-slider[aria-disabled="true"] { cursor: default; }
.settings-window .tier-slider[aria-busy="true"] { cursor: progress; }
.settings-window .tier-slider:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.settings-window .tier-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent-soft); transition: width 0.16s ease; }
.settings-window .tier-slider[data-index="0"] .tier-fill { width: 16.667%; }
.settings-window .tier-slider[data-index="1"] .tier-fill { width: 50%; }
.settings-window .tier-slider[data-index="2"] .tier-fill { width: 83.333%; }
.settings-window .tier-stop { position: relative; z-index: 1; display: flex; justify-content: center; }
.settings-window .tier-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--border-strong); }
.settings-window .tier-stop.is-disabled { opacity: 0.4; }
.settings-window .tier-thumb { position: absolute; z-index: 2; left: 16.667%; top: 3px; bottom: 3px; width: calc(33.333% - 8px); transform: translateX(-50%); border-radius: 6px; background: var(--accent); opacity: 0; pointer-events: none; transition: left 0.16s ease, opacity 0.12s ease; }
.settings-window .tier-slider.has-selection .tier-thumb { opacity: 1; }
.settings-window .tier-slider[data-index="1"] .tier-thumb { left: 50%; }
.settings-window .tier-slider[data-index="2"] .tier-thumb { left: 83.333%; }
@media (max-width: 560px) {
  .settings-window .tier-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .settings-window .tier-control { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  .settings-window .tier-fill, .settings-window .tier-thumb { transition: none; }
}
.settings-window .ctrl-row { min-height: 28px; padding: 4px 0; font-size: var(--fs-caption); color: var(--muted); }
/* ⑤ 分段：一条浅底，选中的那段是白纸 + 细边 */
.v-seg { justify-self: end; display: inline-flex; gap: 2px; padding: 2px; border-radius: var(--r-pill); background: var(--surface-subtle); }
.v-seg__opt { min-width: 64px; height: 28px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--muted); font: inherit; font-size: var(--fs-caption); font-weight: 600; white-space: nowrap; cursor: pointer; transition: background-color 140ms ease, color 140ms ease; }
.v-seg__opt:hover { color: var(--ink); }
.v-seg__opt[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--border-strong); }
.v-seg__opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* 用量：只读值，2px 进度条压在这一行底边 */
.settings-window .settings-usage .api-usage__track { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; margin: 0; border-radius: 0; background: var(--surface-subtle); }
.settings-window .settings-usage .api-usage__track span { border-radius: 0; background: var(--accent); }
@media (max-width: 600px) {
  dialog.settings-window { width: 100vw; height: 100dvh; margin: 0; border-radius: 0; }
  .settings-window__panel { grid-template-columns: minmax(0, 1fr); border: 0; border-radius: 0; box-shadow: none; }
  .settings-window[data-view="detail"] .settings-nav { display: none; }
  /* 分类列表页只留右上角的关闭 */
  .settings-window__panel { position: relative; }
  .settings-window[data-view="list"] .settings-main { position: absolute; top: 0; right: 0; }
  .settings-window[data-view="list"] :is(.settings-main__body, .settings-back, .settings-main__title) { display: none !important; }
  .settings-nav { padding: 16px 12px; border-right: 0; background: var(--surface); }
  .settings-nav__title { padding: 6px 10px 4px; font-size: var(--fs-h2); }
  .settings-tab { min-height: 48px; border-bottom: 1px solid var(--border); border-radius: 0; color: var(--ink); }
  .settings-tab[aria-selected="true"] { background: transparent; box-shadow: none; font-weight: 400; }
  .settings-tab[aria-selected="true"] .icon { color: inherit; }
  .settings-tab::before { content: ''; order: 9; width: 8px; height: 8px; margin-left: auto; border: solid var(--faint); border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); }
  .settings-window:has(#personalPane .pz-pending) [data-settings-tab="personal"]::after,
  .settings-window:has(#settingsPending .pz-pending) [data-settings-tab="course"]::after { margin-left: 0; }
  .settings-back { display: inline-grid; }
  .settings-main__bar { min-height: 52px; padding: 8px 8px 4px; }
  .settings-main__title { font-size: var(--fs-body); }
  .settings-main__body { padding: 4px 16px 24px; }
  .settings-window .v { max-width: 52vw; }
  .settings-window .v-inp { width: 52vw; }
}
@media (prefers-reduced-motion: reduce) { .v-seg__opt { transition: none; } }

/* 左栏的下拉小菜单：全页一个，挂在页面层，一次只开一个 */
.pick-menu { position: fixed; z-index: var(--z-menu); min-width: 176px; max-width: 260px; max-height: calc(100dvh - 16px); overflow-y: auto; padding: 4px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-pop); animation: sidebar-panel-enter 140ms ease-out; }
.pick-menu .pi { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; align-items: start; width: 100%; padding: 7px 8px; border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); font: inherit; font-size: 13px; line-height: 1.45; text-align: left; cursor: pointer; }
.pick-menu .pi:hover:not(:disabled), .pick-menu .pi:focus-visible { outline: none; background: var(--surface-subtle); }
.pick-menu .pi:disabled { color: var(--faint); cursor: not-allowed; }
.pick-menu .pi-check { width: 16px; height: 16px; margin-top: 1px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
.pick-menu .pi.is-on .pi-check { visibility: visible; }
.pick-menu .pi small { display: block; margin-top: 1px; color: var(--faint); font-size: 11.5px; line-height: 1.45; }
/* 窄屏没有悬停：顶栏按钮叫出圆按钮一列（压在遮罩上），点一下出气泡，再点一下开窗口；气泡占满列右边 */
@media (max-width: 1023px) {
  .left-side { position: fixed; inset: var(--topbar-h) auto 0 0; width: 0; }
  .left-side .abar { position: fixed; top: calc(var(--topbar-h) + 8px); bottom: 8px; left: 0; width: var(--rail-w); padding: 0; opacity: 0; visibility: hidden; transform: translateX(-12px); transition: opacity 180ms ease, transform 200ms cubic-bezier(.2,.8,.2,1), visibility 180ms; }
  body.left-open .left-side .abar { opacity: 1; visibility: visible; transform: none; }
  /* 圆按钮一列坐在一条纸底上（顶栏下沿铺到底），后面的正文退到遮罩后面，不从按钮之间透出来（t-20261026-wybz 整合） */
  .left-side .abar { top: var(--topbar-h); bottom: 0; padding: 8px 0; border-right: 1px solid var(--border); border-radius: 0 var(--r-md) var(--r-md) 0; background: var(--canvas); box-shadow: var(--shadow-modal); }
  .sidebar-item--close { display: block; }
  .left-side .drawer-close { display: grid; }
  .sidebar-item :is(.abar-btn, .study-timer) .abar-tip { display: none; }
  .left-side > .lp { top: calc(var(--topbar-h) + 8px); bottom: 8px; right: 8px; width: auto; max-width: none; }
  .sidebar-heading__key { display: none; }
  /* 小计时跟着圆按钮列收进抽屉；补记问句留在外面贴顶栏下沿，不用打开抽屉也看得见 */
  .study-timer-gap { position: fixed; top: calc(var(--topbar-h) + 6px); left: 16px; max-width: min(360px, calc(100vw - 32px)); transform: none; }
  .study-timer-gap::before { display: none; }
}
@media (prefers-reduced-motion: reduce) { .left-side .abar, .left-side > .lp, .sidebar-item :is(.abar-btn, .activity-utility-button, .drawer-close, .study-timer), .sidebar-item :is(.abar-btn, .study-timer) .abar-tip { transition: none; } .left-side > .lp, .knowledge-map-page-overlay__panel { animation: none; } }
.material-progress { display: block; margin-top: 6px; color: var(--muted); font-size: var(--fs-caption); }
.material-progress + .material-progress { margin-top: 8px; }
.material-progress__label { display: flex; align-items: center; gap: 6px; }
.material-progress[data-step="transcribing"] .material-progress__label { color: var(--accent-strong); font-weight: 400; }
.material-progress__icon { width: 14px; height: 14px; animation: material-image-read 1.6s ease-in-out infinite; }
.material-progress__track { display: block; height: 4px; margin-top: 6px; overflow: hidden; border-radius: var(--r-xs); background: var(--border); }
.material-progress__fill { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width 400ms ease; }
@keyframes material-image-read { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .material-progress__icon { animation: none; } .material-progress__fill { transition: none; } }
.file-upload-hint, .material-wait { display: block; color: var(--muted); font-size: var(--fs-caption); margin-top: 6px; }
.material-status { display: block; color: var(--muted); font-size: var(--fs-caption); margin-top: 6px; }
.file-row[data-material-status="ready"] .material-status { color: var(--success); }
.file-row[data-material-status="failed"] .material-status { color: var(--danger); }
.material-reparse { position: relative; z-index: 1; margin-left: 8px; padding: 0; border: 0; background: none; color: var(--accent-strong); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.material-reparse:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.material-processing { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s ease-in-out infinite; }
.msg-assistant[data-generating="true"] > .msg-head .msg-status { display: none; }
/* T1 · 生成中（htuw）：一行字，前面一个 14px 手作圈（brand/kaopy-ring-loop.svg，由遮罩着色）。
   行高 28px，和挂在页边的 Kaopy 标识（top 4px、20px 高）同一条中线；正文写出来时整行收起。 */
.stream-activity { position: relative; display: flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%; min-height: 28px; padding: 0 8px 0 0; margin: 12px 0; border-radius: var(--r-sm); background: var(--canvas); color: var(--muted); font: 400 var(--fs-ui)/1.5 var(--font-sans); }
.msg-head + .stream-activity, .msg-head + .msg-body:empty + .stream-activity { margin-top: 0; }
.stream-activity[data-phase="writing"] { display: none; }
.msg-assistant:has(> .stream-activity:not([data-phase="writing"])) .caret { display: none; }
.stream-activity::before { content: ''; width: 14px; height: 14px; flex: none; color: var(--accent); background: currentColor; -webkit-mask: url('../brand/kaopy-ring-loop.svg') center / contain no-repeat; mask: url('../brand/kaopy-ring-loop.svg') center / contain no-repeat; }
/* 长等待（fak8，scan 复原）：同一行长成两行，手作圈的位置换成一叠文档。不另起白卡——白卡是上面的
   地图小组件；这一行仍是页底的进度行，画布底、灰字、和标识同一条左边。读的时候亮带上下扫，
   写的时候每 1,500 个真实字符点亮一行。字只有服务端报来的事实和已等时间。 */
.stream-activity.is-long-wait { align-items: flex-start; gap: 12px; padding: 6px 12px 6px 0; }
.stream-activity.is-long-wait::before { display: none; }
.stream-wait-sheet { position: relative; flex: none; width: 25px; height: 35px; }
.stream-wait-page { position: absolute; top: 0; left: 0; width: 20px; height: 30px; border: 1px solid var(--border-strong); border-radius: 3px; background: var(--surface); }
.stream-wait-page.is-back-2 { transform: translate(5px, 5px); border-color: var(--border); }
.stream-wait-page.is-back-1 { transform: translate(2.5px, 2.5px); }
.stream-wait-page.is-top { display: grid; align-content: start; gap: 2px; padding: 3px 3.5px; overflow: hidden; }
.stream-wait-line { display: block; width: 100%; height: 1px; border-radius: 1px; background: var(--border-strong); transition: background-color .3s ease; }
.stream-wait-line:nth-child(3n) { width: 64%; }
.stream-wait-line:nth-child(4n) { width: 82%; }
.stream-wait-scan { position: absolute; top: 1px; right: 0; left: 0; height: 7px; background: linear-gradient(transparent, color-mix(in srgb, var(--accent) 42%, transparent) 50%, transparent); animation: stream-wait-scan 2.8s ease-in-out infinite; }
@keyframes stream-wait-scan { 50% { transform: translateY(20px); } }
.stream-activity[data-wait-phase="write"] .stream-wait-scan { display: none; }
.stream-activity[data-wait-phase="write"] .stream-wait-line { background: var(--accent); }
.stream-activity[data-wait-phase="write"] .stream-wait-line.is-off { background: var(--border); }
.stream-wait-copy { min-width: 0; padding-top: 1px; }
.stream-wait-main { color: var(--muted); font-size: var(--fs-ui); line-height: 1.5; font-variant-numeric: tabular-nums; }
.stream-wait-sub { color: var(--faint); font-size: var(--fs-caption); line-height: 1.5; font-variant-numeric: tabular-nums; }
.stream-wait-hint { display: block; }
.stream-wait-hint[hidden] { display: none; }
@media (max-width: 600px) {
  .chat { scrollbar-gutter: auto; }
  .chat-inner, .composer { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .stream-activity::before, .material-processing { animation: none; }
  .stream-activity::before { -webkit-mask-image: url('../brand/kaopy-ring-still.svg'); mask-image: url('../brand/kaopy-ring-still.svg'); }
  .stream-wait-scan { animation: none; }
  .stream-wait-line { transition: none; }
}

@media (prefers-reduced-motion: reduce) { .left-side, .left-side > .lp { transition: none; } }

/* Personalization, settings, then account form one quiet utility stack (round buttons above, avatar unchanged). */
.activity-utilities { display: grid; justify-items: center; gap: 10px; margin-top: auto; }
.activity-account { position: relative; }
.activity-avatar-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 5px; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.activity-avatar-button:hover, .activity-avatar-button[aria-expanded="true"], .activity-avatar-button:focus-visible { background: var(--surface-subtle); outline: none; }
.activity-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: var(--fs-caption); font-weight: 600; text-transform: uppercase; }
.activity-avatar--large { width: 38px; height: 38px; flex: none; font-size: var(--fs-ui); }
.account-menu { position: fixed; z-index: var(--z-menu); left: 6px; bottom: 64px; width: min(276px, calc(100vw - 28px)); padding: 10px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-pop); transform-origin: bottom left; animation: sidebar-panel-enter 140ms ease-out; }
.account-menu[hidden] { display: none; }
.account-menu__identity { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 8px 8px 12px; border-bottom: 1px solid var(--border); }
.account-menu__identity-copy { display: grid; min-width: 0; gap: 2px; }
.account-menu__identity-copy strong, .account-menu__identity-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu__identity-copy strong { color: var(--ink); font-size: var(--fs-ui); }
.account-menu__identity-copy small { color: var(--muted); font-size: var(--fs-caption); }
.account-menu__items { display: grid; gap: 2px; padding-top: 8px; }
.account-menu__items :is(button, a) { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--ink); font: inherit; font-size: var(--fs-ui); text-align: left; text-decoration: none; cursor: pointer; }
.account-menu__items :is(button, a):hover, .account-menu__items :is(button, a):focus-visible { background: var(--surface-subtle); outline: none; }
.account-menu__items svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.account-menu__items :is(button, a) > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu__items small { justify-self: end; color: var(--faint); font-size: var(--fs-caption); white-space: nowrap; }
.account-menu__separator { height: 1px; margin: 6px 4px; background: var(--border); }

.amsg-k { display: block; font-size: var(--fs-ui); line-height: 1.8; }
.amsg-k .msg-head { margin-bottom: 12px; }
.amsg-k .aside-answer { width: 100%; }
.amsg-k .stream-activity { position: static; background: transparent; }
.aside-compose.composer-box { display: block; padding: 12px 12px 8px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md); }
.cornell-advisor-compose.composer-box { display: flex; flex-wrap: wrap; padding: 12px; gap: 8px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md); }
.aside-compose.composer-box:focus-within, .cornell-advisor-compose.composer-box:focus-within { border-color: var(--accent); }
.aside-compose.composer-box textarea { display: block; width: 100%; min-height: 0; height: 24px; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; font-size: var(--fs-ui); line-height: 1.6; }
.cornell-advisor-compose.composer-box textarea { flex: 1 0 100%; width: 100%; min-height: 24px; height: 24px; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; font-size: var(--fs-ui); line-height: 1.6; }
.aside-compose .a-send, .cornell-advisor-compose #boardAdvisorSend { margin-left: auto; }

.chat-inner .msg-body { max-width: 100%; }


/* Settings are quiet controls; the stage list remains the primary content. */
.settings-usage #apiUsageTokens { font-variant-numeric: tabular-nums; }
.settings-window .setting-switch { appearance: none; justify-self: end; flex: none; margin: 0; position: relative; width: 34px; height: 20px; border: 1px solid var(--border-strong); border-radius: var(--r-pill); background: var(--border-strong); cursor: pointer; transition: background-color 150ms ease; }
.settings-window .setting-switch::before { content: ''; position: absolute; width: 14px; height: 14px; top: 2px; left: 2px; border-radius: 50%; background: var(--surface); transition: transform 150ms ease; }
.settings-window .setting-switch:checked { background: var(--accent); border-color: var(--accent); }
.settings-window .setting-switch:checked::before { transform: translateX(14px); }
.settings-window .setting-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.settings-window .setting-switch:disabled { opacity: .5; cursor: wait; }
.api-question-section.is-correct:disabled, .api-question-section.is-incorrect:disabled, .api-question-section.is-skipped:disabled { opacity: 1; }
.api-question-option { max-width: 100%; }
.api-questionnaire-head:has(.quiz-label) { margin-bottom: 8px; }
.api-questionnaire-head .quiz-label { font-size: var(--fs-caption); font-weight: 600; color: var(--muted); }
.api-questionnaire-head span:empty { display: none; }
.unit-interlude { margin: 6px 12px 6px 18px; padding: 3px 0 3px 12px; }
.unit-interlude::before { top: -6px; bottom: -6px; opacity: .3; }
.unit-interlude::after { top: 13px; width: 4px; height: 4px; }
.unit-interlude__button { flex: 0 1 auto; max-width: 100%; padding: 4px 7px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); color: var(--muted); font-size: var(--fs-caption); line-height: 1.35; }
.unit-interlude__button .unit-title { line-height: 1.35; }
.unit-interlude__button:hover { border-color: var(--border-strong); background: var(--border); color: var(--ink); }
.unit-interlude__arrow { font-size: var(--fs-caption); }
.unit-interlude__toggle { width: 22px; height: 22px; font-size: var(--fs-ui); }
@media (prefers-reduced-motion: reduce) { .settings-window .setting-switch, .settings-window .setting-switch::before { transition: none; } }

#connBtn[hidden] { display: none; }
.composer { position: relative; }
.scroll-to-latest { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); z-index: 3; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop); cursor: pointer; }
.scroll-to-latest:hover { background: var(--surface-subtle); }
.scroll-to-latest { transition: opacity 120ms ease, visibility 120ms; }
.scroll-to-latest[hidden] { display: grid; opacity: 0; visibility: hidden; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .scroll-to-latest { transition: none; } }
/* 「回到底部」出来时对话区底下渐隐到底，圆钮坐在渐隐里，不压在字、卡片的边框上（--latest-fade：圆钮上沿离对话区顶多远，workspace.js 量） */
.chat { --latest-fade: 100%; }
.chat.has-latest-below {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(var(--latest-fade) - 64px), transparent var(--latest-fade));
  mask-image: linear-gradient(to bottom, #000 calc(var(--latest-fade) - 64px), transparent var(--latest-fade));
}

/* Shared composer geometry. */
#leftPanel select { width: 160px; }
.composer-box .composer-foot { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 8px; }
.composer-box .composer-foot > .caption { font-size: var(--fs-caption); color: var(--faint); }
.composer-box .composer-actions > .btn,
.composer-box .composer-foot > .composer-attach { flex: none; width: 32px; height: 32px; min-height: 32px; padding: 0; }
.composer-box .composer-actions { margin-left: auto; }

/* Materials use the same quiet paper surface as the lesson. */
.topbar-panel-toggle--left img { width: 28px; height: 28px; object-fit: contain; }
.material-search { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 7px 12px; border: 1px solid var(--border-strong); border-radius: var(--r-pill); background: var(--surface); color: var(--faint); }
.material-search input { width: 100%; min-width: 0; padding: 0; border: 0; outline: none; background: transparent; color: var(--ink); font: inherit; font-size: var(--fs-ui); }
.material-search:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
#leftPanel .src-note { display: none; }
#leftPanel .material-list-item[hidden] { display: none; }
#leftPanel .material-list-item .caption { font-size: var(--fs-caption); }
#leftPanel .material-wait { font-size: var(--fs-caption); }
#leftPanel .material-status { margin-top: 2px; font-size: var(--fs-caption); }
#leftPanel .material-progress { margin-top: 4px; font-size: var(--fs-caption); }
#leftPanel .file-row[data-material-status="processing"] .file-state { display: none; }
.material-processing { width: 10px; height: 10px; border: 1.5px solid currentColor; border-right-color: transparent; background: none; vertical-align: -1px; animation: stream-work-spin 850ms linear infinite; }
#leftPanel select { border-radius: var(--r-sm); }
.upload-dialog .video-link-dialog__panel { display: grid; width: min(540px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 24px; border-radius: var(--r-md); gap: 18px; }
.upload-dialog .video-link-dialog__panel label, .upload-dialog .video-link-dialog__actions { margin-top: 0; }
.upload-dialog__heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.upload-dialog__heading h2 { margin: 0; font-size: var(--fs-h2); line-height: 1.4; }
.upload-dialog__close { font-size: var(--fs-h2); }
.upload-dialog__drop { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; min-height: 156px; padding: 24px 16px; border: 1px dashed var(--border-strong); border-radius: var(--r-md); background: var(--canvas); color: var(--ink); font: inherit; cursor: pointer; }
.upload-dialog__drop:hover, .upload-dialog__drop:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.upload-dialog__drop .icon { width: 28px; height: 28px; color: var(--accent-strong); }
.upload-dialog__drop strong { font-weight: 600; font-size: var(--fs-ui); }
.upload-dialog__drop > span, .upload-dialog__paste small { color: var(--muted); font-size: var(--fs-caption); font-weight: 400; }
.upload-dialog__paste { display: flex; flex-direction: column; gap: 8px; }
.upload-dialog__paste textarea { min-height: 94px; resize: vertical; border-radius: var(--r-sm); font: inherit; font-size: var(--fs-ui); }
.upload-dialog .video-link-dialog__feedback:empty { display: none; }
body.is-file-dragging::after { content: attr(data-file-drop-label); position: fixed; inset: 14px; z-index: 500; display: grid; place-items: center; border: 2px dashed var(--accent); border-radius: var(--r-md); background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--accent-strong); font-size: var(--fs-h2); font-weight: 600; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .account-menu, .material-processing { animation: none; } }

/* Main-chat assistant message, look B: the .msg-head stays in the DOM; its 20px mark hangs in the
   left margin beside the first body line, and the name is kept only for screen readers. A status
   line, when it has text, still reads in flow. Below 720px it falls back to A: no head, no mark.
   Aside and notes-advisor replies (.amsg-k) keep their own head. */
.chat-inner .msg-assistant > .msg-head { display: block; margin: 0; }
.chat-inner .msg-assistant > .msg-head > .msg-name { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.chat-inner .msg-assistant > .msg-head:has(> .msg-status:not(:empty):not([hidden])) { margin-bottom: 8px; }
.chat-inner .msg-assistant[data-generating="true"] > .msg-head { margin-bottom: 0; }
@media (min-width: 720px) {
  .chat-inner { padding-left: 60px; }
  .chat-inner .msg-assistant { position: relative; }
  .chat-inner .msg-assistant > .msg-head > .klogo { position: absolute; top: 4px; left: -32px; }
}
@media (max-width: 719px) {
  .chat-inner .msg-assistant > .msg-head > .klogo { display: none; }
}

.tool-activity-mark[data-mark="settled"] { border: 1px solid var(--faint); border-radius: 50%; }
.tool-activity-mark[data-mark="settled"] > i { display: none; }
.composer-box textarea, .aside-compose.composer-box textarea, .cornell-advisor-compose.composer-box textarea { min-height: 48px; }
.chat-inner .msg-assistant[data-generating="true"]:has(> .msg-body:empty) > .stream-activity { margin-top: 0; }
.reading-style-option__preview--original { display: grid; place-items: center; background: var(--surface); color: var(--ink); font: 600 20px/1 var(--font-sans); }
