/* ============================================================
   TeTher 网页端 · app.css
   布局参考：chat.deepseek.com —— 左侧会话栏 + 主区欢迎/对话
   白底黑字细灰线，简约无装饰
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #111;
  --dim: #666;
  --faint: #999;
  --line: #e5e5e5;
  --line2: #d9d9d9;
  --bubble: #f4f4f5;
  --codebg: #f7f7f8;
  --sidebg: #f9f9f9;
}

html, body { height: 100%; }

body.ds {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
               "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  background: #fff;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }
a { color: inherit; text-decoration: none; }
code, pre, input, textarea { font-family: ui-monospace, "SF Mono", Consolas, Menlo, monospace; }

/* ---------------- 图标（iconfont.cn Symbol 引用方式） ---------------- */
.ic {
  display: inline-block;
  vertical-align: -.16em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ic-fill { fill: currentColor; stroke: none; }
.ic-bare { fill: none; stroke: none; }
/* 品牌标记：白底深箭头（网页端固定浅色） */
:root { --mark-bg: var(--ink); --mark-fg: #fff; }

.ds-app { display: flex; height: 100vh; height: 100svh; }

/* ---------------- 左侧栏 ---------------- */
.ds-side {
  width: 264px;
  flex-shrink: 0;
  background: var(--sidebg);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ds-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 14px 10px;
}
.ds-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: ui-monospace, "SF Mono", Consolas, Menlo, monospace;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: .3px;
}
.ds-logo:hover { opacity: .65; }

.ds-new {
  margin: 6px 14px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid var(--line2);
  border-radius: 12px;
  background: #fff;
  padding: 10px 0;
  font-size: 14px;
  color: var(--ink);
  transition: background .15s ease, border-color .15s ease;
}
.ds-new:hover { background: var(--bubble); }
.ds-new:disabled { opacity: .45; cursor: default; }
.ds-plus { font-size: 15px; }

.ds-history {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 8px 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--line2) transparent;
}
.ds-group-title {
  font-size: 12px;
  color: var(--faint);
  padding: 14px 10px 5px;
}
.ds-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 9px;
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}
.ds-item:hover { background: #ededed; }
.ds-item.on { background: #e8e8e8; font-weight: 600; }
.ds-item .ds-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-item .ds-item-del {
  color: var(--faint);
  visibility: hidden;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 2px;
}
.ds-item:hover .ds-item-del { visibility: visible; }
.ds-item .ds-item-del:hover { color: var(--ink); }
.ds-history .ds-empty { padding: 14px 10px; font-size: 12.5px; color: var(--faint); }

.ds-side-foot {
  border-top: 1px solid var(--line);
  padding: 12px 14px;
}
.ds-conn-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--dim);
  min-width: 0;
}
.ds-conn-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.wa-dot.off { background: none; border: 1.5px solid var(--faint); }
.wa-dot.busy { background: var(--faint); animation: dsBlink 1s infinite; }
.wa-dot.on { background: var(--ink); }
@keyframes dsBlink { 50% { opacity: .3; } }
.ds-conn-change {
  margin-top: 6px;
  font-size: 12px;
  color: var(--faint);
  padding: 0;
}
.ds-conn-change:hover { color: var(--ink); }

