/* [project]/apps/web/src/index.css [app-client] (css) */
:root {
  --bg: #faf9f7;
  --bg-app: #faf9f7;
  --bg-panel: #fff;
  --bg-subtle: #f4f2ed;
  --bg-muted: #ece9e2;
  --bg-elevated: #fff;
  --border: #ebe8e1;
  --border-strong: #d8d4cb;
  --border-soft: #f1eee7;
  --text: #1a1916;
  --text-strong: #0d0c0a;
  --text-muted: #74716b;
  --text-soft: #989590;
  --text-faint: #b3b0a8;
  --accent: #c96442;
  --accent-strong: #b45a3b;
  --accent-soft: #f5d8cb;
  --accent-tint: #fbeee5;
  --accent-hover: #b45a3b;
  --green: #1f7a3a;
  --green-bg: #e8f7ee;
  --green-border: #c6ead2;
  --blue: #2348b8;
  --blue-bg: #e8efff;
  --blue-border: #c8d6ff;
  --purple: #6c3aa6;
  --purple-bg: #f3ecf9;
  --purple-border: #e4d4f1;
  --red: #9c2a25;
  --red-bg: #fdecea;
  --red-border: #f5c6c2;
  --amber: #b26200;
  --amber-bg: #fff3e0;
  --shadow-xs: 0 1px 0 #1c1b1a0a;
  --shadow-sm: 0 1px 2px #1c1b1a0d, 0 1px 3px #1c1b1a0a;
  --shadow-md: 0 6px 24px #1c1b1a12, 0 2px 6px #1c1b1a0a;
  --shadow-lg: 0 24px 60px #1c1b1a29, 0 8px 16px #1c1b1a12;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;
  --serif: "Source Serif Pro", "Source Serif 4", "Iowan Old Style", "Apple Garamond", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 13.5px;
  line-height: 1.5;
}

.od-loading-shell {
  min-height: 100vh;
  color: var(--text-muted);
  background: var(--bg-app);
  font: 500 13px/1.4 var(--sans);
  place-items: center;
  display: grid;
}

button {
  font: inherit;
  color: var(--text);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 6px 12px;
  transition: background .12s, border-color .12s, color .12s, box-shadow .12s;
}

button:hover:not(:disabled) {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

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

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 1px 0 #b45a3b2e inset, var(--shadow-xs);
  font-weight: 500;
}

button.primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

button.primary-ghost {
  background: var(--bg-panel);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 500;
}

button.primary-ghost:hover:not(:disabled) {
  background: var(--accent-tint);
}

button.ghost {
  border-color: var(--border);
  color: var(--text);
  background: none;
}

