:root {
  --bg0: #f6f1e8;
  --bg1: #eef5f1;
  --ink: #1c1915;
  --muted: #6b645a;
  --line: rgba(40, 32, 24, 0.1);
  --accent: #0b5c4d;
  --accent-soft: #dcece7;
  --user-bg: #0b5c4d;
  --user-ink: #f7fffc;
  --bot-bg: rgba(255, 252, 246, 0.92);
  --panel: rgba(255, 252, 246, 0.86);
  --danger: #8a3b2b;
  --radius: 18px;
  --font: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --display: "Noto Serif SC", "Songti SC", "STSong", serif;
  --shadow: 0 1px 0 rgba(28, 25, 21, 0.04);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  background:
    radial-gradient(900px 420px at 12% -8%, #e4f0ea 0%, transparent 55%),
    radial-gradient(700px 360px at 100% 0%, #f0e6d4 0%, transparent 50%),
    linear-gradient(180deg, var(--bg1), var(--bg0));
}

.app-shell {
  min-height: 100%;
  display: flex;
  align-items: stretch;
}

.app {
  flex: 1;
  min-width: 0;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* —— 历史对话侧边栏（ChatGPT / 豆包式） —— */
.history-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: #f3eee4;
  border-right: 1px solid var(--line);
  z-index: 30;
}
.history-sidebar-inner {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 14px 12px 12px;
  gap: 10px;
}
.history-brand {
  padding: 4px 8px 8px;
  line-height: 1.15;
}
.history-new-btn {
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffcf6;
  color: var(--accent);
  font-weight: 600;
  padding: 10px 12px;
  text-align: left;
  transition: background .15s ease, border-color .15s ease;
}
.history-new-btn:hover {
  background: var(--accent-soft);
  border-color: rgba(11, 92, 77, 0.28);
}
.history-section-label {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 8px 2px;
  letter-spacing: 0.02em;
}
.history-list {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 2px;
  min-height: 0;
}
.history-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 12px 8px;
  line-height: 1.5;
}
.history-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 0;
  text-align: left;
}
.history-item-main {
  flex: 1;
  min-width: 0;
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  padding: 9px 10px;
  text-align: left;
}
.history-item-main:hover {
  background: rgba(255, 252, 246, 0.9);
}
.history-item.is-active .history-item-main {
  background: #fffcf6;
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 600;
  color: var(--accent);
}
.history-item-title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
  line-height: 1.35;
}
.history-item-meta {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}
.history-item-del {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin-right: 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  opacity: 0;
  transition: opacity .12s ease, background .12s ease, color .12s ease;
}
.history-item:hover .history-item-del,
.history-item:focus-within .history-item-del {
  opacity: 1;
}
.history-item-del:hover {
  background: rgba(138, 59, 43, 0.1);
  color: var(--danger);
}
.history-foot {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.history-foot-btn {
  font: inherit;
  width: 100%;
  cursor: pointer;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  padding: 9px 10px;
  text-align: left;
}
.history-foot-btn:hover {
  background: rgba(255, 252, 246, 0.9);
  color: var(--accent);
}
.history-backdrop {
  display: none;
}
.history-toggle {
  display: none;
}
.brand-wrap-compact {
  display: none;
}

@media (max-width: 900px) {
  .history-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(280px, 86vw);
    transform: translateX(-105%);
    transition: transform 220ms ease;
    box-shadow: 8px 0 24px rgba(28, 25, 21, 0.08);
  }
  body.history-open .history-sidebar {
    transform: translateX(0);
  }
  .history-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(20, 16, 12, 0.28);
  }
  .history-backdrop[hidden] { display: none; }
  .history-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .brand-wrap-compact {
    display: block;
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  backdrop-filter: blur(10px);
  background: rgba(246, 241, 232, 0.78);
  border-bottom: 1px solid var(--line);
}
.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-wrap { line-height: 1.15; }
.brand {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.brand-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.icon-btn, .text-btn, .send-btn {
  font: inherit;
  cursor: pointer;
  border: 0;
}
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.text-btn {
  background: transparent;
  color: var(--accent);
  padding: 8px 10px;
  border-radius: 10px;
}
.text-btn:hover, .icon-btn:hover { background: #d0e5de; }
.quota-pill {
  font-size: 12px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
}

.chat-shell {
  flex: 1;
  width: min(820px, 100%);
  margin: 0 auto;
  padding: 8px 14px 18px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.thread {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px 4px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  /* 程序跳转到底部时用 auto，避免 smooth 中断导致停在顶部 */
  scroll-behavior: auto;
}

.welcome {
  margin: 12vh auto 0;
  text-align: center;
  max-width: 34em;
  animation: rise 420ms ease both;
}
.welcome h1 {
  font-family: var(--display);
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 700;
  margin: 0 0 10px;
  color: var(--ink);
  letter-spacing: 0.02em;
}
.welcome p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.6;
}
.suggest {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 640px) {
  .suggest { grid-template-columns: 1fr; }
}
.suggest button {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  border-radius: 14px;
  padding: 14px 14px;
  font: inherit;
  cursor: pointer;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.suggest button:hover {
  border-color: rgba(11, 92, 77, 0.35);
  background: #fff;
  transform: translateY(-1px);
}

.row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: rise 320ms ease both;
}
.row.user { flex-direction: row-reverse; }
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
  margin-top: 2px;
}
.row.user .avatar {
  background: var(--user-bg);
  color: var(--user-ink);
}
.row.assistant .avatar {
  width: 40px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  letter-spacing: -0.02em;
}
.bubble {
  max-width: min(680px, calc(100% - 48px));
  border-radius: 16px;
  padding: 12px 14px;
  line-height: 1.65;
  box-shadow: var(--shadow);
}
.row.user .bubble {
  background: var(--user-bg);
  color: var(--user-ink);
  border-bottom-right-radius: 6px;
}
.row.assistant .bubble {
  background: var(--bot-bg);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}
.bubble .content {
  word-break: break-word;
  font-size: 15px;
  line-height: 1.7;
}
.bubble .content strong {
  font-weight: 700;
  color: #16352e;
}
.bubble .content .md > :first-child { margin-top: 0; }
.bubble .content .md > :last-child { margin-bottom: 0; }
.bubble .content .md-h {
  font-family: var(--display);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
  line-height: 1.35;
  margin: 1.1em 0 0.45em;
}
.bubble .content .md-h1 { font-size: 1.22em; }
.bubble .content .md-h2 { font-size: 1.12em; }
.bubble .content .md-h3 {
  font-size: 1.05em;
  padding-bottom: 0.28em;
  border-bottom: 1px solid rgba(11, 92, 77, 0.14);
}
.bubble .content .md-h4 {
  font-size: 0.98em;
  color: #244942;
  margin-top: 0.95em;
}
.bubble .content .md-p {
  margin: 0.55em 0;
}
.bubble .content .md-ul,
.bubble .content .md-ol {
  margin: 0.4em 0 0.7em;
  padding-left: 1.35em;
}
.bubble .content .md-ul { list-style: disc; }
.bubble .content .md-ol { list-style: decimal; }
.bubble .content .md-ul li,
.bubble .content .md-ol li {
  margin: 0.28em 0;
  padding-left: 0.15em;
}
.bubble .content .md-ul li::marker,
.bubble .content .md-ol li::marker {
  color: rgba(11, 92, 77, 0.55);
}
.bubble .content .md-quote {
  margin: 0.7em 0;
  padding: 0.55em 0.85em;
  border-left: 3px solid rgba(11, 92, 77, 0.35);
  background: rgba(11, 92, 77, 0.05);
  border-radius: 0 10px 10px 0;
  color: #3a342c;
  font-size: 0.96em;
}
.bubble .content hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0.9em 0;
}
.inline-cite {
  color: inherit;
  background: rgba(11, 92, 77, 0.12);
  border-radius: 6px;
  padding: 0 4px;
  margin: 0 1px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92em;
  user-select: none;
}
.inline-cite:hover {
  background: rgba(11, 92, 77, 0.22);
  text-decoration: underline;
}
.inline-cite.is-unbound {
  background: rgba(120, 100, 60, 0.12);
}
.inline-cite:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.row.user .inline-cite {
  background: rgba(255, 255, 255, 0.18);
}
.refs {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.refs summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  list-style: none;
}
.refs summary::-webkit-details-marker { display: none; }
.refs-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}
.ref-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
}
.ref-item:hover { border-color: rgba(11, 92, 77, 0.35); }
.ref-item small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.dock {
  position: sticky;
  bottom: 0;
  padding-top: 8px;
  background: linear-gradient(180deg, rgba(246,241,232,0), rgba(246,241,232,0.92) 28%, var(--bg0));
}
.thinking {
  margin: 0 2px 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,252,246,0.9);
  animation: rise 240ms ease both;
}
.thinking-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.thinking-pct { margin-left: auto; font-variant-numeric: tabular-nums; }
.thinking-dots { display: inline-flex; gap: 4px; }
.thinking-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.35;
  animation: blink 1.1s infinite;
}
.thinking-dots i:nth-child(2) { animation-delay: .15s; }
.thinking-dots i:nth-child(3) { animation-delay: .3s; }
.thinking-track {
  height: 3px;
  background: rgba(11, 92, 77, 0.12);
  border-radius: 999px;
  overflow: hidden;
}
.thinking-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width .25s ease;
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  border: 1px solid var(--line);
  background: #fffcf6;
  border-radius: 22px;
  padding: 10px 10px 10px 14px;
  box-shadow: var(--shadow);
}
.composer:focus-within {
  border-color: rgba(11, 92, 77, 0.4);
}
.composer textarea {
  flex: 1;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  max-height: 160px;
  padding: 6px 0;
  color: var(--ink);
}
.send-btn {
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
  font-weight: 600;
  transition: opacity .15s ease, transform .15s ease;
}
.send-btn:hover { transform: translateY(-1px); }
.send-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.dock-hint {
  margin: 8px 4px 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.status {
  margin: 6px 4px 0;
  font-size: 12px;
  color: var(--danger);
  text-align: center;
}

.drawer[hidden], .modal[hidden] { display: none; }
.drawer, .modal {
  position: fixed;
  inset: 0;
  z-index: 40;
}
.drawer-backdrop, .modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 16, 12, 0.28);
}
.drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: min(360px, 88vw);
  background: #fffcf6;
  border-right: 1px solid var(--line);
  padding: 16px;
  overflow: auto;
  animation: slideIn 260ms ease both;
}
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.drawer-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
}
.theme-grid {
  display: grid;
  gap: 8px;
}
.theme-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}
.theme-card strong { display: block; margin-bottom: 4px; }
.theme-card span { color: var(--muted); font-size: 12px; }

