/* ============================================================
   中山智透 · 视觉系统
   设计语言沿用 docs/zhongshan-zhitou-redesign.html，
   但修正了三处结构问题：
     1. 真正的聊天形态 —— 消息区独立滚动、输入框固定底部
     2. 可读性 —— 正文 15px、次要文字对比度 ≥ 4.5:1
     3. 无障碍 —— :focus-visible、aria、动效可关闭
   ============================================================ */

:root {
  --ink: #14282a;
  --ink-2: #2d4442;
  --muted: #54686a;      /* 正文次要色，≥4.5:1 on #f6f9f8 */
  --faint: #5f7371;      /* 12px 标签色，≥4.5:1 */
  --line: #e2ebe8;
  --line-strong: #d3e0dc;
  --teal: #087f78;
  --teal-dark: #06665f;
  --teal-ink: #0b5f59;
  --mint: #e9f6f3;
  --mint-2: #d6eee8;
  --paper: #ffffff;
  --canvas: #f6f9f8;
  --sidebar: #eff5f3;
  --warn: #a8541f;
  --warn-bg: #fdf3e7;
  --danger: #a8342a;
  --danger-bg: #fdeeea;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(18, 51, 49, .04), 0 4px 14px rgba(18, 51, 49, .05);
  --shadow-md: 0 10px 34px rgba(18, 51, 49, .09);
  --sidebar-w: 272px;
  --chat-col: 860px;
  --welcome-col: 1040px;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--teal-ink); text-decoration: none; border-bottom: 1px solid rgba(8, 127, 120, .28); }
a:hover { border-bottom-color: var(--teal); }

:focus-visible {
  outline: 2.5px solid #0a8f87;
  outline-offset: 2px;
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------- 骨架 ---------------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* ---------------- 侧栏 ---------------- */
.sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 18px 14px 14px;
}

