/* chat.css — ChatPlane, ChatViews, TaskPlanViews, MobileChatStatus, PalaceChatMemoryViews */

/* ── Session plane ── */
.chat-session {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: padding-bottom var(--dur-settle) var(--ease-settle);
}

/* ── ChatTopStrip: design (Quiet Session) — one row: menu · crown · canvas tile · new chat ── */
.chat-top-strip { position: relative; flex: none; padding: 56px 16px 8px; min-height: calc(56px + 44px + 8px); z-index: 3; }
.chat-top-row { position: relative; display: flex; align-items: center; gap: 8px; height: 44px; }
.crown-spacer { flex: 1; }
.chat-top-strip.has-tile .model-readout.crown { max-width: calc(100% - 212px); }
.chat-top-center { position: absolute; left: 0; right: 0; top: 56px; height: 44px; display: flex; justify-content: center; align-items: center; pointer-events: none; }
.chat-top-center > * { pointer-events: auto; }
.crown-side {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  --r: 20px;
}
.crown-badge {
  position: absolute;
  right: -4px;
  top: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font: 700 10px/1 var(--font-sans);
  color: var(--ink);
  background: rgb(var(--wash-rgb) / calc(0.16 * var(--wash-k)));
  box-shadow: 0 0 0 1.5px var(--void);
  font-variant-numeric: tabular-nums;
}
.crown-side.live .crown-badge { color: var(--on-accent); background: var(--accent); box-shadow: 0 0 0 1.5px var(--void), 0 0 10px rgb(var(--accent-rgb) / 0.7); animation: crown-badge-pulse 1.6s var(--ease-in-out) infinite alternate; }
@keyframes crown-badge-pulse { to { transform: scale(1.12); } }
.crown-back.live::after { box-shadow: none; }
.crown-back-dot { position: absolute; right: 7px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgb(var(--accent-rgb) / 0.8); animation: status-pulse 1s var(--ease-in-out) infinite alternate; --s: 7px; --dot: rgb(var(--accent-rgb) / 0.8); }

