* { box-sizing: border-box; }

:root {
  --bg: #f7f4ef;
  --sidebar-bg: #efeae3;
  --card: #ffffff;
  --text: #3d2b1f;
  --muted: #7a6b5c;
  --border: #e0d6c8;
  --primary: #8b5a2b;
  --primary-hover: #6f4520;
  --primary-soft: #f3ebe0;
  --primary-deep: #5c3d1e;
  --user-bg: linear-gradient(135deg, #7a4f28 0%, #9a6b2f 100%);
  --user-bg-solid: #8b5a2b;
  --ok: #16a34a;
  --fail: #dc2626;
  --sidebar-w: 300px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-soft: 0 4px 24px rgba(61, 43, 31, 0.06);
  --shadow-card: 0 2px 12px rgba(61, 43, 31, 0.05);
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body {
  margin: 0;
  height: 100%;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body.mobile-scroll-lock {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

.app {
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  transition: width 0.22s ease, transform 0.22s ease, padding 0.22s ease, opacity 0.18s ease;
  z-index: 200;
}

.app.sidebar-collapsed:not(.layout-compact) .sidebar {
  width: 0;
  padding-left: 0;
  padding-right: 0;
  border-right-width: 0;
  opacity: 0;
  pointer-events: none;
}

.app.layout-compact .sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  transform: translateX(-100%);
  box-shadow: none;
}

.app.layout-compact.sidebar-open .sidebar {
  transform: translateX(0);
  box-shadow: 4px 0 28px rgba(0, 0, 0, 0.14);
}

.app.layout-compact .topbar-brand {
  display: block;
}

.app.sidebar-collapsed:not(.layout-compact) .topbar-brand {
  display: block;
}

.history-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.brand {
  flex-shrink: 0;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff 0%, var(--primary-soft) 100%);
  border: 1px solid var(--border);
  color: var(--primary);
  box-shadow: var(--shadow-card);
}

.brand-icon svg {
  width: 22px;
  height: 22px;
}

.brand-text {
  min-width: 0;
}

.brand h1 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
}

.brand .subtitle {
  margin: 3px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-card);
}

.panel h2 {
  margin: 0 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.panel-head h2 { margin: 0; }

.link-btn {
  border: none;
  background: none;
  color: var(--primary);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
}

#historySearch {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  margin-bottom: 10px;
  background: #faf8f5;
  color: var(--text);
}

#historySearch:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(139, 90, 43, 0.1);
}

.btn-secondary {
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  margin-bottom: 10px;
  box-shadow: 0 2px 10px rgba(139, 90, 43, 0.22);
  transition: background 0.15s, transform 0.1s;
}

.btn-secondary:hover {
  background: var(--primary-hover);
  color: #fff;
  transform: translateY(-1px);
}

.btn-outline {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font: inherit;
}

.btn-outline:hover { border-color: var(--primary); }

.history-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.history-group-label {
  font-size: 0.72rem;
  color: var(--muted);
  margin: 8px 0 4px;
}

.history-empty-hint {
  font-size: 0.8125rem;
  color: var(--muted);
  padding: 12px 8px;
  text-align: center;
}

.history-item-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.history-item-row .history-item {
  flex: 1;
  min-width: 0;
  text-align: left;
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-item:hover { background: var(--primary-soft); }
.history-item.active {
  background: #fff;
  box-shadow: var(--shadow-card);
  font-weight: 600;
  color: var(--primary-deep);
}

.history-copy-btn,
.history-delete-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.75rem;
  opacity: 0;
}

.history-item-row:hover .history-copy-btn,
.history-item-row:hover .history-delete-btn,
.history-item-row:focus-within .history-copy-btn,
.history-item-row:focus-within .history-delete-btn {
  opacity: 1;
}

.history-copy-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
}

.history-delete-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--fail);
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tool-grid.collapsed {
  max-height: 6.5rem;
  overflow: hidden;
}

.tool-grid:not(.collapsed) {
  max-height: min(42vh, 380px);
  overflow-y: auto;
}

.tool-card-mini {
  background: #faf8f5;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  min-height: 64px;
}

.tool-card-mini:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.tool-card-mini .name { font-size: 0.8rem; font-weight: 700; display: block; color: var(--text); }
.tool-card-mini .at { font-size: 0.72rem; color: var(--muted); margin-top: 4px; display: block; }

