/* 冬沫 · 2号机工作台 — 冬日夜间视觉系统 */
:root {
  color-scheme: dark;
  --bg: #0f131d;
  --surface: #151a26;
  --surface-raised: #1b2130;
  --surface-soft: #202636;
  --text: #f2eff5;
  --text-soft: #d4cfdd;
  --muted: #9598ab;
  --faint: #6e7286;
  --line: rgba(211, 199, 225, .12);
  --line-strong: rgba(226, 182, 215, .28);
  --pink: #e2b6d7;
  --pink-strong: #ca91bd;
  --lavender: #b5b3e8;
  --green: #7ac9ad;
  --yellow: #d8b66d;
  --red: #ed909b;
  --shadow: 0 24px 70px rgba(0, 0, 0, .3);
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
*:where(:not(#univer-container, #univer-container *)) { margin: 0; padding: 0; }
html { min-width: 320px; background: var(--bg); }
body { min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; -webkit-font-smoothing: antialiased; }
button:where(:not(#univer-container *)), input:where(:not(#univer-container *)), select:where(:not(#univer-container *)), textarea:where(:not(#univer-container *)) { font: inherit; }
button:where(:not(#univer-container *)) { min-height: 40px; padding: 9px 16px; border: 1px solid transparent; border-radius: 10px; background: var(--surface-soft); color: var(--text-soft); cursor: pointer; transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease; }
button:where(:not(#univer-container *)):hover { background: var(--surface-soft); color: var(--text); }
button:where(:not(#univer-container *)):active { transform: translateY(1px); }
button:where(:not(#univer-container *)):disabled { opacity: .5; cursor: wait; transform: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--pink); outline-offset: 3px; }
input:where(:not(#univer-container *)), select:where(:not(#univer-container *)), textarea:where(:not(#univer-container *)) { border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); color: var(--text); transition: border-color .18s ease, box-shadow .18s ease; }
input:where(:not(#univer-container *))::placeholder, textarea:where(:not(#univer-container *))::placeholder { color: var(--faint); }
input:where(:not(#univer-container *)):focus, select:where(:not(#univer-container *)):focus, textarea:where(:not(#univer-container *)):focus { border-color: var(--line-strong); box-shadow: 0 0 0 3px rgba(226, 182, 215, .06); outline: none; }
select:where(:not(#univer-container *)) { padding: 8px 30px 8px 12px; color: var(--text-soft); cursor: pointer; }
a { color: var(--lavender); text-decoration: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.primary-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--pink); color: #2a1d29; font-weight: 650; box-shadow: 0 6px 20px rgba(202, 145, 189, .12); }
.primary-btn:hover { background: #efc9e5; color: #211721; box-shadow: 0 8px 24px rgba(202, 145, 189, .2); transform: translateY(-1px); }
.secondary-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-color: var(--line); background: transparent; color: var(--text-soft); }
.secondary-btn:hover { border-color: var(--line-strong); background: rgba(226, 182, 215, .06); }
.section-kicker { display: block; color: var(--pink-strong); font-size: 10px; font-weight: 700; letter-spacing: .18em; line-height: 1.5; }
.hint { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.6; white-space: pre-wrap; }

/* 登录页 */
.login-screen { position: relative; isolation: isolate; display: flex; min-height: 100vh; min-height: 100dvh; align-items: center; justify-content: center; overflow: hidden; padding: 48px 24px 70px; background: var(--bg); }
.login-screen::before { position: absolute; z-index: -1; top: 0; left: 0; width: 34%; height: 1px; background: var(--pink-strong); content: ""; opacity: .45; }
.login-orbit { position: absolute; z-index: -1; border: 1px solid rgba(226, 182, 215, .07); border-radius: 50%; pointer-events: none; }
.login-orbit::after { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--pink-strong); content: ""; opacity: .45; }
.login-orbit-one { top: -230px; right: -140px; width: 590px; height: 590px; }
.login-orbit-one::after { bottom: 80px; left: 82px; }
.login-orbit-two { bottom: -280px; left: -180px; width: 560px; height: 560px; }
.login-orbit-two::after { top: 64px; right: 104px; background: var(--lavender); }
.login-card { display: grid; grid-template-columns: 1fr 1fr; width: min(900px, 100%); overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.login-intro { position: relative; display: flex; flex-direction: column; align-items: center; padding: 38px 48px 34px; border-right: 1px solid var(--line); background: var(--surface-soft); text-align: center; }
.login-eyebrow { display: flex; align-items: center; align-self: flex-start; gap: 9px; color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.brand-mark { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--pink); font-family: Georgia, serif; font-size: 14px; }
.login-portrait-wrap { position: relative; width: 164px; height: 164px; margin: 36px auto 24px; }
.login-portrait-ring { position: absolute; inset: -11px; border: 1px solid rgba(226, 182, 215, .2); border-radius: 50%; }
.login-portrait-ring::before, .login-portrait-ring::after { position: absolute; border-radius: 50%; content: ""; }
.login-portrait-ring::before { inset: 7px; border: 1px dashed rgba(181, 179, 232, .12); }
.login-portrait-ring::after { top: 15px; right: 10px; width: 7px; height: 7px; background: var(--pink); box-shadow: 0 0 0 5px var(--surface-soft); }
.login-portrait { display: block; width: 100%; height: 100%; border: 5px solid #252737; border-radius: 50%; background: #eee5ee; object-fit: cover; }
.login-online { position: absolute; right: 9px; bottom: 12px; width: 17px; height: 17px; border: 4px solid var(--surface-soft); border-radius: 50%; background: var(--green); }
.login-name-row { display: flex; align-items: baseline; justify-content: center; gap: 10px; }
.login-name-row h1 { font-size: 30px; font-weight: 650; letter-spacing: .12em; }
.login-name-row > span { color: var(--faint); font-size: 10px; letter-spacing: .2em; }
.login-greeting { margin-top: 12px; color: var(--pink); font-size: 16px; }
.login-description { margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.login-feature-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 15px; margin-top: auto; padding-top: 28px; color: var(--faint); font-size: 11px; }
.login-feature-list span { display: flex; align-items: center; gap: 5px; }
.login-feature-list i { color: var(--pink-strong); font-style: normal; font-size: 9px; }
.login-form-panel { display: flex; flex-direction: column; justify-content: center; padding: 54px 52px 38px; }
.login-form-heading h2 { margin-top: 12px; font-size: 25px; font-weight: 600; letter-spacing: .02em; }
.login-sub { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.login-fields { display: flex; flex-direction: column; margin-top: 34px; }
.field-label { margin-bottom: 8px; color: var(--text-soft); font-size: 12px; }
.login-fields input { width: 100%; height: 46px; margin-bottom: 20px; padding: 0 14px; font-size: 14px; }
#login-btn { width: 100%; min-height: 46px; justify-content: space-between; margin-top: 3px; padding: 11px 18px; }
#login-btn > span:last-child { font-size: 19px; font-weight: 400; }
.login-msg { min-height: 20px; margin-top: 12px; color: var(--red); font-size: 12px; line-height: 1.6; text-align: center; }
.login-footnote { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 24px; color: var(--faint); font-size: 10px; }
.login-copyright { position: absolute; bottom: 24px; color: var(--faint); font-size: 9px; letter-spacing: .18em; }
.login-copyright span { margin: 0 8px; color: var(--pink-strong); }

/* 顶栏 */
.topbar { position: relative; z-index: 30; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 74px; gap: 24px; padding: 10px 30px; border-bottom: 1px solid var(--line); background: rgba(15, 19, 29, .96); }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-avatar { position: relative; flex-shrink: 0; width: 40px; height: 40px; }
.brand-avatar img { display: block; width: 100%; height: 100%; border: 2px solid #292b3a; border-radius: 13px; background: #eee5ee; object-fit: cover; }
.brand-avatar span { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border: 2px solid var(--bg); border-radius: 50%; background: var(--green); }
.brand h1 { display: flex; flex-direction: column; gap: 2px; font-size: 15px; font-weight: 500; }
.brand h1 strong { font-size: 16px; font-weight: 650; letter-spacing: .08em; }
.brand h1 small { color: var(--muted); font-size: 10px; font-weight: 400; }
.tabs { display: flex; align-items: center; gap: 5px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.tab { display: inline-flex; min-height: 38px; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 9px; background: transparent; color: var(--muted); font-size: 13px; white-space: nowrap; }
.tab:hover { background: rgba(226, 182, 215, .05); color: var(--text-soft); }
.tab.active { background: var(--surface-raised); color: var(--pink); box-shadow: inset 0 0 0 1px rgba(226, 182, 215, .09); }
.tab-icon { font-size: 16px; line-height: 1; }
.topbar-end { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.workspace-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.workspace-badge i, .live-badge i, .empty-note i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.logout { min-height: 36px; padding: 7px 2px 7px 10px; background: transparent; color: var(--muted); font-size: 12px; }
.logout:hover { background: transparent; color: var(--red); }
.logout span { margin-left: 4px; }
.sidebar-toggle { display: none; }

/* 页面公共结构 */
.view { width: 100%; max-width: 1120px; margin: 28px auto; padding: 0 28px; }
.view-domo-full { height: calc(100dvh - 124px); max-width: 1440px; margin-top: 24px; margin-bottom: 26px; }
.content-view { padding-top: 12px; padding-bottom: 40px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.page-heading h2 { margin-top: 7px; font-size: 28px; font-weight: 600; letter-spacing: .02em; }
.page-heading p { margin-top: 9px; color: var(--muted); font-size: 13px; }
.page-heading-mark { display: flex; width: 58px; height: 58px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--pink); font-size: 25px; }
.live-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid rgba(122, 201, 173, .16); border-radius: 20px; background: rgba(122, 201, 173, .05); color: var(--green); font-size: 11px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 28px 0 14px; }
.section-heading h3 { margin-top: 5px; font-size: 17px; font-weight: 550; }
.section-heading .secondary-btn { min-height: 36px; padding: 7px 12px; font-size: 12px; }

/* 冬沫对话 */
.domo-layout { display: flex; height: 100%; align-items: stretch; gap: 18px; }
.domo-sidebar { display: flex; width: 238px; min-width: 0; flex-shrink: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.sidebar-heading { display: flex; align-items: center; justify-content: space-between; padding: 19px 18px 13px; color: var(--text-soft); font-size: 13px; font-weight: 550; }
.sidebar-heading-icon { color: var(--pink-strong); font-size: 18px; }
.domo-new-btn { width: calc(100% - 28px); min-height: 43px; margin: 0 14px 18px; font-size: 13px; }
.domo-new-btn > span { font-size: 17px; font-weight: 400; }
.session-label { padding: 0 18px 9px; color: var(--faint); font-size: 10px; letter-spacing: .08em; }
.session-list { display: flex; min-height: 0; flex: 1; flex-direction: column; gap: 4px; overflow-y: auto; padding: 0 9px 12px; scrollbar-color: #34394a transparent; scrollbar-width: thin; }
.session-item { display: flex; align-items: center; gap: 5px; padding: 11px 9px; border: 1px solid transparent; border-radius: 10px; color: var(--text-soft); cursor: pointer; transition: background-color .18s ease, border-color .18s ease; }
.session-item:hover { background: var(--surface-raised); }
.session-item.active { border-color: rgba(226, 182, 215, .15); background: var(--surface-raised); color: var(--pink); }
.session-text { min-width: 0; flex: 1; }
.session-title { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.session-meta { margin-top: 5px; color: var(--faint); font-size: 10px; }
.session-del { visibility: hidden; min-width: 30px; min-height: 32px; flex-shrink: 0; padding: 4px; background: transparent; color: var(--faint); font-size: 11px; }
.session-item:hover .session-del, .session-item:focus-within .session-del { visibility: visible; }
.session-del:hover { background: transparent; color: var(--red); }
.sidebar-footer { display: flex; align-items: center; gap: 11px; margin: 0 14px; padding: 14px 3px 16px; border-top: 1px solid var(--line); }
.sidebar-footer img { width: 36px; height: 36px; border-radius: 12px; background: #eee5ee; object-fit: cover; }
.sidebar-footer p { color: var(--faint); font-size: 10px; line-height: 1.7; }
.domo-main { display: flex; min-width: 0; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: 0 14px 40px rgba(0, 0, 0, .1); }
.domo-toolbar { display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 16px 10px 20px; border-bottom: 1px solid var(--line); }
.conversation-heading { display: flex; min-width: 0; align-items: center; gap: 9px; }
.conversation-dot { width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: var(--pink-strong); }
.domo-current-title { overflow: hidden; color: var(--text-soft); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.toolbar-actions { display: flex; flex-shrink: 0; align-items: center; gap: 7px; }
.domo-toolbar select { width: auto; max-width: 210px; min-height: 36px; border-color: transparent; background: var(--surface-soft); font-size: 11px; }
.toolbar-btn { display: inline-flex; min-height: 36px; align-items: center; gap: 5px; padding: 7px 10px; background: transparent; color: var(--muted); font-size: 11px; }
.toolbar-btn:hover { background: var(--surface-soft); color: var(--pink); }
.toolbar-btn > span:first-child { font-size: 16px; }
.messages { display: flex; min-height: 0; flex: 1; flex-direction: column; gap: 18px; overflow-y: auto; padding: 24px; scrollbar-color: #34394a transparent; scrollbar-width: thin; }
.domo-empty { display: flex; max-width: 570px; min-height: 100%; align-items: center; align-self: center; justify-content: center; flex-direction: column; padding: 24px 12px; text-align: center; }
.empty-avatar-wrap { position: relative; width: 106px; height: 106px; margin-bottom: 25px; }
.empty-avatar-wrap::before { position: absolute; inset: -9px; border: 1px solid rgba(226, 182, 215, .14); border-radius: 32px; content: ""; transform: rotate(7deg); }
.empty-avatar-wrap img { position: relative; display: block; width: 100%; height: 100%; border: 4px solid #272938; border-radius: 29px; background: #eee5ee; object-fit: cover; }
.empty-spark { position: absolute; z-index: 1; color: var(--pink); font-size: 19px; }
.empty-spark-one { top: -15px; right: -23px; }
.empty-spark-two { bottom: 0; left: -27px; color: var(--lavender); font-size: 15px; }
.domo-empty h2 { margin-top: 11px; font-size: 23px; font-weight: 550; letter-spacing: .02em; }
.domo-empty > p { margin-top: 13px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.empty-actions { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }
.empty-actions button { min-height: 42px; padding: 9px 16px; font-size: 12px; }
.empty-note { display: flex; align-items: center; gap: 7px; margin-top: 24px; color: var(--faint); font-size: 10px; }
.composer-wrap { margin: 0 18px 14px; padding: 10px 12px 8px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface-soft); transition: border-color .18s ease, box-shadow .18s ease; }
.composer-wrap:focus-within { border-color: rgba(226, 182, 215, .45); box-shadow: 0 0 0 3px rgba(226, 182, 215, .04); }
.domo-input { display: flex; align-items: flex-end; gap: 9px; }
.domo-input textarea { min-height: 44px; max-height: 150px; flex: 1; resize: vertical; padding: 10px 5px; border: 0; background: transparent; font-size: 14px; line-height: 1.6; }
.domo-input textarea:focus { box-shadow: none; }
.domo-input button { flex-shrink: 0; }
#domo-send { min-height: 40px; padding: 8px 13px 8px 16px; font-size: 12px; }
.send-arrow { display: inline-flex; width: 21px; height: 21px; align-items: center; justify-content: center; border-radius: 7px; background: rgba(42, 29, 41, .1); font-size: 15px; }
#domo-attach-btn { width: 40px; min-height: 40px; padding: 7px; border-color: var(--line); background: transparent; color: var(--muted); font-size: 21px; font-weight: 300; }
#domo-attach-btn:hover { background: var(--surface-soft); color: var(--pink); }
.composer-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 3px 48px 0; color: var(--faint); font-size: 9px; }
.composer-wrap .hint { margin: 7px 4px 0; }
.attach-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 8px; }
.attach-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-raised); color: var(--text-soft); font-size: 11px; }
.attach-chip button { min-width: 26px; min-height: 28px; padding: 2px; background: transparent; color: var(--muted); font-size: 11px; }
.attach-chip button:hover { color: var(--red); }

/* 聊天气泡与 Markdown */
.msg { display: flex; align-items: flex-start; gap: 10px; }
.msg-user { justify-content: flex-end; }
.msg-avatar { width: 34px; height: 34px; flex-shrink: 0; overflow: hidden; margin-top: 2px; border: 1px solid var(--line-strong); border-radius: 11px; background: #eee5ee; }
.msg-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.msg-bubble { max-width: 78%; padding: 11px 15px; border-radius: 14px; font-size: 14px; line-height: 1.75; overflow-wrap: anywhere; }
.msg-user .msg-bubble { border-top-right-radius: 4px; background: #d9adce; color: #2a1d29; white-space: pre-wrap; }
.msg-domo .msg-bubble { border: 1px solid var(--line); border-top-left-radius: 4px; background: var(--surface-raised); color: var(--text-soft); }
.msg-source { display: block; margin-bottom: 4px; color: rgba(42, 29, 41, .64); font-size: 10px; }
.msg-plain { white-space: pre-wrap; }
.markdown-body { font-family: inherit; white-space: normal; }
.markdown-body p { margin: 8px 0; }
.markdown-body p:first-child { margin-top: 0; }
.markdown-body p:last-child { margin-bottom: 0; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 { margin: 16px 0 8px; color: var(--text); line-height: 1.45; }
.markdown-body h1 { font-size: 19px; }
.markdown-body h2 { font-size: 18px; }
.markdown-body h3 { font-size: 16px; }
.markdown-body h4 { font-size: 15px; }
.markdown-body ul, .markdown-body ol { margin: 8px 0; padding-left: 22px; }
.markdown-body li { margin: 4px 0; }
.markdown-body code { padding: 2px 6px; border-radius: 5px; background: var(--surface-soft); color: var(--pink); font-family: "Cascadia Code", Consolas, Monaco, monospace; font-size: 12px; }
.markdown-body pre { overflow-x: auto; margin: 10px 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.markdown-body pre code { padding: 0; background: transparent; color: var(--text-soft); }
.markdown-body blockquote { margin: 8px 0; padding-left: 12px; border-left: 2px solid var(--pink-strong); color: var(--muted); }
.markdown-body table { max-width: 100%; margin: 10px 0; border-collapse: collapse; font-size: 12px; }
.markdown-body th, .markdown-body td { padding: 7px 10px; border: 1px solid var(--line); }
.markdown-body th { background: var(--surface-soft); color: var(--text); }
.markdown-body a { color: var(--lavender); text-decoration: underline; text-underline-offset: 3px; }
.markdown-body hr { margin: 14px 0; border: 0; border-top: 1px solid var(--line); }
.markdown-body strong { color: var(--text); }
.markdown-body img { max-width: 100%; }

/* 学习资料 */
.learn-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.learn-card { position: relative; display: flex; min-height: 160px; align-items: flex-start; gap: 17px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: inherit; transition: border-color .18s ease, background-color .18s ease, transform .18s ease; }
.learn-card:hover { border-color: var(--line-strong); background: var(--surface-raised); transform: translateY(-2px); }
.learn-card-icon { display: flex; width: 43px; height: 43px; flex-shrink: 0; align-items: center; justify-content: center; border: 1px solid var(--line-strong); border-radius: 13px; background: var(--surface-raised); color: var(--pink); font-family: Georgia, serif; font-size: 16px; }
.card-eyebrow { color: var(--faint); font-size: 10px; }
.learn-card h3 { margin-top: 5px; font-size: 16px; font-weight: 550; }
.learn-card p { margin-top: 9px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.card-arrow { position: absolute; top: 20px; right: 22px; color: var(--faint); font-size: 17px; transition: color .18s ease, transform .18s ease; }
.learn-card:hover .card-arrow { color: var(--pink); transform: translate(2px, -2px); }
.learn-list { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.learn-list > .hint { margin: 0; padding: 24px; }
.learn-item { display: flex; align-items: center; gap: 16px; padding: 15px 18px; border-bottom: 1px solid var(--line); font-size: 13px; }
.learn-item:last-child { border-bottom: 0; }
.learn-item span:first-child { min-width: 0; flex: 1; color: var(--text-soft); }
.learn-item a { font-size: 12px; }

/* 服务器状态 */
.status-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.stat-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; color: var(--muted); font-size: 11px; }
.stat-icon { color: var(--pink-strong); font-size: 17px; }
.stat-value { overflow: hidden; margin-bottom: 14px; color: var(--text); font-size: 19px; font-weight: 550; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
.stat-sub { margin-top: 10px; color: var(--muted); font-size: 10px; font-weight: 400; }
.bar { height: 4px; overflow: hidden; border-radius: 4px; background: var(--surface-raised); }
.bar-fill { width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width .4s ease; }
.service-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.service-item { display: flex; min-width: 0; align-items: center; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--text-soft); font-size: 12px; overflow-wrap: anywhere; }
.svc-state { margin-left: auto; color: var(--muted); font-size: 10px; white-space: nowrap; }
.dot { width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; }
.dot-ok { background: var(--green); box-shadow: 0 0 0 3px rgba(122, 201, 173, .07); }
.dot-bad { background: var(--red); box-shadow: 0 0 0 3px rgba(237, 144, 155, .07); }
.status-hint { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.pulse-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }

/* 冬沫表情包 */
.dongmo-emoji-modal { position: fixed; z-index: 100; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(6, 9, 15, .82); backdrop-filter: blur(8px); }
.dongmo-emoji-box { width: 740px; max-width: 94vw; max-height: 88vh; overflow-y: auto; padding: 22px; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.dongmo-emoji-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 18px; }
.dongmo-emoji-head h3 { color: var(--text); font-size: 17px; font-weight: 550; }
.dongmo-emoji-head span { color: var(--muted); font-size: 11px; }
.dongmo-emoji-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.dongmo-emoji-item { padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-raised); text-align: center; transition: border-color .18s ease, transform .18s ease; }
.dongmo-emoji-item:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.dongmo-emoji-item img { display: block; width: 100%; aspect-ratio: 1; border-radius: 9px; background: #f3eaf2; object-fit: cover; }
.dongmo-emoji-item span { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; }
#dongmo-emoji-close { display: block; min-width: 100px; margin: 18px auto 0; }
.sidebar-mask { position: fixed; z-index: 40; inset: 0; background: rgba(6, 9, 15, .7); backdrop-filter: blur(3px); }

/* 中等屏幕 */
@media (max-width: 1050px) {
  .topbar { gap: 16px; padding-right: 20px; padding-left: 20px; }
  .workspace-badge { display: none; }
  .tab { padding-right: 12px; padding-left: 12px; }
  .status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 移动端与窄屏：保持轻量、无横向滚动 */
@media (max-width: 760px) {
  .login-screen { align-items: flex-start; padding: 24px 16px 56px; overflow-y: auto; }
  .login-card { grid-template-columns: 1fr; max-width: 430px; border-radius: 20px; }
  .login-intro { padding: 24px 26px 22px; border-right: 0; border-bottom: 1px solid var(--line); }
  .login-portrait-wrap { width: 112px; height: 112px; margin: 25px auto 19px; }
  .login-portrait { border-width: 4px; }
  .login-online { right: 4px; bottom: 7px; }
  .login-name-row h1 { font-size: 25px; }
  .login-greeting { margin-top: 8px; font-size: 14px; }
  .login-description { margin-top: 8px; font-size: 12px; line-height: 1.7; }
  .login-description br { display: none; }
  .login-feature-list { display: none; }
  .login-form-panel { padding: 26px; }
  .login-form-heading h2 { margin-top: 8px; font-size: 21px; }
  .login-fields { margin-top: 24px; }
  .login-fields input { height: 46px; margin-bottom: 17px; font-size: 16px; }
  .login-footnote { margin-top: 14px; }
  .login-copyright { bottom: 18px; }

  .topbar { grid-template-columns: auto minmax(0, 1fr) auto; min-height: 64px; gap: 8px; padding: 8px 10px; }
  .brand { display: none; }
  .sidebar-toggle { display: inline-flex; width: 44px; min-height: 44px; align-items: center; justify-content: center; padding: 7px; background: transparent; color: var(--text-soft); font-size: 21px; }
  .tabs { min-width: 0; justify-content: center; gap: 2px; padding: 3px; }
  .tab { min-width: 0; min-height: 44px; flex: 1; justify-content: center; padding: 7px 8px; font-size: 11px; }
  .tab-icon { display: none; }
  .topbar-end { gap: 0; }
  .logout { min-width: 44px; min-height: 44px; padding: 7px 4px; font-size: 11px; }
  .logout span { display: none; }
  .view { margin-top: 12px; margin-bottom: 12px; padding: 0 10px; }
  .view-domo-full { height: calc(100dvh - 88px); }
  .content-view { padding: 12px 14px 32px; }
  .page-heading { margin-bottom: 20px; }
  .page-heading h2 { font-size: 24px; }
  .page-heading p { max-width: 240px; font-size: 12px; line-height: 1.6; }
  .page-heading-mark { display: none; }
  .live-badge { flex-shrink: 0; padding: 7px 9px; font-size: 10px; }

  .domo-layout { display: block; height: 100%; }
  .domo-sidebar { position: fixed; z-index: 50; top: 0; bottom: 0; left: 0; width: 80%; max-width: 300px; border: 0; border-right: 1px solid var(--line-strong); border-radius: 0 18px 18px 0; box-shadow: 20px 0 60px rgba(0, 0, 0, .3); transform: translateX(-105%); transition: transform .24s ease; }
  .domo-sidebar.drawer-open { transform: translateX(0); }
  .sidebar-heading { padding-top: 24px; }
  .session-list { max-height: none; }
  .session-item { min-height: 52px; padding: 10px; }
  .session-title { font-size: 13px; }
  .session-del { visibility: visible; min-width: 44px; min-height: 44px; }
  .domo-new-btn { min-height: 44px; }
  .domo-main { height: 100%; border-radius: 13px; }
  .domo-toolbar { min-height: 58px; gap: 7px; padding: 7px 8px 7px 12px; }
  .conversation-heading { flex: 1; }
  .domo-current-title { font-size: 11px; }
  .toolbar-actions { gap: 2px; }
  .domo-toolbar select { width: 82px; max-width: 82px; min-height: 44px; padding: 6px 4px; font-size: 16px; }
  .toolbar-btn { min-width: 44px; min-height: 44px; padding: 6px 8px; }
  .toolbar-btn > span:first-child { font-size: 17px; }
  .toolbar-btn > span:last-child { display: none; }
  .messages { gap: 13px; padding: 14px 10px; }
  .domo-empty { padding: 18px 8px; }
  .empty-avatar-wrap { width: 82px; height: 82px; margin-bottom: 21px; }
  .empty-avatar-wrap img { border-radius: 23px; }
  .empty-avatar-wrap::before { border-radius: 27px; }
  .domo-empty h2 { font-size: 19px; }
  .domo-empty > p { font-size: 12px; }
  .empty-actions { width: 100%; max-width: 300px; flex-direction: column; gap: 8px; margin-top: 20px; }
  .empty-actions button { min-height: 44px; }
  .empty-note { margin-top: 17px; }
  .composer-wrap { margin: 0 8px calc(8px + env(safe-area-inset-bottom)); padding: 8px; border-radius: 12px; }
  .domo-input { gap: 6px; }
  .domo-input textarea { min-height: 44px; padding: 10px 3px; font-size: 16px; }
  #domo-attach-btn { width: 44px; min-height: 44px; }
  #domo-send { min-width: 44px; min-height: 44px; padding: 8px 12px; }
  #domo-send > span:first-child { display: none; }
  .send-arrow { width: 23px; height: 23px; }
  .composer-meta { margin: 3px 44px 0; font-size: 8px; }
  .composer-meta > span:last-child { display: none; }
  .msg { gap: 7px; }
  .msg-avatar { width: 29px; height: 29px; border-radius: 9px; }
  .msg-bubble { max-width: 87%; padding: 9px 11px; border-radius: 11px; font-size: 14px; line-height: 1.65; }
  .markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 { margin: 11px 0 6px; }
  .markdown-body h1 { font-size: 17px; }
  .markdown-body h2 { font-size: 16px; }
  .markdown-body h3, .markdown-body h4 { font-size: 15px; }
  .markdown-body p { margin: 6px 0; }
  .markdown-body ul, .markdown-body ol { margin: 6px 0; padding-left: 19px; }
  .markdown-body pre { padding: 10px; }

  .learn-cards { grid-template-columns: 1fr; gap: 10px; }
  .learn-card { min-height: 0; gap: 13px; padding: 18px 16px; }
  .learn-card-icon { width: 38px; height: 38px; }
  .learn-card h3 { font-size: 15px; }
  .card-arrow { top: 16px; right: 16px; }
  .section-heading { margin-top: 24px; }
  .section-heading .secondary-btn { min-height: 44px; }
  .learn-item { flex-wrap: wrap; gap: 10px; padding: 14px; }
  .learn-item span:first-child { flex-basis: 100%; }
  .status-grid { gap: 9px; }
  .stat-card { padding: 14px 12px; }
  .stat-label { margin-bottom: 12px; }
  .stat-value { font-size: 15px; }
  .stat-icon { display: none; }
  .service-list { grid-template-columns: 1fr; gap: 7px; }
  .service-item { min-height: 48px; padding: 12px 14px; }
  .dongmo-emoji-modal { padding: 12px; }
  .dongmo-emoji-box { max-width: 100%; padding: 14px; border-radius: 16px; }
  .dongmo-emoji-grid { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .dongmo-emoji-item { padding: 6px; }
  #dongmo-emoji-close { min-height: 44px; }
}

@media (max-width: 370px) {
  .tab { padding-right: 5px; padding-left: 5px; font-size: 10px; }
  .login-intro, .login-form-panel { padding-right: 21px; padding-left: 21px; }
  .stat-value { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* WebDAV 网盘与 Univer 在线文档工作台 */
.view-webdav { max-width: 1280px; }
.wd-heading { gap: 16px; flex-wrap: wrap; }
.wd-conn-pill { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wd-badge-off { border-color: rgba(237, 144, 155, .24); background: rgba(237, 144, 155, .07); color: var(--red); }
.wd-badge-off i { background: var(--red); }
.wd-connect-bar { margin-bottom: 18px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); }
.wd-connect-fields { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wd-connect-fields input { flex: 1; min-width: 180px; height: 40px; padding: 0 12px; font-size: 13px; }
.wd-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.wd-nav-group { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; flex-wrap: wrap; }
.wd-breadcrumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-width: 0; }
.wd-crumb-btn { min-height: 32px; padding: 4px 10px; border-radius: 8px; background: transparent; color: var(--muted); font-size: 12px; }
.wd-crumb-btn:hover, .wd-crumb-btn.active { background: var(--surface-soft); color: var(--pink); }
.wd-crumb-sep { color: var(--faint); font-size: 12px; }
.wd-actions-group { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.wd-actions-group button { min-height: 36px; padding: 6px 12px; font-size: 12px; }
.wd-search { width: 170px; height: 36px; padding: 0 11px; font-size: 12px; }
.wd-dropzone { border: 1px solid var(--line); border-radius: 15px; background: var(--surface); overflow: hidden; transition: border-color .18s ease, background-color .18s ease; outline: none; }
.wd-dropzone.drag-over { border-color: var(--pink); background: rgba(226, 182, 215, .06); }
.wd-list-head, .wd-row { display: grid; grid-template-columns: minmax(220px, 1fr) 90px 145px 190px; align-items: center; gap: 12px; padding: 11px 16px; }
.wd-list-head { border-bottom: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); font-size: 11px; font-weight: 600; }
.wd-list { min-height: 220px; max-height: 62dvh; overflow-y: auto; }
.wd-row { border-bottom: 1px solid var(--line); cursor: pointer; user-select: none; transition: background-color .14s ease; }
.wd-row:last-child { border-bottom: 0; }
.wd-row:hover { background: var(--surface-raised); }
.wd-row.selected { background: var(--surface-raised); }
.wd-col-name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.wd-icon { flex-shrink: 0; font-size: 16px; }
.wd-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 13px; }
.wd-tag { flex-shrink: 0; padding: 2px 7px; border-radius: 6px; font-size: 10px; font-weight: 600; }
.wd-tag-sheet { background: rgba(122, 201, 173, .14); color: var(--green); }
.wd-tag-doc { background: rgba(181, 179, 232, .16); color: var(--lavender); }
.wd-tag-text { background: rgba(216, 182, 109, .14); color: var(--yellow); }
.wd-col-size, .wd-col-time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.wd-col-ops { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.wd-op-btn { min-height: 28px; padding: 4px 8px; border-radius: 7px; background: var(--surface-soft); color: var(--text-soft); font-size: 11px; }
.wd-op-btn:hover { background: var(--surface-raised); color: var(--pink); }
.wd-op-del:hover { color: var(--red); }
.wd-empty { padding: 48px 20px; text-align: center; color: var(--muted); font-size: 13px; }

.wd-context-menu { position: fixed; z-index: 250; min-width: 178px; padding: 6px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface-soft); box-shadow: var(--shadow); }
.wd-ctx-item { display: block; width: 100%; min-height: 34px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--text-soft); font-size: 12px; text-align: left; }
.wd-ctx-item:hover { background: var(--surface-soft); color: var(--pink); }
.wd-ctx-item.danger:hover { color: var(--red); }
.wd-ctx-sep { height: 1px; margin: 5px 4px; background: var(--line); }

/* Univer 全屏编辑器工作区 */
.univer-overlay { position: fixed; z-index: 200; inset: 0; display: flex; flex-direction: column; background: var(--surface-soft); }
.univer-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--surface-soft); flex-wrap: wrap; }
.univer-topbar-left, .univer-topbar-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.univer-topbar button { min-height: 36px; padding: 6px 12px; font-size: 12px; }
.univer-file-info { display: flex; flex-direction: column; min-width: 0; }
.univer-file-info strong { font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 42vw; }
.univer-file-info small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 42vw; }
.univer-status { color: var(--green); font-size: 12px; white-space: nowrap; }
.univer-notice { padding: 8px 16px; border-bottom: 1px solid rgba(216, 182, 109, .28); background: rgba(216, 182, 109, .12); color: var(--yellow); font-size: 12px; }
.univer-loading { padding: 40px 20px; text-align: center; color: var(--text-soft); font-size: 14px; }
.univer-container { position: relative; flex: 1; min-height: 0; width: 100%; background: #ffffff; color: #1f2937; overflow: hidden; }

/* 文本编辑弹窗 */
.wd-text-box { display: flex; flex-direction: column; width: min(860px, 95vw); height: min(82vh, 720px); padding: 18px; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); gap: 12px; }
.wd-text-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wd-text-head h3 { font-size: 16px; color: var(--text); }
.wd-text-head .hint { margin-top: 2px; }
.wd-text-actions { display: flex; gap: 8px; }
.wd-text-actions button { min-height: 36px; padding: 6px 14px; font-size: 12px; }
#wd-text-area { flex: 1; width: 100%; padding: 12px; font-family: "Cascadia Code", Consolas, Monaco, monospace; font-size: 13px; line-height: 1.6; resize: none; }

@media (max-width: 760px) {
  .wd-list-head { display: none; }
  .wd-row { grid-template-columns: 1fr; gap: 8px; padding: 12px; }
  .wd-col-size, .wd-col-time { display: inline-block; font-size: 11px; margin-right: 10px; }
  .wd-col-ops { justify-content: flex-start; flex-wrap: wrap; }
  .wd-op-btn { min-height: 34px; padding: 5px 10px; }
  .wd-search { width: 100%; }
  .univer-file-info strong, .univer-file-info small { max-width: 55vw; }
}

/* Winter workspace: paper, ink and pine. */
:root {
  color-scheme: light; --bg:#f4f5f1; --surface:#fff; --surface-soft:#f4f6f3; --surface-raised:#e9eeea;
  --text:#1f302a; --text-soft:#34453f; --muted:#53665e; --faint:#607269;
  --line:#d6ded7; --line-strong:#80998c; --pink:#28634e; --pink-strong:#275d4b; --lavender:#355f74;
  --green:#28674d; --yellow:#78581b; --red:#ad3e44; --action:#285e4c; --on-action:#fff;
  --tint:#e5eee8; --shadow:0 12px 36px rgb(32 52 42 / .07);
}
@media(prefers-color-scheme:dark) {
  :root {color-scheme:dark;--bg:#171c1c;--surface:#202726;--surface-soft:#252e2b;--surface-raised:#303c36;
    --text:#edf2ed;--text-soft:#dce5df;--muted:#b4c1b9;--faint:#a2b2aa;
    --line:#414f47;--line-strong:#82988b;--pink:#a2ceba;--pink-strong:#a5cfb9;--lavender:#a4c9db;
    --green:#96cfaf;--yellow:#e4c68b;--red:#ffacaf;--action:#a2ceba;--on-action:#152a20;
    --tint:#304637;--shadow:0 12px 36px rgb(0 0 0 / .14);}
}
.entry {min-height:100vh;min-height:100dvh;display:grid;place-items:safe center;padding:24px 16px;background:var(--bg)}
.entry-card {width:min(100%,390px);padding:32px;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:var(--shadow)}
.entry-brand {display:flex;align-items:center;gap:12px;padding-bottom:19px;margin-bottom:22px;border-bottom:1px solid var(--line)}
.entry-brand img,.domo-empty>img {object-fit:cover;border-radius:50%}
.entry-brand strong,.entry-brand small {display:block}.entry-brand strong{font-size:17px}.entry-brand small{margin-top:3px;color:var(--muted);font-size:12px}
.entry-card h1 {font-size:25px;line-height:1.35;letter-spacing:-.02em}.entry-help{color:var(--muted);font-size:13px;line-height:1.65;margin:7px 0 20px}
.entry-card label{display:block;font-size:13px;font-weight:600;margin:14px 0 6px}
.entry-card input{width:100%;height:44px;padding:0 12px;border-radius:8px;background:var(--surface);border-color:var(--line-strong);font-size:16px}
.entry-pass{position:relative}.entry-pass input{padding-right:78px}
.entry-pass button{position:absolute;right:2px;top:2px;min-height:40px;padding:0 10px;background:transparent;font-size:12px;color:var(--muted)}
.entry-card #login-btn{margin:20px 0 0;min-height:44px;justify-content:center;border-radius:8px}
.entry-card .login-msg:empty,.hint:empty{display:none}
.primary-btn,.primary-btn:hover{background:var(--action);color:var(--on-action);box-shadow:none}
.primary-btn:hover{filter:brightness(.94)}.topbar{background:var(--surface)}
.domo-main{box-shadow:none}.domo-sidebar,.domo-main{border-radius:12px}
.tab.active,.session-item.active,.msg-user .msg-bubble{background:var(--tint);color:var(--text)}
.msg-source{color:var(--muted)}.msg-domo .msg-bubble{background:transparent;border-color:transparent}
.msg-bubble{min-width:0;max-width:min(80%,72ch);padding:8px 12px}.markdown-body{overflow-x:auto}
#app:has(#view-domo:not([hidden])){height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden}
#app .topbar{flex:none}.view-domo-full{flex:1;min-height:0;height:auto;margin:12px auto;padding:0 14px}
.domo-empty{padding:12px}.domo-empty h2{font-size:21px;margin:12px 0 0}.domo-empty p{margin:5px 0 0}
.composer-wrap{flex:none;margin:0 12px 12px;padding:5px 8px;border-color:var(--line-strong);background:var(--surface);border-radius:12px}
.composer-wrap:focus-within{border-color:var(--pink);box-shadow:none}
.domo-input textarea{min-width:0;min-height:40px;max-height:min(120px,24dvh);resize:none;field-sizing:content;line-height:22px;padding:9px 4px;background:transparent}
#domo-hint:not(:empty){max-height:12dvh;overflow:auto;margin:3px 0}
@media(max-width:760px){
  .entry-card{padding:24px}.view-domo-full{margin:0 auto;padding:0}.domo-main{border:0;border-radius:0}
  .topbar{padding:4px;gap:2px}.tabs{overflow-x:auto;justify-content:flex-start}.tab{flex:1 0 auto;padding:7px 5px}
  .domo-input textarea{min-height:44px;padding:11px 3px}
  .composer-wrap{margin:0 8px max(8px,env(safe-area-inset-bottom));padding:3px 5px}
  .domo-toolbar{min-height:48px;padding:2px 8px}.msg-bubble{max-width:88%}
}

