:root {
  --bg: #0d0d0e;
  --side: #121214;
  --elev: #18181b;
  --elev-2: #202024;
  --hover: #1f1f23;
  --border: #27272b;
  --border-strong: #34343a;
  --text: #ececee;
  --text-2: #b6b6bc;
  --muted: #7c7c84;
  --accent: #e07a52;
  --accent-soft: rgba(224, 122, 82, .14);
  --user: #222226;
  --code-bg: #141416;
  --danger: #ef5d5d;
  --ok: #4cc38a;
  --send-bg: #f2f2f3;
  --send-fg: #0d0d0e;
  --shadow: 0 10px 40px rgba(0, 0, 0, .45), 0 0 0 1px var(--border);
  --radius: 26px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #fafaf8;
  --side: #f2f2ef;
  --elev: #ffffff;
  --elev-2: #f3f3f0;
  --hover: #e9e9e5;
  --border: #e4e4df;
  --border-strong: #d4d4ce;
  --text: #1b1b1d;
  --text-2: #45454b;
  --muted: #85858c;
  --accent: #c8633f;
  --accent-soft: rgba(200, 99, 63, .1);
  --user: #efefeb;
  --code-bg: #f4f4f1;
  --send-bg: #1b1b1d;
  --send-fg: #ffffff;
  --shadow: 0 8px 30px rgba(20, 20, 20, .08), 0 0 0 1px var(--border);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #fafaf8;
    --side: #f2f2ef;
    --elev: #ffffff;
    --elev-2: #f3f3f0;
    --hover: #e9e9e5;
    --border: #e4e4df;
    --border-strong: #d4d4ce;
    --text: #1b1b1d;
    --text-2: #45454b;
    --muted: #85858c;
    --accent: #c8633f;
    --accent-soft: rgba(200, 99, 63, .1);
    --user: #efefeb;
    --code-bg: #f4f4f1;
    --send-bg: #1b1b1d;
    --send-fg: #ffffff;
    --shadow: 0 8px 30px rgba(20, 20, 20, .08), 0 0 0 1px var(--border);
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15.5px/1.65 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, textarea { font: inherit; color: inherit; }
svg { width: 20px; height: 20px; flex: none; }
.muted { color: var(--muted); }

.mark { display: inline-grid; place-items: center; color: var(--accent); }
.mark svg { width: 22px; height: 22px; }
.mark-lg svg { width: 40px; height: 40px; }
.mark-xl svg { width: 46px; height: 46px; }

.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center;
  border-radius: 12px; color: var(--text-2); transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn.round { border-radius: 50%; width: 36px; height: 36px; }
.icon-btn svg { width: 19px; height: 19px; }

.btn-primary {
  background: var(--send-bg); color: var(--send-fg); border-radius: 14px;
  padding: 11px 18px; font-weight: 600; transition: opacity .15s, transform .1s;
}
.btn-primary:active { transform: scale(.98); }
.btn-primary.danger { background: var(--danger); color: #fff; }
.btn-ghost { padding: 11px 16px; border-radius: 14px; color: var(--text-2); }
.btn-ghost:hover { background: var(--hover); }

/* ---------- 登录 ---------- */
.login {
  height: 100dvh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 600px at 50% -10%, var(--accent-soft), transparent 60%), var(--bg);
}
.login-card { width: min(360px, 100%); display: flex; flex-direction: column; gap: 14px; text-align: center; }
.login-card h1 { margin: 6px 0 0; font-size: 26px; letter-spacing: -.01em; }
.login-card p { margin: 0 0 10px; }
.login-card input {
  height: 50px; border-radius: 16px; border: 1px solid var(--border-strong); background: var(--elev);
  padding: 0 16px; font-size: 16px; outline: none; transition: border-color .15s;
}
.login-card input:focus { border-color: var(--accent); }
.login-card .btn-primary { height: 50px; font-size: 16px; }
.login-err { color: var(--danger); min-height: 1.4em; font-size: 14px; }

/* ---------- 框架 ---------- */
.app { display: flex; height: 100dvh; }
.sidebar {
  width: 276px; flex: none; background: var(--side); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 12px 10px calc(10px + env(safe-area-inset-bottom));
  padding-top: calc(12px + env(safe-area-inset-top));
}
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 10px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 650; font-size: 17px; letter-spacing: -.01em; }
.new-chat {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 14px;
  background: var(--elev); border: 1px solid var(--border); font-weight: 550; transition: background .15s;
}
.new-chat:hover { background: var(--hover); }
.new-chat svg { width: 18px; height: 18px; }
.new-chat span { flex: 1; text-align: left; }
.new-chat kbd { font: 11.5px/1 inherit; color: var(--muted); border: 1px solid var(--border-strong); border-radius: 6px; padding: 3px 5px; }
.search {
  display: flex; align-items: center; gap: 8px; margin: 10px 0 6px; padding: 0 12px; height: 38px;
  border-radius: 12px; color: var(--muted); transition: background .15s;
}
.search:focus-within { background: var(--elev); }
.search svg { width: 17px; height: 17px; }
.search input { flex: 1; background: none; border: 0; outline: none; font-size: 14.5px; min-width: 0; }
.sess-list { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; }
.grp { font-size: 12px; color: var(--muted); padding: 14px 10px 6px; font-weight: 550; letter-spacing: .02em; }
.sess {
  display: flex; align-items: center; gap: 8px; padding: 0 4px 0 12px; height: 40px; border-radius: 12px;
  cursor: pointer; color: var(--text-2); position: relative; transition: background .12s;
}
.sess:hover { background: var(--hover); }
.sess.active { background: var(--elev-2); color: var(--text); }
:root[data-theme="light"] .sess.active { background: var(--hover); }
.sess .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14.5px; }
.sess .more { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); opacity: 0; }
.sess:hover .more, .sess.active .more { opacity: 1; }
.sess .more:hover { background: var(--border); color: var(--text); }
.sess .more svg { width: 17px; height: 17px; }
.run-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); animation: pulse 1.4s infinite; flex: none; }
.empty-list { color: var(--muted); font-size: 13.5px; padding: 18px 12px; }
.side-foot { display: flex; align-items: center; gap: 2px; padding: 8px 4px 0; border-top: 1px solid var(--border); margin-top: 6px; }
.host { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding-left: 8px; min-width: 0; }
.host span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot-online { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }

.scrim { display: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.topbar {
  height: 52px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 12px;
  padding-top: env(safe-area-inset-top); box-sizing: content-box;
}
.top-title { flex: 1; min-width: 0; text-align: center; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.only-mobile { display: none; }

.scroller { flex: 1; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: auto; }
.thread { max-width: 780px; margin: 0 auto; padding: 8px 20px 40px; }

/* 空状态：Grok 式居中 */
.hero { display: none; }
.main.empty .scroller { flex: 0 1 auto; display: flex; align-items: flex-end; justify-content: center; min-height: 0; padding-top: 12vh; }
.main.empty .hero { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 0 20px 26px; text-align: center; }
.main.empty .thread { display: none; }
.main.empty .dock { margin-bottom: auto; }
.hero h2 { margin: 6px 0 4px; font-size: clamp(24px, 4.2vw, 32px); font-weight: 600; letter-spacing: -.02em; }
.suggests { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 640px; }
.suggest {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-2); font-size: 14px; background: transparent; transition: background .15s, color .15s;
}
.suggest:hover { background: var(--elev); color: var(--text); }
.suggest svg { width: 16px; height: 16px; color: var(--muted); }

/* ---------- 输入区 ---------- */
.dock { padding: 0 16px calc(10px + env(safe-area-inset-bottom)); flex: none; }
.composer {
  max-width: 780px; margin: 0 auto; background: var(--elev); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 10px 10px 8px 10px; transition: box-shadow .2s;
}
.composer:focus-within { box-shadow: var(--shadow), 0 0 0 1px var(--border-strong); }
.composer textarea {
  display: block; width: 100%; resize: none; border: 0; outline: none; background: none;
  font-size: 16px; line-height: 1.55; padding: 6px 8px 4px; max-height: 40vh; min-height: 32px;
}
.composer textarea::placeholder { color: var(--muted); }
.bar { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.grow { flex: 1; }
.chip-wrap { position: relative; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 10px 0 11px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-2); font-size: 13.5px; font-weight: 550; white-space: nowrap;
  transition: background .15s, color .15s;
}
.chip:hover, .chip.open { background: var(--hover); color: var(--text); }
.chip .chip-ic { width: 16px; height: 16px; }
.chip .caret { width: 14px; height: 14px; color: var(--muted); }
.menu {
  position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 30; min-width: 230px; padding: 6px;
  background: var(--elev); border-radius: 18px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(6px) scale(.98); transform-origin: bottom left; pointer-events: none; transition: opacity .14s, transform .14s;
}
.menu.open { opacity: 1; transform: none; pointer-events: auto; }
.menu.down { bottom: auto; top: calc(100% + 6px); transform-origin: top right; right: 0; left: auto; }
.menu-h { font-size: 12px; color: var(--muted); padding: 8px 10px 4px; }
.opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 12px; text-align: left; }
.opt:hover { background: var(--hover); }
.opt .ot { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.opt .ot b { font-weight: 560; font-size: 14.5px; }
.opt .ot small { color: var(--muted); font-size: 12.5px; }
.opt .ck { width: 18px; height: 18px; color: var(--accent); visibility: hidden; }
.opt.sel .ck { visibility: visible; }
.opt.danger { color: var(--danger); }
.opt > svg:first-child { width: 18px; height: 18px; }
.lvl { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.lvl i { width: 3px; border-radius: 2px; background: var(--border-strong); }
.lvl i.on { background: var(--accent); }

.send {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--send-bg); color: var(--send-fg); transition: opacity .15s, transform .1s;
}
.send:disabled { opacity: .25; cursor: default; }
.send:not(:disabled):active { transform: scale(.94); }
.send svg { width: 19px; height: 19px; }
.send .i-stop { display: none; }
.send.stop .i-send { display: none; }
.send.stop .i-stop { display: block; }
.disclaimer { text-align: center; font-size: 11.5px; color: var(--muted); margin: 8px 0 0; }

.atts { display: flex; gap: 8px; flex-wrap: wrap; padding: 2px 4px 6px; }
.atts:empty { display: none; }
.att {
  display: flex; align-items: center; gap: 8px; height: 46px; padding: 4px 8px 4px 4px; border-radius: 14px;
  background: var(--elev-2); border: 1px solid var(--border); max-width: 220px; position: relative; font-size: 13px;
}
.att .th { width: 38px; height: 38px; border-radius: 10px; background: var(--border) center/cover; display: grid; place-items: center; color: var(--muted); flex: none; }
.att .th svg { width: 18px; height: 18px; }
.att .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.att .rm { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); flex: none; }
.att .rm:hover { background: var(--border); color: var(--text); }
.att .rm svg { width: 14px; height: 14px; }
.att.loading .th { animation: pulse 1.2s infinite; }

