/* ==========================================================================
   zhouyang.ai
   视觉语言：仪器面板 —— 冷调石白、狭体等宽标签、一块深色读数条
   ========================================================================== */

:root {
  --paper: #f0f1ed;
  --surface: #ffffff;
  --rail: #e9eae5;
  --rail-2: #e2e4dd;

  --ink: #14171a;
  --ink-2: #454c53;
  --ink-3: #767f87;
  --ink-4: #9aa2a8;

  --rule: #d8dbd4;
  --rule-2: #e6e8e2;

  --accent: #1b33d6;
  --accent-ink: #12239b;
  --accent-tint: rgba(27, 51, 214, 0.06);

  --panel: #15181b;
  --panel-2: #1d2124;
  --panel-ink: #edefea;
  --panel-dim: #9ca5a1;
  --panel-rule: #2a2f31;

  --f-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  --f-mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;

  --shadow-1: 0 1px 2px rgba(20, 23, 26, 0.05);
  --shadow-2: 0 1px 2px rgba(20, 23, 26, 0.05), 0 14px 32px -22px rgba(20, 23, 26, 0.4);
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  height: 100%;
}

body {
  font-family: var(--f-sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: light;
  overflow: hidden;
}

button {
  font: inherit;
  color: inherit;
}

.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;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.mono {
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
}

/* ─────────────────────────── 骨架 ─────────────────────────── */

.app {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
}

/* ─────────────────────────── 侧栏 ─────────────────────────── */

.rail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 16px 12px 12px;
  background: var(--rail);
  border-right: 1px solid var(--rule);
}

.rail-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 20px;
  height: 20px;
  flex: none;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 6px;
  height: 6px;
  background: var(--accent);
}

.brand-txt {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.brand-txt b {
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-txt b span {
  color: var(--ink-4);
}

.brand-txt i {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
}

.new-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  margin-bottom: 14px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13.5px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.new-btn:hover {
  border-color: #c3c7bd;
  color: var(--ink);
  box-shadow: var(--shadow-1);
}

.new-btn kbd {
  margin-left: auto;
  padding: 1px 5px;
  border: 1px solid var(--rule-2);
  border-radius: 4px;
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--ink-4);
}

.conv-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin: 0 -4px;
  padding: 0 4px;
  scrollbar-width: thin;
  scrollbar-color: #cdd0c7 transparent;
}

.conv-list::-webkit-scrollbar {
  width: 6px;
}

.conv-list::-webkit-scrollbar-thumb {
  background: #cdd0c7;
  border-radius: 3px;
}

.conv-group {
  margin-bottom: 14px;
}

.conv-group > span {
  display: block;
  padding: 0 8px 5px;
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.conv {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 7px 6px 7px 9px;
  margin-bottom: 1px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--ink-2);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}

.conv:hover {
  background: var(--rail-2);
  color: var(--ink);
}

.conv.active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-1);
}

.conv.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 13px;
  border-radius: 2px;
  background: var(--accent);
}

.conv-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conv-del {
  flex: none;
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--ink-4);
  opacity: 0;
  cursor: pointer;
  transition: opacity 0.14s, background 0.14s, color 0.14s;
}

.conv:hover .conv-del,
.conv-del:focus-visible {
  opacity: 1;
}

.conv-del:hover {
  background: rgba(20, 23, 26, 0.08);
  color: var(--ink);
}

.rail-foot {
  padding: 10px 4px 0;
  margin-top: 8px;
  border-top: 1px solid var(--rule);
}

.ghost-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  padding: 6px 6px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--ink-2);
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}

.ghost-btn:hover {
  background: var(--rail-2);
  color: var(--ink);
}

.rail-note {
  margin: 6px 0 0;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1.6;
  color: var(--ink-4);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: none;
  color: var(--ink-3);
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}

.icon-btn:hover {
  background: var(--rail-2);
  color: var(--ink);
}

.rail-close,
.rail-toggle {
  display: none;
}

/* ─────────────────────────── 主区 ─────────────────────────── */

.main {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  background: var(--paper);
}

.topbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 18px;
  border-bottom: 1px solid var(--rule);
}

.top-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.ctx-chip {
  padding: 3px 9px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  white-space: nowrap;
  cursor: default;
}