.panel.hints {
  background: linear-gradient(155deg, #ebe3d6 0%, #e4dacb 100%);
  border-color: #d8cbb8;
}

.hints ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.55;
}

.hints code {
  background: #fff;
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 0.78rem;
}

/* Main */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--bg);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  min-height: 56px;
  backdrop-filter: blur(8px);
}

.sidebar-toggle-btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #faf8f5;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  padding: 0;
}

.sidebar-toggle-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.topbar-brand {
  display: none;
  min-width: 0;
}

.topbar-title {
  font-size: 0.95rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-spacer {
  flex: 1;
  min-width: 0;
}

.topbar-trial-notice {
  flex-shrink: 1;
  min-width: 0;
  max-width: min(100%, 720px);
  display: flex;
  align-items: center;
  margin-right: 2px;
  font-size: 0.8125rem;
  color: #92400e;
  line-height: 1.35;
}

.topbar-trial-notice.hidden {
  display: none;
}

.topbar-trial-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
}

.topbar-help-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #faf8f5;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.topbar-help-link .toolbar-icon {
  width: 16px;
  height: 16px;
}

.topbar-help-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

@media (max-width: 520px) {
  .topbar-help-link {
    padding: 6px 10px;
    font-size: 0;
  }

  .topbar-help-link .toolbar-icon {
    width: 18px;
    height: 18px;
  }
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(15, 23, 42, 0.28);
}

.app.layout-compact.sidebar-open .sidebar-backdrop {
  display: block;
}

.status-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-size: 0.82rem;
  color: var(--muted);
  background: #faf8f5;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px 6px 10px;
}

.topbar-model-wrap {
  display: none !important;
}

.model-select-label {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  user-select: none;
}

#statusBar {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d1d5db;
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0);
}

.status-dot.ready {
  background: var(--ok);
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.15);
}

.model-select {
  flex-shrink: 0;
  min-width: 148px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  background-color: #faf8f5;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 32px 7px 14px;
  max-width: 180px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a6b5c' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.model-select:focus {
  outline: 2px solid var(--primary-soft);
  border-color: var(--primary);
}

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

.chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #faf8f5 0%, var(--bg) 180px);
}

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px 16px;
}

.message {
  margin-bottom: 14px;
  max-width: 88%;
  position: relative;
}

.message:hover .copy-btn,
.message:focus-within .copy-btn {
  opacity: 1;
}

.message-actions {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 1;
}

.message.user .message-actions {
  right: auto;
  left: 4px;
}

.copy-btn {
  border: none;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.72rem;
  color: var(--muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s;
}

.copy-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.copy-btn.copied {
  color: var(--ok);
  border-color: var(--ok);
}

.message.user { margin-left: auto; }

.message .bubble {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  line-height: 1.58;
  white-space: pre-wrap;
  word-break: break-word;
}

.message.user .bubble {
  background: var(--user-bg-solid);
  background-image: var(--user-bg);
  color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 16px rgba(107, 68, 35, 0.18);
}

.user-message-attachments {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
}

.user-message-attachment {
  font-size: 12px;
  line-height: 1.45;
  opacity: 0.92;
  word-break: break-all;
}

.user-message-attachment + .user-message-attachment {
  margin-top: 4px;
}

.user-message-attachment::before {
  content: "📎 ";
}

.user-message-text {
  line-height: 1.55;
}

.message.assistant .bubble {
  background: var(--card);
  border: 1px solid var(--border);
  border-bottom-left-radius: 6px;
  box-shadow: var(--shadow-card);
}

.message.assistant.planning .bubble {
  color: var(--muted);
  font-style: italic;
  border-style: dashed;
  animation: breathe 1.6s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

.reasoning-block {
  margin: 6px 0 8px;
  background: #faf8f5;
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-size: 0.85rem;
  color: var(--muted);
  overflow: hidden;
}

.reasoning-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
  color: var(--primary);
}

.reasoning-toggle:hover {
  background: rgba(154, 107, 47, 0.06);
}

.reasoning-chevron {
  font-size: 0.65rem;
  line-height: 1;
  opacity: 0.85;
}

.reasoning-label {
  font-size: 0.75rem;
  font-weight: 600;
}

.reasoning-hint {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--muted);
}