/* ── ModelReadout: the crown ── */
.model-readout.crown {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  max-width: min(260px, calc(100% - 128px));
  padding: 0 14px 0 15px;
  --r: 22px;
  text-align: left;
}
.crown-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.crown-model { display: flex; align-items: center; gap: 5px; min-width: 0; }
.crown-model-name { font: 600 13px/16px var(--font-sans); letter-spacing: -0.08px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crown-memory { display: grid; flex: none; filter: drop-shadow(0 0 4px rgb(var(--accent-rgb) / 0.6)); }
.crown-sub { font: 400 11px/13px var(--font-sans); color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: crown-sub-in 0.35s var(--ease-settle); }
.crown-sub.live { color: var(--accent); }
.crown-sub .chat-shimmer .shimmer-base { color: rgb(var(--accent-rgb) / 0.9); }
.crown-rate { color: rgb(var(--accent-rgb) / 0.8); font-variant-numeric: tabular-nums; }
.model-readout.offline .crown-sub { color: var(--danger); }
@keyframes crown-sub-in { from { opacity: 0; transform: translateY(3px); } }
.model-readout-chevron { display: grid; flex: none; transition: transform var(--dur-picker) var(--ease-picker); }
.model-readout-chevron.open { transform: rotate(180deg); }

/* The comet: a bead of light running the crown's rim while this chat generates. */
@property --crown-angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.crown-comet {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1.25px;
  background: conic-gradient(from var(--crown-angle), transparent 0deg, transparent 250deg, rgb(var(--accent-rgb) / 0.15) 290deg, rgb(var(--accent-rgb) / 0.95) 350deg, #fff 358deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: crown-orbit 2.4s linear infinite;
  pointer-events: none;
  filter: drop-shadow(0 0 3px rgb(var(--accent-rgb) / 0.8));
}
.model-readout.live { box-shadow: inset 0 1px 0.5px var(--lg-inner-top), inset 0 -1px 0.5px var(--lg-inner-bottom), var(--lg-drop), 0 0 22px -6px rgb(var(--accent-rgb) / 0.55); }
@keyframes crown-orbit { to { --crown-angle: 360deg; } }
.pm-app[data-reduce-motion="true"] .crown-comet { animation: none; background: rgb(var(--accent-rgb) / 0.55); filter: none; }

/* ── Chat / Canvas panes (design: the Canvas zooms out of the crown tile) ── */
.chat-workspace { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-canvas-pane {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform-origin: calc(100% - 81px) -30px;
  transform: scale(0.12);
  border-radius: 40px;
  overflow: clip;
  transition: opacity 0.25s ease, transform var(--dur-glide) var(--ease-glide), border-radius var(--dur-glide) var(--ease-glide);
}
.chat-canvas-pane.active { opacity: 1; pointer-events: auto; transform: none; border-radius: 0; }
.pm-app[data-reduce-motion="true"] .chat-canvas-pane { transform: none; transition: opacity 0.2s ease; }
.chat-chat-pane { animation: chat-pane-in 0.4s var(--ease-settle); }
@keyframes chat-pane-in { from { opacity: 0; transform: scale(0.98); } }
.chat-chat-pane { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.canvas-pending { height: 100%; display: grid; place-items: center; }
.chat-split { flex: 1; min-height: 0; display: flex; }
.chat-split-chat { flex: none; min-width: 0; display: flex; flex-direction: column; }
.chat-split-divider { width: 1px; flex: none; background: rgb(var(--wash-rgb) / calc(0.12 * var(--wash-k))); }
.chat-split-canvas { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ── Memory references: design — an inline accent chip ── */
.memory-refs { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.memory-refs-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 11px 0 10px;
  border-radius: 999px;
  font: 500 12px var(--font-sans);
  color: var(--accent);
  background: rgb(var(--accent-rgb) / 0.09);
  box-shadow: inset 0 0 0 0.5px rgb(var(--accent-rgb) / 0.28);
  transition: background var(--dur-settle) var(--ease-settle);
}
.memory-refs-chip:active { transform: scale(0.97); }
.memory-refs.open .memory-refs-chip { background: rgb(var(--accent-rgb) / 0.14); }
.memory-refs-chevron { display: grid; opacity: 0.7; transition: transform var(--dur-settle) var(--ease-settle); }
.memory-refs-chevron.open { transform: rotate(90deg); }
.memory-refs-list { display: flex; flex-direction: column; gap: 2px; padding: 2px 0 4px 12px; margin-left: 4px; box-shadow: inset 1.5px 0 0 rgb(var(--accent-rgb) / 0.35); animation: thought-in 0.3s var(--ease-settle); }
.memory-ref { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 44px; text-align: left; }
.memory-ref-title { font-size: 15px; font-weight: 500; color: var(--ink); letter-spacing: -0.24px; }
.memory-ref-source { font-size: 12px; color: var(--ink-soft); }
.memory-reference-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.sheet-fill { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.sheet-system-bg { position: absolute; inset: 0; background: #1c1c1e; }
.pm-app[data-appearance="light"] .sheet-system-bg { background: #f2f2f7; }

/* ── Task plan ── */
.plan-bar-wrap { flex: none; padding-bottom: 8px; }
.plan-bar {
  border-radius: 16px;
  background: rgb(var(--veil-lo-rgb) / calc(0.22 * var(--veil-lo-k)));
  box-shadow: inset 0 0 0 0.7px rgb(var(--wash-rgb) / calc(0.08 * var(--wash-k)));
  overflow: hidden;
}
.plan-bar-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; text-align: left; }
.plan-icon-well { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.plan-bar-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.plan-bar-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.plan-bar-title { font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-bar-current { font: 500 9px/1.3 var(--font-mono); color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-bar-count { font: 600 9px var(--font-mono); color: var(--ink-faint); font-variant-numeric: tabular-nums; flex: none; margin-left: 6px; }
.plan-chevron { display: grid; transition: transform var(--dur-settle) var(--ease-settle); }
.plan-chevron.open { transform: rotate(90deg); }
.plan-hairline { position: relative; height: 2px; background: rgb(var(--wash-rgb) / calc(0.06 * var(--wash-k))); overflow: hidden; }
.plan-hairline span { position: absolute; left: 0; top: 0; bottom: 0; background: rgb(var(--accent-rgb) / 0.85); box-shadow: 0 0 8px rgb(var(--accent-rgb) / 0.35); transition: width var(--dur-settle) var(--ease-settle); }
.plan-list { max-height: 168px; height: 168px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; animation: disclosure-in 0.3s var(--ease-settle); }
.plan-rows { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px 11px; }
.plan-row { display: flex; align-items: baseline; gap: 8px; }
.plan-row-mark { width: 14px; display: flex; justify-content: center; flex: none; transform: translateY(2px); }
.plan-row-title { font-size: 12.5px; color: var(--ink); line-height: 1.3; min-width: 0; }
.plan-row-title.pending { color: var(--ink-soft); }
.plan-row-title.done { text-decoration: line-through; text-decoration-color: var(--ink-ghost); }
.plan-now { flex: none; height: 14px; padding: 0 5px; border-radius: 999px; display: inline-flex; align-items: center; font: 700 7px var(--font-mono); color: var(--accent); background: rgb(var(--accent-rgb) / 0.12); }
.plan-clear-row { display: flex; justify-content: flex-end; padding: 0 12px 10px; }
.plan-clear { font: 500 8px var(--font-mono); color: var(--ink-ghost); }

.plan-inline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 14px;
  background: rgb(var(--wash-rgb) / calc(0.035 * var(--wash-k)));
  box-shadow: inset 0 0 0 0.5px rgb(var(--wash-rgb) / calc(0.07 * var(--wash-k)));
}
.plan-inline-top { display: flex; flex-direction: column; gap: 3px; }
.plan-inline-meta { display: flex; align-items: center; gap: 6px; }
.plan-inline-dot { font: 500 8px var(--font-mono); color: var(--ink-ghost); }
.plan-inline-count { font: 600 8px var(--font-mono); color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.plan-inline-headline { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.plan-track { display: flex; align-items: center; height: 10px; }
.plan-connector { flex: 1; height: 1px; border-radius: 1px; transition: background var(--dur-settle) var(--ease-settle); }
.plan-mark { flex: none; width: 6px; height: 6px; border-radius: 50%; transition: all var(--dur-settle) var(--ease-settle); }
.plan-mark.done { background: rgb(var(--accent-rgb) / 0.9); }
.plan-mark.inProgress { width: 8px; height: 8px; background: var(--accent); box-shadow: 0 0 8px rgb(var(--accent-rgb) / 0.55); }
.plan-mark.pending { box-shadow: inset 0 0 0 1px var(--ink-ghost); }

/* ── MessageScroll ── */
.message-scroll-wrap { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.message-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  /* design: soft scroll edges — text dissolves under the crown and into the composer (scrollEdgeEffectStyle .soft) */
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 36px, #000 calc(100% - 22px), transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 36px, #000 calc(100% - 22px), transparent 100%);
}
.message-stack { display: flex; flex-direction: column; gap: 22px; padding-top: 30px; padding-bottom: 26px; }
.message-bottom-sentinel { height: 8px; flex: none; margin-top: -22px; }
.load-earlier { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 0; font-size: 16px; color: var(--ink); }
.msg-row { display: flex; animation: row-in 0.35s var(--ease-settle); }
@keyframes row-in { from { opacity: 0; transform: translateY(8px); } }
.msg-row.user { justify-content: flex-end; gap: 8px; }
.msg-user-spacer { flex: 1 0 auto; }
.msg-user-col { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 0; max-width: 100%; }
.msg-user-bubble {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 15px;
  min-width: 0;
  max-width: 100%;
  transition: transform 0.25s var(--ease-settle), filter 0.2s ease, box-shadow var(--dur-settle) var(--ease-settle);
  touch-action: pan-y;
}
.msg-user-bubble.focused { box-shadow: inset 0 0 0 0.75px rgb(var(--accent-rgb) / 0.4), inset 0 1px 0 var(--lg-inner-top), var(--lg-drop); }
.msg-user-bubble.lifted, .msg-assistant-col.lifted { transform: scale(1.02); }
.msg-user-text { color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.3; letter-spacing: -0.3px; }
.msg-steering { display: inline-flex; align-items: center; gap: 4px; font: 600 11px var(--font-sans); color: var(--accent); }
.msg-attachment-label { display: flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-weight: 500; color: var(--ink-soft); white-space: nowrap; overflow: hidden; }
.msg-attachment-label span { overflow: hidden; text-overflow: ellipsis; }
.msg-attach-grid { display: grid; gap: 3px; width: 168px; height: 116px; border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 0.75px rgb(var(--wash-rgb) / calc(0.12 * var(--wash-k))); align-content: start; }
.msg-attach-cell { position: relative; background-size: cover; background-position: center; }
.msg-attach-more { position: absolute; right: 5px; bottom: 5px; padding: 6px; border-radius: 999px; background: rgb(0 0 0 / 0.65); font: 600 10px var(--font-mono); color: var(--ink); }

/* design: actions on demand — icon-only, quiet, a stats readout that opens in place */
.msg-actions { display: flex; align-items: center; gap: 2px; margin-inline: -8px; min-height: 32px; animation: msg-actions-in 0.3s var(--ease-settle); }
.msg-actions.trailing { justify-content: flex-end; }
@keyframes msg-actions-in { from { opacity: 0; transform: translateY(-4px); } }
.msg-act {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-faint);
  transition: color var(--dur-settle) var(--ease-settle), background var(--dur-settle) var(--ease-settle), transform 0.15s var(--ease-settle);
}
.msg-act:hover { color: var(--ink-soft); background: rgb(var(--wash-rgb) / calc(0.05 * var(--wash-k))); }
.msg-act:active { transform: scale(0.9); }
.msg-act.done { color: var(--accent); }
.msg-stats {
  margin-left: 6px;
  min-height: 32px;
  padding: 0 4px;
  font: 500 11px/1.3 var(--font-sans);
  color: var(--ink-ghost);
  font-variant-numeric: tabular-nums;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  transition: color var(--dur-settle) var(--ease-settle);
}
.msg-stats:hover, .msg-stats.open { color: var(--ink-faint); }
.msg-stats.open { white-space: normal; font-size: 10.5px; }

.msg-user-edit { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; width: 100%; max-width: 580px; }
.msg-edit-field { width: 100%; min-height: 56px; padding: 18px 15px; resize: none; color: var(--ink); caret-color: var(--accent); line-height: 1.3; }
.msg-edit-actions { display: flex; gap: 8px; }
.msg-edit-btn { display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px; font: 500 9px var(--font-mono); color: var(--ink-soft); }
.msg-edit-btn.primary { color: var(--accent); font-weight: 600; padding: 5px 10px; }

.msg-row.assistant { justify-content: flex-start; }
.msg-assistant-col { display: flex; flex-direction: column; gap: 8px; width: 100%; min-width: 0; transition: transform 0.25s var(--ease-settle); }
.msg-assistant-col > .msg-actions { margin-top: -4px; }
.msg-answer { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.msg-error { font-size: 13px; color: var(--danger); }
.art-update-fallback { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; height: 29px; padding: 0 10px; border-radius: 999px; background: rgb(var(--veil-lo-rgb) / calc(0.22 * var(--veil-lo-k))); box-shadow: inset 0 0 0 0.75px rgb(var(--wash-rgb) / calc(0.08 * var(--wash-k))); font: 500 9px var(--font-mono); color: var(--ink-soft); }

/* ── Scroll to latest ── */
.scroll-latest {
  --lg-fill: var(--mat-regular-bg);
  --lg-blur: 20px;
  position: absolute;
  left: 50%;
  bottom: 10px;
  width: 36px;
  height: 36px;
  margin-left: -18px;
  display: grid;
  place-items: center;
  --r: 18px;
  z-index: 3;
  opacity: 0;
  transform: translateY(10px) scale(0.8);
  pointer-events: none;
  transition: opacity 0.2s ease, transform var(--dur-settle) var(--ease-settle);
}
.scroll-latest.shown { opacity: 1; transform: none; pointer-events: auto; }
.scroll-latest.shown:active { transform: scale(0.92); }
.scroll-latest-live { position: absolute; right: 1px; top: 1px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px rgb(var(--accent-rgb) / 0.8); animation: status-pulse 1s var(--ease-in-out) infinite alternate; --s: 8px; --dot: rgb(var(--accent-rgb) / 0.8); }

/* ── Thinking row ── */
.thinking-row { display: flex; flex-direction: column; gap: 6px; }
.thinking-status { display: flex; align-items: center; gap: 7px; min-height: 20px; width: 100%; text-align: left; }
.thinking-status:disabled { cursor: default; opacity: 1; }
.thinking-label { font: 500 13px/16px var(--font-sans); letter-spacing: -0.08px; color: var(--ink-faint); flex: none; }
.chat-shimmer { font: inherit; letter-spacing: inherit; }
.chat-shimmer .shimmer-band { background-size: 90% 100%; }
.thinking-steered { font: 600 11px var(--font-sans); color: var(--accent); flex: none; }
.thinking-chevron { display: grid; transition: transform var(--dur-settle) var(--ease-settle); }
.thinking-chevron.open { transform: rotate(90deg); }
.thinking-preview {
  flex: 1;
  min-width: 0;
  color: rgb(var(--ink2-rgb) / calc(var(--ink-faint-a) * 0.75));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: rtl;
  text-align: left;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px);
  mask-image: linear-gradient(90deg, transparent, #000 28px);
}
.thinking-hints { display: flex; flex-direction: column; gap: 3px; }
.thinking-hint { font-family: var(--font-mono); font-weight: 500; color: rgb(var(--accent-rgb) / 0.85); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.thinking-body {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--ink-faint);
  line-height: calc(1.2em + 2px);
  white-space: pre-wrap;
  padding-left: 12px;
  box-shadow: inset 1.5px 0 0 rgb(var(--wash-rgb) / calc(0.12 * var(--wash-k)));
  animation: thought-in 0.35s var(--ease-settle);
}
@keyframes thought-in { from { opacity: 0; transform: translateY(-6px); } }

/* ── ToolCard ── */
.tool-card {
  padding: 9px 12px;
  border-radius: 12px;
  background: rgb(var(--wash-rgb) / calc(0.035 * var(--wash-k)));
  box-shadow: inset 0 0 0 0.5px rgb(var(--wash-rgb) / calc(0.06 * var(--wash-k)));
}
.tool-card-head { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 16px; text-align: left; }
.tool-name { font-family: var(--font-mono); font-weight: 600; color: var(--ink-soft); flex: none; }
.tool-detail { font-family: var(--font-mono); font-weight: 500; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tool-spacer { flex: 1; min-width: 6px; }
.tool-chevron { display: grid; transition: transform var(--dur-settle) var(--ease-settle); }
.tool-chevron.open { transform: rotate(90deg); }
.tool-output { padding-top: 7px; font-family: var(--font-mono); font-weight: 500; color: var(--ink-faint); line-height: calc(1.2em + 2px); white-space: pre-wrap; animation: thought-in 0.3s var(--ease-settle); }

/* ── Diffusion card ── */
.diffusion-card {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 460px;
  height: 96px;
  border-radius: 15px;
  overflow: hidden;
  text-align: left;
  background: rgb(var(--veil-lo-rgb) / calc(0.3 * var(--veil-lo-k)));
}
.diffusion-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 0.75px;
  background: linear-gradient(135deg, rgb(var(--acc-rgb) / 0.3), rgb(var(--wash-rgb) / calc(0.07 * var(--wash-k))), rgb(var(--wash-rgb) / calc(0.025 * var(--wash-k))));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
.diffusion-thumb { position: relative; width: 124px; height: 96px; flex: none; overflow: hidden; background: #000; }
.diffusion-field, .diffusion-image, .diffusion-stage-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.diffusion-image { transition: filter 0.4s ease; }
.diffusion-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / 0.08), rgb(0 0 0 / 0.42)); }
.diffusion-expand { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgb(0 0 0 / 0.48); }
.diffusion-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 9px 12px; }
.diffusion-row1 { display: flex; align-items: center; gap: 7px; }
.diffusion-asset { font-family: var(--font-mono); font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.diffusion-spacer { flex: 1; min-width: 4px; }
.diffusion-pct { font-family: var(--font-mono); font-weight: 600; font-variant-numeric: tabular-nums; }
.diffusion-row2 { display: flex; gap: 6px; white-space: nowrap; overflow: hidden; }
.diffusion-phase { font-family: var(--font-mono); font-weight: 700; letter-spacing: 1.1px; }
.diffusion-meta { font-family: var(--font-mono); font-weight: 500; color: var(--ink-faint); overflow: hidden; text-overflow: ellipsis; }
.diffusion-detail { color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.diffusion-progress { position: absolute; left: 0; bottom: 0; height: 2px; border-radius: 1px; background: var(--acc); box-shadow: 0 0 8px rgb(var(--acc-rgb) / 0.7); transition: width 0.4s var(--ease-settle); }
.diffusion-icon.cycling .cf1 { animation: cf-cycle 1.2s ease-in-out infinite; }
.diffusion-icon.cycling .cf2 { animation: cf-cycle 1.2s ease-in-out infinite 0.4s; }
.diffusion-icon.cycling .cf3 { animation: cf-cycle 1.2s ease-in-out infinite 0.8s; }
@keyframes cf-cycle { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

.diffusion-sheet, .recording-sheet { position: relative; height: 100%; display: flex; justify-content: center; overflow: hidden; }
.diffusion-sheet-inner { flex: none; width: 700px; min-width: 700px; height: 100%; display: flex; flex-direction: column; }
.diffusion-sheet-head { height: 54px; padding: 0 16px; display: flex; align-items: center; gap: 10px; flex: none; }
.diffusion-sheet-titles { display: flex; flex-direction: column; gap: 2px; }
.diffusion-sheet-title { font: 600 11px var(--font-mono); color: var(--ink); }
.diffusion-sheet-sub { font: 500 8px var(--font-mono); color: var(--ink-faint); }
.diffusion-stage { position: relative; flex: 1; background: #000; overflow: hidden; }
.diffusion-stage-image { object-fit: contain; padding: 22px; transition: filter 0.4s ease; }
.diffusion-stage-bar { position: absolute; left: 0; bottom: 0; height: 2px; box-shadow: 0 0 10px rgb(var(--accent-rgb) / 0.8); }
.diffusion-sheet-foot { display: flex; align-items: flex-start; gap: 12px; padding: 16px; flex: none; }
.diffusion-sheet-phase { font: 700 9px var(--font-mono); letter-spacing: 1.2px; flex: none; }
.diffusion-sheet-detail { font-size: 12px; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.close-pill { display: inline-flex; align-items: center; gap: 5px; padding: 7px 11px; border-radius: 999px; background: rgb(var(--wash-rgb) / calc(0.08 * var(--wash-k))); font: 600 9px var(--font-mono); }
.pm-app[data-appearance="light"] .close-pill { color: #000; }
.pm-app:not([data-appearance="light"]) .close-pill { color: #fff; }

.attach-sheet-head { display: flex; align-items: center; gap: 12px; padding: 11px 16px; background: var(--attach-head, rgb(0 0 0 / 0.96)); box-shadow: inset 0 -0.75px 0 rgb(var(--wash-rgb) / calc(0.09 * var(--wash-k))); position: relative; z-index: 1; margin-top: 18px; }
.pm-app[data-appearance="light"] .attach-sheet-head { --attach-head: rgb(237 242 250 / 0.96); }
.attach-sheet-title { display: inline-flex; align-items: center; gap: 6px; font: 600 11px var(--font-mono); color: var(--ink); }
.attach-sheet-grid { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 16px; }
.attach-sheet-cell { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.attach-sheet-cell img { max-width: 100%; max-height: 420px; border-radius: 14px; }
.attach-sheet-cell figcaption { font: 500 10px var(--font-mono); color: var(--ink-soft); }

/* ── Recording card ── */
.recording-card {
  width: 100%;
  max-width: 520px;
  border-radius: 15px;
  background: rgb(0 0 0 / 0.3);
  box-shadow: inset 0 0 0 0.6px rgb(var(--wash-rgb) / calc(0.08 * var(--wash-k)));
}
.recording-main { width: 100%; display: flex; align-items: center; text-align: left; }
.recording-thumb { position: relative; width: 148px; height: 96px; flex: none; overflow: hidden; }
.recording-canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
.recording-count { position: absolute; left: 6px; bottom: 6px; padding: 3px 6px; border-radius: 999px; background: rgb(0 0 0 / 0.55); font: 700 8px var(--font-mono); color: #fff; }
.recording-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 9px 12px; }
.recording-row { display: flex; align-items: center; gap: 7px; }
.recording-name { font-family: var(--font-mono); font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recording-detail { font-family: var(--font-mono); font-weight: 500; color: var(--ink-faint); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recording-output { color: var(--ink-faint); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recording-sheet-inner { flex: none; width: 520px; min-width: 520px; display: flex; flex-direction: column; }
.recording-sheet-head { display: flex; align-items: center; padding: 29px 16px 11px; }
.recording-sheet-stage { flex: 1; padding: 16px; display: grid; place-items: center; }
.recording-sheet-stage canvas { width: 100%; height: auto; border-radius: 6px; }

/* ── ApprovalSheet ── */
.approval-layer { position: absolute; inset: 0; z-index: 70; display: grid; place-items: center; opacity: 0; transition: opacity var(--dur-settle) var(--ease-settle); }
.approval-layer.shown { opacity: 1; }
.approval-dimmer { position: absolute; inset: 0; }
.approval-panel-wrap { position: relative; width: 440px; flex: none; }
.approval-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.approval-risk { display: flex; align-items: center; gap: 8px; }
.approval-risk-dot { width: 7px; height: 7px; border-radius: 50%; }
.approval-title { font-size: 16px; font-weight: 500; color: var(--ink); line-height: 1.3; }
.approval-detail { padding: 12px; font: 500 11px/1.4 var(--font-mono); color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.approval-actions { display: flex; align-items: center; gap: 10px; }
.approval-deny { padding: 10px 18px; }
.approval-allow { padding: 10px 22px; border-radius: 999px; }
.approval-deny:active, .approval-allow:active { transform: scale(0.97); }

/* ── Composer: design (Quiet Session) — one glass capsule, the tray above it ── */
.composer {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 4px;
  padding-bottom: 14px;
  position: relative;
  z-index: 4;
  transition: padding var(--dur-settle) var(--ease-settle);
}
.composer.docked { padding-bottom: 0; }
.composer-anchor { position: relative; }
.composer-capsule {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-height: 52px;
  padding: 6px;
  cursor: text;
  transition: box-shadow var(--dur-settle) var(--ease-settle), border-radius var(--dur-settle) var(--ease-settle);
}
.composer-capsule.multiline { --r: 24px; }
.composer-capsule.focused { box-shadow: inset 0 1px 0.5px var(--lg-inner-top), inset 0 -1px 0.5px var(--lg-inner-bottom), var(--lg-drop), 0 0 0 0.75px rgb(var(--accent-rgb) / 0.35), 0 0 24px -8px rgb(var(--accent-rgb) / 0.5); }
.composer-field {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 10px 4px;
  resize: none;
  color: var(--ink);
  caret-color: var(--accent);
  line-height: 1.25;
  letter-spacing: -0.3px;
  overflow: hidden;
  cursor: text;
}
.composer-field::placeholder { color: var(--ink-faint); }
.composer-trailing { display: flex; align-items: center; gap: 6px; flex: none; }
.composer-swap { display: grid; animation: composer-swap-in 0.32s var(--ease-settle); }
@keyframes composer-swap-in { from { opacity: 0; transform: scale(0.6) rotate(-30deg); } }
.composer-icon-btn { flex: none; display: grid; place-items: center; border-radius: 50%; transition: background var(--dur-settle) var(--ease-settle), box-shadow var(--dur-settle) var(--ease-settle); }
.composer-icon-btn:active { transform: scale(0.92); }
.composer-icon-btn.mic.listening { background: var(--accent); box-shadow: 0 0 18px rgb(var(--accent-rgb) / 0.6); }
.composer-well { width: 30px; height: 30px; flex: none; display: grid; place-items: center; }
.composer-well:active { transform: scale(0.94); }
.composer-well.mic.listening { box-shadow: 0 0 16px rgb(var(--accent-rgb) / 0.45), inset 0 3px 12px -1px var(--inset-shadow); }

.composer-plus {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  background: rgb(var(--wash-rgb) / calc(0.07 * var(--wash-k)));
  transition: background var(--dur-settle) var(--ease-settle), color var(--dur-settle) var(--ease-settle);
}
.composer-plus:active { transform: scale(0.92); }
.composer-plus.open { color: var(--ink); background: rgb(var(--wash-rgb) / calc(0.14 * var(--wash-k))); }
.composer-plus-glyph { display: grid; transition: transform var(--dur-picker) var(--ease-picker); }
.composer-plus.open .composer-plus-glyph { transform: rotate(135deg); }
.composer-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.composer-ring circle { fill: none; stroke-width: 1.5; }
.composer-ring-track { stroke: rgb(var(--wash-rgb) / calc(0.1 * var(--wash-k))); }
.composer-ring-fill { stroke: var(--accent); stroke-linecap: round; filter: drop-shadow(0 0 2px rgb(var(--accent-rgb) / 0.8)); transition: stroke-dasharray 0.6s var(--ease-settle); }
.composer-ring-fill.hot { stroke: var(--orange); filter: drop-shadow(0 0 2px rgb(var(--orange-rgb) / 0.8)); }

.composer-attachments { height: 48px; display: flex; gap: 7px; overflow-x: auto; padding: 0 8px; }
.composer-chip { flex: none; display: flex; align-items: center; gap: 7px; height: 48px; padding: 5px; border-radius: 11px; background: rgb(var(--wash-rgb) / calc(0.025 * var(--wash-k))); box-shadow: inset 0 0 0 0.75px rgb(var(--wash-rgb) / calc(0.075 * var(--wash-k))); }
.composer-chip-thumb { position: relative; width: 38px; height: 38px; border-radius: 8px; background-size: cover; background-position: center; flex: none; }
.composer-chip-thumb i { position: absolute; right: 2px; bottom: 2px; padding: 3px; border-radius: 999px; background: rgb(0 0 0 / 0.55); display: grid; }
.composer-chip-name { max-width: 104px; font: 500 8px var(--font-mono); color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer-chip-x { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: rgb(var(--wash-rgb) / calc(0.055 * var(--wash-k))); }
.composer-vision-note { padding: 0 10px; font: 500 8px/1.4 var(--font-mono); color: var(--ink-faint); }
.composer-stream-status { display: flex; align-items: flex-start; gap: 6px; padding: 10px; border-radius: 14px; background: rgb(var(--accent-rgb) / 0.07); font-size: 11px; font-weight: 500; color: var(--accent); line-height: 1.3; }
.composer-notice { display: flex; align-items: center; gap: 5px; padding: 0 12px; font-size: 12px; color: var(--ink-soft); animation: done-in 0.25s var(--ease-settle); }
@keyframes done-in { from { opacity: 0; transform: scale(0.92); } }
.voice-caption { padding: 0 16px; color: var(--ink-faint); animation: done-in 0.25s var(--ease-settle); }

/* The tray: one glass sheet above the + — tools, reasoning, sampling, context. */
.composer-tray {
  position: absolute;
  left: var(--tray-left, 0px);
  right: 0;
  bottom: calc(100% + 10px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  z-index: 5;
  transform-origin: 26px 100%;
  opacity: 0;
  transform: translateY(10px) scale(0.94);
  transition: opacity 0.2s ease, transform var(--dur-picker) var(--ease-picker);
  --lg-fill: var(--mat-regular-bg);
  --lg-blur: 28px;
}
.composer-tray.shown { opacity: 1; transform: none; }
.tray-tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.tray-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 7px 2px 6px;
  border-radius: 16px;
  color: var(--ink-soft);
  transition: background var(--dur-settle) var(--ease-settle), transform 0.15s var(--ease-settle);
}
.tray-tool:hover { background: rgb(var(--wash-rgb) / calc(0.06 * var(--wash-k))); }
.tray-tool:active { transform: scale(0.94); background: rgb(var(--wash-rgb) / calc(0.09 * var(--wash-k))); }
.tray-tool-icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: var(--ink); background: rgb(var(--wash-rgb) / calc(0.07 * var(--wash-k))); box-shadow: inset 0 1px 0 var(--lg-inner-top); }
.tray-tool-label { font: 500 11px/13px var(--font-sans); letter-spacing: 0.06px; }
.tray-rows { display: flex; flex-direction: column; border-top: 0.5px solid rgb(var(--wash-rgb) / calc(0.1 * var(--wash-k))); padding-top: 4px; }
.tray-row { display: flex; align-items: center; gap: 11px; min-height: 50px; padding: 6px 8px; border-radius: 14px; text-align: left; width: 100%; }
.tray-row-button:hover { background: rgb(var(--wash-rgb) / calc(0.05 * var(--wash-k))); }
.tray-row.disabled { opacity: 0.45; }
.tray-row-icon { width: 30px; height: 30px; border-radius: 10px; flex: none; display: grid; place-items: center; color: var(--accent); background: rgb(var(--accent-rgb) / 0.12); }
.tray-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tray-row-title { font: 500 15px/18px var(--font-sans); letter-spacing: -0.24px; color: var(--ink); }
.tray-row-sub { font: 400 12px/15px var(--font-sans); color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tray-row-text .context-bar { margin-top: 3px; }
.tray-row-value { flex: none; font: 500 13px var(--font-sans); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.tray-row-value.hot { color: var(--orange); }
.tray-seg { flex: none; display: flex; padding: 2px; gap: 1px; border-radius: 999px; background: rgb(var(--wash-rgb) / calc(0.07 * var(--wash-k))); }
.tray-seg-btn { min-width: 38px; height: 28px; padding: 0 8px; border-radius: 999px; font: 500 12px var(--font-sans); color: var(--ink-soft); transition: background var(--dur-settle) var(--ease-settle), color var(--dur-settle) var(--ease-settle); }
.tray-seg-btn.on { color: var(--on-accent); background: var(--accent); font-weight: 600; box-shadow: 0 0 12px -2px rgb(var(--accent-rgb) / 0.6); }
.tray-seg-btn:disabled { cursor: default; }

.shortcut-menu-wrap { padding: 0 8px; }
.shortcut-menu { display: flex; flex-direction: column; gap: 2px; padding: 5px; animation: done-in 0.22s var(--ease-settle); }
.shortcut-row { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 10px; text-align: left; min-width: 0; }
.shortcut-row.selected { background: rgb(var(--wash-rgb) / calc(0.07 * var(--wash-k))); }
.shortcut-icon { width: 16px; display: flex; justify-content: center; flex: none; }
.shortcut-token { font: 600 11px var(--font-mono); color: var(--ink-soft); flex: none; }
.shortcut-row.selected .shortcut-token { color: var(--ink); }
.shortcut-title { font: 500 10px var(--font-mono); color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.shortcut-spacer { flex: 1; min-width: 8px; }
.shortcut-detail { font: 500 8px var(--font-mono); color: var(--ink-ghost); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex-shrink: 2; }

/* ── Context usage ── */
.context-bar { display: flex; gap: 1px; width: 100%; border-radius: 999px; overflow: hidden; background: rgb(255 255 255 / 0.065); }
.context-bar i { display: block; height: 100%; }
.context-details { width: 340px; margin: 0 auto; padding: 22px; display: flex; flex-direction: column; gap: 18px; background: rgb(var(--veil-hi-rgb) / min(1, calc(var(--veil-hi-base) + 0.9 * var(--veil-hi-k)))); }
.context-details-head { display: flex; align-items: center; }
.context-details-title { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.context-details-live { font: 600 8px var(--font-mono); letter-spacing: 1px; }
.context-details-big { display: flex; align-items: baseline; gap: 5px; }
.context-big-num { font: 300 34px var(--font-rounded); color: var(--ink); font-variant-numeric: tabular-nums; }
.context-big-of { font-size: 12px; color: var(--ink-faint); }
.context-big-pct { font: 500 20px var(--font-rounded); }
.context-details-lines { display: flex; flex-direction: column; gap: 5px; }
.mono10 { font: 500 10px var(--font-mono); color: var(--ink-soft); }
.faint10 { font-size: 10px; color: var(--ink-faint); line-height: 1.4; }
.context-details-cats { display: flex; flex-direction: column; gap: 11px; font-size: 12px; }
.context-cat { display: flex; align-items: center; gap: 9px; color: var(--ink-soft); }
.context-cat i { width: 7px; height: 7px; border-radius: 2px; }
.context-cat-n { color: var(--ink); font-variant-numeric: tabular-nums; }
.context-remaining { display: flex; justify-content: space-between; color: var(--ink-soft); }
.context-rem-label { font: 600 7px var(--font-mono); letter-spacing: 0.8px; margin-bottom: 4px; }
.context-rem-num { font: 500 17px var(--font-rounded); }

/* ── Sampling tuner ── */
.tuner { width: 300px; margin: 0 auto; padding: 36px 13px 32px; display: flex; flex-direction: column; gap: 11px; }
.tuner-profile { padding: 8px; display: flex; flex-direction: column; gap: 3px; }
.tuner-profile-head { display: flex; align-items: center; gap: 6px; }
.tuner-badge { font: 600 10px var(--font-mono); color: var(--ink); }
.tuner-auto { padding: 2px 5px; border-radius: 999px; background: rgb(var(--accent-rgb) / 0.12); }
.tuner-rationale { font-size: 10px; color: var(--ink-soft); line-height: 1.35; }
.tuner-link { font-size: 10px; color: var(--accent); text-decoration: none; }
.tuner-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.tuner-preset { padding: 5px 0; border-radius: 7px; font: 400 9px var(--font-mono); color: var(--ink-soft); background: rgb(var(--wash-rgb) / calc(0.06 * var(--wash-k))); }
.tuner-preset.on { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.tuner-sliders { display: flex; flex-direction: column; gap: 8px; }
.tuner-slider { display: flex; flex-direction: column; gap: 2px; }
.tuner-slider-head { display: flex; align-items: center; }
.tuner-value { font: 600 9px var(--font-mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.tuner-note { font-size: 10px; color: var(--ink-faint); line-height: 1.35; }
.tuner-footer { display: flex; align-items: center; gap: 10px; }
.tuner-auto-label { font: 500 9px var(--font-mono); color: var(--ink-soft); }
.tuner-reset { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 999px; background: rgb(var(--wash-rgb) / calc(0.06 * var(--wash-k))); font: 600 8px var(--font-mono); color: var(--accent); }

/* ── EmptyChat: design — a breathing orb and three starters ── */
.empty-chat { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 0 20px 12px; overflow: hidden; }
.empty-orb { position: relative; width: 76px; height: 76px; margin-bottom: 8px; flex: none; }
.empty-orb i { position: absolute; inset: 0; border-radius: 50%; }
.empty-orb i:nth-child(1) {
  background:
    radial-gradient(circle at 50% 30%, rgb(255 255 255 / 0.5), transparent 26%),
    radial-gradient(circle at 50% 55%, rgb(var(--accent-rgb) / 0.55), rgb(var(--accent-rgb) / 0.14) 52%, rgb(var(--accent-rgb) / 0.05) 70%);
  box-shadow: inset 0 0 18px rgb(var(--accent-rgb) / 0.45), inset 0 1px 0 rgb(255 255 255 / 0.35), 0 0 36px rgb(var(--accent-rgb) / 0.35);
  -webkit-backdrop-filter: blur(6px) saturate(1.6);
  backdrop-filter: blur(6px) saturate(1.6);
  animation: orb-breathe 3.2s var(--ease-in-out) infinite alternate;
}
.empty-orb i:nth-child(2) { inset: -22px; background: conic-gradient(from 0deg, transparent, rgb(var(--accent-rgb) / 0.35), transparent 40%, rgb(140 87 255 / 0.25), transparent 75%); filter: blur(14px); animation: orb-ring 9s linear infinite; }
.empty-orb i:nth-child(3) { inset: -7px; border: 1px solid transparent; border-top-color: rgb(var(--accent-rgb) / 0.85); border-right-color: rgb(var(--accent-rgb) / 0.2); filter: drop-shadow(0 0 4px rgb(var(--accent-rgb) / 0.8)); animation: orb-ring 5s linear infinite; }
@keyframes orb-breathe { from { transform: scale(0.94); opacity: 0.85; } to { transform: scale(1.04); opacity: 1; } }
@keyframes orb-ring { to { transform: rotate(360deg); } }
.pm-app[data-reduce-motion="true"] .empty-orb i { animation: none; }
.empty-chat-title { font: 300 24px var(--font-rounded); color: var(--ink); letter-spacing: 0.1px; text-align: center; }
.empty-chat-sub { font-size: 15px; color: var(--ink-soft); text-align: center; letter-spacing: -0.24px; margin-top: -6px; }
.empty-chat-connect { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 18px; margin-top: 8px; font-size: 15px; font-weight: 500; color: var(--accent); }
.empty-starters { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 340px; margin-top: 14px; }
.empty-starter {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 16px 8px 9px;
  text-align: left;
  animation: starter-in 0.5s var(--ease-settle) both;
  animation-delay: calc(0.08s * var(--i, 0) + 0.1s);
}
@keyframes starter-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.empty-starter-icon { width: 38px; height: 38px; border-radius: 13px; flex: none; display: grid; place-items: center; background: rgb(var(--accent-rgb) / 0.12); box-shadow: inset 0 0 0 0.5px rgb(var(--accent-rgb) / 0.25); }
.empty-starter-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.empty-starter-title { font: 500 15px/19px var(--font-sans); letter-spacing: -0.24px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty-starter-detail { font: 400 12px/15px var(--font-sans); color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty-chat-memory { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; font-size: 14px; color: var(--ink-faint); }
/* ── Reasoning budget card ── */
.budget-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 15px; background: rgb(var(--veil-lo-rgb) / calc(0.24 * var(--veil-lo-k))); box-shadow: inset 0 0 0 0.8px rgb(var(--orange-rgb) / 0.25); }
.budget-head { display: flex; align-items: flex-start; gap: 8px; }
.budget-text { display: flex; flex-direction: column; gap: 2px; }
.budget-title { font-size: 12px; font-weight: 600; color: var(--ink); }
.budget-body { font-size: 11px; color: var(--ink-soft); line-height: 1.35; }
.budget-actions { display: flex; gap: 8px; }
.budget-btn { flex: 1 1 auto; min-width: 0; height: 30px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; font: 500 9px/1.1 var(--font-mono); color: var(--ink); text-align: center; }
.budget-btn.accent { color: var(--accent); font-weight: 600; padding: 0 11px; }
.budget-btn.soft { color: var(--ink-soft); }
.budget-btn:disabled { opacity: 0.45; }
