:root {
  --bg: #F5F4EE;
  --bg-elevated: #FAF9F5;
  --card: #FFFEFA;
  --text: #1F1E1D;
  --muted: #6B6860;
  --border: #E6E2D8;
  --border-soft: #EFEBE3;
  --accent: #D97757;
  --accent-deep: #C96442;
  --accent-soft: rgba(217, 119, 87, 0.12);
  --user-bg: #EDE9E0;
  --err: #B54A3A;
  --radius: 18px;
  --radius-sm: 12px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --serif: Georgia, "Songti SC", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Segoe UI", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "PingFang SC", monospace;
  --shadow: 0 1px 2px rgba(31, 30, 29, 0.04), 0 8px 24px rgba(31, 30, 29, 0.04);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #262624;
    --bg-elevated: #2C2C2A;
    --card: #30302E;
    --text: #F5F4EE;
    --muted: #A29E94;
    --border: #3D3C38;
    --border-soft: #353430;
    --accent: #D97757;
    --accent-deep: #E08A6C;
    --accent-soft: rgba(217, 119, 87, 0.18);
    --user-bg: #3A3935;
    --err: #E07A6A;
    --shadow: 0 1px 2px rgba(0,0,0,0.2), 0 8px 24px rgba(0,0,0,0.25);
  }
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.shell {
  display: flex;
  min-height: 100%;
  min-height: 100dvh;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}
.app-main {
  flex: 1;
  min-width: 0;
  max-width: 640px;
  margin: 0 auto;
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}
#app { /* legacy alias */ }
.mono { font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.01em; }