.reasoning-block .body {
  padding: 0 12px 10px;
  white-space: pre-wrap;
  line-height: 1.5;
  max-height: 280px;
  overflow-y: auto;
}

.reasoning-block.collapsed .body {
  display: none;
}

.reasoning-block.streaming .reasoning-label::after {
  content: "…";
  animation: breathe 1.2s ease-in-out infinite;
}

.message.welcome {
  max-width: min(720px, 96%);
  margin-bottom: 12px;
}

.welcome-banner {
  padding: 22px 24px 20px !important;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #fff;
  background: linear-gradient(125deg, #5c3d1e 0%, #8b5a2b 42%, #b8925a 100%) !important;
  border: none !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 10px 36px rgba(92, 61, 30, 0.22);
  white-space: normal;
  position: relative;
  overflow: hidden;
}

.welcome-banner::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 88px;
  height: 88px;
  opacity: 0.18;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3Cpath d='M8 7h8M8 11h6'/%3E%3C/svg%3E") no-repeat center / contain;
}

.welcome-banner strong {
  color: #fff;
  font-weight: 700;
}

.welcome-examples-head {
  margin: 0.75em 0 0.35em;
  font-size: inherit;
  color: rgba(255, 255, 255, 0.82);
}

.welcome-examples {
  margin: 0;
  padding-left: 1.15em;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.86rem;
}

.welcome-at {
  display: inline;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 600;
  font-size: 0.86rem;
}

.tool-card {
  margin: 10px 0;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  max-width: 92%;
  box-shadow: var(--shadow-card);
}

.tool-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.tool-card-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  width: 1em;
  height: 1em;
}

.tool-card-spinner {
  display: block;
  width: 1em;
  height: 1em;
  border: 2px solid #e8dfd3;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: tool-card-spin 0.7s linear infinite;
}

.tool-card.done .tool-card-icon,
.tool-card.fail .tool-card-icon {
  display: none;
}

@keyframes tool-card-spin {
  to { transform: rotate(360deg); }
}

.tool-card .title { font-weight: 600; margin-bottom: 0; }
.tool-card .step { font-size: 0.9rem; color: #374151; }
.tool-card.done { border-color: #bbf7d0; }
.tool-card.fail { border-color: #fecaca; }
.tool-card .detail { font-size: 0.85rem; color: var(--muted); margin-top: 8px; }
.message .bubble.rendered .md-p { margin: 0.4em 0; }
.message .bubble.rendered .md-h { margin: 0.6em 0 0.35em; font-size: 1em; }
.message .bubble.rendered .md-ul { margin: 0.35em 0 0.5em 1.2em; padding: 0; }
.message .bubble.rendered .md-inline,
.message .bubble.rendered .md-code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9em;
}
.message .bubble.rendered .md-inline {
  background: #f3f4f6;
  padding: 0.1em 0.35em;
  border-radius: 4px;
}
.message .bubble.rendered pre.md-code {
  background: #1e293b;
  color: #e2e8f0;
  padding: 10px 12px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 0.5em 0;
}
.message .bubble.rendered a { color: var(--primary); }
.message .bubble.rendered a.file-open-link {
  cursor: pointer;
  text-decoration: underline;
  font-weight: 500;
}
.message .bubble.rendered a.file-open-link:hover {
  color: var(--primary-hover);
}

.html-preview-wrap {
  margin: 10px 0 14px;
  max-width: 92%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.html-preview-title {
  padding: 8px 12px;
  font-size: 0.82rem;
  color: var(--muted);
  background: #faf8f5;
  border-bottom: 1px solid var(--border);
}
.html-preview-frame {
  width: 100%;
  min-height: 280px;
  height: 42vh;
  max-height: 520px;
  border: none;
  display: block;
  background: #fff;
}

.tool-card .detail.hidden { display: none; }

.output-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.output-file-name {
  flex: 1 1 160px;
  font-size: 0.84rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.output-link {
  flex-shrink: 0;
  border: none;
  background: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 0.84rem;
  text-decoration: underline;
  padding: 0;
}

.output-link.secondary {
  color: var(--text-muted, #64748b);
}

.delivery-footer {
  margin-top: 10px;
  padding: 10px 12px;
  background: #faf8f5;
  border: 1px solid #e8dfd3;
  border-radius: 10px;
  max-width: 100%;
}

.delivery-footer-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

.attachment-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 24px 8px;
}

.attachment-chips.hidden { display: none; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--primary-soft);
  border: 1px solid #e8dfd3;
  border-radius: 999px;
  font-size: 0.8rem;
}

.chip button {
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  color: var(--muted);
}

/* Composer */
.composer {
  background: transparent;
  border-top: none;
  padding: 12px 28px 22px;
  flex-shrink: 0;
}

.composer-input-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 14px 10px;
  box-shadow: var(--shadow-soft);
}

#input {
  flex: 1;
  resize: none;
  min-height: 80px;
  max-height: 160px;
  padding: 4px 6px;
  border: none;
  border-radius: 0;
  font: inherit;
  line-height: 1.55;
  background: transparent;
  color: var(--text);
}

#input:focus {
  outline: none;
  box-shadow: none;
}