.modal { display: grid; place-items: center; padding: 16px; }
.modal-card {
  position: relative;
  width: min(720px, 100%);
  max-height: min(82vh, 860px);
  overflow: auto;
  background: #fffcf6;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 16px 18px;
  animation: rise 240ms ease both;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.modal-head h3 {
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: 20px;
}
.cite-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
}
.cite-body {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  background: #f3eee4;
  border-radius: 12px;
  padding: 14px;
  line-height: 1.7;
  font-size: 14px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
  from { transform: translateX(-12px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes blink {
  0%, 80%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}

.dock-beian {
  margin: 6px 0 0;
  text-align: center;
  font-size: 11px;
}
.dock-beian a {
  color: inherit;
  opacity: 0.55;
  text-decoration: none;
}
.dock-beian a:hover { opacity: 0.85; }

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(6, 46, 40, 0.18);
  background: #0a4f43;
}
.brand-logo-sm {
  width: 30px;
  height: 30px;
}
.brand-text { min-width: 0; }

.auth-card {
  width: min(380px, 92vw);
  padding: 18px 18px 16px;
}
.auth-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.auth-seg {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border-radius: 12px;
  background: rgba(11, 92, 77, 0.08);
}
.auth-seg-btn {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 0;
  border-radius: 10px;
  cursor: pointer;
  color: var(--muted);
}
.auth-seg-btn.is-active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 1px 3px rgba(28, 25, 21, 0.08);
}
.auth-close {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 6px;
}
.auth-close:hover { color: var(--ink); }
.auth-lead {
  margin: 0 0 14px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-soft, #243330);
}
/* display:flex 会压过原生 [hidden]，密码登录时验证码行必须真正隐藏 */
.auth-form label[hidden],
.auth-form [hidden] {
  display: none !important;
}
.auth-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.auth-field-title { font-weight: 600; }
.auth-link {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
}
.auth-link:hover { text-decoration: underline; }
.auth-form input {
  font: inherit;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--line, rgba(0,0,0,.12));
  background: #fff;
}
.auth-code-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.auth-code-row input { flex: 1; min-width: 0; }
.auth-send-btn {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  white-space: nowrap;
}
.auth-send-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.auth-error {
  margin: 0;
  color: var(--danger, #b42318);
  font-size: 13px;
}
.auth-dev-hint {
  margin: 0;
  font-size: 12px;
  color: var(--accent);
  line-height: 1.5;
}
.auth-submit { width: 100%; justify-content: center; margin-top: 2px; }
.auth-alt {
  margin: 2px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  min-height: 1.2em;
}
.auth-dot { margin: 0 6px; opacity: 0.5; }
.auth-entry {
  background: var(--accent-soft) !important;
  font-weight: 600;
  padding: 8px 12px !important;
}
.auth-entry:hover { background: #d0e5de !important; }

.user-menu-wrap {
  position: relative;
}
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line, rgba(0,0,0,.12));
  background: var(--accent-soft, #e7f2ee);
  border-radius: 999px;
  padding: 4px 10px 4px 4px;
  cursor: pointer;
  font: inherit;
  color: var(--ink, #1a2b27);
}
.user-chip-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2f5d50;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.user-chip-name {
  max-width: 7em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}
.user-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 140px;
  background: #fff;
  border: 1px solid var(--line, rgba(0,0,0,.12));
  border-radius: 12px;
  padding: 6px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.user-menu[hidden] { display: none !important; }
.user-menu-item {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 9px 10px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  color: var(--ink, #1a2b27);
}
.user-menu-item:hover { background: rgba(47, 93, 80, 0.08); }
.user-menu-danger { color: var(--danger, #b42318); }

.account-card {
  width: min(440px, calc(100vw - 28px));
  max-height: min(86vh, 720px);
  overflow: auto;
}
.account-modal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink, #1a2b27);
}
.account-pane { display: flex; flex-direction: column; gap: 14px; }
.account-pane[hidden] { display: none !important; }
.account-avatar-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.account-avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #2f5d50;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.account-avatar-actions { display: flex; flex-direction: column; gap: 4px; }
.account-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}
.account-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted, #6b7c76);
  line-height: 1.45;
}
.account-section {
  padding-top: 4px;
  border-top: 1px solid var(--line, rgba(0,0,0,.08));
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.account-section-title {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 700;
}
.account-meta {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft, #243330);
}
.account-credits-head {
  text-align: center;
  padding: 8px 0 4px;
}
.account-credits-balance {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent, #2f5d50);
  line-height: 1.1;
}
.account-ledger {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
}
.account-ledger-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  padding: 10px 12px;
  border: 1px solid var(--line, rgba(0,0,0,.08));
  border-radius: 12px;
  background: #fff;
}
.account-ledger-title {
  font-size: 13px;
  font-weight: 600;
}
.account-ledger-time {
  font-size: 12px;
  color: var(--muted);
  grid-column: 1 / -1;
}
.account-ledger-delta {
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}
.account-ledger-delta.is-plus { color: #1f7a4d; }
.account-ledger-delta.is-minus { color: #b42318; }
.account-ledger-balance {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}
.account-ledger-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.quota-pill.is-clickable { cursor: pointer; }
.quota-pill.is-user-credits { cursor: pointer; }