.top {
  padding: 16px 16px 12px 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.new-chat-btn {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.new-chat-btn:active { border-color: var(--accent); color: var(--accent-deep); }
.brand-mark {
  color: var(--accent);
  font-size: 1.35rem;
  line-height: 1;
  animation: pulse-mark 2.4s ease-in-out infinite;
}
.top h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.sub {
  margin: 2px 0 0;
  color: var(--muted);
}

.panel { padding: 28px 20px; flex: 1; display: flex; align-items: flex-start; }
.login-card {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 28px 22px;
  box-shadow: var(--shadow);
  animation: fade-up 0.45s ease both;
}
.login-title {
  font-family: var(--serif);
  font-size: 1.55rem;
  margin: 0 0 8px;
  font-weight: 600;
}
.hint { color: var(--muted); margin: 0 0 18px; line-height: 1.5; }
.big-input {
  width: 100%;
  font-size: 1.12rem;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 0 0 14px;
  background: var(--bg-elevated);
  color: var(--text);
  font-family: var(--sans);
}
.big-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.btn {
  border: none;
  border-radius: 999px;
  font-size: 1.08rem;
  padding: 14px 20px;
  cursor: pointer;
  width: 100%;
  font-weight: 600;
  font-family: var(--sans);
}
.btn.primary {
  background: var(--accent);
  color: #fff;
}
.btn.primary:active { background: var(--accent-deep); }
.btn:disabled, .send-fab:disabled { opacity: 0.5; cursor: wait; }
.err { color: var(--err); font-size: 0.95rem; margin: 12px 0 0; }
.hidden { display: none !important; }

.chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 18px 8px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* Messages */
.msg {
  animation: fade-up 0.4s ease both;
  max-width: 100%;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}
.msg.user {
  align-self: flex-end;
  width: auto;
  max-width: min(88%, 100%);
  min-width: 0;
  background: var(--user-bg);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 18px 18px 6px 18px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-sizing: border-box;
  box-shadow: 0 1px 0 rgba(31,30,29,0.03);
}
.msg.bot {
  align-self: stretch;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.msg.bot .accent {
  width: 8px;
  height: 8px;
  margin-top: 0.55em;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.msg.bot .body {
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: var(--text);
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
.thumb {
  display: block;
  max-width: 180px;
  border-radius: 12px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
}

/* File card */
.file-card {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease;
  overflow: hidden;
}
.file-card:active { transform: scale(0.99); border-color: var(--accent); }
.file-ico {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.file-meta { min-width: 0; flex: 1 1 auto; overflow: hidden; max-width: 100%; }
.file-name {
  display: block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  min-width: 0;
}
.file-ico, .file-arrow { flex-shrink: 0; }
.file-sub { color: var(--muted); font-size: 0.82rem; margin-top: 2px; font-family: var(--mono); }
.file-arrow { color: var(--accent); font-size: 1.1rem; }

/* Thinking / spinner */
.thinking {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 22px 12px;
  color: var(--muted);
  min-height: 36px;
}
.spin-glyph {
  color: var(--accent);
  font-size: 1.15rem;
  width: 1.2em;
  text-align: center;
  display: inline-block;
}
.shimmer-word {
  font-family: var(--serif);
  font-size: 1.02rem;
  background: linear-gradient(
    90deg,
    var(--muted) 0%,
    var(--accent) 35%,
    var(--text) 50%,
    var(--accent) 65%,
    var(--muted) 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 2.2s linear infinite;
}
.elapsed { color: var(--muted); opacity: 0.85; }

/* Composer */
.composer-wrap {
  padding: 8px 14px calc(12px + var(--safe-b));
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.composer.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 10px 12px 12px;
  box-shadow: var(--shadow);
}
.tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
  padding: 0 4px;
}
.tool-btn {
  font-size: 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--muted);
  font-weight: 550;
}
.tool-btn:active { border-color: var(--accent); color: var(--accent-deep); }
.attach-name {
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
}
.composer-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.composer-input {
  flex: 1;
  border: none;
  resize: none;
  min-height: 52px;
  max-height: 140px;
  padding: 10px 8px;
  font-size: 1.08rem;
  font-family: var(--sans);
  background: transparent;
  color: var(--text);
  line-height: 1.45;
}
.composer-input:focus { outline: none; }
.composer-input::placeholder { color: var(--muted); opacity: 0.75; }
.send-fab {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  margin-bottom: 2px;
  transition: background 0.15s ease, transform 0.15s ease;
}
.send-fab:active { background: var(--accent-deep); transform: scale(0.96); }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
@keyframes pulse-mark {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
  .msg, .login-card { animation: none; }
  .shimmer-word {
    animation: none;
    color: var(--muted);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
  }
  .brand-mark { animation: none; }
  .spin-glyph { animation: none; }
}

/* Quick actions */
.quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 10px;
  max-width: 100%;
  box-sizing: border-box;
}
.quick-chip {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  min-height: 44px;
}
.quick-chip:active { border-color: var(--accent); color: var(--accent-deep); }
.quick-chip.soon {
  opacity: 0.55;
  font-weight: 500;
  color: var(--muted);
}
.quick-chip .soon-tag {
  font-size: 0.75rem;
  color: var(--accent);
  margin-left: 4px;
  font-weight: 600;
}

/* Bottom sheet */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(31, 30, 29, 0.35);
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: fade-up 0.2s ease both;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: min(86vh, 640px);
  overflow-y: auto;
  background: var(--card);
  border-radius: 22px 22px 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  padding: 18px 18px calc(20px + var(--safe-b));
  box-sizing: border-box;
  box-shadow: var(--shadow);
}
.sheet h2 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
}
.sheet .sheet-sub {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
}
.sheet label.field {
  display: block;
  margin: 0 0 14px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
}
.sheet select, .sheet .seg {
  width: 100%;
  margin-top: 6px;
  font-size: 1.05rem;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: var(--sans);
  min-height: 48px;
  box-sizing: border-box;
}
.seg {
  display: flex;
  gap: 8px;
  padding: 6px;
}
.seg button {
  flex: 1;
  min-height: 44px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 1.02rem;
  font-weight: 600;
  cursor: pointer;
}
.seg button.on {
  background: var(--accent);
  color: #fff;
}
.sheet-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.sheet-actions .btn { flex: 1; }
.btn.ghost {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}
@media (prefers-reduced-motion: reduce) {
  .sheet-backdrop { animation: none; }
}

/* Essay sheet */
.sheet textarea {
  width: 100%;
  min-height: 72px;
  border: 1px solid var(--border, #e5e2d9);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  background: var(--card, #fff);
  resize: vertical;
}
.sheet-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: #8a8578;
  line-height: 1.4;
}
.essay-photos {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.photo-pick {
  flex: 1;
  text-align: center;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.essay-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.essay-thumbs .thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e5e2d9;
  background: #f5f4ee;
}
.essay-thumbs .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.essay-thumbs .thumb button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 14px;
  line-height: 22px;
  cursor: pointer;
}


/* ===== Sidebar / drawer ===== */
.sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  z-index: 20;
}
.sidebar-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 12px 10px;
  border-bottom: 1px solid var(--border-soft);
}
.sidebar-new {
  flex: 1;
  min-height: 48px;
  font-size: 1rem;
  border-radius: 14px;
}
.sidebar-close { display: none; }
.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 1.15rem;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.icon-btn:active { border-color: var(--accent); color: var(--accent-deep); }
.menu-btn { margin-right: 4px; }
.conv-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 10px 24px;
  -webkit-overflow-scrolling: touch;
}
.conv-group-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
  padding: 14px 10px 6px;
  text-transform: none;
}
.conv-item {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 14px;
  padding: 4px 4px 4px 10px;
  margin-bottom: 2px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  min-height: 52px;
}
.conv-item:hover { background: var(--accent-soft); }
.conv-item.active {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(217, 119, 87, 0.25);
}
.conv-item-main {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  padding: 10px 4px;
  color: inherit;
  font: inherit;
}
.conv-item-title {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conv-item-actions {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.conv-item-actions button {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
}
.conv-item-actions button:active,
.conv-item-actions button:hover {
  background: var(--card);
  color: var(--accent-deep);
}
.drawer-backdrop {
  display: none;
}
.btn.danger {
  background: var(--err);
  color: #fff;
  border: none;
}
.confirm-card {
  background: var(--card);
  border-radius: 20px 20px 0 0;
  padding: 22px 18px calc(18px + var(--safe-b));
  width: 100%;
  max-width: 420px;
  margin: auto auto 0;
  box-shadow: var(--shadow);
}
.confirm-card h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 1.25rem;
}
@media (min-width: 480px) {
  .confirm-card {
    border-radius: 20px;
    margin: auto;
  }
}

/* Mobile drawer */
@media (max-width: 899px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: none;
    max-width: 86vw;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 32px rgba(31,30,29,0.12);
  }
  .sidebar-close { display: inline-flex; }
  .drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(31, 30, 29, 0.35);
    z-index: 15;
    border: none;
    padding: 0;
  }
  .drawer-backdrop.hidden { display: none; }
  .menu-btn.hidden { display: none; }
  .menu-btn { display: inline-flex; }
}
@media (min-width: 900px) {
  .menu-btn { display: none !important; }
  .sidebar-close { display: none !important; }
  .drawer-backdrop { display: none !important; }
  .shell { max-width: 1100px; }
}