.composer-icon-grid {
  display: grid;
  grid-template-columns: 40px 40px;
  grid-template-rows: 40px 40px;
  gap: 6px;
  flex-shrink: 0;
  align-self: flex-end;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #faf8f5;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  padding: 0;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.icon-btn:hover,
.icon-btn.active,
.icon-btn[aria-pressed="true"] {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.icon-btn.recording {
  border-color: var(--fail);
  color: var(--fail);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  50% { opacity: 0.6; }
}

.toolbar-icon { width: 18px; height: 18px; }

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  gap: 12px;
}

.composer-hint {
  font-size: 0.78rem;
  color: var(--muted);
}

.composer-send-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

#sendBtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.7rem 1.35rem;
  border: none;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(139, 90, 43, 0.28);
  transition: background 0.15s, transform 0.1s;
}

.send-btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

#sendBtn:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-1px);
}
#sendBtn:disabled { opacity: 0.5; cursor: not-allowed; }

.stop-btn {
  padding: 0.65rem 1rem;
  border: 1px solid var(--fail);
  border-radius: 10px;
  background: #fff;
  color: var(--fail);
  font: inherit;
  cursor: pointer;
}

.stop-btn:hover { background: #fef2f2; }

.hidden { display: none !important; }

#sendBtn.hidden { display: none; }

/* ─── 桌面端多分辨率适配（非手机端） ─── */
@media (min-width: 1600px) {
  .messages,
  .composer,
  .attachment-chips {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }
}

@media (max-width: 1279px) {
  :root { --sidebar-w: 272px; }

  .messages,
  .composer,
  .attachment-chips {
    padding-left: 18px;
    padding-right: 18px;
  }

  .topbar {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 1023px) {
  .message {
    max-width: 94%;
  }

  .tool-card,
  .html-preview-wrap {
    max-width: 100%;
  }

  .html-preview-frame {
    min-height: 240px;
    height: 38vh;
  }

  .media-preview-img,
  .media-preview-video {
    max-height: min(45vh, 360px);
  }

  .media-preview-frame {
    height: min(48vh, 400px);
  }
}

@media (max-width: 1023px) and (min-width: 641px) {
  .composer-hint {
    display: none;
  }
}

@media (max-width: 899px) {
  .messages,
  .composer,
  .attachment-chips {
    padding-left: 12px;
    padding-right: 12px;
  }

  .composer-input-row {
    flex-wrap: wrap;
  }

  #input {
    min-height: 72px;
    width: 100%;
  }

  .composer-icon-grid {
    align-self: flex-end;
  }

  .composer-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .brand h1 {
    font-size: 1.05rem;
  }

  .panel {
    padding: 10px;
  }
}

@media (max-height: 720px) {
  .sidebar {
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 10px;
  }

  .tool-grid:not(.collapsed) {
    max-height: min(34vh, 280px);
  }

  #input {
    min-height: 64px;
    max-height: 120px;
  }

  .messages {
    padding-top: 14px;
  }
}

/* PPT 模版浮窗 */
.ppt-picker {
  position: fixed;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  min-width: 360px;
  min-height: 427px;
}

.ppt-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: var(--primary-soft);
  border-bottom: 1px solid var(--border);
  cursor: grab;
  user-select: none;
  flex-shrink: 0;
}