button.ghost:hover:not(:disabled) {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

button.subtle {
  background: var(--bg-subtle);
  color: var(--text);
  border-color: #0000;
}

button.subtle:hover:not(:disabled) {
  background: var(--bg-muted);
}

button.icon-btn {
  padding: 6px 10px;
  font-size: 13px;
}

button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

input, textarea, select {
  font: inherit;
  color: var(--text);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 100%;
  padding: 7px 10px;
  transition: border-color .12s, box-shadow .12s;
}

input::placeholder, textarea::placeholder {
  color: var(--text-faint);
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}

select {
  padding-right: 24px;
}

textarea {
  resize: vertical;
  font-family: inherit;
}

code {
  font-family: var(--mono);
  background: var(--bg-subtle);
  color: var(--text);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: .92em;
}

.app {
  background: var(--bg-app);
  grid-template-rows: auto 1fr;
  height: 100vh;
  display: grid;
}

.app-chrome-header {
  --app-chrome-traffic-space: 0px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-shrink: 0;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 4px 14px;
  display: flex;
}

.app-chrome-traffic-space {
  width: var(--app-chrome-traffic-space);
  flex: 0 0 var(--app-chrome-traffic-space);
}

.app-chrome-brand {
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
  min-width: 0;
  display: inline-flex;
}

.app-chrome-mark {
  background: none;
  border-radius: 0;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 28px;
  height: 28px;
  display: inline-flex;
  overflow: visible;
}

.app-chrome-mark .brand-mark-img {
  object-fit: contain;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  width: 100%;
  height: 100%;
  padding: 0;
  display: block;
}

.app-chrome-name {
  color: var(--text-strong);
  letter-spacing: -.01em;
  white-space: nowrap;
  font-size: 18px;
  font-weight: 650;
}

.app-chrome-back, .settings-icon-btn {
  width: 32px;
  height: 32px;
  color: var(--text-muted);
  background: none;
  border-color: #0000;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  padding: 0;
  display: inline-flex;
}

.app-chrome-back:hover:not(:disabled), .settings-icon-btn:hover:not(:disabled) {
  background: var(--bg-subtle);
  border-color: var(--border);
  color: var(--text);
}

.app-chrome-content {
  align-items: center;
  gap: 10px;
  min-width: 0;
  display: flex;
}

.app-chrome-drag {
  flex: auto;
  align-self: stretch;
  min-width: 24px;
}

.app-chrome-actions {
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  display: inline-flex;
}

.app-project-title {
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  display: flex;
}

.app-project-title .title {
  color: var(--text-strong);
  letter-spacing: -.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13.5px;
  font-weight: 600;
  overflow: hidden;
}

.app-project-title .meta {
  color: var(--text-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11.5px;
  overflow: hidden;
}

.topbar {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  display: flex;
}

.topbar-left {
  flex-direction: row;
  align-items: center;
  gap: 12px;
  min-width: 0;
  display: flex;
}

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

.topbar .title {
  letter-spacing: -.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
}

.topbar .meta {
  color: var(--text-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11.5px;
  overflow: hidden;
}

.topbar-right {
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  display: flex;
}

.topbar .brand-mark {
  width: 30px;
  height: 30px;
  color: var(--accent);
  background: linear-gradient(135deg, #fbeee5 0%, #f5d8cb 100%);
  border-radius: 50%;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  display: inline-flex;
  overflow: hidden;
}

.topbar .brand-mark .brand-mark-img {
  object-fit: contain;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  width: 100%;
  height: 100%;
  padding: 1px;
  display: block;
}

.topbar-left .back-btn {
  color: var(--text-muted);
  background: none;
  border-color: #0000;
  align-self: center;
  padding: 4px 10px;
  font-size: 12px;
}

.topbar-left .back-btn:hover {
  background: var(--bg-subtle);
  color: var(--text);
  border-color: var(--border);
}

.avatar-menu {
  position: relative;
}

.avatar-btn {
  border: 1px solid var(--border);
  background: linear-gradient(135deg, #fbeee5 0%, #f5d8cb 100%);
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  transition: box-shadow .12s, transform .12s;
  display: inline-flex;
  overflow: hidden;
}

.avatar-btn:hover:not(:disabled) {
  border-color: #0000;
  box-shadow: 0 0 0 3px #c2532d2e;
}

.avatar-btn:focus-visible {
  border-color: #0000;
  outline: none;
  box-shadow: 0 0 0 3px #c2532d52;
}

.avatar-btn:active:not(:disabled) {
  transform: scale(.96);
}

.avatar-btn-photo {
  object-fit: cover;
  object-position: 50% 22%;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  width: 100%;
  height: 100%;
  display: block;
}

.avatar-popover {
  z-index: 80;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 280px;
  box-shadow: var(--shadow-lg);
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  display: flex;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
}

.avatar-popover-head {
  border-bottom: 1px solid var(--border-soft);
  flex-direction: column;
  gap: 2px;
  margin-bottom: 4px;
  padding: 10px 10px 8px;
  display: flex;
}

.avatar-popover-head .who {
  font-size: 13px;
  font-weight: 600;
}

.avatar-popover-head .where {
  color: var(--text-muted);
  font-size: 11.5px;
}

.avatar-item {
  text-align: left;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text);
  background: none;
  border: none;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  font-size: 12.5px;
  display: flex;
}

.avatar-item:hover {
  background: var(--bg-subtle);
}

.avatar-item .avatar-item-icon {
  text-align: center;
  width: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.avatar-item .avatar-item-meta {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-left: auto;
  font-size: 11px;
}

.avatar-section-label {
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-faint);
  padding: 8px 10px 4px;
  font-size: 10.5px;
  font-weight: 600;
}

.avatar-model-section {
  border-top: 1px dashed var(--border-soft);
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
  padding: 2px 10px 6px;
  display: flex;
}

.avatar-select-row {
  color: var(--text-muted);
  align-items: center;
  gap: 8px;
  font-size: 12px;
  display: flex;
}

.avatar-select-label {
  flex-shrink: 0;
  min-width: 64px;
}

.avatar-select {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-panel);
  min-width: 0;
  color: var(--text);
  cursor: pointer;
  flex: 1;
  padding: 4px 6px;
  font-size: 12px;
}

.avatar-select:focus {
  outline: 2px solid var(--accent-soft, var(--border-strong));
}

.env-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  min-width: 0;
  max-width: 360px;
  font: inherit;
  color: inherit;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  display: inline-flex;
}

.env-pill:hover {
  background: var(--bg-panel);
  border-color: var(--border-strong);
}

.env-pill-dot {
  background: linear-gradient(135deg, #d97757 0%, #b85a3b 100%);
  border-radius: 50%;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
}

.env-pill-dot[data-mode="api"] {
  background: linear-gradient(135deg, #1c1b1a 0%, #4b4948 100%);
}

.env-pill-label {
  font-size: 12px;
  font-weight: 500;
}

.env-pill-meta {
  color: var(--text-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
  font-size: 12px;
  overflow: hidden;
}

.split {
  grid-template-columns: minmax(380px, 460px) 1fr;
  min-height: 0;
  display: grid;
}

.pane {
  border-right: 1px solid var(--border);
  background: var(--bg-panel);
  flex-direction: column;
  min-height: 0;
  display: flex;
}

.pane:last-child {
  border-right: none;
}

.chat-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  z-index: 4;
  align-items: center;
  gap: 4px;
  height: 44px;
  padding: 8px 12px;
  display: flex;
  position: sticky;
  top: 0;
}

.chat-header-tabs {
  flex: 1;
  gap: 16px;
  display: inline-flex;
}

.chat-header-tab {
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid #0000;
  border-radius: 0;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 500;
}

.chat-header-tab:hover {
  color: var(--text);
  background: none;
  border-color: #0000;
}

.chat-header-tab.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

.chat-header-actions {
  align-items: center;
  gap: 4px;
  display: inline-flex;
}

.chat-header-actions .icon-only {
  width: 28px;
  height: 28px;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  padding: 0;
  display: inline-flex;
}

.chat-header-actions .icon-only:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.chat-log {
  flex-direction: column;
  flex: 1;
  gap: 14px;
  padding: 16px;
  display: flex;
  overflow-y: auto;
}

.msg {
  white-space: normal;
  word-wrap: break-word;
  background: none;
  border: none;
  padding: 0;
}

.msg .role {
  text-transform: none;
  color: var(--text-strong);
  letter-spacing: 0;
  margin-bottom: 4px;
  font-size: 12.5px;
  font-weight: 600;
}

.msg.user .role:before {
  content: "";
}

.msg.user .user-text {
  white-space: pre-wrap;
  color: var(--text);
}

.msg.assistant .prose {
  margin-top: 4px;
}

.msg .artifact-badge {
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  margin-top: 8px;
  padding: 2px 8px;
  font-size: 11px;
  display: inline-block;
}

.msg.error {
  border: 1px solid var(--red-border);
  background: var(--red-bg);
  color: var(--red);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.composer {
  border-top: 1px solid var(--border);
  background: var(--bg-panel);
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  display: flex;
}

.composer-shell {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
  box-shadow: var(--shadow-xs);
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px 6px;
  transition: border-color .12s, box-shadow .12s;
  display: flex;
}

.composer-shell:focus-within {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.composer.drag-active .composer-shell {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.composer textarea {
  resize: vertical;
  background: none;
  border: none;
  min-height: 60px;
  padding: 4px;
}

.composer textarea:focus {
  box-shadow: none;
  outline: none;
}

.composer-input-wrap {
  position: relative;
}

.composer-row {
  align-items: center;
  gap: 6px;
  padding-top: 4px;
  display: flex;
}

.composer-row .icon-btn {
  width: 28px;
  height: 28px;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  padding: 0;
  font-size: 14px;
  display: inline-flex;
}

.composer-row .icon-btn:hover:not(:disabled) {
  background: var(--bg-subtle);
  color: var(--text);
}

.composer-spacer {
  flex: 1;
}

.composer-import {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: none;
  padding: 4px 12px;
  font-size: 12px;
}

.composer-import:hover:not(:disabled) {
  background: var(--bg-subtle);
  color: var(--text);
}

.composer-send {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  font-size: 12.5px;
  font-weight: 500;
  display: inline-flex;
}

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

.composer-send.stop {
  background: var(--text);
  border-color: var(--text);
}

.composer-send.stop:hover {
  background: #000;
  border-color: #000;
}

.composer-hint {
  color: var(--text-faint);
  margin: 0 8px;
  font-size: 11px;
}

.staged-row {
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px 4px 0;
  display: flex;
}

.staged-chip {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 220px;
  box-shadow: var(--shadow-xs);
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 4px;
  font-size: 11.5px;
  display: inline-flex;
}

.staged-chip img {
  object-fit: cover;
  border-radius: 6px;
  width: 28px;
  height: 28px;
}

.staged-icon {
  background: var(--bg-subtle);
  width: 28px;
  height: 28px;
  color: var(--text-muted);
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  display: inline-flex;
}

.staged-name {
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
  color: var(--text);
  overflow: hidden;
}

.staged-remove {
  color: var(--text-faint);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 4px;
  padding: 0 2px;
  font-size: 13px;
  line-height: 1;
}

.staged-remove:hover {
  color: var(--red);
  background: var(--red-bg);
}

.user-attachments {
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  display: flex;
}

.user-attachment {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 240px;
  color: var(--text);
  cursor: default;
  text-align: left;
  font-size: 11.5px;
  font: inherit;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  font-size: 11.5px;
  display: inline-flex;
}

.user-attachment.openable {
  cursor: pointer;
}

.user-attachment.openable:hover {
  background: var(--bg-subtle);
  border-color: var(--accent);
}

.user-attachment img {
  object-fit: cover;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: block;
}

.user-attachment .staged-name {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.mention-popover {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 220px;
  box-shadow: var(--shadow-md);
  z-index: 10;
  margin-bottom: 4px;
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  overflow-y: auto;
}

.mention-item {
  text-align: left;
  background: none;
  border: none;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  font-size: 12px;
  display: flex;
}

.mention-item:hover {
  background: var(--bg-subtle);
  border-color: #0000;
}

.mention-item code {
  text-overflow: ellipsis;
  white-space: nowrap;
  background: none;
  flex: 1;
  padding: 0;
  font-size: 11px;
  overflow: hidden;
}

.mention-meta {
  color: var(--text-muted);
  flex-shrink: 0;
  font-size: 10px;
}

.modal-backdrop {
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  background: #1c1b1a6b;
  justify-content: center;
  align-items: center;
  animation: .16s ease-out fade-in;
  display: flex;
  position: fixed;
  inset: 0;
}

.modal {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  width: 520px;
  max-width: calc(100vw - 32px);
  box-shadow: var(--shadow-lg);
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  animation: .22s cubic-bezier(.21, 1.02, .73, 1) pop-in;
  display: flex;
}

.modal h2 {
  letter-spacing: -.01em;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.modal label {
  color: var(--text-muted);
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  display: flex;
}

.modal .hint {
  color: var(--text-muted);
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
}

.modal .row {
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
  display: flex;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(6px)scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0)scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: .6;
    transform: scale(.85);
  }
}

.modal-settings {
  --modal-padding: 24px;
  gap: 0;
  width: min(920px, 100vw - 48px);
  max-height: calc(100vh - 64px);
  padding: 0;
}

@media (max-height: 600px) {
  .modal-settings {
    max-height: 90vh;
  }
}

.modal-settings .modal-body {
  border-top: 1px solid var(--border);
  flex: 1;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  display: grid;
  overflow-y: auto;
}

.modal-head {
  padding: var(--modal-padding);
  flex-direction: column;
  flex-shrink: 0;
  gap: 4px;
  display: flex;
}

.modal-head .kicker {
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
}

.modal-head h2 {
  letter-spacing: -.015em;
  color: var(--text);
  font-size: 22px;
  font-weight: 600;
}

.modal-head .subtitle {
  color: var(--text-muted);
  max-width: 50ch;
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.55;
}

.modal-foot {
  padding: 12px var(--modal-padding);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 0;
  display: flex;
}

.settings-sidebar {
  background: var(--bg-subtle);
  border-right: 1px solid var(--border);
  flex-direction: column;
  gap: 8px;
  padding: 22px 12px;
  display: flex;
}

.settings-nav-item {
  width: 100%;
  color: var(--text-muted);
  text-align: left;
  cursor: pointer;
  background: none;
  border: 1px solid #0000;
  border-radius: 12px;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  display: grid;
}

.settings-nav-item:hover {
  background: color-mix(in srgb, var(--bg-panel) 72%, transparent);
  color: var(--text);
}

.settings-nav-item.active {
  background: var(--bg-panel);
  border-color: color-mix(in srgb, var(--accent) 62%, var(--border));
  color: var(--text);
  box-shadow: var(--shadow-xs);
}

.settings-nav-item svg {
  justify-self: center;
}

.settings-nav-item span {
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  display: flex;
}

.settings-nav-item strong {
  color: currentColor;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
}

.settings-nav-item small {
  color: var(--text-muted);
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.25;
}

.settings-content {
  min-width: 0;
  padding: 22px var(--modal-padding);
  flex-direction: column;
  gap: 18px;
  display: flex;
  overflow: auto;
}

@media (max-width: 760px) {
  .modal-settings {
    width: min(560px, 100vw - 24px);
  }

  .modal-settings .modal-body {
    grid-template-columns: 1fr;
  }

  .settings-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    flex-direction: row;
    padding: 10px 12px;
    overflow-x: auto;
  }

  .settings-nav-item {
    min-width: 150px;
  }
}

.seg-control {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  display: grid;
}

.seg-btn {
  cursor: pointer;
  text-align: left;
  background: none;
  border: 1px solid #0000;
  border-radius: 10px;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 14px;
  display: flex;
}

.seg-btn:hover:not(:disabled):not(.active) {
  background: #ffffff80;
}

.seg-btn.active {
  background: var(--bg-panel);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.seg-btn .seg-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.seg-btn .seg-meta {
  color: var(--text-muted);
  letter-spacing: .01em;
  font-size: 11px;
}

.seg-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.settings-section {
  flex-direction: column;
  gap: 12px;
  display: flex;
}

.settings-about-list {
  flex-direction: column;
  gap: 8px;
  margin: 0;
  display: flex;
}

.settings-about-list > div {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  justify-content: space-between;
  gap: 16px;
  padding: 12px;
  display: flex;
}

.settings-about-list dt {
  color: var(--text-muted);
  font-size: 12px;
}

.settings-about-list dd {
  color: var(--text);
  text-align: right;
  overflow-wrap: anywhere;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.media-provider-list {
  flex-direction: column;
  gap: 10px;
  display: flex;
}

.media-provider-row {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  display: flex;
}

.media-provider-row.pending {
  background: var(--bg-subtle);
  border-style: dashed;
}

.media-provider-head {
  justify-content: space-between;
  gap: 10px;
  display: flex;
}

.media-provider-meta {
  flex-direction: column;
  gap: 2px;
  display: flex;
}

.media-provider-name {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.media-provider-hint {
  color: var(--text-muted);
  font-size: 11px;
}

.media-provider-badge {
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  align-self: flex-start;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 600;
}

.media-provider-badges {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  display: flex;
}

.media-provider-badge.integrated {
  color: #137a3d;
  border-color: color-mix(in srgb, #1f9d55 28%, var(--border));
  background: #1f9d551a;
}

.media-provider-badge.unsupported {
  color: var(--text-soft);
  background: var(--bg-subtle);
  border-color: var(--border);
}

.media-provider-badge.on {
  color: #3155c9;
  border-color: color-mix(in srgb, #4169e1 28%, var(--border));
  background: #4169e11a;
}

.media-provider-body {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 6px;
  display: grid;
}

.section-head {
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  display: flex;
}

.section-head h3 {
  letter-spacing: .01em;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.section-head .hint {
  margin-top: 2px;
}

.field {
  flex-direction: column;
  gap: 4px;
  display: flex;
}

.field-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
}

.field-row {
  align-items: stretch;
  gap: 6px;
  display: flex;
}

.field-row input {
  flex: 1;
}

.field-row .icon-btn {
  white-space: nowrap;
  padding: 6px 12px;
}

.settings-language-picker {
  position: relative;
}

.settings-language-button {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 100%;
  color: var(--text);
  text-align: left;
  box-shadow: none;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  display: grid;
}

.settings-language-button:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.settings-language-button[aria-expanded="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.settings-language-icon {
  background: linear-gradient(135deg, #fff 0%, var(--bg-subtle) 100%);
  border: 1px solid var(--border);
  width: 42px;
  height: 42px;
  color: var(--accent);
  border-radius: 12px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  display: inline-flex;
}

.settings-language-text, .settings-language-option > span:first-child {
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  display: flex;
}

.settings-language-title, .settings-language-option-title {
  color: var(--text);
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 600;
}

.settings-language-code, .settings-language-option-code {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  font-size: 11px;
}

.settings-language-menu {
  z-index: 1000;
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  flex-direction: column;
  gap: 2px;
  max-width: calc(100vw - 24px);
  padding: 4px;
  display: flex;
  position: fixed;
  box-shadow: 0 14px 30px #00000024;
}

.settings-language-option {
  text-align: left;
  width: 100%;
  color: var(--text);
  background: none;
  border: 0;
  border-radius: 9px;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  display: grid;
}

.settings-language-option:hover, .settings-language-option.active {
  background: var(--bg-subtle);
}

.settings-language-option.active {
  color: var(--accent);
}

.empty-card {
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 16px;
  font-size: 12px;
}

.agent-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  display: grid;
}

.agent-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  transition: border-color .12s, transform .12s, box-shadow .12s, background .12s;
  display: flex;
  position: relative;
}

.agent-card:hover:not(.disabled) {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.agent-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: linear-gradient(#fff 0%, #fff7f3 100%);
}

.agent-card.disabled {
  cursor: not-allowed;
  opacity: .55;
  background: var(--bg-subtle);
}

.agent-card-body {
  flex-direction: column;
  flex: 1;
  min-width: 0;
  display: flex;
}

.agent-card-name {
  color: var(--text);
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
}

.agent-card-meta {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px;
  overflow: hidden;
}

.agent-card-meta .muted {
  color: var(--text-soft);
  font-style: italic;
}

.agent-model-row {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  display: flex;
}

.agent-model-row .field {
  gap: 4px;
}

.agent-model-row .field-label {
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  font-size: 11.5px;
}

.agent-model-row .hint {
  margin: 0;
  font-size: 11.5px;
}

.status-dot {
  background: #cbd5e1;
  border-radius: 50%;
  flex-shrink: 0;
  width: 8px;
  height: 8px;
}

.status-dot.active {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.agent-icon {
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  display: inline-flex;
  box-shadow: inset 0 0 0 1px #ffffff0f, 0 1px 2px #00000014;
}

.error {
  border-color: var(--red-border);
  background: var(--red-bg);
  color: var(--red);
}

.activity {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  margin: 4px 0 8px;
  padding: 8px 10px;
}

.activity-header {
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  display: flex;
}

.activity-header .dot {
  background: var(--text-muted);
  border-radius: 50%;
  flex: none;
  width: 8px;
  height: 8px;
}

.activity-header .dot[data-active="true"] {
  background: var(--accent);
  animation: 1.2s ease-in-out infinite pulse;
}

.activity-title {
  font-weight: 500;
}

.activity-stats {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-left: auto;
  font-size: 11px;
}

.activity-list {
  flex-direction: column;
  gap: 4px;
  max-height: 280px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  overflow-y: auto;
}

.activity-item {
  align-items: flex-start;
  gap: 8px;
  padding: 2px 0;
  font-size: 12px;
  line-height: 1.4;
  display: flex;
}

.activity-item .badge {
  letter-spacing: .02em;
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border);
  text-align: center;
  border-radius: 4px;
  flex: none;
  min-width: 56px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 500;
  display: inline-block;
}

.activity-item .badge-tool {
  background: var(--blue-bg);
  border-color: var(--blue-border);
  color: var(--blue);
}

.activity-item .badge-result {
  background: var(--green-bg);
  border-color: var(--green-border);
  color: var(--green);
}

.activity-item .badge-error, .activity-item .badge-result.badge-error {
  background: var(--red-bg);
  border-color: var(--red-border);
  color: var(--red);
}

.activity-item .badge-thinking {
  background: var(--purple-bg);
  border-color: var(--purple-border);
  color: var(--purple);
}

.activity-item .badge-status {
  background: var(--bg-panel);
}

.activity-item .badge-text {
  border-color: var(--border);
  background: none;
}

.activity-item .badge-usage {
  background: var(--bg-panel);
  color: var(--text-muted);
}

.activity-item .detail {
  overflow-wrap: break-word;
  word-break: break-word;
  flex: 1;
  min-width: 0;
}

.activity-item .detail.muted {
  color: var(--text-muted);
}

.activity-item .thinking-text {
  color: var(--text-muted);
  font-style: italic;
}

.activity-waiting {
  color: var(--text-muted);
  font-size: 11px;
  font-style: italic;
}

.entry-shell {
  background: var(--bg);
  grid-template-rows: auto 1fr;
  height: 100vh;
  min-height: 0;
  display: grid;
}

.entry {
  background: var(--bg);
  grid-template-columns: 380px 1fr;
  height: 100%;
  min-height: 0;
  display: grid;
}

.entry-side {
  border-right: 1px solid var(--border);
  background: var(--bg-panel);
  flex-direction: column;
  gap: 20px;
  padding: 28px 24px 20px;
  display: flex;
  overflow-y: auto;
}

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

.entry-brand-mark {
  width: 44px;
  height: 44px;
  color: var(--accent);
  background: linear-gradient(135deg, #fbeee5 0%, #f5d8cb 100%);
  border-radius: 50%;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  display: inline-flex;
  overflow: hidden;
}

.entry-brand-mark .brand-mark-img {
  object-fit: contain;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  width: 100%;
  height: 100%;
  padding: 2px;
  display: block;
}

.entry-brand-text {
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  display: flex;
}

.entry-brand-title-row {
  align-items: center;
  gap: 8px;
  display: flex;
}

.entry-brand-title {
  font-family: var(--serif);
  letter-spacing: -.015em;
  color: var(--text-strong);
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
}

.entry-brand-pill {
  letter-spacing: .02em;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 2px 8px;
  font-size: 10.5px;
}

.entry-brand-subtitle {
  color: var(--text-muted);
  letter-spacing: .01em;
  font-size: 11.5px;
}

.newproj {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
  box-shadow: var(--shadow-xs);
  flex-direction: column;
  display: flex;
}

.newproj-tabs-shell {
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.newproj-tabs {
  scroll-behavior: smooth;
  scrollbar-width: none;
  gap: 2px;
  padding: 4px 4px 0;
  display: flex;
  overflow: auto hidden;
}

.newproj-tabs::-webkit-scrollbar {
  display: none;
}

.newproj-tabs-shell:before, .newproj-tabs-shell:after {
  content: "";
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  width: 28px;
  transition: opacity .12s;
  position: absolute;
  top: 0;
  bottom: 0;
}

.newproj-tabs-shell:before {
  background: linear-gradient(90deg, var(--bg-panel), transparent);
  left: 0;
}

.newproj-tabs-shell:after {
  background: linear-gradient(270deg, var(--bg-panel), transparent);
  right: 0;
}

.newproj-tabs-shell.can-left:before, .newproj-tabs-shell.can-right:after {
  opacity: 1;
}

.newproj-tabs-arrow {
  z-index: 2;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  width: 28px;
  height: 28px;
  color: var(--text-strong);
  box-shadow: var(--shadow-xs);
  border-radius: 999px;
  justify-content: center;
  align-items: center;
  padding: 0;
  transition: opacity .12s, transform .12s;
  display: inline-flex;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.newproj-tabs-arrow:hover {
  border-color: var(--border-strong);
  background: var(--bg-subtle);
}

.newproj-tabs-arrow svg {
  flex: none;
  display: block;
}

.newproj-tabs-arrow.left {
  left: 6px;
}

.newproj-tabs-arrow.right {
  right: 6px;
}

.newproj-tabs-arrow.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%)scale(.92);
}

.newproj-tab {
  min-width: max-content;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid #0000;
  border-radius: 6px 6px 0 0;
  flex: none;
  padding: 10px 6px;
  font-size: 12px;
  font-weight: 500;
}

.newproj-tab:hover:not(:disabled) {
  background: var(--bg-subtle);
  color: var(--text);
}

.newproj-tab.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

.newproj-body {
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  display: flex;
}

.newproj-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.newproj-name {
  width: 100%;
}

.newproj-section {
  flex-direction: column;
  gap: 6px;
  display: flex;
}

.newproj-label {
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 500;
}

.newproj-media-options {
  flex-direction: column;
  gap: 14px;
  display: flex;
}

.newproj-media-field, .newproj-media-options .newproj-label {
  flex-direction: column;
  gap: 6px;
  display: flex;
}

.newproj-model-groups {
  flex-direction: column;
  gap: 12px;
  display: flex;
}

.newproj-model-group {
  flex-direction: column;
  gap: 8px;
  display: flex;
}

.newproj-provider-row {
  color: var(--text-muted);
  letter-spacing: .11em;
  text-transform: uppercase;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
}

.newproj-provider-badge {
  letter-spacing: .08em;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10px;
}

.newproj-provider-badge.configured {
  color: #3155c9;
  background: #4169e11a;
  border: 1px solid #4169e13d;
}

.newproj-provider-badge.integrated {
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: color-mix(in srgb, var(--accent) 78%, var(--text-strong));
}

.newproj-provider-badge.unsupported {
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.newproj-model-grid, .newproj-option-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  display: grid;
}

.newproj-option-grid.aspect-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.newproj-option-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
}

.newproj-card {
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-strong);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  text-align: left;
  border-radius: 10px;
  transition: border-color .14s, background .14s, box-shadow .14s;
}

.newproj-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-subtle);
}

.newproj-card.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--bg-panel));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 26%, transparent);
}

.newproj-model-card {
  flex-direction: column;
  gap: 5px;
  min-height: 74px;
  padding: 12px;
  display: flex;
}

.newproj-model-name {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.newproj-model-hint {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.newproj-option-card {
  text-align: center;
  min-height: 62px;
  color: var(--text-muted);
  justify-content: center;
  align-items: center;
  gap: 7px;
  padding: 10px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
}

.newproj-option-card small {
  color: var(--text-muted);
  font-size: 11px;
}

.aspect-copy {
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1.15;
  display: flex;
}

.aspect-copy strong {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 650;
}

.aspect-copy small {
  color: var(--text-muted);
  font-size: 12px;
}

.aspect-glyph {
  background: var(--bg-subtle);
  width: 34px;
  height: 24px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border) 80%, transparent);
  border-radius: 4px;
  flex: none;
}

.aspect-1-1 {
  width: 26px;
  height: 26px;
}

.aspect-16-9 {
  width: 36px;
  height: 20px;
}

.aspect-9-16 {
  width: 20px;
  height: 36px;
}

.aspect-4-3 {
  width: 32px;
  height: 24px;
}

.aspect-3-4 {
  width: 24px;
  height: 32px;
}

@media (max-width: 560px) {
  .newproj-model-grid, .newproj-option-grid, .newproj-option-grid.aspect-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.newproj-skills {
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  padding-right: 4px;
  display: flex;
  overflow-y: auto;
}

.skill-radio {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--bg-panel);
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  display: flex;
}

.skill-radio:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.skill-radio.active {
  border-color: var(--accent);
  background: var(--accent-tint);
}

.skill-radio input {
  width: auto;
  margin-top: 2px;
}

.skill-radio-body {
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  display: flex;
}

.skill-radio-name {
  font-size: 13px;
  font-weight: 500;
}

.skill-radio-desc {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.4;
}

.newproj-empty {
  color: var(--text-muted);
  padding: 8px 0;
  font-size: 12px;
  font-style: italic;
}

.video-body, .audio-body {
  background: var(--bg-subtle);
  flex: 1;
  justify-content: center;
  align-items: center;
  min-height: 0;
  padding: 24px;
  display: flex;
}

.video-body video {
  border-radius: var(--radius-sm);
  background: #000;
  max-width: 100%;
  max-height: 100%;
}

.audio-card {
  width: min(100%, 480px);
  color: var(--text-muted);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 32px;
  display: flex;
}

.audio-card-name {
  color: var(--text);
  text-align: center;
  word-break: break-word;
  font-size: 13px;
  font-weight: 500;
}

.audio-card audio {
  width: 100%;
}

.newproj-create {
  border-radius: var(--radius-sm);
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
  padding: 11px;
  font-size: 13px;
  display: inline-flex;
}

.newproj-import {
  border-radius: var(--radius-sm);
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  font-size: 12.5px;
  display: inline-flex;
}

.newproj-create svg, .newproj-import svg {
  flex: none;
  display: block;
}

.newproj-footer {
  color: var(--text-muted);
  text-align: center;
  padding: 0 18px 16px;
  font-size: 11px;
}

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

.fidelity-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px 10px 12px;
  transition: border-color .12s, box-shadow .12s, background .12s;
  display: flex;
  position: relative;
}

.fidelity-card:hover {
  border-color: var(--border-strong);
}

.fidelity-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent),
    0 1px 0 #b45a3b0a;
}

.fidelity-thumb {
  aspect-ratio: 12 / 7;
  background: var(--bg-subtle);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  width: 100%;
  display: block;
  overflow: hidden;
}

.fidelity-thumb-wireframe {
  background: #fbfaf6;
}

.fidelity-thumb-high-fidelity {
  background: var(--bg-panel);
}

.fidelity-card.active .fidelity-thumb {
  border-color: var(--accent-soft);
}

.fidelity-label {
  text-align: center;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
}

.toggle-row {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  transition: border-color .12s, background .12s;
  display: flex;
}

.toggle-row:hover {
  border-color: var(--border-strong);
}

.toggle-row.on {
  border-color: var(--accent);
  background: var(--accent-tint);
}

.toggle-row-text {
  flex-direction: column;
  flex: 1;
  gap: 2px;
  min-width: 0;
  display: flex;
}

.toggle-row-label {
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

.toggle-row-hint {
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.toggle-row-switch {
  background: var(--border-strong);
  border-radius: 999px;
  flex: none;
  width: 32px;
  height: 18px;
  transition: background .16s;
  position: relative;
}

.toggle-row-switch:after {
  content: "";
  background: #fff;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  transition: transform .16s cubic-bezier(.2, 0, .2, 1);
  position: absolute;
  top: 2px;
  left: 2px;
  box-shadow: 0 1px 2px #1c1b1a2e;
}

.toggle-row.on .toggle-row-switch {
  background: var(--accent);
}

.toggle-row.on .toggle-row-switch:after {
  transform: translateX(14px);
}

.template-list {
  flex-direction: column;
  gap: 6px;
  display: flex;
}

.template-option {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  transition: border-color .12s, background .12s;
  display: flex;
}

.template-option:hover {
  border-color: var(--border-strong);
}

.template-option.active {
  border-color: var(--accent);
  background: var(--accent-tint);
}

.template-radio {
  border: 1.5px solid var(--border-strong);
  background: var(--bg-panel);
  border-radius: 50%;
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 2px;
  position: relative;
}

.template-radio.active {
  border-color: var(--accent);
  background: var(--bg-panel);
}

.template-radio.active:after {
  content: "";
  background: var(--accent);
  border-radius: 50%;
  position: absolute;
  inset: 2px;
}

.template-option-text {
  flex-direction: column;
  flex: 1;
  gap: 2px;
  min-width: 0;
  display: flex;
}

.template-option-name {
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

.template-option-desc {
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.template-howto {
  background: var(--bg-subtle);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  display: flex;
}

.template-howto-title {
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
}

.template-howto-body {
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.ds-picker {
  position: relative;
}

.ds-picker-trigger {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  transition: border-color .12s, box-shadow .12s;
  display: flex;
}

.ds-picker-trigger:hover {
  border-color: var(--border-strong);
}

.ds-picker-trigger.open {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.ds-picker-meta {
  flex-direction: column;
  flex: 1;
  gap: 1px;
  min-width: 0;
  display: flex;
}

.ds-picker-title {
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  overflow: hidden;
}

.ds-picker-extra-pill {
  letter-spacing: .04em;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
}

.ds-picker-sub {
  color: var(--text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  overflow: hidden;
}

.ds-picker-chevron {
  color: var(--text-muted);
  flex: none;
  transition: transform .16s;
}

.ds-picker-trigger.empty .ds-picker-title {
  color: var(--text-muted);
  font-weight: 500;
}

.ds-avatar {
  border: 1px solid var(--border);
  background: var(--bg-panel);
  border-radius: 6px;
  flex: none;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  display: inline-flex;
  position: relative;
  overflow: hidden;
}

.ds-avatar-grid {
  grid-template-rows: 1fr 1fr;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  height: 100%;
  display: grid;
}

.ds-avatar-cell {
  display: block;
}

.ds-avatar-stack {
  letter-spacing: .02em;
  background: var(--text-strong);
  color: #fff;
  border: 2px solid var(--bg-panel);
  border-radius: 999px;
  padding: 1px 5px;
  font-size: 9px;
  font-weight: 600;
  position: absolute;
  bottom: -2px;
  right: -2px;
}

.ds-avatar-none {
  background: var(--bg-subtle);
  color: var(--text-faint);
}

.ds-picker-popover {
  z-index: 30;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  flex-direction: column;
  animation: .14s cubic-bezier(.2, 0, .2, 1) ds-pop-in;
  display: flex;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  overflow: hidden;
}

@keyframes ds-pop-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ds-picker-head {
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  align-items: center;
  gap: 8px;
  padding: 8px;
  display: flex;
}

.ds-picker-search {
  background: var(--bg-panel);
  flex: 1;
  font-size: 12.5px;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  padding: 6px 10px !important;
}

.ds-picker-mode {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  flex: none;
  padding: 2px;
  display: inline-flex;
}

.ds-picker-mode-btn {
  font-weight: 500;
  color: var(--text-muted) !important;
  box-shadow: none !important;
  background: none !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 3px 10px !important;
  font-size: 11px !important;
}

.ds-picker-mode-btn.active {
  background: var(--accent) !important;
  color: #fff !important;
}

.ds-picker-list {
  flex-direction: column;
  max-height: 320px;
  padding: 4px;
  display: flex;
  overflow-y: auto;
}

.ds-picker-empty {
  color: var(--text-muted);
  text-align: center;
  padding: 16px 12px;
  font-size: 12px;
}

.ds-picker-item {
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  background: none;
  border: 1px solid #0000;
  align-items: center;
  gap: 10px;
  padding: 8px;
  display: flex;
}

.ds-picker-item:hover {
  background: var(--bg-subtle);
}

.ds-picker-item.active {
  background: var(--accent-tint);
  border-color: var(--accent-soft);
}

.ds-picker-item-text {
  flex-direction: column;
  flex: 1;
  gap: 1px;
  min-width: 0;
  display: flex;
}

.ds-picker-item-title {
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  display: inline-flex;
  overflow: hidden;
}

.ds-picker-item-badge {
  letter-spacing: .06em;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 9px;
  font-weight: 600;
}

.ds-picker-item-sub {
  color: var(--text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  overflow: hidden;
}

.ds-picker-mark {
  color: #0000;
  flex: none;
  justify-content: center;
  align-items: center;
  width: 18px;
  height: 18px;
  font-size: 10px;
  font-weight: 600;
  display: inline-flex;
}

.ds-picker-mark.radio {
  border: 1.5px solid var(--border-strong);
  background: var(--bg-panel);
  border-radius: 50%;
  position: relative;
}

.ds-picker-mark.radio.active {
  border-color: var(--accent);
}

.ds-picker-mark.radio.active:after {
  content: "";
  background: var(--accent);
  border-radius: 50%;
  width: 9px;
  height: 9px;
}

.ds-picker-mark.check {
  border: 1.5px solid var(--border-strong);
  background: var(--bg-panel);
  color: var(--bg-panel);
  border-radius: 4px;
}

.ds-picker-mark.check.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.ds-picker-foot {
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-muted);
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 11.5px;
  line-height: 1.4;
  display: flex;
}

.ds-picker-foot-text {
  flex: 1;
  min-width: 0;
}

.ds-picker-foot-text strong {
  color: var(--text);
  font-weight: 600;
}

.ds-picker-clear {
  flex: none;
  background: var(--bg-panel) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
  padding: 4px 10px !important;
  font-size: 11px !important;
}

.ds-picker-clear:hover {
  border-color: var(--border-strong) !important;
}

.entry-side-foot {
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
  padding-top: 16px;
  display: flex;
}

.entry-side-foot .foot-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  cursor: pointer;
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 11.5px;
  text-decoration: none;
  display: inline-flex;
}

.entry-side-foot .foot-pill:hover {
  background: var(--bg-panel);
  border-color: var(--border-strong);
  color: var(--text);
}

.entry-side-foot .foot-pill .ico {
  opacity: .7;
  font-size: 12px;
}

.lang-menu-wrap {
  align-self: flex-start;
  position: relative;
}

.lang-menu-wrap .lang-pill {
  font-variant-numeric: tabular-nums;
}

.lang-menu-popover {
  z-index: 50;
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  flex-direction: column;
  width: max-content;
  min-width: 180px;
  max-width: min(280px, 100vw - 48px);
  padding: 4px;
  display: flex;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  box-shadow: 0 12px 28px #0000001f;
}

.lang-menu-item {
  color: var(--text);
  text-align: left;
  cursor: pointer;
  background: none;
  border: 0;
  border-radius: 7px;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  font-size: 12.5px;
  display: grid;
}

.lang-menu-label {
  overflow-wrap: anywhere;
  min-width: 0;
}

.lang-menu-item:hover, .lang-menu-item.active {
  background: var(--bg-subtle);
}

.lang-menu-item .lang-menu-code {
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  font-size: 11px;
}

.lang-menu-item .lang-menu-check {
  color: var(--text-muted);
  align-items: center;
  display: inline-flex;
}

.entry-main {
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  display: flex;
}

.entry-header {
  border-bottom: 1px solid var(--border);
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-width: 0;
  min-height: 52px;
  padding: 0 28px;
  display: flex;
}

.entry-header-tabs-row {
  align-items: center;
  gap: 24px;
  display: flex;
}

.entry-tabs {
  scrollbar-width: none;
  gap: 2px;
  min-width: 0;
  display: flex;
  overflow: auto hidden;
}

.entry-tabs::-webkit-scrollbar {
  display: none;
}

.entry-tab {
  color: var(--text-muted);
  white-space: nowrap;
  background: none;
  border: none;
  border-bottom: 2px solid #0000;
  border-radius: 6px 6px 0 0;
  flex: none;
  padding: 14px 11px;
  font-size: 14px;
  font-weight: 500;
}

.entry-tab:hover:not(:disabled) {
  background: var(--bg-subtle);
  color: var(--text);
}

.entry-tab.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

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

.entry-tab-content {
  background: var(--bg);
  flex: 1;
  min-height: 0;
  padding: 22px 28px 32px;
  overflow-y: auto;
}

.tab-panel {
  flex-direction: column;
  gap: 18px;
  display: flex;
}

.tab-panel-toolbar {
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  display: flex;
}

.tab-panel-toolbar .toolbar-left, .tab-panel-toolbar .toolbar-right {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  display: flex;
}

.tab-panel-toolbar .toolbar-search {
  flex: 240px;
  width: min(280px, 100%);
  max-width: 100%;
  position: relative;
}

.tab-panel-toolbar .toolbar-search input {
  background: var(--bg-panel);
  padding-left: 30px;
}

.tab-panel-toolbar .toolbar-search .search-icon {
  color: var(--text-faint);
  pointer-events: none;
  font-size: 13px;
  position: absolute;
  top: 50%;
  left: 9px;
  transform: translateY(-50%);
}

.tab-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 0;
  font-size: 13px;
}

.subtab-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  scrollbar-width: none;
  gap: 2px;
  max-width: 100%;
  padding: 3px;
  display: inline-flex;
  overflow-x: auto;
}

.subtab-pill::-webkit-scrollbar {
  display: none;
}

.subtab-pill button {
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  white-space: nowrap;
  background: none;
  border: none;
  padding: 5px 16px;
  font-size: 12px;
  font-weight: 500;
}

.subtab-pill button:hover:not(.active) {
  color: var(--text);
  background: #fff9;
  border-color: #0000;
}

.subtab-pill button.active {
  background: var(--text);
  color: #fff;
  box-shadow: var(--shadow-xs);
}

.subtab-pill button:has( > svg:only-child) {
  justify-content: center;
  align-items: center;
  padding: 5px 8px;
  line-height: 0;
  display: inline-flex;
}

.design-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  display: grid;
}

.design-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  flex-direction: column;
  min-height: 168px;
  padding: 0;
  transition: border-color .12s, box-shadow .12s, transform .12s;
  display: flex;
  position: relative;
  overflow: hidden;
}

.design-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.design-card-thumb {
  background: var(--bg-subtle);
  min-height: 100px;
  color: var(--text-faint);
  flex: 1;
  justify-content: center;
  align-items: center;
  font-size: 38px;
  display: flex;
  position: relative;
}

.design-card-thumb:before {
  content: "";
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  width: 56px;
  height: 44px;
  box-shadow: var(--shadow-xs);
  border-radius: 4px 6px 6px;
  position: relative;
}

.design-card-thumb:after {
  content: "";
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  width: 22px;
  height: 8px;
  margin-top: -52px;
  margin-left: -26px;
  position: absolute;
}

.design-card-meta-block {
  border-top: 1px solid var(--border-soft);
  background: var(--bg-panel);
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px 12px;
  display: flex;
}

.design-card-name {
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
}

.design-card-meta {
  color: var(--text-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11.5px;
  overflow: hidden;
}

.design-card-meta .ds {
  color: var(--accent);
}

.design-card-status {
  font-weight: 500;
}

.design-card-status-running {
  color: var(--accent);
}

.design-card-status-awaiting_input {
  color: var(--amber);
}

.design-card-status-queued, .design-card-status-not_started, .design-card-status-canceled {
  color: var(--text-muted);
}

.design-card-status-succeeded {
  color: var(--green);
}

.design-card-status-failed {
  color: var(--red);
}

.design-card-close {
  background: var(--bg-panel);
  opacity: 0;
  border-color: var(--border);
  z-index: 2;
  width: 22px;
  height: 22px;
  color: var(--text-muted);
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  transition: opacity .15s;
  display: inline-flex;
  position: absolute;
  top: 8px;
  right: 8px;
}

.design-card:hover .design-card-close, .design-card:focus-within .design-card-close, .design-kanban-card:hover .design-card-close, .design-kanban-card:focus-within .design-card-close, .design-card-close:focus-visible {
  opacity: 1;
}

.design-card-close:hover {
  color: var(--text-strong);
  border-color: var(--border-strong);
}

@media (hover: none) {
  .design-card .design-card-close, .design-kanban-card .design-card-close {
    opacity: 1;
  }
}

.design-card.featured .design-card-thumb {
  background: linear-gradient(#e8efff 0%, #d8e3ff 100%);
}

.design-card.featured .design-card-thumb:before {
  background: var(--bg-panel);
  border-color: #2348b82e;
}

.design-card.featured .design-card-thumb:after {
  display: none;
}

.design-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--border-strong);
}

.tab-panel.design-kanban-view {
  flex: auto;
  height: 100%;
  min-height: 0;
}

.design-kanban-board {
  scroll-snap-type: x proximity;
  scrollbar-gutter: stable;
  flex: auto;
  gap: 14px;
  min-height: 0;
  padding-bottom: 8px;
  display: flex;
  overflow-x: auto;
}

.design-kanban-col {
  background: var(--bg-subtle);
  border-radius: var(--radius);
  scroll-snap-align: start;
  flex-direction: column;
  flex-shrink: 0;
  gap: 12px;
  width: 280px;
  min-height: 0;
  padding: 12px;
  display: flex;
}

.design-kanban-header {
  color: var(--text-strong);
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-left: 2px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
}

.design-kanban-header > span:first-child {
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
  overflow: hidden;
}

.design-kanban-count {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  padding: 2px 8px;
  font-size: 11px;
}

.design-kanban-list {
  flex-direction: column;
  flex: auto;
  gap: 8px;
  min-height: 0;
  margin-right: -4px;
  padding-right: 4px;
  display: flex;
  overflow-y: auto;
}

.design-kanban-empty {
  color: var(--text-faint);
  text-align: center;
  padding: 20px 0;
  font-size: 13px;
}

.design-kanban-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  display: flex;
  position: relative;
}

.design-kanban-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.design-kanban-card:active {
  transform: none;
}

.design-kanban-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--border-strong);
}