/* ===== Mobile polish (WeChat / iOS) ===== */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  font-size: 17px;
  padding: env(safe-area-inset-top, 0px) 0 0;
}
.app-main, .shell {
  min-height: 100dvh;
  min-height: -webkit-fill-available;
}
.composer-input,
.big-input,
.sheet select,
.sheet textarea,
#essayPrompt {
  font-size: 16px !important; /* prevent iOS zoom */
}
.composer-wrap {
  padding-bottom: calc(10px + var(--safe-b));
  /* visualViewport JS may adjust --kb */
  margin-bottom: var(--kb, 0px);
}
.chat {
  /* keep composer visible when soft keyboard opens */
  padding-bottom: 0;
}

/* Quick chips: horizontal scroll on narrow screens */
.quick-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 4px 8px;
  max-width: 100%;
}
.quick-row::-webkit-scrollbar { display: none; }
.quick-chip {
  flex: 0 0 auto;
  white-space: nowrap;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 0.95rem;
}
.welcome-quick {
  flex-wrap: wrap;
  overflow-x: visible;
}

/* Drawer swipe hint */
.sidebar {
  touch-action: pan-y;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Conv item: ⋯ instead of always-visible rename/delete on mobile */
.conv-item-actions {
  display: none;
}
.conv-more {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.conv-more:active {
  background: var(--card);
  color: var(--accent-deep);
}

/* Action sheet (⋯ menu) */
.action-sheet {
  background: var(--card);
  border-radius: 20px 20px 0 0;
  padding: 12px 12px calc(12px + var(--safe-b));
  width: 100%;
  max-width: 480px;
  margin: auto auto 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.action-title {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  margin: 4px 0 8px;
  padding: 0 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.action-btn {
  min-height: 52px;
  border: none;
  border-radius: 14px;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--sans);
}
.action-btn.danger-text { color: var(--err); }
.action-btn.cancel {
  background: transparent;
  border: 1px solid var(--border);
  margin-top: 4px;
  color: var(--muted);
}
@media (min-width: 480px) {
  .action-sheet {
    border-radius: 20px;
    margin: auto;
  }
}

/* Larger bottom sheet controls */
.sheet {
  padding: 18px 16px calc(16px + var(--safe-b));
  border-radius: 22px 22px 0 0;
}
.sheet .seg button {
  min-height: 48px;
  font-size: 1rem;
  padding: 10px 12px;
}
.sheet select {
  min-height: 48px;
  font-size: 16px;
  border-radius: 12px;
  padding: 10px 12px;
}
.sheet-actions .btn {
  min-height: 52px;
  font-size: 1.05rem;
  border-radius: 14px;
}
.photo-pick {
  min-height: 52px;
  font-size: 1rem;
}

/* WeChat tip */
.wechat-tip {
  margin: 0 12px 8px;
  padding: 10px 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(217, 119, 87, 0.25);
  border-radius: 14px;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.45;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.wechat-tip.hidden { display: none !important; }
.tip-link-btn {
  border: 1px solid var(--accent);
  background: var(--card);
  color: var(--accent-deep);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 40px;
  font-family: var(--sans);
}

/* Docx open help under file card */
.file-wechat-hint {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}
.file-copy-btn {
  display: inline-flex;
  margin-top: 6px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--accent-deep);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 40px;
  font-family: var(--sans);
}

@media (min-width: 900px) {
  .conv-item-actions { display: flex; }
  .conv-more { display: none; }
}