.ppt-picker-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.ppt-picker-zoom {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.ppt-picker-zoom:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.ppt-picker-header:active { cursor: grabbing; }

.ppt-picker-title {
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 0;
}

.ppt-picker-close {
  border: none;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0 4px;
}

.ppt-picker-close:hover { color: var(--text); }

.ppt-picker-hint {
  margin: 0;
  padding: 8px 12px 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
  flex-shrink: 0;
}

.ppt-picker-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(154, 107, 47, 0.45) transparent;
}

.ppt-picker-scroll::-webkit-scrollbar {
  width: 8px;
}

.ppt-picker-scroll::-webkit-scrollbar-thumb {
  background: rgba(154, 107, 47, 0.35);
  border-radius: 4px;
}

.ppt-picker-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(154, 107, 47, 0.55);
}

.ppt-picker-grid {
  padding: 10px 12px 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: auto;
  align-items: start;
  gap: 12px;
}

.ppt-thumb {
  position: relative;
  display: flex;
  flex-direction: column;
  align-self: start;
  width: 100%;
  min-width: 0;
  height: auto;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0;
  background: #f8f6f2;
  cursor: pointer;
  overflow: hidden;
}

.ppt-thumb:hover { border-color: var(--primary); }

.ppt-thumb.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-soft);
}

.ppt-thumb-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #eceae6;
  line-height: 0;
}

.ppt-thumb img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}

.ppt-thumb-label {
  flex: 0 0 auto;
  display: block;
  width: 100%;
  padding: 4px 6px;
  font-size: 0.68rem;
  line-height: 1.3;
  text-align: center;
  color: var(--muted);
  background: #f0eeea;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.ppt-thumb.selected .ppt-thumb-label {
  color: var(--primary);
  font-weight: 600;
  background: var(--primary-soft);
}

.ppt-thumb-skeleton {
  pointer-events: none;
  border-color: transparent;
}

.ppt-thumb-skeleton .ppt-thumb-media {
  background: linear-gradient(90deg, #eceae6 25%, #f5f3ef 50%, #eceae6 75%);
  background-size: 200% 100%;
  animation: ppt-thumb-shimmer 1.2s ease-in-out infinite;
}

.ppt-thumb-skeleton .ppt-thumb-label {
  height: 1.1rem;
  margin: 4px 6px;
  border-radius: 4px;
  background: #eceae6;
  color: transparent;
}

@keyframes ppt-thumb-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.ppt-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: #faf9f7;
  flex-shrink: 0;
}

.ppt-picker-resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  z-index: 2;
  background: linear-gradient(135deg, transparent 50%, rgba(154, 107, 47, 0.35) 50%);
  border-bottom-right-radius: 14px;
}

.ppt-picker-resize-handle:hover {
  background: linear-gradient(135deg, transparent 45%, rgba(154, 107, 47, 0.55) 45%);
}

.ppt-picker-selected {
  font-size: 0.8rem;
  color: var(--muted);
}