.design-kanban-card:before {
  content: "";
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--text-muted);
  width: 3px;
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: -1px;
}

.design-kanban-card.status-running:before {
  background: var(--accent);
}

.design-kanban-card.status-awaiting_input:before {
  background: var(--amber);
}

.design-kanban-card.status-succeeded:before {
  background: var(--green);
}

.design-kanban-card.status-failed:before {
  background: var(--red);
}

.design-kanban-card.status-not_started:before, .design-kanban-card.status-queued:before, .design-kanban-card.status-canceled:before {
  background: var(--text-muted);
}

.design-kanban-card-name {
  color: var(--text-strong);
  white-space: nowrap;
  text-overflow: ellipsis;
  padding-right: 20px;
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
}

.design-kanban-card-meta {
  color: var(--text-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  overflow: hidden;
}

.design-kanban-card-meta .ds {
  color: var(--text-strong);
  font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
  .design-card, .design-kanban-card {
    transition: none;
  }

  .design-card:hover, .design-kanban-card:hover {
    transform: none;
  }
}

.examples-panel {
  gap: 32px;
}

.example-card {
  grid-template-columns: 2fr 1fr;
  align-items: center;
  gap: 24px;
  display: grid;
}

.example-preview {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  height: 320px;
  position: relative;
  overflow: hidden;
}

.example-preview iframe {
  pointer-events: none;
  background: #fff;
  border: none;
  width: 100%;
  height: 100%;
}

.example-preview-placeholder {
  color: var(--text-muted);
  justify-content: center;
  align-items: center;
  font-size: 12px;
  display: flex;
  position: absolute;
  inset: 0;
}

.example-meta {
  flex-direction: column;
  gap: 12px;
  display: flex;
}

.example-name {
  letter-spacing: -.01em;
  font-size: 18px;
  font-weight: 600;
}

.example-prompt {
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
  line-height: 1.55;
}

.example-cta {
  align-self: flex-start;
  padding: 8px 18px;
}

.example-tag {
  text-transform: uppercase;
  letter-spacing: .06em;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  flex-shrink: 0;
  padding: 2px 8px;
  font-size: 10px;
}

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

.ds-row {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  display: flex;
}

.ds-row:hover {
  border-color: var(--border-strong);
}

.ds-row.active {
  background: var(--accent-tint);
  border-color: var(--accent);
}

.ds-row-body {
  flex: 1;
  min-width: 0;
}

.ds-row-title {
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
}

.ds-row-default {
  letter-spacing: .06em;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 600;
}

.ds-row-summary {
  color: var(--text-muted);
  margin-top: 2px;
  font-size: 12px;
}

.ds-row-swatches {
  border: 1px solid var(--border);
  border-radius: 6px;
  flex-shrink: 0;
  align-items: center;
  gap: 0;
  height: 24px;
  display: inline-flex;
  overflow: hidden;
}

.ds-row-swatch {
  width: 16px;
  height: 100%;
  display: block;
}

.ds-row-swatch + .ds-row-swatch {
  border-left: 1px solid #0000000d;
}

@media (max-width: 900px) {
  .entry {
    height: auto;
    min-height: 100vh;
    grid-template-columns: 1fr !important;
  }

  .entry-side {
    border-right: none;
    border-bottom: 1px solid var(--border);
    min-width: 0;
    max-width: none;
    width: 100% !important;
  }

  .entry-side-resizer {
    display: none;
  }

  .example-card {
    grid-template-columns: 1fr;
  }

  .example-preview {
    height: 240px;
  }
}

.workspace {
  background: var(--bg);
  flex-direction: column;
  flex: 1;
  min-height: 0;
  display: flex;
}

.ws-tabs-bar {
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  z-index: 4;
  flex-wrap: nowrap;
  align-items: center;
  gap: 2px;
  height: 44px;
  padding: 6px 10px;
  display: flex;
  position: sticky;
  top: 0;
  overflow-x: auto;
}

.ws-tab {
  border-radius: var(--radius-sm);
  cursor: pointer;
  max-width: 220px;
  color: var(--text-muted);
  background: none;
  border: none;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12.5px;
  transition: background .12s, color .12s;
  display: inline-flex;
}

.ws-tab:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

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

.ws-tab.active {
  background: var(--bg-subtle);
  color: var(--text);
  font-weight: 500;
}

.ws-tab .tab-icon {
  color: var(--text-muted);
  text-align: center;
  width: 14px;
  font-size: 13px;
}

.ws-tab.active .tab-icon {
  color: var(--text);
}

.ws-tab-label {
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 180px;
  overflow: hidden;
}

.ws-tab-close {
  color: var(--text-faint);
  background: none;
  border: none;
  border-radius: 4px;
  justify-content: center;
  align-items: center;
  width: 16px;
  height: 16px;
  margin-left: 2px;
  padding: 0 2px;
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
}

.ws-tab-close:hover {
  background: var(--border);
  color: var(--text);
}

.ws-tab.design-files-tab {
  color: var(--text);
  font-weight: 500;
}

.ws-tabs-spacer {
  flex: 1;
}

.ws-tabs-actions {
  align-items: center;
  gap: 4px;
  display: inline-flex;
}

.ws-tab-action {
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  background: none;
  border: 1px solid #0000;
  padding: 4px 12px;
  font-size: 12.5px;
}

.ws-tab-action:hover:not(:disabled) {
  background: var(--bg-subtle);
  color: var(--text);
  border-color: #0000;
}

.ws-tab-action.share {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
  font-weight: 500;
}

.ws-tab-action.share:hover:not(:disabled) {
  background: #000;
  border-color: #000;
}

.ws-body {
  flex-direction: column;
  flex: 1;
  min-height: 0;
  display: flex;
}

.df-panel {
  background: var(--bg);
  flex: 1;
  grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
  min-height: 0;
  display: grid;
}

.df-panel.no-preview {
  grid-template-columns: minmax(0, 1fr);
}

.df-main {
  background: var(--bg);
  border-right: 1px solid var(--border);
  flex-direction: column;
  min-height: 0;
  display: flex;
}

.df-main:last-child {
  border-right: none;
}

.df-head {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  z-index: 3;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  display: flex;
  position: sticky;
  top: 0;
}

.df-head .icon-only {
  width: 28px;
  height: 28px;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  padding: 0;
  display: inline-flex;
}

.df-head .icon-only:hover:not(:disabled) {
  background: var(--bg-subtle);
  color: var(--text);
}

.df-head .crumbs {
  color: var(--text);
  margin-left: 4px;
  font-size: 12.5px;
  font-weight: 500;
}

.df-head .df-actions {
  gap: 4px;
  margin-left: auto;
  display: inline-flex;
}

.df-head .df-actions button {
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  background: none;
  border: 1px solid #0000;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 12.5px;
  display: inline-flex;
}

.df-head .df-actions button:hover:not(:disabled) {
  background: var(--bg-subtle);
  color: var(--text);
}

.df-body {
  flex: 1;
  min-height: 0;
  padding: 12px 0 0;
  overflow-y: auto;
}

.df-section {
  flex-direction: column;
  gap: 0;
  display: flex;
}

.df-section + .df-section {
  margin-top: 6px;
}

.df-section-label {
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding: 12px 20px 6px;
  font-size: 10.5px;
  font-weight: 600;
}

.df-row {
  text-align: left;
  cursor: pointer;
  width: 100%;
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  border-radius: 0;
  grid-template-columns: 36px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  transition: background .12s;
  display: grid;
  position: relative;
}

.df-row:hover {
  background: var(--bg-subtle);
}

.df-row.active {
  background: var(--blue-bg);
  color: var(--text);
}

.df-row.active .df-row-name {
  color: var(--text-strong);
}

.df-row-icon {
  background: var(--bg-subtle);
  width: 32px;
  height: 32px;
  color: var(--text-muted);
  border-radius: 6px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  display: inline-flex;
  position: relative;
}

.df-row-icon[data-kind="folder"] {
  background: var(--bg-muted);
  color: var(--text-soft);
}

.df-row-icon[data-kind="html"] {
  color: #b85a3b;
  background: #fbeee5;
}

.df-row-icon[data-kind="image"] {
  background: var(--green-bg);
  color: var(--green);
}

.df-row-icon[data-kind="code"] {
  color: #8c6700;
  background: #fff7d8;
}

.df-row-icon[data-kind="text"] {
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.df-row-icon[data-kind="sketch"] {
  background: var(--purple-bg);
  color: var(--purple);
}

.df-row-name-wrap {
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  display: flex;
}

.df-row-name {
  color: var(--text);
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
}

.df-row-sub {
  color: var(--text-muted);
  font-size: 11px;
}

.df-row-time {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 11.5px;
}

.df-row-menu {
  color: var(--text-muted);
  opacity: 0;
  background: none;
  border: none;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 16px;
  transition: opacity .12s;
}

.df-row:hover .df-row-menu {
  opacity: 1;
}

.df-row-menu:hover {
  background: var(--border);
  color: var(--text);
}

.df-row-collapse {
  color: var(--text-muted);
  text-align: center;
  cursor: pointer;
  background: none;
  border: none;
  width: 18px;
  padding: 0;
  font-size: 12px;
}

.df-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 24px;
  font-size: 13px;
}

.df-drop {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-panel);
  text-align: center;
  color: var(--text-muted);
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 18px 16px 16px;
  padding: 16px;
  display: flex;
}