/* ─────────────────────────── 滚动区 ─────────────────────────── */

.scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #cdd0c7 transparent;
}

.scroll::-webkit-scrollbar {
  width: 9px;
}

.scroll::-webkit-scrollbar-thumb {
  background: #d3d6cd;
  border-radius: 5px;
  border: 2px solid var(--paper);
}

.thread {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 760px;
  margin: 0 auto;
  padding: 30px 24px 8px;
}

.msg {
  animation: rise 0.26s var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* 用户 */
.msg.user {
  display: flex;
  justify-content: flex-end;
}

.msg.user .bubble {
  max-width: 82%;
  padding: 10px 14px;
  border: 1px solid var(--rule);
  border-radius: 13px;
  background: var(--surface);
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  box-shadow: var(--shadow-1);
}

/* 助手 */
.msg.bot .head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}

.who {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.model-tag {
  padding: 1.5px 6px;
  border: 1px solid var(--rule-2);
  border-radius: 4px;
  background: var(--surface);
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

.msg-tools {
  margin-left: auto;
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.16s;
}

.msg.bot:hover .msg-tools,
.msg-tools:focus-within {
  opacity: 1;
}

.mini-btn {
  padding: 2px 7px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: none;
  color: var(--ink-4);
  font-size: 11px;
  cursor: pointer;
  transition: background 0.14s, color 0.14s, border-color 0.14s;
}

.mini-btn:hover {
  background: var(--surface);
  border-color: var(--rule);
  color: var(--ink-2);
}

/* 思考过程 */
.think {
  margin: 0 0 12px;
  padding-left: 10px;
  border-left: 2px solid var(--rule);
}

.think summary {
  display: flex;
  align-items: center;
  gap: 7px;
  list-style: none;
  cursor: pointer;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  user-select: none;
}

.think summary::-webkit-details-marker {
  display: none;
}

.think summary::after {
  content: "展开";
  font-size: 9.5px;
  color: var(--ink-4);
}

.think[open] summary::after {
  content: "收起";
}

.pulse {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.3s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

.think-body {
  margin-top: 8px;
  max-height: 260px;
  overflow-y: auto;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink-3);
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

/* ─────────────────────────── 正文排版 ─────────────────────────── */

.prose {
  font-size: 15.5px;
  line-height: 1.78;
  color: var(--ink);
  overflow-wrap: break-word;
}

.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 {
  margin: 22px 0 9px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.prose h1 {
  font-size: 21px;
}

.prose h2 {
  font-size: 18px;
}

.prose h3 {
  font-size: 16px;
}

.prose h4 {
  font-size: 15px;
}

.prose strong {
  font-weight: 600;
  color: #0b0e10;
}

.prose a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(27, 51, 214, 0.3);
}

.prose a:hover {
  border-bottom-color: var(--accent);
}

.prose ul,
.prose ol {
  margin: 0 0 12px;
  padding-left: 21px;
}

.prose li {
  margin: 4px 0;
}

.prose li > p {
  margin: 0;
}

.prose ul ul,
.prose ol ol,
.prose ul ol,
.prose ol ul {
  margin: 4px 0 0;
}

.prose hr {
  margin: 20px 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

.prose blockquote {
  margin: 14px 0;
  padding: 2px 0 2px 13px;
  border-left: 2px solid var(--ink-3);
  color: var(--ink-2);
}

.prose blockquote p:last-child {
  margin-bottom: 0;
}

.prose code {
  padding: 1.5px 5px;
  border-radius: 4px;
  background: #e6e8e2;
  font-family: var(--f-mono);
  font-size: 0.87em;
  color: var(--accent-ink);
}

.prose pre {
  position: relative;
  margin: 14px 0;
  padding: 13px 15px;
  border-radius: 9px;
  background: var(--panel);
  overflow-x: auto;
}

.prose pre code {
  padding: 0;
  background: none;
  color: #e4e7e1;
  font-size: 12.6px;
  line-height: 1.66;
  white-space: pre;
}

.copy-code {
  position: absolute;
  top: 7px;
  right: 7px;
  padding: 2px 7px;
  border: 1px solid #3a4043;
  border-radius: 5px;
  background: var(--panel-2);
  color: #9aa2a8;
  font-family: var(--f-sans);
  font-size: 10.5px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.14s, color 0.14s;
}

.prose pre:hover .copy-code {
  opacity: 1;
}

.copy-code:hover {
  color: #edefea;
}

.prose table {
  width: 100%;
  margin: 14px 0;
  border-collapse: collapse;
  font-size: 13.6px;
  line-height: 1.6;
}

.prose th,
.prose td {
  padding: 7px 10px;
  border: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: #e9eae5;
  font-weight: 600;
}

.prose tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.6);
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.02em;
  margin-left: 1px;
  vertical-align: -0.15em;
  background: var(--accent);
  animation: blink 1.05s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* 错误 */
.err-box {
  margin-top: 4px;
  padding: 11px 13px;
  border: 1px solid #e0c9c6;
  border-left: 2px solid #a8322a;
  border-radius: 7px;
  background: #faf3f2;
  font-size: 13.5px;
  line-height: 1.65;
  color: #7a2b25;
}

.err-box b {
  display: block;
  margin-bottom: 2px;
  font-weight: 600;
}

/* ─────────────────────────── 空状态 ─────────────────────────── */

.empty {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(26px, 6.5vh, 68px) 24px 40px;
}

.eyebrow {
  margin: 0 0 14px;
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.greet {
  margin: 0 0 14px;
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.greet #greetWhere {
  white-space: nowrap;
}


.lede {
  max-width: 52ch;
  margin: 0 0 28px;
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink-2);
}

/* 测站读数条 —— 页面的签名元素 */
.station {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: var(--panel);
  color: var(--panel-ink);
  box-shadow: var(--shadow-2);
}

.station::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 46px;
  height: 2px;
  background: #5a72ff;
}

.station-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.st-cell {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 15px 16px 14px;
  border-left: 1px solid var(--panel-rule);
  min-width: 0;
}

.st-cell:first-child {
  border-left: 0;
}

.st-label {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--panel-dim);
}

.st-value {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.st-value.mono {
  font-family: var(--f-mono);
  font-size: 16.5px;
  letter-spacing: 0;
}

.st-sub {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--panel-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.st-icon {
  display: inline-flex;
  width: 17px;
  height: 17px;
  color: #7d94ff;
}

.st-icon svg {
  width: 17px;
  height: 17px;
}

.st-live {
  position: absolute;
  top: 12px;
  right: 13px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #5a72ff;
  box-shadow: 0 0 0 3px rgba(90, 114, 255, 0.14);
  animation: pulse 2.4s ease-in-out infinite;
}

.station.is-loading .st-value,
.station.is-loading .st-sub {
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.42; }
  50% { opacity: 0.72; }
}

.station-grid.is-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.station.is-off .st-live {
  background: #5b635f;
  box-shadow: none;
  animation: none;
}

/* 起始提示 */
.starters {
  margin-top: 26px;
}

.starters-label {
  display: block;
  margin-bottom: 9px;
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.starter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.starter {
  padding: 7px 13px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, transform 0.12s;
}

.starter:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
}

.starter:active {
  transform: translateY(1px);
}

/* ─────────────────────────── 输入区 ─────────────────────────── */

.composer {
  flex: none;
  padding: 4px 24px 10px;
  background: linear-gradient(to bottom, rgba(240, 241, 237, 0) 0%, var(--paper) 30%);
}

.composer-inner {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 760px;
  margin: 0 auto;
  padding: 11px 11px 8px 15px;
  border: 1px solid var(--rule);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow-1);
  transition: border-color 0.18s, box-shadow 0.18s;
}

.composer-inner:focus-within {
  border-color: #b9bdb1;
  box-shadow: 0 1px 2px rgba(20, 23, 26, 0.05), 0 0 0 3px var(--accent-tint);
}

#input {
  width: 100%;
  max-height: 200px;
  padding: 0;
  border: 0;
  outline: 0;
  background: none;
  resize: none;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.62;
  color: var(--ink);
}