.brand { display: flex; gap: 11px; align-items: center; padding: 2px 8px 18px; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-name { font-weight: 750; font-size: 16px; letter-spacing: .01em; }
.brand-sub { font-size: 11px; color: var(--faint); letter-spacing: .09em; margin-top: 2px; }

.new-chat {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; padding: 12px 14px;
  background: var(--teal); color: #fff;
  border-radius: 12px; font-weight: 650; font-size: 14.5px;
  box-shadow: 0 6px 16px rgba(8, 127, 120, .18);
  transition: background .16s ease, transform .16s ease;
}
.new-chat:hover { background: var(--teal-dark); }
.new-chat:active { transform: translateY(1px); }
.new-chat svg { width: 18px; height: 18px; }

.side-search { position: relative; margin: 14px 0 6px; }
.side-search svg { position: absolute; left: 11px; top: 11px; width: 16px; height: 16px; color: var(--faint); }
.side-search input {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: #f9fcfb;
  border-radius: 10px;
  padding: 9px 10px 9px 34px;
  font-size: 13.5px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.side-search input::placeholder { color: var(--faint); }
.side-search input:focus { border-color: #7cc0b7; box-shadow: 0 0 0 3px #d5ece8; }

.section-label {
  font-size: 11.5px; color: var(--faint); font-weight: 700;
  letter-spacing: .08em; padding: 14px 10px 8px;
  display: flex; justify-content: space-between; align-items: center;
}
.section-label button { font-size: 11.5px; color: var(--teal-ink); font-weight: 650; }

.history {
  flex: 1; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; gap: 2px;
  padding-right: 2px;
  scrollbar-width: thin;
}
.history-empty { padding: 10px; font-size: 13px; color: var(--faint); line-height: 1.7; }

.history-item {
  display: block; width: 100%; text-align: left;
  padding: 9px 10px; border-radius: 9px;
  font-size: 13.5px; color: #3d5553;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background .14s, color .14s;
}
.history-item:hover { background: #e4efec; color: var(--ink); }
.history-item[aria-current="true"] { background: #dcece8; color: #104d49; font-weight: 650; }

.side-foot { padding-top: 12px; }
.side-note {
  display: flex; gap: 10px; align-items: center;
  border: 1px solid #dfeae6; background: #f8fbfa;
  border-radius: 11px; padding: 10px;
}
.shield { width: 28px; height: 28px; flex: none; border-radius: 8px; background: #e2f2ec; color: var(--teal); display: grid; place-items: center; }
.shield svg { width: 15px; height: 15px; }
.note-title { font-size: 12px; font-weight: 700; }
.note-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.profile { display: flex; align-items: center; gap: 10px; padding: 14px 4px 4px; margin-top: 10px; border-top: 1px solid var(--line); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #d5e8e2; color: #2f5f59; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; flex: none; }
.profile-name { font-size: 13px; font-weight: 650; }
.profile-role { font-size: 11.5px; color: var(--muted); }

/* ---------------- 主区 ---------------- */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--canvas); }

.topbar {
  flex: none;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 62px; padding: 0 28px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  z-index: 5;
}
.product { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 650; }
.product-badge { padding: 4px 9px; border-radius: 7px; background: var(--mint); color: var(--teal-ink); font-size: 11.5px; font-weight: 700; }
.top-right { display: flex; align-items: center; gap: 14px; font-size: 12.5px; color: var(--muted); }
.secure { display: flex; align-items: center; gap: 6px; }
.secure svg { width: 15px; height: 15px; color: #12805f; }
.help {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line-strong); color: var(--muted);
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
  transition: background .15s, color .15s;
}
.help:hover { background: var(--mint); color: var(--teal-ink); }

.menu-btn { display: none; }

/* 滚动舞台 */
.stage-wrap { position: relative; flex: 1; min-height: 0; display: flex; }
.stage {
  flex: 1; min-width: 0;
  overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain;
}

/* ---------------- 欢迎态 ---------------- */
.welcome {
  width: min(100%, var(--welcome-col));
  margin: 0 auto;
  padding: 46px 40px 28px;
  display: flex; flex-direction: column;
  min-height: 100%;
}
.welcome[hidden] { display: none; }

.intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.intro-text { max-width: 640px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--teal-ink); font-size: 12px; font-weight: 700; letter-spacing: .06em; margin-bottom: 12px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #17a085; box-shadow: 0 0 0 4px #dcefe9; }
.intro h1 { font-size: 30px; line-height: 1.3; letter-spacing: -.02em; margin: 0 0 10px; font-weight: 730; color: #10292b; }
.intro p { margin: 0; font-size: 14.5px; line-height: 1.85; color: var(--muted); }
.date-chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--muted);
  padding: 8px 12px; border: 1px solid var(--line-strong);
  border-radius: 20px; background: #fff;
}
.date-chip i { width: 7px; height: 7px; border-radius: 50%; background: #17a085; }

.assist-card {
  display: flex; gap: 14px; align-items: flex-start;
  border: 1px solid #dfeae6;
  background: linear-gradient(112deg, #fff 38%, #f2fbf8 100%);
  border-radius: 16px; padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 26px;
}
.assist-icon { flex: none; width: 38px; height: 38px; border-radius: 11px; background: #e4f3ee; color: var(--teal); display: grid; place-items: center; }
.assist-icon svg { width: 20px; height: 20px; }
.assist-title { font-size: 14px; font-weight: 700; margin: 1px 0 4px; }
.assist-text { font-size: 13.5px; line-height: 1.7; color: var(--muted); }
.assist-link { margin-left: auto; align-self: center; flex: none; color: var(--teal-ink); font-size: 13px; font-weight: 650; white-space: nowrap; }

.cards-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.cards-head strong { font-size: 14px; }
.cards-head span { font-size: 12px; color: var(--faint); }

.prompt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.prompt-card {
  min-height: 132px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 13px;
  padding: 15px;
  display: flex; flex-direction: column; text-align: left;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.prompt-card:hover { transform: translateY(-2px); border-color: #a9d3cb; box-shadow: 0 10px 22px rgba(25, 80, 72, .08); }
.prompt-icon { width: 29px; height: 29px; border-radius: 8px; background: #ecf6f3; color: #2b8a7b; display: grid; place-items: center; margin-bottom: 11px; }
.prompt-icon svg { width: 16px; height: 16px; }
.prompt-title { font-size: 13.5px; font-weight: 700; margin-bottom: 4px; }
.prompt-desc { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.prompt-arrow { margin-top: auto; align-self: flex-end; color: #7e938f; font-size: 15px; }

/* Dify 开场问题动态卡片 */
.prompt-grid.auto { grid-template-columns: repeat(auto-fit, minmax(212px, 1fr)); }
.prompt-card.is-q { min-height: 104px; }
.prompt-card.is-q .prompt-title {
  font-weight: 650; font-size: 13.5px; line-height: 1.6; margin: 0 0 4px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------------- 会话态 ---------------- */
.chat { width: min(100%, var(--chat-col)); margin: 0 auto; padding: 26px 28px 8px; }
.chat[hidden] { display: none; }

.chat-head {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 16px; margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.chat-title { font-size: 15px; font-weight: 700; }
.chat-sub { font-size: 12px; color: var(--muted); }

.msg { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; margin: 18px 0; }
.msg-avatar {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; flex: none;
  background: #e5f3ef; color: var(--teal);
}
.msg-avatar svg { width: 18px; height: 18px; }
.msg-body { min-width: 0; }

.msg.user { grid-template-columns: minmax(0, 1fr) 34px; }
.msg.user .msg-avatar { order: 2; background: #deeeea; color: #37665f; font-size: 12.5px; font-weight: 700; }
.msg.user .msg-body { order: 1; display: flex; justify-content: flex-end; }
.msg.user .bubble {
  max-width: 84%;
  background: #dff1ec;
  border: 1px solid #cfe7e0;
  border-radius: 14px 14px 4px 14px;
  padding: 11px 14px;
  font-size: 14.5px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}

.msg.assistant .paper {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 4px 14px 14px 14px;
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.msg-actions { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.act {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--muted);
  padding: 5px 8px; border-radius: 7px;
  transition: background .14s, color .14s;
}
.act:hover { background: #eaf3f0; color: var(--teal-ink); }
.act svg { width: 14px; height: 14px; }
.act[aria-pressed="true"] { background: var(--mint); color: var(--teal-ink); font-weight: 650; }

/* 引用来源 */
.cites { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.cites-title { font-size: 11.5px; font-weight: 700; color: var(--faint); letter-spacing: .06em; margin-bottom: 8px; }
.cite-list { display: flex; flex-wrap: wrap; gap: 6px; }
.cite-chip {
  display: inline-flex; align-items: center; gap: 6px;
  max-width: 100%;
  font-size: 12px; color: var(--ink-2);
  background: #f4f9f7; border: 1px solid var(--line);
  padding: 5px 9px; border-radius: 8px;
  text-align: left;
  transition: background .14s, border-color .14s;
}
.cite-chip:hover { background: var(--mint); border-color: #b6dcd3; }
.cite-n { width: 16px; height: 16px; border-radius: 5px; background: var(--teal); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; flex: none; }
.cite-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* markdown 正文 */
.prose { font-size: 15px; line-height: 1.85; color: var(--ink-2); overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose p { margin: 0 0 12px; }
.prose h1, .prose h2, .prose h3, .prose h4 {
  color: var(--ink); line-height: 1.45; margin: 22px 0 9px; font-weight: 720; letter-spacing: -.01em;
}
.prose h1 { font-size: 19px; }
.prose h2 { font-size: 17px; }
.prose h3 { font-size: 15.5px; }
.prose h4, .prose h5, .prose h6 { font-size: 15px; }
.prose ul, .prose ol { margin: 0 0 12px; padding-left: 22px; }
.prose li { margin: 5px 0; }
.prose li::marker { color: #7d9390; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose blockquote {
  margin: 12px 0; padding: 10px 14px;
  border-left: 3px solid #9bd0c6;
  background: #f5faf8; border-radius: 0 8px 8px 0;
  color: #33504d;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.prose code { font-family: var(--mono); font-size: .9em; background: #eef4f2; padding: 1.5px 5px; border-radius: 5px; }
.prose .code { margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.code-bar { display: flex; justify-content: space-between; align-items: center; background: #f3f8f6; padding: 6px 10px; font-size: 11.5px; color: var(--faint); border-bottom: 1px solid var(--line); }
.code-copy { font-size: 11.5px; color: var(--teal-ink); font-weight: 650; }
.prose pre { margin: 0; padding: 12px 14px; overflow-x: auto; background: #fbfdfc; }
.prose pre code { background: none; padding: 0; font-size: 13px; line-height: 1.7; }

.table-wrap {
  margin: 12px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px;
  -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(to right, #fff 40%, rgba(255,255,255,0)) left center / 24px 100% no-repeat,
    linear-gradient(to left, #fff 40%, rgba(255,255,255,0)) right center / 24px 100% no-repeat;
}
.prose table { border-collapse: collapse; width: 100%; font-size: 13.5px; min-width: 420px; }
.prose th, .prose td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: #f3f8f6; font-weight: 700; color: var(--ink); white-space: nowrap; font-size: 13px; }
.prose tr:last-child td { border-bottom: 0; }

sup.cite { line-height: 0; }
sup.cite button {
  font-size: 10.5px; font-weight: 700; color: var(--teal-ink);
  background: var(--mint); border-radius: 4px;
  padding: 1px 4px; margin: 0 1px;
  vertical-align: super;
}
sup.cite button:hover { background: var(--mint-2); }

/* 打字光标 */
.caret { display: inline-block; width: 8px; height: 15px; background: var(--teal); border-radius: 1px; vertical-align: -2px; animation: blink 1s steps(2, start) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.thinking { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 13.5px; }
.thinking .dots { display: inline-flex; gap: 3px; }
.thinking .dots i { width: 6px; height: 6px; border-radius: 50%; background: #9ec9c2; animation: hop 1.1s infinite ease-in-out; }
.thinking .dots i:nth-child(2) { animation-delay: .15s; }
.thinking .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* 错误态 */
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--danger-bg); border: 1px solid #f2d3cc;
  color: #7d2a22; border-radius: 10px; padding: 11px 13px;
  font-size: 13.5px; line-height: 1.65;
}
.alert strong { display: block; margin-bottom: 3px; }
.alert-msg { display: block; }
.alert-actions { margin-top: 6px; }
.alert button { color: var(--danger); font-weight: 700; text-decoration: underline; }

.stopped { margin-top: 10px; font-size: 12px; color: var(--muted); }

/* 建议问题 */
.suggest { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px 46px; }
.suggest button {
  font-size: 13px; color: var(--ink-2);
  border: 1px solid var(--line-strong); background: #fff;
  padding: 7px 12px; border-radius: 18px;
  transition: border-color .14s, background .14s;
}
.suggest button:hover { border-color: #9ecdc4; background: #f7fbfa; }

/* ---------------- 输入区（固定在底部） ---------------- */
.dock {
  flex: none;
  padding: 6px 28px 10px;
  background: linear-gradient(180deg, rgba(246, 249, 248, 0), var(--canvas) 26%);
}
.dock-inner { width: min(100%, var(--chat-col)); margin: 0 auto; }
/* 欢迎态需要更宽的输入区 */
body[data-view="welcome"] .dock-inner { width: min(100%, var(--welcome-col)); }

.composer-wrap {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  box-shadow: var(--shadow-md);
  padding: 11px 13px 9px;
  transition: border-color .16s, box-shadow .16s;
}
.composer-wrap:focus-within { border-color: #8ec8be; box-shadow: 0 0 0 3px #dcefe9, var(--shadow-md); }
.composer { display: flex; align-items: flex-end; gap: 10px; }
.composer textarea {
  flex: 1; min-width: 0; resize: none; border: 0; outline: 0;
  min-height: 26px; max-height: 160px;
  font-size: 14.5px; line-height: 1.65; padding: 4px 2px;
  color: var(--ink); background: transparent;
}
.composer textarea::placeholder { color: #6b807d; }

.send {
  width: 38px; height: 38px; flex: none;
  border-radius: 11px; background: var(--teal); color: #fff;
  display: grid; place-items: center;
  transition: background .15s, opacity .15s;
}
.send:hover:not(:disabled) { background: var(--teal-dark); }
.send:disabled { background: #c6d6d3; cursor: not-allowed; }
.send svg { width: 18px; height: 18px; }
.send.stop { background: #1f3d3a; }

.compose-tools {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 2px 0; margin-top: 6px;
  border-top: 1px solid #f0f5f3;
  font-size: 11.5px; color: var(--faint);
}
.tool-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); padding: 3px 4px; border-radius: 6px; }
.tool-btn:hover { color: var(--teal-ink); background: #f1f8f6; }
.tool-btn svg { width: 14px; height: 14px; }
.tool-spacer { flex: 1; }
.kbd { border: 1px solid var(--line-strong); border-radius: 5px; padding: 1px 5px; font-size: 10.5px; color: var(--faint); }

.disclaimer { text-align: center; font-size: 12px; color: var(--muted); margin: 9px 0 0; line-height: 1.6; }

/* 回到最新 */
.jump {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 14px; z-index: 4;
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-sm); border-radius: 20px;
  padding: 6px 13px; font-size: 12.5px; color: var(--ink-2);
}
.jump[hidden] { display: none; }

/* 引用弹层 */
.pop {
  position: fixed; z-index: 40;
  width: min(420px, calc(100vw - 32px));
  background: #fff; border: 1px solid var(--line-strong);
  border-radius: 12px; box-shadow: var(--shadow-md);
  padding: 14px 15px;
  font-size: 13px; line-height: 1.7; color: var(--ink-2);
}
.pop[hidden] { display: none; }
.pop h4 { margin: 0 0 4px; font-size: 13px; }
.pop .pop-meta { font-size: 11.5px; color: var(--faint); margin-bottom: 8px; }
.pop .pop-body { max-height: 220px; overflow-y: auto; color: var(--muted); white-space: pre-wrap; }

/* 移动端遮罩 */
.scrim { position: fixed; inset: 0; background: rgba(16, 41, 43, .38); z-index: 20; }
.scrim[hidden] { display: none; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  :root { --sidebar-w: 232px; --chat-col: 100%; }
  .welcome { padding: 34px 26px 20px; }
  .chat { padding: 20px 22px 6px; }
  .dock { padding: 6px 22px 8px; }
  .topbar { padding: 0 20px; }
}

@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: 282px; z-index: 30;
    transform: translateX(-102%);
    transition: transform .22s ease;
    box-shadow: var(--shadow-md);
  }
  body[data-drawer="open"] .sidebar { transform: none; }
  .menu-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--ink); }
  .menu-btn svg { width: 20px; height: 20px; }
  .topbar { height: 56px; padding: 0 14px; gap: 10px; }
  .product { font-size: 13px; }
  .secure span { display: none; }
  .welcome { padding: 24px 16px 16px; }
  .intro { flex-direction: column; gap: 12px; }
  .intro h1 { font-size: 25px; }
  .date-chip { display: none; }
  .prompt-grid { grid-template-columns: 1fr 1fr; }
  .prompt-card { min-height: 124px; }
  .prompt-card:last-child { grid-column: 1 / -1; min-height: 108px; }
  .assist-card { flex-wrap: wrap; }
  .assist-link { margin-left: 0; }
  .chat { padding: 14px 14px 4px; }
  .msg { grid-template-columns: 28px minmax(0, 1fr); gap: 9px; }
  .msg-avatar { width: 28px; height: 28px; border-radius: 8px; }
  .msg.assistant .paper { padding: 14px 14px; }
  .msg.user .bubble { max-width: 92%; }
  .prose { font-size: 15px; }
  .prose table { font-size: 12.5px; min-width: 100%; }
  .prose th { white-space: normal; }
  .prose th, .prose td { padding: 8px 9px; }
  .disclaimer { font-size: 11.5px; }
  .dock { padding: 4px 12px 8px; }
  .compose-tools .kbd, .compose-tools .hint { display: none; }
  .suggest { margin-left: 37px; }
}

@media (max-width: 420px) {
  .prompt-grid { grid-template-columns: 1fr; }
  .prompt-card, .prompt-card:last-child { min-height: 104px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .stage { scroll-behavior: auto; }
}