.df-drop.dragging {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--bg-panel));
  color: var(--text);
}

.df-drop .label {
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-faint);
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
}

.df-drop .desc {
  max-width: 56ch;
  font-size: 12px;
  line-height: 1.5;
}

.df-preview {
  background: var(--bg-panel);
  border-left: 1px solid var(--border);
  flex-direction: column;
  min-height: 0;
  display: flex;
}

.df-preview-empty {
  color: var(--text-faint);
  flex: 1;
  justify-content: center;
  align-items: center;
  padding: 32px;
  font-size: 13px;
  display: flex;
}

.df-preview-thumb {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  aspect-ratio: 16 / 10;
  flex-shrink: 0;
  margin: 16px;
  position: relative;
  overflow: hidden;
}

.df-preview-thumb iframe, .df-preview-thumb img, .df-preview-thumb video {
  object-fit: cover;
  background: #fff;
  border: none;
  width: 100%;
  height: 100%;
  display: block;
}

.df-preview-thumb audio {
  width: calc(100% - 24px);
  position: absolute;
  bottom: 12px;
  left: 12px;
}

.df-preview-meta {
  flex-direction: column;
  gap: 6px;
  padding: 0 16px 16px;
  display: flex;
}

.df-preview-name {
  color: var(--text-strong);
  word-break: break-word;
  font-size: 14px;
  font-weight: 600;
}