#input::placeholder {
  color: var(--ink-4);
}

.composer-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* 模型选择 */
.model-wrap {
  position: relative;
  flex: none;
}

.model-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 9px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  white-space: nowrap;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.model-pill:hover {
  border-color: var(--rule);
  background: #f6f7f4;
  color: var(--ink);
}

.model-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.model-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  width: 268px;
  padding: 5px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 18px 44px -16px rgba(20, 23, 26, 0.34);
  animation: popUp 0.16s var(--ease) both;
}

@keyframes popUp {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.model-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-radius: 6px;
  background: none;
  text-align: left;
  cursor: pointer;
}

.model-item:hover {
  background: #f6f7f4;
}

.model-item[aria-selected="true"] {
  background: var(--accent-tint);
}

.model-item b {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.model-item em {
  font-style: normal;
  font-size: 10.5px;
  color: var(--ink-4);
  margin-left: auto;
  white-space: nowrap;
}

.model-menu .mm-head {
  display: block;
  padding: 6px 9px 7px;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-4);
  border-bottom: 1px solid var(--rule-2);
  margin-bottom: 3px;
}

.model-item[aria-selected="true"] b::before {
  content: "› ";
  color: var(--accent);
}

.composer-right {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hint {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  color: var(--ink-4);
}

.send {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  transition: background 0.16s, opacity 0.16s, transform 0.12s;
}

.send:hover:not(:disabled) {
  background: var(--accent);
}

.send:active:not(:disabled) {
  transform: scale(0.94);
}

.send:disabled {
  opacity: 0.22;
  cursor: not-allowed;
}

.stop {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  cursor: pointer;
}

.stop:hover {
  border-color: #c3c7bd;
  color: var(--ink);
}

.stop-square {
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: var(--ink);
}

.fineprint {
  max-width: 760px;
  margin: 7px auto 0;
  font-size: 10.5px;
  line-height: 1.6;
  text-align: center;
  color: var(--ink-3);
}

/* 回到最新 */
.jump {
  position: absolute;
  left: 50%;
  bottom: 112px;
  transform: translateX(-50%);
  z-index: 20;
  padding: 5px 13px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 11.5px;
  cursor: pointer;
  box-shadow: 0 8px 20px -12px rgba(20, 23, 26, 0.45);
}

.jump:hover {
  border-color: #c3c7bd;
  color: var(--ink);
}

/* ─────────────────────────── 弹层 ─────────────────────────── */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(20, 23, 26, 0.36);
  backdrop-filter: blur(3px);
  animation: fade 0.18s ease both;
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.sheet-card {
  position: relative;
  width: min(452px, 100%);
  padding: 24px 24px 20px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 28px 64px -28px rgba(20, 23, 26, 0.55);
}

.sheet-card h3 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sheet-card p {
  margin: 0 0 11px;
  font-size: 13.5px;
  line-height: 1.78;
  color: var(--ink-2);
}

.sheet-card .eyebrow {
  margin-bottom: 10px;
}

.sheet-meta {
  margin-top: 14px !important;
  padding-top: 12px;
  border-top: 1px solid var(--rule-2);
  font-size: 11.5px !important;
  color: var(--ink-3) !important;
}

.sheet-x {
  position: absolute;
  top: 12px;
  right: 12px;
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(20, 23, 26, 0.36);
}

/* ─────────────────────────── 响应式 ─────────────────────────── */

@media (max-width: 900px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
  }

  .rail {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    width: 272px;
    transform: translateX(-102%);
    transition: transform 0.26s var(--ease);
    box-shadow: 20px 0 50px -30px rgba(20, 23, 26, 0.5);
  }

  .rail.open {
    transform: none;
  }

  .rail-toggle,
  .rail-close {
    display: grid;
  }

  .topbar {
    padding: 0 12px;
  }

  .thread,
  .empty {
    padding-left: 16px;
    padding-right: 16px;
  }

  .thread {
    gap: 24px;
    padding-top: 20px;
  }

  .composer {
    padding: 4px 13px 8px;
  }

  .msg.user .bubble {
    max-width: 90%;
  }

  .hint {
    display: none;
  }

  .station-grid {
    grid-template-columns: 1fr 1fr;
  }

  .st-cell:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--panel-rule);
  }

  .st-cell:nth-child(4) {
    border-top: 1px solid var(--panel-rule);
  }

  .station::before {
    width: 38px;
  }
}

@media (max-width: 430px) {
  .greet {
    font-size: 27px;
  }

  .st-cell {
    padding: 12px 13px;
  }

  .st-value {
    font-size: 15.5px;
  }

  .model-menu {
    width: 246px;
  }

  .fineprint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