/* ---------- 消息 ---------- */
.msg { margin: 22px 0; }
.msg.user { display: flex; flex-direction: column; align-items: flex-end; }
.bubble {
  background: var(--user); border-radius: 22px; border-bottom-right-radius: 8px; padding: 10px 16px;
  max-width: min(85%, 620px); white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere;
}
.u-atts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin-bottom: 6px; max-width: 85%; }
.u-atts a { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.u-atts img { display: block; max-width: 160px; max-height: 160px; object-fit: cover; }
.u-atts .fa { display: flex; align-items: center; gap: 6px; padding: 8px 12px; font-size: 13px; color: var(--text-2); text-decoration: none; }
.u-atts .fa svg { width: 16px; height: 16px; }

.msg.ai { display: flex; gap: 12px; }
.msg.ai > .av { width: 28px; height: 28px; flex: none; display: grid; place-items: center; color: var(--accent); margin-top: 1px; }
.msg.ai > .av svg { width: 22px; height: 22px; }
.msg.ai.live > .av svg { animation: spin 3.2s linear infinite; }
.msg.ai > .body { flex: 1; min-width: 0; }

.md { overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md p { margin: .55em 0 .75em; }
.md h1, .md h2, .md h3, .md h4 { margin: 1.2em 0 .5em; line-height: 1.35; letter-spacing: -.01em; }
.md h1 { font-size: 1.35em; } .md h2 { font-size: 1.22em; } .md h3 { font-size: 1.08em; } .md h4 { font-size: 1em; }
.md ul, .md ol { padding-left: 1.4em; margin: .5em 0 .8em; }
.md li { margin: .25em 0; }
.md li::marker { color: var(--muted); }
.md a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-soft); }
.md strong { font-weight: 640; }
.md blockquote { margin: .8em 0; padding: 2px 0 2px 14px; border-left: 3px solid var(--border-strong); color: var(--text-2); }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 1.4em 0; }
.md :not(pre) > code {
  font: .88em/1.4 ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  background: var(--elev-2); border: 1px solid var(--border); padding: .1em .4em; border-radius: 6px;
}
.md table { border-collapse: collapse; display: block; overflow-x: auto; margin: .8em 0; font-size: .94em; }
.md th, .md td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.md th { background: var(--elev); font-weight: 600; }
.md img { max-width: 100%; border-radius: 12px; }
.codebox { margin: .8em 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--code-bg); }
.codebox .cb-h { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 4px 14px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--border); }
.codebox .cb-h button { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 8px; font-size: 12px; }
.codebox .cb-h button:hover { background: var(--hover); color: var(--text); }
.codebox .cb-h svg { width: 14px; height: 14px; }
.codebox pre { margin: 0; padding: 12px 14px; overflow-x: auto; }
.codebox code, .tool pre { font: 13px/1.55 ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace; }
.codebox code { background: none !important; padding: 0 !important; }