.df-preview-kind {
  color: var(--text-muted);
  font-size: 12px;
}

.df-preview-stats {
  color: var(--text-muted);
  font-size: 11.5px;
}

.df-preview-actions {
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  display: inline-flex;
}

.df-preview-actions button {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  font-size: 12px;
  display: inline-flex;
}

.df-preview-actions button:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.df-row-popover {
  z-index: 200;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  flex-direction: column;
  min-width: 160px;
  padding: 4px;
  display: flex;
  position: fixed;
}

.df-row-popover button {
  text-align: left;
  color: var(--text);
  background: none;
  border: none;
  border-radius: 4px;
  padding: 7px 10px;
  font-size: 12.5px;
}

.df-row-popover button:hover {
  background: var(--bg-subtle);
}

.df-row-popover button.danger {
  color: var(--red);
}

.df-row-popover button.danger:hover {
  background: var(--red-bg);
}

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

.viewer-toolbar {
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-muted);
  flex-shrink: 0;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 8px 14px;
  font-size: 12.5px;
  display: flex;
}

.viewer-toolbar-left {
  align-items: center;
  gap: 8px;
  display: inline-flex;
}

.viewer-toolbar-actions {
  align-items: center;
  gap: 2px;
  display: inline-flex;
}

.viewer-toolbar .icon-only, .viewer-toolbar-actions .icon-only {
  width: 28px;
  height: 28px;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: 6px;
  justify-content: center;
  align-items: center;
  padding: 0;
  font-size: 14px;
  display: inline-flex;
}

.viewer-toolbar .icon-only:hover:not(:disabled), .viewer-toolbar-actions .icon-only:hover:not(:disabled) {
  background: var(--bg-subtle);
  color: var(--text);
}

.viewer-action {
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  white-space: nowrap;
  background: none;
  border: none;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 12.5px;
  display: inline-flex;
}

.viewer-action:hover:not(:disabled) {
  background: var(--bg-subtle);
  color: var(--text);
}

.viewer-action.primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
}

.viewer-action.primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.viewer-divider {
  background: var(--border);
  width: 1px;
  height: 18px;
  margin: 0 4px;
}

.viewer-toggle {
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12.5px;
  display: inline-flex;
}

.viewer-toggle .switch {
  background: var(--bg-muted);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  width: 28px;
  height: 16px;
  transition: background .12s;
  position: relative;
}

.viewer-toggle .switch:after {
  content: "";
  background: var(--bg-panel);
  width: 12px;
  height: 12px;
  box-shadow: var(--shadow-xs);
  border-radius: 50%;
  transition: transform .12s;
  position: absolute;
  top: 1px;
  left: 1px;
}

.viewer-toggle.on .switch {
  background: var(--text);
  border-color: var(--text);
}

.viewer-toggle.on .switch:after {
  transform: translateX(12px);
}

.viewer-tabs {
  gap: 2px;
  display: inline-flex;
}

.viewer-tab {
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  white-space: nowrap;
  background: none;
  border: none;
  padding: 4px 10px;
  font-size: 12px;
}

.viewer-tab:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.viewer-tab.active {
  background: var(--bg-subtle);
  color: var(--text);
  font-weight: 500;
}

.viewer-meta {
  color: var(--text-muted);
  font-size: 12px;
}

.ghost-link {
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 12px;
  text-decoration: none;
  display: inline-flex;
}

.ghost-link:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.viewer-body {
  background: var(--bg);
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: auto;
}

.viewer-body iframe {
  background: #fff;
  border: none;
  width: 100%;
  height: 100%;
}

.viewer-source {
  font-family: var(--mono);
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  background: var(--bg-panel);
  min-height: 100%;
  margin: 0;
  padding: 16px;
  font-size: 12px;
  line-height: 1.55;
}

.code-viewer {
  background: var(--bg-panel);
  font-family: var(--mono);
  grid-template-columns: auto 1fr;
  min-height: 100%;
  margin: 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.6;
  display: grid;
}

.code-viewer .gutter {
  background: var(--bg);
  color: var(--text-faint);
  text-align: right;
  -webkit-user-select: none;
  user-select: none;
  border-right: 1px solid var(--border-soft);
  white-space: pre;
  font-variant-numeric: tabular-nums;
  padding: 16px 12px 16px 16px;
}

.code-viewer .lines {
  white-space: pre;
  color: var(--text);
  padding: 16px 16px 16px 18px;
  overflow-x: auto;
}

.viewer-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 24px;
  font-size: 13px;
}

.document-preview {
  max-width: 860px;
  color: var(--text);
  margin: 0 auto;
  padding: 32px 40px 56px;
}

.document-preview h2 {
  margin: 0 0 24px;
  font-size: 20px;
  line-height: 1.25;
}

.document-preview section {
  border-top: 1px solid var(--border-soft);
  margin-top: 18px;
  padding-top: 18px;
}

.document-preview h3 {
  color: var(--text-muted);
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
}

.document-preview p {
  white-space: pre-wrap;
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.65;
}

.markdown-rendered {
  max-width: 900px;
  color: var(--text);
  white-space: normal;
  margin: 0 auto;
  padding: 24px 28px 40px;
  line-height: 1.65;
}

.markdown-status {
  border: 1px solid var(--border-soft);
  background: var(--bg-panel);
  max-width: 900px;
  color: var(--text-muted);
  border-radius: 8px;
  margin: 12px auto 0;
  padding: 8px 10px;
  font-size: 12px;
}

.markdown-status-error {
  border-color: color-mix(in oklab, var(--danger, #d04b4b) 45%, var(--border-soft));
  color: var(--danger, #d04b4b);
}

.markdown-rendered h1, .markdown-rendered h2, .markdown-rendered h3, .markdown-rendered h4, .markdown-rendered h5, .markdown-rendered h6 {
  margin: 20px 0 10px;
  line-height: 1.25;
}

.markdown-rendered p {
  margin: 10px 0;
}

.markdown-rendered ul, .markdown-rendered ol {
  margin: 10px 0;
  padding-left: 24px;
}

.markdown-rendered blockquote {
  border-left: 3px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-panel);
  margin: 12px 0;
  padding: 8px 12px;
}

.markdown-rendered pre {
  background: var(--bg-panel);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  margin: 12px 0;
  padding: 12px;
  overflow: auto;
}

.markdown-rendered code {
  font-family: var(--mono);
  font-size: 12px;
}

.markdown-rendered a {
  color: var(--accent);
}

.image-body {
  justify-content: center;
  align-items: center;
  padding: 24px;
  display: flex;
}

.image-body img {
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  max-width: 100%;
  max-height: 100%;
}

.sketch-editor {
  background: var(--bg);
  flex-direction: column;
  flex: 1;
  min-height: 0;
  display: flex;
}

.sketch-toolbar {
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  display: flex;
}

.sketch-tool {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  min-width: 32px;
  padding: 6px 10px;
  font-size: 14px;
  line-height: 1;
}

.sketch-tool:hover {
  background: var(--bg-subtle);
}

.sketch-tool.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.sketch-divider {
  background: var(--border);
  width: 1px;
  height: 20px;
  margin: 0 4px;
}

.sketch-color {
  border: 1px solid var(--border);
  cursor: pointer;
  border-radius: 6px;
  width: 32px;
  height: 28px;
  padding: 0;
}

.sketch-size {
  background: none;
  border: none;
  width: 80px;
}

.sketch-spacer {
  flex: 1;
}

.sketch-canvas-wrap {
  background: var(--bg);
  flex: 1;
  min-height: 0;
  position: relative;
}

.sketch-canvas-wrap canvas {
  cursor: crosshair;
  display: block;
}

.chat-empty-wrap {
  flex-direction: column;
  flex: 1;
  justify-content: center;
  align-items: center;
  gap: 18px;
  min-height: 100%;
  padding: 24px 8px;
  display: flex;
}

.chat-empty {
  color: var(--text-muted);
  text-align: center;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  max-width: 44ch;
  font-size: 13px;
  display: flex;
}

.chat-empty-title {
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 600;
}

.chat-empty-hint {
  line-height: 1.6;
}

.chat-examples {
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 520px;
  display: flex;
}

.chat-example {
  text-align: left;
  cursor: pointer;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  box-shadow: var(--shadow-xs);
  color: var(--text);
  font: inherit;
  opacity: 0;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  transition: transform .16s, border-color .16s, box-shadow .16s, background-color .16s;
  animation: .38s cubic-bezier(.22, 1, .36, 1) forwards chat-example-in;
  display: flex;
  position: relative;
  overflow: hidden;
}

.chat-example:before {
  content: "";
  background: linear-gradient(135deg,
    var(--accent-tint) 0%,
    transparent 55%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  position: absolute;
  inset: 0;
}

.chat-example:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  background: var(--bg-panel);
  transform: translateY(-2px);
}

.chat-example:hover:before {
  opacity: 1;
}

.chat-example:active {
  transform: translateY(0);
}

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

.chat-example-icon {
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  position: relative;
  box-shadow: 0 1px #0000000a, inset 0 -1px #00000014;
}

.chat-example-body {
  flex-direction: column;
  flex: 1;
  gap: 3px;
  min-width: 0;
  display: flex;
  position: relative;
}

.chat-example-head {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  display: flex;
}

.chat-example-title {
  color: var(--text-strong);
  font-size: 13.5px;
  font-weight: 600;
}

.chat-example-tag {
  font-family: var(--mono);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-tint);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius-pill);
  white-space: nowrap;
  padding: 1px 7px;
  font-size: 10.5px;
  line-height: 1.5;
}