/* ---------------- 主区 ---------------- */
.ds-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}
.ds-top {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 18px;
  flex-shrink: 0;
}
.ds-iconbtn {
  color: var(--dim);
  padding: 5px 8px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ds-iconbtn:hover { color: var(--ink); background: var(--bubble); }
.ds-burger { display: none; }
.ds-top-status { font-size: 12.5px; color: var(--faint); }
.ds-spacer { flex: 1; }
.ds-top-link { font-size: 13px; color: var(--dim); }
.ds-top-link:hover { color: var(--ink); }

/* ---------------- 连接屏 ---------------- */
.ds-connect {
  flex: 1;
  overflow-y: auto;
  display: flex;
  justify-content: center;
}
.ds-connect-in { width: 100%; max-width: 560px; padding: 9vh 24px 40px; }
.ds-connect-in h1 { font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.ds-sub { color: var(--dim); font-size: 14px; margin-bottom: 26px; }

.ds-form { display: flex; gap: 10px; }
.ds-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line2);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  outline: none;
}
.ds-form input:focus { border-color: var(--ink); }
.ds-form input::placeholder { color: #bbb; }
.ds-form button {
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 26px;
  font-size: 14px;
}
.ds-form button:hover { background: #000; }
.ds-form button:disabled { opacity: .5; cursor: default; }

.ds-hint { margin-top: 14px; font-size: 13px; color: var(--dim); line-height: 1.8; word-break: break-all; }
.ds-hint.err { color: #c0392b; }
.ds-hint.ok { color: var(--ink); }
.ds-hint code { font-size: 12px; background: var(--codebg); padding: 1px 5px; border-radius: 4px; }

/* ---------------- 演示模式入口 ---------------- */
.ds-demo {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.ds-demo-btn {
  display: inline-block;
  border: 1px solid var(--line2);
  border-radius: 10px;
  background: #fff;
  padding: 10px 20px;
  font-size: 13.5px;
  color: var(--ink);
  transition: background .15s ease, border-color .15s ease;
}
.ds-demo-btn:hover { background: var(--bubble); border-color: var(--ink); }
.ds-demo-note {
  margin-top: 9px;
  font-size: 12px;
  color: var(--faint);
}
.ds-demo-badge {
  font-size: 11.5px;
  letter-spacing: .5px;
  color: var(--dim);
  border: 1px solid var(--line2);
  border-radius: 999px;
  padding: 2px 10px;
}

.ds-ways { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 22px; }
.ds-ways p { font-size: 13px; color: var(--dim); margin-bottom: 12px; line-height: 1.8; }
.ds-ways b { color: var(--ink); font-weight: 600; }
.ds-ways code { font-size: 12px; background: var(--codebg); padding: 1px 5px; border-radius: 4px; }

/* ---------------- 欢迎页 ---------------- */
.ds-welcome {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.ds-welcome-in {
  width: 100%;
  max-width: 720px;
  padding: 16vh 24px 40px;
  text-align: center;
}
.ds-wl-mark {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}
.ds-welcome-in h2 { font-size: 24px; font-weight: 600; margin-bottom: 34px; }

/* ---------------- 输入框（DeepSeek 式大圆角框） ---------------- */
.ds-box {
  background: #fff;
  border: 1px solid var(--line2);
  border-radius: 22px;
  padding: 14px 16px 10px;
  text-align: left;
}
.ds-box:focus-within { border-color: var(--ink); }
.ds-box textarea {
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  max-height: 200px;
  background: transparent;
}
.ds-box textarea::placeholder { color: #b3b3b3; }
.ds-box textarea:disabled { color: var(--faint); }
.ds-box-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.ds-box-note { font-size: 11.5px; color: #bbb; }
.ds-round {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  flex-shrink: 0;
}
.ds-round-send { background: var(--ink); color: #fff; }
.ds-round-send:hover { background: #000; }
.ds-round-send:disabled { opacity: .3; cursor: default; }
.ds-round-stop { background: var(--ink); color: #fff; }

/* ---------------- 对话线程 ---------------- */
.ds-thread {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.ds-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line2) transparent;
}
.ds-log-in { max-width: 760px; margin: 0 auto; padding: 20px 24px 8px; }
.ds-thread-slot { padding: 0 24px 14px; }
.ds-composer { width: 100%; }
.ds-thread-slot .ds-box { max-width: 712px; margin: 0 auto; }
.ds-dock .ds-composer { max-width: 712px; margin: 0 auto; }

.msg { padding: 14px 0 6px; }
.msg + .msg { border-top: 1px solid var(--line); }
.msg.user { display: flex; justify-content: flex-end; }
.msg.user .msg-bubble {
  background: var(--bubble);
  border-radius: 14px;
  padding: 10px 15px;
  max-width: 78%;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 14.5px;
}
.msg.assistant .msg-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.msg.assistant .msg-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.msg.assistant .msg-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.msg-body { font-size: 14.5px; line-height: 1.8; color: var(--ink); word-break: break-word; }
.msg-body p { margin: 0 0 10px; }
.msg-body p:last-child { margin-bottom: 0; }
.msg-body h3 { font-size: 15.5px; margin: 16px 0 8px; }
.msg-body ul, .msg-body ol { margin: 0 0 10px 22px; }
.msg-body li { margin: 3px 0; }
.msg-body a { text-decoration: underline; }
.msg-body strong { font-weight: 600; }

.msg-body code.inline {
  font-size: .88em;
  background: var(--codebg);
  border: 1px solid var(--line);
  padding: 0 5px;
  border-radius: 4px;
}

.codeblock { margin: 12px 0; border: 1px solid var(--line2); border-radius: 10px; overflow: hidden; }
.codeblock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: var(--codebg);
  border-bottom: 1px solid var(--line);
  font-family: ui-monospace, "SF Mono", Consolas, Menlo, monospace;
  font-size: 11px;
  color: var(--faint);
}
.code-copy {
  font-size: 11px;
  color: var(--faint);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.code-copy:hover { color: var(--ink); }
.codeblock pre {
  margin: 0;
  padding: 13px 15px;
  overflow-x: auto;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--codebg);
}
.tk-kw { font-weight: 600; }
.tk-str { color: #555; }
.tk-com { color: #999; font-style: italic; }
.tk-num { font-weight: 600; }

.think { margin: 2px 0 10px; border-left: 2px solid var(--line2); padding-left: 12px; }
.think summary {
  list-style: none;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--faint);
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.think summary::-webkit-details-marker { display: none; }
.think summary:hover { color: var(--ink); }
.think-body { padding: 6px 0 4px; font-size: 13px; color: var(--dim); white-space: pre-wrap; }

.tool-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: ui-monospace, "SF Mono", Consolas, Menlo, monospace;
  font-size: 12.5px;
  color: var(--dim);
  padding: 5px 0;
}
.tool-line .t-name { font-weight: 600; color: var(--ink); }
.tool-line .ic { color: var(--faint); }
.tool-line:hover .ic { color: var(--ink); }
.tool-line .t-state { margin-left: auto; font-size: 11px; color: var(--faint); }

.waiting { font-size: 12.5px; color: var(--faint); padding: 10px 0 2px; }
.waiting::after { content: "▮"; animation: dsBlink 1s infinite; margin-left: 4px; }

.sysline {
  font-size: 13px;
  color: #c0392b;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.sysline .hint { display: block; color: var(--dim); font-size: 12.5px; margin-top: 2px; }

/* ---------------- 底部停靠 ---------------- */
.ds-dock {
  flex-shrink: 0;
  padding: 6px 24px 16px;
}
.ds-dock .ds-box { max-width: 712px; margin: 0 auto; }
.ds-thread-slot .ds-composer { max-width: 712px; margin: 0 auto; }

/* ---------------- 侧栏账号区 ---------------- */
.ds-account-btn {
  margin-top: 10px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 6px;
  border-radius: 9px;
  font-size: 13px;
  color: var(--ink);
  text-align: left;
  transition: background .15s ease;
}
.ds-account-btn:hover { background: #ededed; }
.ds-account-av {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}
.ds-account-av.guest { background: #fff; color: var(--faint); border: 1px solid var(--line2); }
.ds-account-txt {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------- 已保存的连接 ---------------- */
.ds-saved { margin-top: 26px; }
.ds-saved-title {
  font-size: 12px;
  color: var(--faint);
  margin-bottom: 10px;
}
.ds-saved-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 13.5px;
  color: var(--ink);
  text-align: left;
  margin-bottom: 8px;
  transition: border-color .15s ease, background .15s ease;
}
.ds-saved-item:hover { border-color: var(--ink); background: var(--bubble); }
.ds-saved-item .n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ds-saved-item .a {
  font-family: ui-monospace, "SF Mono", Consolas, Menlo, monospace;
  font-size: 11.5px;
  color: var(--faint);
  flex-shrink: 0;
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------- 快捷指令条 ---------------- */
.ds-tpl-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 8px;
}
.ds-tpl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line2);
  border-radius: 999px;
  background: #fff;
  padding: 5px 12px;
  font-size: 12.5px;
  color: var(--dim);
  max-width: 220px;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.ds-tpl:hover { border-color: var(--ink); color: var(--ink); }
.ds-tpl .t {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ds-tpl .d {
  color: var(--faint);
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
}
.ds-tpl .d:hover { color: var(--ink); }
.ds-tpl-add {
  border-style: dashed;
  color: var(--faint);
}
.ds-tpl-add:hover { border-color: var(--ink); color: var(--ink); }

/* ---------------- 弹窗 ---------------- */
.ds-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.ds-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .28);
}
.ds-modal-box {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: 28px 26px 24px;
  max-height: 90vh;
  overflow-y: auto;
}
.ds-modal-x {
  position: absolute;
  top: 14px; right: 14px;
  color: var(--faint);
  padding: 4px;
  border-radius: 8px;
}
.ds-modal-x:hover { color: var(--ink); background: var(--bubble); }
.ds-modal-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.ds-modal-sub {
  font-size: 13px;
  color: var(--dim);
  line-height: 1.7;
  margin-bottom: 20px;
}
.ds-modal-sub b { color: var(--ink); font-weight: 600; }
/* ---------------- 华为账号登录 ---------------- */
.ds-hw-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line2);
  border-radius: 10px;
  background: #fff;
  padding: 12px 0;
  font-size: 14.5px;
  color: var(--ink);
  transition: border-color .15s ease, background .15s ease;
}
.ds-hw-btn:hover { border-color: var(--ink); background: var(--bubble); }
.ds-hw-btn:disabled { opacity: .55; cursor: default; }
.ds-hw-ic { color: #111; }
.ds-hw-note {
  font-size: 12px;
  color: var(--faint);
  line-height: 1.7;
  margin-top: 9px;
  text-align: center;
}
.ds-hw-note.err { color: #c0392b; }
.ds-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 4px;
  color: var(--faint);
  font-size: 12px;
}
.ds-or::before, .ds-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---------------- 华为设备码授权面板 ---------------- */
.ds-hw-panel {
  margin-top: 14px;
  border: 1px solid var(--line2);
  border-radius: 12px;
  padding: 16px;
  background: #fafafa;
}
.ds-hw-wait {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 12px;
}
.ds-hw-spin {
  width: 13px; height: 13px;
  border: 2px solid var(--line2);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: hwspin .9s linear infinite;
  flex-shrink: 0;
}
@keyframes hwspin { to { transform: rotate(360deg); } }
.ds-hw-code-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.ds-hw-code-label { font-size: 12px; color: var(--faint); }
.ds-hw-code {
  flex: 1;
  font-family: ui-monospace, "SF Mono", Consolas, Menlo, monospace;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--ink);
  text-align: center;
  user-select: all;
}
.ds-hw-copy {
  font-size: 12px;
  color: var(--dim);
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: #fff;
  padding: 4px 10px;
}
.ds-hw-copy:hover { border-color: var(--ink); color: var(--ink); }
.ds-hw-open {
  width: 100%;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  padding: 11px 0;
  font-size: 14px;
}
.ds-hw-open:hover { background: #000; }
.ds-hw-tip {
  font-size: 12px;
  color: var(--dim);
  line-height: 1.7;
  margin-top: 10px;
  text-align: center;
}
.ds-hw-tip.ds-hw-dim { color: var(--faint); margin-top: 4px; }
.ds-hw-panel .err { color: #c0392b; }

.ds-field-label {
  display: block;
  font-size: 12.5px;
  color: var(--faint);
  margin: 14px 0 6px;
}
.ds-field {
  width: 100%;
  border: 1px solid var(--line2);
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  outline: none;
}
.ds-field:focus { border-color: var(--ink); }
.ds-field::placeholder { color: #bdbdbd; }
.ds-modal-hint {
  min-height: 1.5em;
  font-size: 12.5px;
  color: var(--dim);
  margin-top: 10px;
}
.ds-modal-hint.err { color: #c0392b; }
.ds-modal-hint.ok { color: var(--ink); }
.ds-modal-primary {
  width: 100%;
  margin-top: 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  padding: 11px 0;
  font-size: 14px;
  transition: background .15s ease;
}
.ds-modal-primary:hover { background: #000; }
.ds-modal-primary:disabled { opacity: .5; cursor: default; }
.ds-modal-ghost {
  width: 100%;
  margin-top: 10px;
  border: 1px solid var(--line2);
  border-radius: 10px;
  padding: 11px 0;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  transition: border-color .15s ease, background .15s ease;
}
.ds-modal-ghost:hover { border-color: var(--ink); background: var(--bubble); }
.ds-modal-note {
  font-size: 12px;
  color: var(--faint);
  line-height: 1.7;
  margin-top: 16px;
}
/* ---------------- 人机验证 / 邮箱验证码 ---------------- */
.cap-row { display: flex; align-items: center; gap: 10px; }
.cap-img {
  flex-shrink: 0; display: inline-flex;
  border: 1px solid var(--line2); border-radius: 8px;
  overflow: hidden; cursor: pointer; background: #fafafa;
}
.cap-img svg { display: block; }
.cap-in { flex: 1; min-width: 0; }
.cap-send {
  flex-shrink: 0; border: 1px solid var(--line2); border-radius: 10px;
  background: #fff; color: var(--ink); padding: 10px 14px; font-size: 13px;
  white-space: nowrap;
}
.cap-send:hover { border-color: var(--ink); }
.cap-send:disabled { opacity: .5; cursor: default; }

.ds-btn-row { display: flex; gap: 10px; margin-top: 16px; }
.ds-mode-btn {
  flex: 1; padding: 11px 0; font-size: 14px; border-radius: 10px;
  border: 1px solid var(--line2); background: #fff; color: var(--dim);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.ds-mode-btn:hover { border-color: var(--ink); color: var(--ink); }
.ds-mode-btn.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.ds-mode-btn:disabled { opacity: .5; cursor: default; }
.ds-modal-danger {
  width: 100%;
  margin-top: 18px;
  padding: 9px 0;
  border-radius: 10px;
  font-size: 13px;
  color: #c0392b;
}
.ds-modal-danger:hover { background: rgba(192, 57, 43, .07); }
.ds-acc-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.ds-acc-k { color: var(--faint); font-size: 12.5px; flex-shrink: 0; }
.ds-acc-v {
  color: var(--ink);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ds-acc-actions { margin-top: 4px; }

/* ---------------- 顶部轻提示 ---------------- */
.ds-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translate(-50%, -12px);
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  padding: 10px 20px;
  border-radius: 999px;
  z-index: 400;
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
  white-space: nowrap;
}
.ds-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- 移动端 ---------------- */
@media (max-width: 820px) {
  .ds-side {
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform .22s ease;
    box-shadow: none;
  }
  .ds-side.open { transform: none; }
  .ds-side-close { display: inline-block; }
  .ds-mask {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .3);
    z-index: 40;
  }
  .ds-burger { display: inline-block; }
  .ds-side { box-shadow: 4px 0 24px rgba(0, 0, 0, .08); }
  .ds-log-in { padding: 14px 16px 6px; }
  .ds-thread-slot { padding: 0 14px 10px; }
  .ds-dock { padding: 4px 14px 12px; }
  .ds-welcome-in { padding: 12vh 18px 32px; }
}

@media (min-width: 821px) {
  .ds-side-close { display: none; }
}