/* 工具调用卡片 */
.tool, .think { margin: 8px 0; border-radius: 14px; }
.tool > summary, .think > summary {
  list-style: none; display: flex; align-items: center; gap: 9px; cursor: pointer; user-select: none;
  padding: 7px 12px; border-radius: 14px; border: 1px solid var(--border); background: var(--elev);
  font-size: 13.5px; color: var(--text-2); max-width: 100%; width: fit-content; transition: background .12s;
}
.tool > summary::-webkit-details-marker, .think > summary::-webkit-details-marker { display: none; }
.tool > summary:hover, .think > summary:hover { background: var(--hover); }
.tool > summary svg, .think > summary svg { width: 16px; height: 16px; }
.tool .tn { font-weight: 600; color: var(--text); white-space: nowrap; }
.tool .ts { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; max-width: 46ch; }
.tool .st { width: 16px; height: 16px; display: grid; place-items: center; flex: none; }
.tool .st.ok { color: var(--ok); }
.tool .st.err { color: var(--danger); }
.spinner { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.tool-body { margin-top: 6px; border: 1px solid var(--border); border-radius: 14px; background: var(--code-bg); overflow: hidden; }
.tool-body .lbl { font-size: 11.5px; color: var(--muted); padding: 8px 14px 0; letter-spacing: .03em; }
.tool-body pre { margin: 0; padding: 6px 14px 12px; overflow: auto; max-height: 340px; white-space: pre-wrap; word-break: break-all; color: var(--text-2); }
.tool-body pre.err { color: var(--danger); }
.tool-body .lbl + pre + .lbl { border-top: 1px solid var(--border); padding-top: 10px; }
.think > summary { border-style: dashed; }
.think.empty > summary { cursor: default; }
.think.empty > summary:hover { background: var(--elev); }
.think.empty .md { display: none; }
.think.thinking-now .tl { animation: think-pulse 1.4s ease-in-out infinite; }
@keyframes think-pulse { 50% { opacity: .4; } }
.think .md { color: var(--text-2); font-size: 14.5px; padding: 10px 14px 4px; border-left: 2px solid var(--border-strong); margin: 8px 0 0 10px; }

.ai-meta { display: flex; align-items: center; gap: 4px; margin-top: 10px; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }
.ai-meta .sep { opacity: .5; }
.ai-meta button { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--muted); margin-left: -6px; }
.ai-meta button:hover { background: var(--hover); color: var(--text); }
.ai-meta button svg { width: 16px; height: 16px; }
.ai-err { margin-top: 10px; padding: 10px 14px; border-radius: 14px; background: rgba(239, 93, 93, .1); color: var(--danger); font-size: 13.5px; white-space: pre-wrap; font-family: ui-monospace, Menlo, monospace; }
.ai-stop { margin-top: 8px; color: var(--muted); font-size: 13px; }