.chat-example-prompt {
  color: var(--text-muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 12.5px;
  line-height: 1.5;
  display: -webkit-box;
  overflow: hidden;
}

.chat-example-cta {
  background: var(--bg-subtle);
  width: 24px;
  height: 24px;
  color: var(--text-muted);
  border-radius: 50%;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  font-size: 13px;
  transition: background-color .16s, color .16s, transform .16s;
  display: inline-flex;
  position: relative;
}

.chat-example:hover .chat-example-cta {
  background: var(--accent);
  color: #fff;
  transform: translateX(2px);
}

@keyframes chat-example-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.assistant-header {
  color: var(--text-muted);
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 11.5px;
  display: flex;
}

.assistant-header .dot {
  background: var(--text-muted);
  border-radius: 50%;
  width: 7px;
  height: 7px;
}

.assistant-header .dot[data-active="true"] {
  background: var(--accent);
  animation: 1.2s ease-in-out infinite pulse;
}

.assistant-label {
  color: var(--text-strong);
  font-size: 12.5px;
  font-weight: 600;
}

.assistant-stats {
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}

.assistant-flow {
  flex-direction: column;
  gap: 8px;
  display: flex;
}

.prose-block {
  color: var(--text);
  line-height: 1.6;
}

.prose-block .md-p {
  margin: 0;
}

.prose-block .md-p + .md-p {
  margin-top: 8px;
}

.prose-block .md-h {
  margin: 10px 0 4px;
  font-weight: 600;
  line-height: 1.3;
}

.prose-block .md-h1 {
  font-size: 18px;
}

.prose-block .md-h2 {
  font-size: 16px;
}

.prose-block .md-h3 {
  font-size: 14px;
}

.prose-block .md-h4 {
  font-size: 13px;
}

.prose-block .md-ul, .prose-block .md-ol {
  margin: 4px 0;
  padding-left: 20px;
}

.prose-block .md-ul li, .prose-block .md-ol li {
  margin: 2px 0;
}

.prose-block .md-inline-code {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-family: var(--mono);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: .92em;
}

.prose-block .md-code {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 6px 0;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  overflow-x: auto;
}

.prose-block .md-code code {
  font-family: var(--mono);
}

.prose-block .md-link {
  color: var(--accent);
  text-decoration: underline;
}

.prose-block .md-hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 10px 0;
}

.op-waiting {
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
}

.thinking-block {
  border-radius: var(--radius-sm);
  background: #6c3aa60a;
  border: 1px solid #6c3aa629;
}

.thinking-toggle {
  text-align: left;
  width: 100%;
  color: var(--text);
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  font-size: 12px;
  display: flex;
}

.thinking-toggle:hover {
  background: #6c3aa60d;
  border-color: #0000;
}

.thinking-icon {
  color: var(--purple);
}

.thinking-label {
  font-weight: 500;
}

.thinking-preview {
  color: var(--text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  font-style: italic;
  overflow: hidden;
}

.thinking-chev {
  color: var(--text-muted);
  font-size: 10px;
}

.thinking-body {
  font-family: var(--mono);
  color: var(--text-muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
  padding: 0 14px 12px;
  font-size: 11px;
  line-height: 1.55;
}

.status-pill {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  align-self: flex-start;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  font-size: 11.5px;
  display: inline-flex;
}

.status-label {
  letter-spacing: .02em;
}

.status-detail {
  color: var(--text);
}

.action-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
  flex-direction: column;
  display: flex;
  overflow: hidden;
}

.action-card-toggle {
  text-align: left;
  width: 100%;
  color: var(--text);
  cursor: pointer;
  border-radius: var(--radius);
  background: none;
  border: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  display: flex;
}

.action-card-toggle:hover {
  background: var(--bg-subtle);
  border-color: #0000;
}

.action-card-toggle .ico {
  background: var(--bg-subtle);
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--mono);
  border-radius: 4px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  display: inline-flex;
}

.action-card-toggle .summary {
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.action-card-toggle .summary strong {
  font-weight: 500;
}

.action-card-toggle .chev {
  color: var(--text-faint);
  flex-shrink: 0;
  font-size: 10px;
}

.action-card-toggle.running .ico {
  background: var(--purple-bg);
  color: var(--purple);
  animation: 1.6s ease-in-out infinite pulse;
}

.action-card-body {
  border-top: 1px solid var(--border-soft);
  flex-direction: column;
  gap: 6px;
  padding: 0 12px 10px;
  display: flex;
}

.action-card-body > .op-card {
  box-shadow: none;
  border-color: #0000;
  padding: 4px 0;
}

.action-card-body > .op-card .op-card-head {
  padding: 6px 0;
}

.op-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}

.op-card-head {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  display: flex;
}

.op-icon {
  background: var(--bg-subtle);
  width: 22px;
  height: 22px;
  color: var(--text-muted);
  font-size: 12px;
  font-family: var(--mono);
  border-radius: 6px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  display: inline-flex;
}

.op-icon-write {
  background: var(--green-bg);
  color: var(--green);
}

.op-icon-edit {
  background: var(--amber-bg);
  color: var(--amber);
}

.op-icon-read {
  background: var(--blue-bg);
  color: var(--blue);
}

.op-title {
  font-weight: 500;
}

.op-meta {
  color: var(--text-muted);
  font-size: 11.5px;
}

.op-desc {
  font-style: italic;
}

.op-path {
  background: var(--bg-subtle);
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 4px;
  max-width: 220px;
  padding: 1px 6px;
  overflow: hidden;
}

.op-status {
  border-radius: var(--radius-pill);
  letter-spacing: .02em;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-subtle);
  margin-left: auto;
  padding: 2px 9px;
  font-size: 10.5px;
}

.op-status-running {
  border-color: var(--purple-border);
  background: var(--purple-bg);
  color: var(--purple);
  animation: 1.6s ease-in-out infinite pulse;
}

.op-status-ok {
  border-color: var(--green-border);
  background: var(--green-bg);
  color: var(--green);
}

.op-status-error {
  border-color: var(--red-border);
  background: var(--red-bg);
  color: var(--red);
}

.op-toggle {
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  background: none;
  padding: 2px 8px;
  font-size: 10.5px;
}

.op-open {
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text);
  cursor: pointer;
  background: none;
  padding: 2px 9px;
  font-size: 10.5px;
}

.op-open:hover {
  background: var(--bg-subtle);
  border-color: var(--accent);
  color: var(--accent);
}

.produced-files {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 4px;
  padding: 12px 14px;
}

.produced-files-label {
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 600;
}

.produced-files-list {
  flex-direction: column;
  gap: 4px;
  display: flex;
}

.produced-file {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 12px;
  display: flex;
}

.produced-file-icon {
  text-align: center;
  width: 22px;
  color: var(--text-muted);
}

.produced-file-name {
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  font-family: var(--mono);
  flex: 1;
  overflow: hidden;
}

.produced-file-size {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
}

.produced-file-actions {
  gap: 6px;
  display: flex;
}

.produced-file-actions .ghost, .produced-file-actions .ghost-link {
  padding: 3px 9px;
  font-size: 11px;
}

.op-bash .op-command, .op-bash .op-output {
  color: #f0eee9;
  font-family: var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #1c1b1a;
  max-height: 220px;
  margin: 0;
  padding: 8px 12px;
  font-size: 11px;
  line-height: 1.55;
  overflow-y: auto;
}

.op-bash .op-output {
  background: #2a2926;
}

.op-todo .todo-list {
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 4px 12px 10px;
  font-size: 12px;
  list-style: none;
  display: flex;
}

.todo-item {
  align-items: flex-start;
  gap: 8px;
  padding: 2px 0;
  line-height: 1.4;
  display: flex;
}

.todo-check {
  width: 16px;
  color: var(--text-muted);
  font-family: var(--mono);
  text-align: center;
  flex-shrink: 0;
}

.todo-pending .todo-text {
  color: var(--text-muted);
}

.todo-in_progress .todo-check {
  color: var(--accent);
}

.todo-in_progress .todo-text {
  color: var(--text);
  font-weight: 500;
}

.todo-completed .todo-check {
  color: var(--green);
}

.todo-completed .todo-text {
  color: var(--text-muted);
  text-decoration: line-through;
}

.composer.drag-active {
  outline: 2px dashed var(--accent);
  outline-offset: -4px;
}

.present-wrap {
  display: inline-block;
  position: relative;
}

.present-trigger .caret {
  opacity: .7;
  margin-left: 4px;
  font-size: 10px;
}

.present-menu {
  z-index: 60;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 168px;
  box-shadow: var(--shadow-md);
  flex-direction: column;
  padding: 4px;
  display: flex;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
}

.present-menu button {
  text-align: left;
  cursor: pointer;
  color: var(--text);
  background: none;
  border: none;
  border-radius: 6px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  font-size: 12px;
  display: flex;
}

.present-menu button:hover {
  background: var(--bg-subtle);
  border-color: #0000;
}

.present-icon {
  width: 14px;
  color: var(--text-muted);
  justify-content: center;
  font-size: 12px;
  display: inline-flex;
}

.share-menu {
  display: inline-block;
  position: relative;
}

.share-menu-popover {
  z-index: 50;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 240px;
  box-shadow: var(--shadow-md);
  flex-direction: column;
  padding: 4px;
  display: flex;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
}

.share-menu-item {
  text-align: left;
  cursor: pointer;
  color: var(--text);
  background: none;
  border: none;
  border-radius: 6px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  font-size: 12.5px;
  display: flex;
}

.share-menu-item:hover:not(:disabled) {
  background: var(--bg-subtle);
  border-color: #0000;
}

.share-menu-item:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.share-menu-icon {
  text-align: center;
  flex: none;
  width: 18px;
  font-size: 13px;
}

.share-menu-divider {
  background: var(--border);
  height: 1px;
  margin: 4px 6px;
}

.button-like {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
  min-height: 36px;
  color: var(--text);
  cursor: pointer;
  justify-content: center;
  align-items: center;
  padding: 0 14px;
  text-decoration: none;
  display: inline-flex;
}

.button-like:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.deploy-modal {
  width: min(760px, 100vw - 32px);
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.deploy-form {
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
  display: flex;
}

.field-label-row {
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  display: flex;
}

.field-label-row a {
  color: var(--accent);
  white-space: nowrap;
  font-size: 13px;
}

.deploy-form input {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
  width: 100%;
  min-height: 44px;
  color: var(--text);
  font: inherit;
  padding: 0 12px;
}

.deploy-config-actions {
  justify-content: flex-end;
  display: flex;
}

.deploy-field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  display: grid;
}

.deploy-field-grid label {
  flex-direction: column;
  gap: 6px;
  display: flex;
}

.deploy-error {
  color: var(--red);
  margin: 0;
}

.deploy-result {
  border-radius: var(--radius-lg);
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  display: flex;
}

.deploy-result.ready {
  border: 1px solid color-mix(in srgb, var(--green) 35%, var(--border));
  background: color-mix(in srgb, var(--green) 10%, var(--bg-panel));
}