.ppt-picker-generate {
  padding: 0.45rem 1rem;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.ppt-picker-generate:hover:not(:disabled) { background: var(--primary-hover); }
.ppt-picker-generate:disabled { opacity: 0.45; cursor: not-allowed; }

/* 语音音色选择浮窗 */
.voice-picker .voice-picker-filters {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
  flex-wrap: wrap;
}

.voice-filter {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
}

.voice-filter.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.voice-picker-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.voice-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.voice-item:hover { border-color: var(--primary); }

.voice-item.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.voice-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.voice-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.voice-picker-empty {
  color: var(--text-muted);
  font-size: 13px;
  padding: 12px 4px;
}

.voice-picker-preview {
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

@media (max-width: 520px) {
  .ppt-picker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ppt-picker {
    min-width: 0;
    width: calc(100vw - 24px);
    left: 12px !important;
    right: 12px;
  }
}

/* ─── 手机端适配（Web 试用 / Sealos） ─── */
@media (max-width: 640px) {
  :root {
    --sidebar-w: min(88vw, 320px);
  }

  .app.layout-compact .sidebar {
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .topbar {
    gap: 6px;
    padding: 8px 10px;
    padding-top: calc(8px + env(safe-area-inset-top, 0px));
    min-height: 48px;
  }

  .sidebar-toggle-btn {
    width: 40px;
    height: 40px;
  }

  .topbar-brand {
    display: block;
    max-width: 28vw;
  }

  .topbar-title {
    font-size: 0.88rem;
  }

  .topbar-spacer {
    flex: 1 1 auto;
    min-width: 0;
  }

  .topbar-trial-notice {
    flex: 1 1 auto;
    max-width: none;
    font-size: 0.68rem;
  }

  .topbar-trial-text {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.25;
    padding: 4px 8px;
  }

  #statusBar {
    display: none;
  }

  .status-wrap {
    padding: 5px 8px;
    min-width: 0;
  }

  .auth-user-chip {
    display: none !important;
  }

  .auth-login-btn,
  .auth-logout-btn {
    padding: 8px 10px;
    margin-right: 4px;
    font-size: 0.78rem;
  }

  .topbar-download-btn {
    max-width: 4.5rem;
    padding: 6px 8px;
    font-size: 0.72rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .messages {
    padding: 12px 10px 8px;
    -webkit-overflow-scrolling: touch;
  }

  .message {
    max-width: 94%;
    margin-bottom: 12px;
  }

  .message .bubble {
    padding: 12px 14px;
    font-size: 0.9375rem;
  }

  .attachment-chips {
    padding: 0 10px 6px;
  }

  .composer {
    padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .composer-input-row {
    flex-direction: column;
    gap: 8px;
    padding: 10px;
  }

  #input {
    width: 100%;
    min-height: 44px;
    max-height: 120px;
    font-size: 16px;
    padding: 2px 4px;
  }

  .composer-icon-grid {
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: 44px;
    gap: 8px;
    align-self: stretch;
  }

  .icon-btn {
    width: 100%;
    height: 44px;
    max-width: 52px;
    justify-self: center;
  }

  .composer-actions {
    margin-top: 8px;
    gap: 8px;
  }

  .composer-hint {
    display: block;
    font-size: 0.72rem;
    flex: 1;
    min-width: 0;
  }

  #sendBtn {
    padding: 0.65rem 1rem;
    min-height: 44px;
  }

  .stop-btn {
    min-height: 44px;
  }

  .promote-banner {
    margin: 0.5rem 0.5rem 0;
    font-size: 0.78rem;
  }

  .login-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .login-card {
    width: 100%;
    max-width: none;
    border-radius: 16px 16px 0 0;
    padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .login-form input {
    font-size: 16px;
    padding: 12px;
  }

  .login-submit,
  .wechat-login-btn {
    min-height: 44px;
  }

  .html-preview-frame {
    min-height: 200px;
    height: 32vh;
  }

  .media-preview-img,
  .media-preview-video {
    max-height: min(40vh, 280px);
  }

  .output-link-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .output-file-name {
    white-space: normal;
    word-break: break-all;
  }

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

  .history-list {
    max-height: min(36vh, 240px);
  }
}

@media (hover: none) and (pointer: coarse) {
  .copy-btn {
    opacity: 0.9;
  }

  .message:hover .copy-btn,
  .message:focus-within .copy-btn {
    opacity: 0.9;
  }
}

/* PPT 大纲确认（阶段一） */
.ppt-outline-panel {
  margin: 12px 0 16px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.ppt-outline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ppt-outline-title {
  font-weight: 600;
  font-size: 0.92rem;
}

.ppt-outline-phase {
  font-size: 0.75rem;
  color: var(--muted);
}

.ppt-outline-hint {
  margin: 0 0 10px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

.ppt-outline-editor {
  width: 100%;
  min-height: 220px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 0.85rem;
  line-height: 1.5;
  resize: vertical;
  background: #faf9f7;
}

.ppt-outline-editor:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-soft);
}

.ppt-outline-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.ppt-outline-pick-btn {
  padding: 0.5rem 1.1rem;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.ppt-outline-pick-btn:hover { background: var(--primary-hover); }

.tool-card .detail .tool-result-message {
  margin-bottom: 6px;
  line-height: 1.45;
}

.tool-card .detail .output-link-list {
  margin-top: 8px;
}

.media-preview-wrap {
  margin-top: 10px;
  margin-bottom: 4px;
  padding: 8px;
  background: #faf9f7;
  border: 1px solid var(--border);
  border-radius: 8px;
  max-width: 100%;
  overflow: hidden;
}

.media-preview-caption {
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.media-preview-img {
  display: block;
  max-width: min(100%, 720px);
  width: auto;
  height: auto;
  max-height: min(60vh, 480px);
  margin: 0 auto;
  object-fit: contain;
  border-radius: 4px;
}

.media-preview-video {
  display: block;
  width: 100%;
  max-width: min(100%, 720px);
  max-height: min(60vh, 480px);
  margin: 0 auto;
  border-radius: 4px;
  background: #111;
}

.media-preview-audio {
  display: block;
  width: 100%;
  max-width: min(100%, 480px);
  margin: 0 auto;
}

.media-preview-frame {
  display: block;
  width: 100%;
  max-width: 100%;
  height: min(55vh, 520px);
  border: none;
  border-radius: 4px;
  background: #fff;
}

.chart-preview-wrap {
  margin-top: 10px;
  padding: 8px;
  background: #faf9f7;
  border: 1px solid var(--border);
  border-radius: 8px;
  max-width: 100%;
  overflow: auto;
}

.chart-preview-img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.auth-user-chip {
  font-size: 0.8125rem;
  color: var(--muted);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 8px;
}

.topbar-download-btn {
  display: inline-flex;
  align-items: center;
  margin-right: 0.5rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  text-decoration: none;
  white-space: nowrap;
}

.topbar-download-btn:hover {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
}

.topbar-download-btn.hidden {
  display: none;
}

.promote-banner {
  margin: 0.75rem 0.75rem 0;
  padding: 0.65rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--accent) 8%, var(--panel-bg));
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
}

.promote-banner a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.promote-banner a:hover {
  text-decoration: underline;
}

.promote-banner.trial-warning {
  color: var(--text);
  border-color: color-mix(in srgb, #c98a2e 35%, transparent);
  background: color-mix(in srgb, #c98a2e 10%, var(--panel-bg));
}

.promote-banner.trial-expired {
  color: #b42318;
  border-color: color-mix(in srgb, #b42318 35%, transparent);
  background: color-mix(in srgb, #b42318 8%, var(--panel-bg));
}

.promote-banner.hidden {
  display: none;
}

.auth-login-btn,
.auth-logout-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 0.8125rem;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  margin-right: 8px;
}

.auth-login-btn:hover,
.auth-logout-btn:hover {
  background: #faf9f7;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.login-overlay.hidden {
  display: none;
}

.login-card {
  width: min(92vw, 400px);
  background: #fff;
  border-radius: 12px;
  padding: 28px 24px 24px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
}

.login-card h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.login-subtitle {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.875rem;
}

.login-form label {
  display: block;
  margin-bottom: 14px;
}

.login-form label span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.login-form input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9375rem;
}

.login-error {
  color: #b42318;
  font-size: 0.8125rem;
  margin: 0 0 12px;
}

.login-error.hidden {
  display: none;
}

.login-submit {
  width: 100%;
  padding: 11px 16px;
  border: none;
  border-radius: 8px;
  background: var(--accent, #9a6b2f);
  color: #fff;
  font-size: 0.9375rem;
  cursor: pointer;
}

.login-submit:hover {
  filter: brightness(1.05);
}

.login-submit[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: var(--muted);
  font-size: 0.8125rem;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.login-divider.hidden {
  display: none;
}

.wechat-login-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid #07c160;
  border-radius: 8px;
  background: #07c160;
  color: #fff;
  font-size: 0.9375rem;
  cursor: pointer;
}

.wechat-login-btn:hover {
  filter: brightness(1.05);
}

.wechat-login-btn[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

.wechat-login-btn.hidden {
  display: none;
}

.wechat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;
  font-weight: 700;
}

.wechat-qr-panel {
  display: flex;
  justify-content: center;
  margin-top: 4px;
}

.wechat-qr-panel.hidden {
  display: none;
}

.wechat-qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 12px 0 4px;
}

.wechat-qr-img {
  display: block;
  width: 220px;
  height: 220px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.wechat-qr-hint {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  text-align: center;
}

.wechat-qr-refresh {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.8125rem;
  padding: 6px 12px;
  cursor: pointer;
}

.wechat-qr-refresh:hover {
  background: var(--surface-hover, #f8fafc);
}