.working { display: inline-flex; gap: 5px; padding: 10px 2px; }
.working i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.working i:nth-child(2) { animation-delay: .15s; }
.working i:nth-child(3) { animation-delay: .3s; }
.caret-blink::after { content: ""; display: inline-block; width: 8px; height: 1.05em; vertical-align: -2px; margin-left: 2px; border-radius: 2px; background: var(--accent); animation: blink 1s infinite; }

.to-bottom {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 150px; width: 36px; height: 36px; border-radius: 50%;
  background: var(--elev); box-shadow: var(--shadow); display: grid; place-items: center; color: var(--text-2);
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 5;
}
.to-bottom.show { opacity: 1; pointer-events: auto; }
.to-bottom svg { width: 18px; height: 18px; }

/* 弹窗 & 提示 */
.dialog-back { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .5); display: grid; place-items: center; padding: 20px; animation: fade .15s; }
.dialog { width: min(380px, 100%); background: var(--elev); border-radius: 22px; padding: 22px 20px 16px; box-shadow: var(--shadow); }
.dialog h3 { margin: 0 0 6px; font-size: 17px; }
.dialog p { margin: 0 0 14px; font-size: 14px; }
.dialog p:empty { display: none; }
.dialog input { width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--bg); padding: 0 12px; font-size: 16px; outline: none; margin-bottom: 14px; }
.dialog input:focus { border-color: var(--accent); }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; }
.toast {
  position: fixed; left: 50%; top: calc(16px + env(safe-area-inset-top)); transform: translate(-50%, -20px); z-index: 70;
  background: var(--send-bg); color: var(--send-fg); padding: 9px 16px; border-radius: 999px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .45; } }
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes fade { from { opacity: 0; } }

/* ---------- 手机 ---------- */
@media (max-width: 860px) {
  .only-mobile { display: inline-grid; }
  .only-desktop { display: none; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 40; width: min(86vw, 320px);
    transform: translateX(-102%); transition: transform .25s cubic-bezier(.3, .7, .2, 1);
  }
  .sidebar.open { transform: none; box-shadow: 10px 0 40px rgba(0, 0, 0, .3); }
  .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .45); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .scrim.show { opacity: 1; pointer-events: auto; }
  .sess .more { opacity: 1; }
  .thread { padding: 4px 16px 30px; }
  .dock { padding: 0 10px calc(8px + env(safe-area-inset-bottom)); }
  .composer { --radius: 24px; }
  .disclaimer { display: none; }
  .msg.ai { gap: 0; flex-direction: column; }
  .msg.ai > .av { margin-bottom: 4px; }
  .main.empty .scroller { padding-top: 8vh; }
  .main.empty .dock { margin-bottom: 0; margin-top: auto; }
  .main.empty .scroller { flex: 1; align-items: center; }
  .tool .ts { max-width: 52vw; }
  .chip { padding: 0 8px 0 9px; }
  .composer { position: relative; }
  .chip-wrap { position: static; }
  .composer .menu { left: 8px; right: 8px; min-width: 0; bottom: calc(100% + 8px); }
  .to-bottom { bottom: 130px; }
}
@media (max-width: 380px) {
  .chip .chip-ic { display: none; }
}