.deploy-result.delayed {
  border: 1px solid color-mix(in srgb, #b7791f 42%, var(--border));
  background: color-mix(in srgb, #b7791f 10%, var(--bg-panel));
}

.deploy-result.protected {
  border: 1px solid color-mix(in srgb, #c96442 48%, var(--border));
  background: color-mix(in srgb, #c96442 10%, var(--bg-panel));
}

.deploy-result-label {
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}

.deploy-result.delayed .deploy-result-label {
  color: #9a5b12;
}

.deploy-result.protected .deploy-result-label {
  color: #a34828;
}

.deploy-result-message {
  color: var(--muted);
  margin: 0;
}

.deploy-result a {
  overflow-wrap: anywhere;
}

.deploy-result-actions {
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  display: flex;
}

.ghost-link.disabled, .ghost-link[aria-disabled="true"] {
  opacity: .45;
  pointer-events: none;
  cursor: not-allowed;
}

.present-overlay {
  z-index: 1000;
  background: #000;
  display: flex;
  position: fixed;
  inset: 0;
}

.present-overlay iframe {
  background: #fff;
  border: none;
  flex: 1;
  width: 100%;
  height: 100%;
}

.present-exit {
  z-index: 1001;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: #ffffffeb;
  padding: 6px 12px;
  font-size: 12px;
  position: absolute;
  top: 12px;
  right: 12px;
}

.present-exit:hover {
  background: #fff;
}

.picker {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  align-items: center;
  gap: 6px;
  padding: 2px 6px 2px 10px;
  display: inline-flex;
}

.picker-label {
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  font-size: 11px;
}

.picker select {
  width: auto;
  min-width: 120px;
  box-shadow: none;
  background: none;
  border: none;
  padding: 4px 6px;
}

.picker select:focus {
  box-shadow: none;
  outline: none;
}

.picker.agent-picker select {
  min-width: 140px;
}

.picker.agent-picker .icon-btn {
  background: none;
  border: none;
  padding: 2px 8px;
}

.preview {
  background: var(--bg-subtle);
  flex-direction: column;
  min-height: 0;
  display: flex;
}

.preview-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-muted);
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  font-size: 12px;
  display: flex;
}

.preview-title {
  align-items: center;
  gap: 10px;
  min-width: 0;
  display: flex;
}

.preview-actions {
  align-items: center;
  gap: 8px;
  display: flex;
}

.preview-actions .muted {
  font-size: 11px;
}

.preview-actions button {
  padding: 4px 10px;
  font-size: 12px;
}

.preview-body {
  flex: 1;
  min-height: 0;
  position: relative;
}

.preview-body iframe {
  background: #fff;
  border: none;
  width: 100%;
  height: 100%;
}

.preview-empty {
  height: 100%;
  color: var(--text-muted);
  text-align: center;
  justify-content: center;
  align-items: center;
  padding: 24px;
  font-size: 13px;
  display: flex;
}

.topbar-title .title.editable, .app-project-title .title.editable {
  border-radius: 4px;
  outline: none;
  margin: -1px -4px;
  padding: 1px 4px;
}

.topbar-title .title.editable:focus, .app-project-title .title.editable:focus {
  background: var(--bg-subtle);
  box-shadow: 0 0 0 1px var(--accent);
}

.conv-pill {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  align-items: center;
  gap: 6px;
  max-width: 220px;
  padding: 6px 10px;
  font-size: 12px;
  display: inline-flex;
}

.conv-pill:hover {
  background: var(--bg-subtle);
}

.conv-pill.open {
  background: var(--bg-subtle);
  border-color: var(--accent);
}

.conv-pill-icon {
  font-size: 13px;
  line-height: 1;
}

.conv-pill-label {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.conv-pill-count {
  background: var(--bg-subtle);
  min-width: 18px;
  height: 18px;
  color: var(--text-muted);
  border-radius: 9px;
  justify-content: center;
  align-items: center;
  padding: 0 6px;
  font-size: 10px;
  display: inline-flex;
}

.conv-menu {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  z-index: 200;
  width: 320px;
  max-height: 420px;
  padding: 8px;
  position: fixed;
  overflow-y: auto;
  box-shadow: 0 8px 32px #0000001f;
}

.conv-menu-header {
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  padding: 4px 6px 8px;
  font-size: 11px;
  display: flex;
}

.conv-add-btn {
  padding: 2px 8px;
  font-size: 11px;
}

.conv-menu-empty {
  color: var(--text-muted);
  text-align: center;
  padding: 16px 8px;
  font-size: 12px;
}

.conv-list {
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
}

.conv-item {
  border-radius: 6px;
  align-items: stretch;
  gap: 4px;
  display: flex;
}

.conv-item.active {
  background: var(--bg-subtle);
}

.conv-item-button {
  text-align: left;
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 6px;
  flex-direction: column;
  flex: 1;
  gap: 2px;
  padding: 6px 8px;
  display: flex;
}

.conv-item-button:hover {
  background: var(--bg-subtle);
}

.conv-item-name {
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  overflow: hidden;
}

.conv-item-meta {
  color: var(--text-muted);
  font-size: 10px;
}

.conv-item-del {
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 6px;
  width: 24px;
  font-size: 16px;
}

.conv-item-del:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.conv-rename-input {
  border: 1px solid var(--accent);
  background: var(--bg-panel);
  font: inherit;
  border-radius: 6px;
  flex: 1;
  padding: 6px 8px;
  font-size: 12px;
}

.system-reminder-block {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 6px 0;
}

.system-reminder-toggle {
  text-align: left;
  width: 100%;
  color: var(--text-muted);
  background: none;
  border: none;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 12px;
  display: flex;
}

.system-reminder-toggle:hover {
  background: #00000008;
}

.system-reminder-icon {
  color: var(--text-muted);
}

.system-reminder-label {
  color: var(--text);
  font-weight: 500;
}

.system-reminder-preview {
  color: var(--text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  font-style: italic;
  overflow: hidden;
}

.system-reminder-chev {
  color: var(--text-muted);
  font-size: 10px;
}

.system-reminder-body {
  font-family: var(--mono);
  color: var(--text-muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
  padding: 0 12px 10px;
  font-size: 11px;
  line-height: 1.5;
}

.op-waiting {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  color: var(--text-muted);
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-style: normal;
  display: flex;
}

.op-waiting-dot {
  background: var(--accent);
  border-radius: 999px;
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  animation: 1.4s ease-in-out infinite pulse;
}

.op-waiting-label {
  color: var(--text);
  font-weight: 500;
}

.op-waiting-detail {
  font-family: var(--mono);
  background: var(--bg-panel);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
}

.op-waiting-hint {
  color: var(--text-soft);
  flex-basis: 100%;
  font-size: 11px;
  font-style: italic;
}

.op-todo {
  border-color: var(--accent-soft);
  background: linear-gradient(180deg, #fff8f3 0%, var(--bg-panel) 60%);
}

.op-todo .op-card-head {
  border-bottom: 1px solid var(--accent-soft);
  background: none;
}

.op-todo .op-icon {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.op-todo .op-title {
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--accent-hover);
  font-size: 11px;
}

.op-todo .op-meta {
  font-variant-numeric: tabular-nums;
  color: var(--accent-hover);
  margin-left: auto;
  font-size: 11px;
}

.question-form {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  box-shadow: var(--shadow-md);
  margin: 8px 0;
  overflow: hidden;
}

.question-form-locked {
  background: var(--bg-subtle);
  box-shadow: none;
  opacity: .92;
}

.question-form-head {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fdf6f1 0%, var(--bg-panel) 100%);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  display: flex;
}

.question-form-locked .question-form-head {
  background: var(--bg-subtle);
}

.question-form-icon {
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  width: 28px;
  height: 28px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
}

.question-form-titles {
  flex: 1;
  min-width: 0;
}

.question-form-title {
  letter-spacing: -.01em;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.question-form-desc {
  color: var(--text-muted);
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.45;
}

.question-form-pill {
  letter-spacing: .04em;
  text-transform: uppercase;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
}

.question-form-body {
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  display: flex;
}

.qf-field {
  flex-direction: column;
  gap: 6px;
  display: flex;
}

.qf-label {
  color: var(--text);
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  display: flex;
}

.qf-required {
  color: var(--accent);
}

.qf-help {
  color: var(--text-muted);
  margin-top: -2px;
  font-size: 11px;
}

.qf-options {
  flex-wrap: wrap;
  gap: 6px;
  display: flex;
}

.qf-chip {
  border: 1px solid var(--border);
  background: var(--bg-panel);
  cursor: pointer;
  border-radius: 999px;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  transition: border-color .12s, background .12s, color .12s;
  display: inline-flex;
}

.qf-chip input {
  width: auto;
  margin: 0;
  display: none;
}

.qf-chip:hover {
  border-color: var(--border-strong);
}

.qf-chip-disabled {
  cursor: not-allowed;
  opacity: .48;
}

.qf-chip-disabled:hover {
  border-color: var(--border);
}

.qf-chip-on {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-weight: 500;
}

.question-form-locked .qf-chip {
  cursor: not-allowed;
}

.qf-input, .qf-select, .qf-textarea {
  font-size: 13px;
}

.question-form-foot {
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  display: flex;
}

.qf-hint, .qf-locked-note {
  color: var(--text-muted);
  flex: 1;
  font-size: 11px;
  line-height: 1.4;
}

.qf-direction-cards {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 4px;
  display: grid;
}

.qf-card {
  background: var(--bg);
  border: 1px solid var(--border);
  cursor: pointer;
  border-radius: 10px;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  transition: border-color .12s, background .12s, transform 60ms;
  display: flex;
  position: relative;
}

.qf-card input {
  display: none;
}

.qf-card:hover {
  border-color: var(--border-strong);
}

.qf-card:active {
  transform: translateY(1px);
}

.qf-card-on {
  border-color: var(--accent, #c96442);
  background: color-mix(in oklch, var(--accent, #c96442) 4%, var(--bg));
  box-shadow: 0 0 0 1px var(--accent, #c96442) inset;
}

.qf-card-disabled {
  cursor: not-allowed;
  opacity: .6;
}

.qf-card-head {
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  display: flex;
}

.qf-card-title {
  letter-spacing: -.005em;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.qf-card-pill {
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--accent, #c96442);
  color: #fff;
  border-radius: 999px;
  flex-shrink: 0;
  padding: 2px 6px;
  font-family: ui-monospace, JetBrains Mono, monospace;
  font-size: 9px;
}

.qf-card-swatches {
  gap: 4px;
  height: 18px;
  display: flex;
}

.qf-card-swatch {
  border: 1px solid #00000014;
  border-radius: 3px;
  flex: 1;
  min-width: 0;
}

.qf-card-types {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  display: flex;
}

.qf-card-type-display {
  letter-spacing: -.02em;
  color: var(--text);
  flex-shrink: 0;
  font-size: 28px;
  line-height: 1;
}

.qf-card-type-body {
  color: var(--text-muted);
  letter-spacing: -.005em;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  line-height: 1.3;
  overflow: hidden;
}

.qf-card-mood {
  color: var(--text-muted);
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.qf-card-refs {
  color: var(--text-muted);
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
}

.qf-card-refs-label {
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: .7;
  font-family: ui-monospace, JetBrains Mono, monospace;
  font-size: 10px;
}

.ds-modal-backdrop {
  z-index: 900;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  background: #1c1b1a6b;
  justify-content: center;
  align-items: stretch;
  padding: 32px;
  display: flex;
  position: fixed;
  inset: 0;
}

.ds-modal {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 1320px;
  box-shadow: var(--shadow-lg);
  flex-direction: column;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.ds-modal-fullscreen {
  border-radius: 0;
  max-width: none;
}

.ds-modal-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  display: grid;
}

.ds-modal-title-block {
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  display: flex;
}

.ds-modal-title {
  letter-spacing: -.01em;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 15px;
  font-weight: 600;
  overflow: hidden;
}

.ds-modal-subtitle {
  color: var(--text-muted);
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 60ch;
  font-size: 12px;
  overflow: hidden;
}

.ds-modal-tabs {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  gap: 2px;
  padding: 3px;
  display: inline-flex;
}

.ds-modal-tab {
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 12.5px;
  font-weight: 500;
}

.ds-modal-tab:hover {
  color: var(--text);
}

.ds-modal-tab.active {
  background: var(--bg-panel);
  color: var(--text);
  box-shadow: 0 1px 2px #0000000f;
}

.ds-modal-actions {
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  display: flex;
}

.ds-modal-stage {
  background: #fff;
  flex: 1;
  min-height: 0;
  position: relative;
}

.ds-modal-stage iframe {
  background: #fff;
  border: none;
  width: 100%;
  height: 100%;
  display: block;
}

.ds-modal-fullscreen .ds-modal-stage:fullscreen iframe, .ds-modal-stage:fullscreen iframe {
  height: 100vh;
}

.ds-modal-empty {
  color: var(--text-muted);
  justify-content: center;
  align-items: center;
  font-size: 13px;
  display: flex;
  position: absolute;
  inset: 0;
}

@media (max-width: 760px) {
  .ds-modal-backdrop {
    padding: 0;
  }

  .ds-modal {
    border-radius: 0;
  }

  .ds-modal-header {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ds-modal-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

.examples-toolbar {
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
  display: flex;
}

.examples-filter-row {
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  display: flex;
}

.examples-filter-label {
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-right: 6px;
  font-size: 11px;
  font-weight: 500;
}

.filter-pill {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 999px;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 12px;
  display: inline-flex;
}

.filter-pill:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.filter-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.filter-pill-count {
  opacity: .7;
  font-size: 11px;
}

.example-card-actions {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  display: flex;
}

.example-tags {
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
  display: flex;
}

.example-tag.platform-mobile, .example-tag.mode-deck {
  color: var(--accent);
  border-color: var(--accent-soft);
  background: var(--accent-soft);
}

.example-preview {
  cursor: zoom-in;
  transition: border-color .15s, box-shadow .15s;
}

.example-preview:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 18px #c964421a;
}

.example-preview:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}

.example-preview-overlay {
  color: #fff;
  opacity: 0;
  pointer-events: none;
  letter-spacing: .02em;
  background: #1c1b1ac7;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 500;
  transition: opacity .15s;
  position: absolute;
  bottom: 10px;
  right: 10px;
}

.example-preview:hover .example-preview-overlay, .example-preview:focus-visible .example-preview-overlay {
  opacity: 1;
}

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

@keyframes shimmer {
  0% {
    background-position: -400px 0;
  }

  100% {
    background-position: 400px 0;
  }
}

.icon-spin {
  transform-origin: center;
  animation: .9s linear infinite icon-spin;
}

.loading-spinner {
  color: var(--text-muted);
  align-items: center;
  gap: 6px;
  display: inline-flex;
}

.loading-spinner-label {
  font-size: 12px;
}

.skeleton-block, .skeleton-shimmer {
  background-color: var(--bg-subtle);
  background-image: linear-gradient(90deg,
    var(--bg-subtle) 0%,
    var(--bg-muted) 50%,
    var(--bg-subtle) 100%);
  background-size: 800px 100%;
  animation: 1.4s linear infinite shimmer;
  display: inline-block;
}

.skeleton-block + .skeleton-block {
  margin-top: 6px;
}

.design-card-skeleton {
  cursor: default;
  pointer-events: none;
}

.design-card-skeleton .design-card-thumb {
  background: none;
}

.design-card-skeleton .design-card-thumb:before, .design-card-skeleton .design-card-thumb:after {
  display: none;
}

.design-card-skeleton .design-card-thumb {
  background-image: linear-gradient(90deg,
    var(--bg-subtle) 0%,
    var(--bg-muted) 50%,
    var(--bg-subtle) 100%);
  background-size: 800px 100%;
  animation: 1.4s linear infinite shimmer;
}

.centered-loader {
  color: var(--text-muted);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 48px 12px;
  display: flex;
}

.centered-loader-label {
  letter-spacing: .01em;
  font-size: 12.5px;
}

.entry-side {
  min-width: 280px;
  max-width: 560px;
  position: relative;
}

.entry-side-resizer {
  cursor: col-resize;
  z-index: 5;
  background: none;
  border: 0;
  width: 6px;
  height: 100%;
  padding: 0;
  transition: background-color .12s;
  position: absolute;
  top: 0;
  right: -3px;
}

.entry-side-resizer:hover, .entry-side-resizer.dragging {
  background: var(--accent-soft);
}

body.entry-resizing {
  cursor: col-resize;
  -webkit-user-select: none;
  user-select: none;
}

.entry-brand-title-row {
  flex-wrap: wrap;
  row-gap: 4px;
}

.composer-import-wrap {
  position: relative;
}

.composer-import-menu {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 240px;
  box-shadow: var(--shadow-md);
  z-index: 30;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  animation: .18s cubic-bezier(.21, 1.02, .73, 1) pop-in;
  display: flex;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
}

.composer-import-item {
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: not-allowed;
  text-align: left;
  background: none;
  border: none;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  font-size: 12.5px;
  display: flex;
}

.composer-import-item:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.composer-import-item-label {
  flex: 1;
}

.composer-import-item-soon {
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-faint);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 2px 6px;
  font-size: 10px;
}

.composer-import-item .ico {
  width: 16px;
  color: var(--text-muted);
  justify-content: center;
  align-items: center;
  display: inline-flex;
}

.chat-history-wrap {
  align-items: center;
  display: inline-flex;
  position: relative;
}

.chat-history-wrap .icon-only {
  position: relative;
}

.chat-history-wrap.open .icon-only {
  background: var(--bg-subtle);
  color: var(--text);
}

.chat-history-badge {
  letter-spacing: 0;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  justify-content: center;
  align-items: center;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  position: absolute;
  top: 2px;
  right: 2px;
}

.chat-history-menu {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 280px;
  max-height: 360px;
  box-shadow: var(--shadow-md);
  z-index: 30;
  flex-direction: column;
  animation: .18s cubic-bezier(.21, 1.02, .73, 1) pop-in;
  display: flex;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  overflow: hidden;
}

.chat-history-menu-head {
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  display: flex;
}

.chat-history-menu-title {
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
}

.chat-history-new {
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 11px;
  display: inline-flex;
}

.chat-history-new:hover {
  background: var(--bg-muted);
  color: var(--text);
}

.chat-history-list {
  flex-direction: column;
  gap: 1px;
  padding: 4px 6px 6px;
  display: flex;
  overflow-y: auto;
}

.chat-history-empty {
  color: var(--text-muted);
  text-align: center;
  padding: 16px 8px;
  font-size: 12px;
  font-style: italic;
}

.chat-conv-item {
  border-radius: var(--radius-sm);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  background: none;
  border: 1px solid #0000;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  font-size: 12.5px;
  display: flex;
}

.chat-conv-item:hover {
  background: var(--bg-subtle);
}

.chat-conv-item.active {
  background: var(--accent-tint);
  border-color: var(--accent-soft);
  color: var(--text-strong);
}

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

.chat-conv-item-meta {
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  font-size: 10.5px;
}

.chat-conv-item-del {
  width: 22px;
  height: 22px;
  color: var(--text-faint);
  opacity: 0;
  background: none;
  border: none;
  border-radius: 4px;
  justify-content: center;
  align-items: center;
  padding: 0;
  transition: opacity .12s, background-color .12s, color .12s;
  display: inline-flex;
}

.chat-conv-item:hover .chat-conv-item-del {
  opacity: 1;
}

.chat-conv-item-del:hover {
  background: var(--red-bg);
  color: var(--red);
}

.chat-log-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  position: relative;
}

.chat-log-wrap .chat-log {
  flex: 1;
}

.chat-jump-btn {
  border-radius: var(--radius-pill);
  background: var(--bg-panel);
  border: 1px solid var(--border-strong);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  z-index: 6;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  animation: .2s cubic-bezier(.21, 1.02, .73, 1) pop-in;
  display: inline-flex;
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
}

.chat-jump-btn:hover {
  background: var(--bg-subtle);
  border-color: var(--border-strong);
}

.assistant-footer {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 10px;
  padding: 4px 10px;
  font-size: 11.5px;
  display: inline-flex;
}

.assistant-footer .dot {
  background: var(--text-muted);
  border-radius: 50%;
  width: 7px;
  height: 7px;
}

.assistant-footer .dot[data-active="true"] {
  background: var(--accent);
  animation: 1.2s ease-in-out infinite pulse;
}

.assistant-footer .assistant-label {
  color: var(--text-strong);
  font-size: 11.5px;
  font-weight: 600;
}

.assistant-footer .assistant-stats {
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.assistant-footer[data-unfinished="true"] {
  background: var(--amber-bg);
  border-color: color-mix(in srgb, var(--amber) 35%, var(--border));
}

.assistant-footer[data-unfinished="true"] .dot {
  background: var(--amber);
}

.unfinished-todos {
  border: 1px solid color-mix(in srgb, var(--amber) 35%, var(--border));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--amber) 8%, var(--bg-panel));
  width: min(520px, 100%);
  color: var(--text);
  margin-top: 10px;
  padding: 10px 12px;
}

.unfinished-todos-head {
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  display: flex;
}

.unfinished-todos-title {
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 700;
}

.unfinished-todos-continue {
  border: 1px solid color-mix(in srgb, var(--amber) 45%, var(--border-strong));
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  color: var(--text-strong);
  font: inherit;
  cursor: pointer;
  flex: none;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 650;
}

.unfinished-todos-continue:hover {
  background: var(--bg-subtle);
}

.unfinished-todos-list {
  color: var(--text-muted);
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 12.5px;
}

.unfinished-todos-list li + li {
  margin-top: 3px;
}

.unfinished-todos-more {
  color: var(--text-muted);
  margin-top: 6px;
  font-size: 12px;
}

.viewer-action[data-coming-soon="true"] {
  opacity: .55;
  cursor: not-allowed;
  position: relative;
}

.viewer-action[data-coming-soon="true"]:hover {
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.viewer-action[data-coming-soon="true"]:after {
  content: "Coming soon";
  background: var(--text-strong);
  color: #fff;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  letter-spacing: .03em;
  pointer-events: none;
  opacity: 0;
  z-index: 10;
  text-transform: uppercase;
  padding: 4px 8px;
  font-size: 10.5px;
  font-weight: 600;
  transition: opacity .12s;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
}

.viewer-action[data-coming-soon="true"]:hover:after {
  opacity: 1;
}

.viewer-toggle[data-coming-soon="true"] {
  opacity: .55;
  cursor: not-allowed;
  position: relative;
}

.viewer-toggle[data-coming-soon="true"]:hover {
  background: var(--bg-subtle);
}

.viewer-toggle[data-coming-soon="true"]:after {
  content: "Coming soon";
  background: var(--text-strong);
  color: #fff;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  letter-spacing: .03em;
  pointer-events: none;
  opacity: 0;
  z-index: 10;
  text-transform: uppercase;
  padding: 4px 8px;
  font-size: 10.5px;
  font-weight: 600;
  transition: opacity .12s;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
}

.viewer-toggle[data-coming-soon="true"]:hover:after {
  opacity: 1;
}

.viewer-action, .viewer-tab, .viewer-toggle {
  border: 1px solid #0000;
  transition: background .12s, border-color .12s, color .12s;
}

.viewer-action:hover:not(:disabled):not([data-coming-soon="true"]), .viewer-tab:hover, .viewer-tab.active {
  border-color: var(--border);
}

.composer-row .icon-btn svg {
  display: block;
}

.composer-row .icon-btn.active {
  background: var(--bg-subtle);
  color: var(--text);
}

.composer-import {
  align-items: center;
  gap: 6px;
  display: inline-flex;
}

.composer-send svg {
  display: block;
}

.composer-row .composer-icon-divider {
  background: var(--border);
  width: 1px;
  height: 18px;
  margin: 0 2px;
}

.deck-nav {
  border-left: 1px solid var(--border);
  align-items: center;
  gap: 2px;
  height: 28px;
  margin-left: 4px;
  padding: 0 6px;
  display: inline-flex;
}

.deck-nav-counter {
  min-width: 50px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  justify-content: center;
  align-items: center;
  padding: 0 6px;
  font-size: 12px;
  display: inline-flex;
}

.chat-conv-rename-input {
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  outline: none;
}

.prompt-templates-panel {
  flex-direction: column;
  gap: 16px;
  display: flex;
}

.prompt-templates-count {
  color: var(--text-muted);
  margin-left: auto;
  font-size: 12px;
}

.prompt-templates-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  display: grid;
}

.prompt-template-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  text-align: left;
  cursor: pointer;
  border-radius: 10px;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  transition: border-color .15s, transform .15s;
  display: flex;
  overflow: hidden;
}

.prompt-template-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.prompt-template-thumb {
  aspect-ratio: 4 / 3;
  background: var(--bg-subtle);
  justify-content: center;
  align-items: center;
  width: 100%;
  display: flex;
  position: relative;
  overflow: hidden;
}

.prompt-template-thumb img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  display: block;
}

.prompt-template-thumb-fallback {
  color: var(--text-faint);
}

.prompt-template-thumb-play {
  color: #fff;
  letter-spacing: 0;
  background: #0000008c;
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  width: 22px;
  height: 22px;
  font-size: 10px;
  display: flex;
  position: absolute;
  bottom: 8px;
  right: 8px;
}

.prompt-template-meta {
  flex-direction: column;
  gap: 4px;
  padding: 0 12px 12px;
  display: flex;
}

.prompt-template-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.prompt-template-summary {
  color: var(--text-muted);
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  font-size: 12px;
  line-height: 1.4;
  display: -webkit-box;
  overflow: hidden;
}

.prompt-template-tags {
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  display: flex;
}

.prompt-template-category {
  background: var(--accent-tint);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .04em;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
}

.prompt-template-tag, .prompt-template-model {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
}

.prompt-template-model {
  font-weight: 500;
}

.prompt-template-source {
  color: var(--text-faint);
  margin-top: 6px;
  font-size: 10px;
}

.prompt-templates-footer {
  color: var(--text-faint);
  border-top: 1px dashed var(--border);
  text-align: center;
  padding-top: 12px;
  font-size: 11px;
}

.prompt-template-modal-backdrop {
  z-index: 1500;
  background: #0f0f1273;
  justify-content: center;
  align-items: center;
  padding: 24px;
  display: flex;
  position: fixed;
  inset: 0;
}

.prompt-template-modal {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  flex-direction: column;
  width: min(820px, 100%);
  max-height: 90vh;
  display: flex;
  overflow: hidden;
  box-shadow: 0 32px 80px #00000040;
}

.prompt-template-modal-head {
  align-items: flex-start;
  gap: 12px;
  padding: 18px 18px 0;
  display: flex;
}

.prompt-template-modal-titles {
  flex: 1;
  min-width: 0;
}

.prompt-template-modal-titles h2 {
  color: var(--text);
  margin: 0 0 6px;
  font-size: 17px;
}

.prompt-template-modal-titles p {
  color: var(--text-muted);
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.prompt-template-modal-tags {
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 18px 0;
  display: flex;
}

.prompt-template-modal-body {
  flex-direction: column;
  gap: 16px;
  padding: 16px 18px;
  display: flex;
  overflow: auto;
}

.prompt-template-modal-asset {
  background: #000;
  border-radius: 8px;
  justify-content: center;
  align-items: center;
  max-height: 360px;
  display: flex;
  position: relative;
  overflow: hidden;
}

.prompt-template-modal-asset img, .prompt-template-modal-asset video {
  max-width: 100%;
  max-height: 360px;
  display: block;
}

.prompt-template-modal-asset-image-trigger {
  cursor: zoom-in;
  background: none;
  border: 0;
  max-height: 360px;
  margin: 0;
  padding: 0;
  line-height: 0;
  display: block;
}

.prompt-template-modal-asset-image-trigger img {
  transition: transform .2s;
}

.prompt-template-modal-asset-image-trigger:hover img, .prompt-template-modal-asset-image-trigger:focus-visible img {
  transform: scale(1.02);
}

.prompt-template-modal-asset-expand {
  z-index: 1;
  color: #fff;
  letter-spacing: .01em;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  opacity: .78;
  background: #0000008c;
  border: 0;
  border-radius: 999px;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  transition: opacity .12s, background .12s;
  display: inline-flex;
  position: absolute;
  top: 10px;
  right: 10px;
}

.prompt-template-modal-asset:hover .prompt-template-modal-asset-expand, .prompt-template-modal-asset-expand:hover, .prompt-template-modal-asset-expand:focus-visible {
  opacity: 1;
  background: #000000b8;
}

.prompt-template-lightbox-backdrop {
  z-index: 1600;
  cursor: zoom-out;
  background: #08090cf0;
  justify-content: center;
  align-items: center;
  padding: 48px;
  animation: .14s ease-out prompt-template-lightbox-fade;
  display: flex;
  position: fixed;
  inset: 0;
}

@keyframes prompt-template-lightbox-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.prompt-template-lightbox-media {
  cursor: default;
  background: #000;
  border-radius: 10px;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  display: block;
  box-shadow: 0 28px 80px #0009;
}

.prompt-template-lightbox-close {
  color: #fff;
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  background: #ffffff24;
  border: 0;
  border-radius: 999px;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  transition: background .12s, transform .12s;
  display: inline-flex;
  position: fixed;
  top: 18px;
  right: 18px;
}

.prompt-template-lightbox-close:hover, .prompt-template-lightbox-close:focus-visible {
  background: #ffffff42;
  transform: scale(1.05);
}

@media (max-width: 640px) {
  .prompt-template-lightbox-backdrop {
    padding: 16px;
  }

  .prompt-template-lightbox-close {
    top: 12px;
    right: 12px;
  }
}

.prompt-template-modal-prompt {
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  border-radius: 8px;
  flex-direction: column;
  display: flex;
}

.prompt-template-modal-prompt-head {
  border-bottom: 1px solid var(--border);
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  display: flex;
}

.prompt-template-modal-prompt-label {
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
}

.prompt-template-modal-prompt-body {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--font-mono, ui-monospace, monospace);
  max-height: 320px;
  margin: 0;
  padding: 12px;
  font-size: 12px;
  line-height: 1.5;
  overflow: auto;
}

.prompt-template-modal-foot {
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  font-size: 11px;
  display: flex;
}

.prompt-template-license {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 1px 6px;
}

.prompt-template-picker .prompt-template-avatar {
  background: var(--bg-subtle);
}

.prompt-template-picker .prompt-template-avatar img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  display: block;
}

.prompt-template-picker .prompt-template-avatar.fallback {
  color: var(--text-muted);
}

.prompt-template-edit {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  padding: 10px;
  display: flex;
}

.prompt-template-edit-head {
  flex-direction: column;
  gap: 2px;
  display: flex;
}

.prompt-template-edit-label {
  color: var(--text);
  letter-spacing: .01em;
  font-size: 11.5px;
  font-weight: 600;
}

.prompt-template-edit-hint {
  color: var(--text-muted);
  font-size: 10.5px;
  line-height: 1.4;
}

.prompt-template-edit-textarea {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 100%;
  min-height: 96px;
  color: var(--text);
  resize: vertical;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.5;
}

.prompt-template-edit-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
  outline: none;
}

.prompt-template-edit-empty {
  color: var(--text-muted);
  margin-top: 6px;
  font-size: 11px;
  font-style: italic;
}

.prompt-template-error {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-left: 3px solid var(--danger, #c0392b);
  border-radius: var(--radius-sm);
  color: var(--text);
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding: 8px 10px;
  font-size: 12px;
  display: flex;
}

.prompt-template-error-msg {
  flex: 1;
  min-width: 0;
}

.prompt-template-error-retry {
  flex: none;
  padding: 4px 10px !important;
  font-size: 11.5px !important;
}

/*# sourceMappingURL=apps_web_src_index_0bb-9nc.css.map*/