/* Mac Quiet Workspace alignment for /chat — loaded after styles.css */

body[data-title-key="chat.title"] {
  --qw-canvas: #ffffff;
  --qw-sidebar: #f7f7f5;
  --qw-surface: #ffffff;
  --qw-surface-muted: #fafafa;
  --qw-surface-sunken: #f6f6f4;
  --qw-surface-elevated: #ffffff;
  --qw-titlebar-bg: rgba(255, 255, 255, 0.94);
  --qw-chip-bg: rgba(255, 255, 255, 0.96);
  --qw-composer-bg: rgba(255, 255, 255, 0.98);
  --qw-composer-dock-bg: rgba(255, 255, 255, 0.98);
  --qw-popover-bg: #ffffff;
  --qw-border: rgba(31, 35, 40, 0.08);
  --qw-border-strong: rgba(31, 35, 40, 0.12);
  --qw-text: #1a1c1f;
  --qw-text-secondary: rgba(26, 28, 31, 0.62);
  --qw-text-muted: #8a8981;
  --qw-text-quaternary: rgba(26, 28, 31, 0.42);
  --qw-hover: rgba(31, 35, 40, 0.055);
  --qw-selected: #e7e7e2;
  --qw-bubble: #f0f0ef;
  --qw-composer-shadow: 0 1px 2px rgba(13, 13, 13, 0.05), 0 10px 32px rgba(13, 13, 13, 0.08);
  --qw-accent: #0285ff;
  --qw-btn-primary-bg: #0d0d0d;
  --qw-btn-primary-fg: #ffffff;
  --qw-btn-primary-rgb: #34363a;
  --qw-highlight-warn-bg: #fffdfa;
  --qw-overlay-scrim: rgba(255, 255, 255, 0.72);
  --qw-item-rgb: rgba(13, 13, 13, 0.03);
  --qw-accent-soft: rgba(2, 133, 255, 0.08);
  --qw-accent-soft-rgb: rgba(2, 133, 255, 0.14);
  --qw-scroll-thumb: rgba(31, 35, 40, 0.14);
  --qw-scroll-thumb-rgb: rgba(31, 35, 40, 0.24);
  --qw-pin-accent-bg: #eaf3ff;
  --qw-pin-accent-fg: #0285ff;
  --qw-pin-amber-bg: #fdf3e3;
  --qw-pin-amber-fg: #c77d1b;
  --qw-pin-green-bg: #e8f6ef;
  --qw-pin-green-fg: #1f9d5b;
  --qw-pin-purple-bg: #f1eefb;
  --qw-pin-purple-fg: #7c6bd4;
  --qw-sidebar-width: 298px;
  background: var(--qw-canvas);
  font-size: 13px;
}

html[data-theme="dark"] body[data-title-key="chat.title"] {
  --qw-canvas: #181818;
  --qw-sidebar: #1c1c1c;
  --qw-surface: #212121;
  --qw-surface-muted: #282828;
  --qw-surface-sunken: #0d0d0d;
  --qw-surface-elevated: #282828;
  --qw-titlebar-bg: rgba(24, 24, 24, 0.94);
  --qw-chip-bg: rgba(33, 33, 33, 0.96);
  --qw-composer-bg: rgba(33, 33, 33, 0.98);
  --qw-composer-dock-bg: rgba(24, 24, 24, 0.98);
  --qw-popover-bg: #212121;
  --qw-border: rgba(255, 255, 255, 0.08);
  --qw-border-strong: rgba(255, 255, 255, 0.14);
  --qw-text: #f3f3f1;
  --qw-text-secondary: rgba(243, 243, 241, 0.68);
  --qw-text-muted: rgba(243, 243, 241, 0.46);
  --qw-text-quaternary: rgba(243, 243, 241, 0.28);
  --qw-hover: rgba(255, 255, 255, 0.07);
  --qw-selected: rgba(51, 156, 255, 0.22);
  --qw-bubble: #282828;
  --qw-composer-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 32px rgba(0, 0, 0, 0.5);
  --qw-accent: #339cff;
  --qw-btn-primary-bg: #ffffff;
  --qw-btn-primary-fg: #0d0d0d;
  --qw-btn-primary-rgb: #e5e5e5;
  --qw-highlight-warn-bg: rgba(251, 106, 34, 0.12);
  --qw-overlay-scrim: rgba(24, 24, 24, 0.72);
  --qw-item-rgb: rgba(255, 255, 255, 0.05);
  --qw-accent-soft: rgba(51, 156, 255, 0.14);
  --qw-accent-soft-rgb: rgba(51, 156, 255, 0.22);
  --qw-scroll-thumb: rgba(255, 255, 255, 0.14);
  --qw-scroll-thumb-rgb: rgba(255, 255, 255, 0.24);
  --qw-pin-accent-bg: rgba(51, 156, 255, 0.16);
  --qw-pin-accent-fg: #339cff;
  --qw-pin-amber-bg: rgba(251, 146, 60, 0.16);
  --qw-pin-amber-fg: #fb923c;
  --qw-pin-green-bg: rgba(34, 197, 94, 0.14);
  --qw-pin-green-fg: #4ade80;
  --qw-pin-purple-bg: rgba(167, 139, 250, 0.16);
  --qw-pin-purple-fg: #a78bfa;
}

body[data-title-key="chat.title"] .app-shell {
  background: var(--qw-canvas);
}

/* Thin titlebar */
body[data-title-key="chat.title"] .thin-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px 0 10px;
  border-bottom: 1px solid var(--qw-border);
  background: var(--qw-titlebar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 40;
  flex-shrink: 0;
  min-width: 0;
  overflow: visible;
}

body[data-title-key="chat.title"] .thin-titlebar .spacer {
  flex: 1 1 auto;
  min-width: 0;
}

body[data-title-key="chat.title"] .thin-titlebar__legacy {
  display: none !important;
}

/* Main content column (Mac AppTopBar lives here) */
body[data-title-key="chat.title"] .main-column {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  background: var(--qw-canvas);
}

body[data-title-key="chat.title"] .main-column__views {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

body[data-title-key="chat.title"] .main-column__views > .chat-pane,
body[data-title-key="chat.title"] .main-column__views > .feature-pane {
  flex: 1;
  min-height: 0;
}

body[data-title-key="chat.title"] .content-topbar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 48px;
  padding: 0 12px;
  border-bottom: 1px solid var(--qw-border);
  background: var(--qw-canvas);
  flex-shrink: 0;
}

body[data-title-key="chat.title"] .content-topbar__btn {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border: none;
  border-radius: 8px;
  flex-shrink: 0;
  color: var(--qw-text-secondary);
  background: transparent;
  line-height: 0;
}

body[data-title-key="chat.title"] .content-topbar__btn .ui-icon-slot {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  line-height: 0;
}

body[data-title-key="chat.title"] .content-topbar__btn .ui-icon {
  display: block;
  width: 16px;
  height: 16px;
}

body[data-title-key="chat.title"] .content-topbar__btn:hover:not(:disabled) {
  background: var(--qw-hover);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .content-topbar__btn:disabled {
  opacity: 0.45;
  cursor: default;
}

body[data-title-key="chat.title"] .content-topbar__sidebar-toggle[aria-expanded="true"] {
  background: var(--qw-selected);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .content-topbar__nav {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

body[data-title-key="chat.title"] .content-topbar__dot {
  flex-shrink: 0;
}

body[data-title-key="chat.title"] .content-topbar__titles {
  min-width: 0;
  flex-shrink: 1;
}

body[data-title-key="chat.title"] .content-topbar__title {
  font-size: 14px;
  font-weight: 620;
  color: var(--qw-text);
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-title-key="chat.title"] .content-topbar__subtitle {
  font-size: 11px;
  color: var(--qw-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-title-key="chat.title"] .content-topbar__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

body[data-title-key="chat.title"] .content-topbar__feature-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

body[data-title-key="chat.title"] .content-topbar__feature-actions[hidden] {
  display: none !important;
}

body[data-title-key="chat.title"] .content-topbar__feature-actions .quiet-btn,
body[data-title-key="chat.title"] .content-topbar__feature-actions .apple-btn {
  height: 28px;
  min-height: 28px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body[data-title-key="chat.title"] .content-topbar__feature-actions .today-refresh-icon-btn {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
}

body[data-title-key="chat.title"] .content-topbar__feature-actions .today-refresh-icon-btn .ui-icon-slot {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
}

body[data-title-key="chat.title"] .content-topbar__feature-actions .today-refresh-icon-btn .ui-icon {
  width: 15px;
  height: 15px;
}

body[data-title-key="chat.title"] .content-topbar__feature-actions .feature-pane__status {
  font-size: 12px;
  white-space: nowrap;
}

body[data-title-key="chat.title"] .content-topbar__feature-actions .notes-head-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body[data-title-key="chat.title"] .content-topbar__feature-actions .notes-more-btn {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 8px;
}

body[data-title-key="chat.title"] .thin-titlebar__toggle {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  flex-shrink: 0;
}

body[data-title-key="chat.title"] .thin-titlebar__brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  color: var(--qw-text);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

body[data-title-key="chat.title"] .thin-titlebar__brand:hover {
  text-decoration: none;
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .thin-titlebar__brand-logo {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: block;
}

body[data-title-key="chat.title"] .thin-titlebar__nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  margin-right: 4px;
}

body[data-title-key="chat.title"] .thin-titlebar__nav a {
  color: var(--qw-text-muted);
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
}

body[data-title-key="chat.title"] .thin-titlebar__nav a:hover {
  color: var(--qw-text);
  background: var(--qw-hover);
  text-decoration: none;
}

body[data-title-key="chat.title"] .thin-titlebar__nav #nav-console[hidden] {
  display: none;
}

body[data-title-key="chat.title"].is-admin .thin-titlebar__nav #nav-console:not([hidden]) {
  display: inline-flex;
}

body[data-title-key="chat.title"] .thin-titlebar__main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  padding-left: 8px;
  border-left: 1px solid var(--qw-border);
  margin-left: 4px;
}

body[data-title-key="chat.title"] .thin-titlebar__titles {
  min-width: 0;
}

body[data-title-key="chat.title"] .thin-titlebar__title {
  font-size: 13px;
  font-weight: 650;
  color: var(--qw-text);
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-title-key="chat.title"] .thin-titlebar__subtitle {
  font-size: 11px;
  color: var(--qw-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-title-key="chat.title"] .thin-titlebar__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

body[data-title-key="chat.title"] .thin-titlebar__actions .ghost {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
}

body[data-title-key="chat.title"] .ui-icon {
  display: block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

/* Sidebar */
body[data-title-key="chat.title"] .chat-layout {
  --chat-sidebar-width: var(--qw-sidebar-width);
  --chat-sidebar-resizer-width: 6px;
  display: grid;
  grid-template-columns: var(--chat-sidebar-width) var(--chat-sidebar-resizer-width) minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: var(--qw-canvas);
}

body[data-title-key="chat.title"] .sidebar {
  background: var(--qw-sidebar);
  border-right: 1px solid var(--qw-border);
  color: var(--qw-text);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  width: var(--chat-sidebar-width);
}

body[data-title-key="chat.title"] .sidebar-brand-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 12px 8px;
  flex-shrink: 0;
}

body[data-title-key="chat.title"] .sidebar-brand-row .sidebar-search-btn {
  margin-left: auto;
}

body[data-title-key="chat.title"] .skills-subview {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

body[data-title-key="chat.title"] .skills-subview[hidden] {
  display: none !important;
}

body[data-title-key="chat.title"] .skills-detail__origin {
  margin: 0 0 8px;
}

body[data-title-key="chat.title"] .skills-detail__meta {
  margin: 14px 0 0;
}

body[data-title-key="chat.title"] .skills-detail__meta dt {
  margin: 0 0 4px;
}

body[data-title-key="chat.title"] .skills-detail__meta dd {
  margin: 0;
  word-break: break-all;
}

body[data-title-key="chat.title"] .sidebar-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 650;
  font-size: 13px;
  color: var(--qw-text);
  text-decoration: none;
}

body[data-title-key="chat.title"] .sidebar-brand:hover {
  text-decoration: none;
}

body[data-title-key="chat.title"] .sidebar-brand__spark {
  color: var(--qw-text-secondary);
  width: 16px;
  height: 16px;
}

body[data-title-key="chat.title"] .sidebar-search-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .account-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 10px 8px;
  padding: 10px 12px;
  border: 1px solid var(--qw-border-strong);
  border-radius: 12px;
  background: rgba(255, 253, 250, 0.78);
  cursor: pointer;
  text-align: left;
  width: calc(100% - 20px);
}

body[data-title-key="chat.title"] .account-card--footer {
  justify-content: center;
  gap: 0;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
}

body[data-title-key="chat.title"] .account-card:hover {
  background: var(--qw-highlight-warn-bg);
  border-color: rgba(31, 35, 40, 0.14);
}

body[data-title-key="chat.title"] .account-card--footer:hover {
  background: var(--qw-hover);
  border-color: transparent;
}

body[data-title-key="chat.title"] .account-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  flex: 1;
  min-width: 0;
}

body[data-title-key="chat.title"] .account-card--footer .account-row {
  flex: 0 0 auto;
}

body[data-title-key="chat.title"] .account-row__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(79, 110, 247, 0.12);
  color: #3d5ae0;
  border: 1px solid rgba(79, 110, 247, 0.22);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

body[data-title-key="chat.title"] .account-card--footer .account-row__avatar {
  width: 28px;
  height: 28px;
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #3a7aed, #7aa5f5);
  font-size: 11px;
}

body[data-title-key="chat.title"] .account-row__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .account-row__email {
  font-size: 11px;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .account-card--footer .account-row__meta,
body[data-title-key="chat.title"] .account-card--footer .account-card__chevron {
  display: none;
}

body[data-title-key="chat.title"] .account-card__chevron {
  color: var(--qw-text-muted);
  flex-shrink: 0;
}

body[data-title-key="chat.title"] .account-menu {
  position: absolute;
  left: 10px;
  right: 10px;
  top: calc(100% + 4px);
  z-index: 60;
  background: var(--qw-surface);
  border: 1px solid var(--qw-border-strong);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(13, 13, 13, 0.1);
  padding: 6px;
}

body[data-title-key="chat.title"] .account-menu-wrap--footer .account-menu {
  left: 0;
  right: auto;
  top: auto;
  bottom: calc(100% + 8px);
  width: 260px;
}

body[data-title-key="chat.title"] .account-menu[hidden] {
  display: none;
}

body[data-title-key="chat.title"] .account-menu__section {
  padding: 4px 0;
}

body[data-title-key="chat.title"] .account-menu__hdr {
  padding: 8px 10px 6px;
}

body[data-title-key="chat.title"] .account-menu__name {
  font-size: 13px;
  font-weight: 700;
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .account-menu__email {
  font-size: 11px;
  margin-top: 2px;
}

body[data-title-key="chat.title"] .account-menu__label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--qw-text-muted);
  padding: 8px 10px 4px;
}

body[data-title-key="chat.title"] .account-menu__identity {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--qw-text);
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}

body[data-title-key="chat.title"] .account-menu__identity:hover {
  background: var(--qw-hover);
}

body[data-title-key="chat.title"] .account-menu__identity-icon {
  flex-shrink: 0;
  width: 18px;
  margin-top: 1px;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .account-menu__identity-body {
  min-width: 0;
  flex: 1;
}

body[data-title-key="chat.title"] .account-menu__identity-name {
  display: block;
  font-weight: 600;
  line-height: 1.25;
}

body[data-title-key="chat.title"] .account-menu__identity-sub {
  display: block;
  margin-top: 2px;
  line-height: 1.35;
}

body[data-title-key="chat.title"] .account-menu__identity-check {
  flex-shrink: 0;
  width: 16px;
  margin-top: 2px;
  color: var(--qw-accent, #0285ff);
}

body[data-title-key="chat.title"] .account-menu__identity-check:empty {
  visibility: hidden;
}

body[data-title-key="chat.title"] .account-menu__action-icon {
  display: inline-flex;
  width: 18px;
  flex-shrink: 0;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .account-menu__action {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--qw-text);
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}

body[data-title-key="chat.title"] .account-menu__action:hover {
  background: var(--qw-hover);
}

body[data-title-key="chat.title"] .account-menu__divider {
  height: 1px;
  background: var(--qw-border);
  margin: 4px 6px;
}

body[data-title-key="chat.title"] .account-menu-wrap {
  position: relative;
  flex-shrink: 0;
}

body[data-title-key="chat.title"] .default-assistant-wrap {
  flex-shrink: 0;
  padding: 4px 8px 6px;
}

body[data-title-key="chat.title"] .default-assistant-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--qw-border);
  background: rgba(255, 253, 250, 0.66);
  color: var(--qw-text);
  cursor: pointer;
  text-align: left;
}

body[data-title-key="chat.title"] .default-assistant-card:hover {
  background: var(--qw-hover);
}

body[data-title-key="chat.title"] .default-assistant-card--active {
  border-color: rgba(58, 122, 237, 0.34);
  background: rgba(58, 122, 237, 0.1);
}

body[data-title-key="chat.title"] .default-assistant-card__avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #3a7aed, #7aa5f5);
}

body[data-title-key="chat.title"] .default-assistant-card__avatar .ui-icon {
  width: 18px;
  height: 18px;
}

body[data-title-key="chat.title"] .default-assistant-card__status {
  position: absolute;
  right: 1px;
  bottom: 1px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34c759;
  border: 1.5px solid var(--qw-sidebar);
}

body[data-title-key="chat.title"] .default-assistant-card__body {
  min-width: 0;
  flex: 1;
}

body[data-title-key="chat.title"] .default-assistant-card__title {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

body[data-title-key="chat.title"] .default-assistant-card__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 650;
}

body[data-title-key="chat.title"] .default-assistant-card__lock {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .default-assistant-card__lock .ui-icon {
  width: 12px;
  height: 12px;
}

body[data-title-key="chat.title"] .default-assistant-card__sub {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--qw-text-muted);
  font-size: 11.5px;
  line-height: 1.35;
}

body[data-title-key="chat.title"] .default-assistant-card-wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px;
  align-items: stretch;
}

body[data-title-key="chat.title"] .default-assistant-card-wrap .default-assistant-card {
  min-width: 0;
}

body[data-title-key="chat.title"] .default-assistant-card__actions {
  position: relative;
  display: flex;
  align-items: center;
}

body[data-title-key="chat.title"] .default-assistant-card__more {
  display: grid;
  place-items: center;
  width: 28px;
  height: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--qw-text-muted);
  cursor: pointer;
}

body[data-title-key="chat.title"] .default-assistant-card__more:hover:not(:disabled),
body[data-title-key="chat.title"] .default-assistant-card__more[aria-expanded="true"] {
  background: var(--qw-surface-hover, rgba(255, 255, 255, 0.06));
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .default-assistant-card__more:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

body[data-title-key="chat.title"] .default-assistant-card__menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 30;
  min-width: 168px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--qw-border, rgba(255, 255, 255, 0.08));
  background: var(--qw-surface-elevated, #1f1f1f);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

body[data-title-key="chat.title"] .default-assistant-card__menu-item {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--qw-text-secondary, #ccc);
  text-align: left;
  cursor: pointer;
}

body[data-title-key="chat.title"] .default-assistant-card__menu-item:hover {
  background: var(--qw-surface-hover, rgba(255, 255, 255, 0.06));
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .default-assistant-card__menu-item--danger {
  color: var(--qw-danger, #ef4444);
}

body[data-title-key="chat.title"] .assistant-clear-history-dialog {
  width: min(420px, calc(100vw - 32px));
  border: 1px solid var(--qw-border, rgba(255, 255, 255, 0.08));
  border-radius: 16px;
  padding: 0;
  background: var(--qw-surface-elevated, #1f1f1f);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .assistant-clear-history-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

body[data-title-key="chat.title"] .assistant-clear-history-dialog__form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

body[data-title-key="chat.title"] .assistant-clear-history-dialog__header,
body[data-title-key="chat.title"] .assistant-clear-history-dialog__body,
body[data-title-key="chat.title"] .assistant-clear-history-dialog__footer {
  padding: 16px 18px;
}

body[data-title-key="chat.title"] .assistant-clear-history-dialog__header {
  border-bottom: 1px solid var(--qw-border, rgba(255, 255, 255, 0.08));
}

body[data-title-key="chat.title"] .assistant-clear-history-dialog__header h2 {
  margin: 0;
  font-size: 16px;
}

body[data-title-key="chat.title"] .assistant-clear-history-dialog__body p {
  margin: 0;
  color: var(--qw-text-secondary, #ccc);
  line-height: 1.5;
}

body[data-title-key="chat.title"] .assistant-clear-history-dialog__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--qw-border, rgba(255, 255, 255, 0.08));
}

body[data-title-key="chat.title"] .assistant-clear-history-dialog__footer .danger {
  color: #fff;
  background: var(--qw-danger, #ef4444);
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
}

body[data-title-key="chat.title"] .ws-chip-wrap {
  display: none;
}

body[data-title-key="chat.title"] .nav-section {
  padding: 2px 8px 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}

body[data-title-key="chat.title"] .nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--qw-text);
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}

body[data-title-key="chat.title"] .nav-item:hover {
  background: var(--qw-hover);
}

body[data-title-key="chat.title"] .nav-item--active,
body[data-title-key="chat.title"] .nav-item.nav-item--primary.nav-item--active {
  background: var(--qw-selected);
  font-weight: 500;
}

body[data-title-key="chat.title"] .nav-item__icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.72;
}

body[data-title-key="chat.title"] .nav-item__label {
  flex: 1;
}

body[data-title-key="chat.title"] .nav-item__badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--qw-hover);
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .sessions-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 8px 4px;
  border: 0;
  overflow: hidden;
}

body[data-title-key="chat.title"] .sessions-section__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-color: rgba(31, 35, 40, 0.08) transparent;
  scrollbar-width: thin;
}

body[data-title-key="chat.title"] .sessions-section__scroll::-webkit-scrollbar {
  width: 6px;
}

body[data-title-key="chat.title"] .sessions-section__scroll::-webkit-scrollbar-track {
  background: transparent;
}

body[data-title-key="chat.title"] .sessions-section__scroll::-webkit-scrollbar-thumb {
  min-height: 32px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(31, 35, 40, 0.18);
  background-clip: content-box;
}

body[data-title-key="chat.title"] .sidebar:not(:hover) .sessions-section__scroll::-webkit-scrollbar-thumb {
  background: transparent;
  background-clip: content-box;
}

body[data-title-key="chat.title"] .sessions-section__scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(31, 35, 40, 0.32);
  background-clip: content-box;
}

body[data-title-key="chat.title"]:has(.sessions-section[hidden]) .nav-section {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body[data-title-key="chat.title"] .sessions-section__label {
  font-size: 11px;
  font-weight: 500;
  color: var(--qw-text-muted);
  padding: 4px 10px 6px;
  letter-spacing: 0.02em;
}

body[data-title-key="chat.title"] .sessions-section__head {
  display: none;
}

body[data-title-key="chat.title"] .session-list {
  flex: 0 0 auto;
  min-height: 0;
  overflow-y: visible;
  gap: 2px;
}

body[data-title-key="chat.title"] .session-list--mirror {
  margin-top: 2px;
}

body[data-title-key="chat.title"] #mirror-sessions-section {
  margin-top: 12px;
  padding: 6px 0 0;
  border-top: 0;
  border-radius: 0;
  background: transparent;
}

body[data-title-key="chat.title"] #mirror-sessions-label {
  display: block;
  padding: 0 10px 4px;
  color: #8d8c85;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: 0;
}

body[data-title-key="chat.title"] #mirror-sessions-hint {
  margin: 0;
  padding: 0 10px 8px;
  color: #9a9992;
  font-size: 12px;
  line-height: 1.5;
}

body[data-title-key="chat.title"] #mirror-sessions-section .session-list--mirror {
  margin-top: 0;
  opacity: 1;
}

body[data-title-key="chat.title"] #mirror-sessions-section .session-time-group__label {
  display: none;
}

body[data-title-key="chat.title"] #mirror-sessions-section .session-item--mirror {
  margin: 0;
  color: #898881;
  background: transparent;
}

body[data-title-key="chat.title"] #mirror-sessions-section .session-item--mirror:hover {
  background: rgba(0, 0, 0, 0.025);
}

body[data-title-key="chat.title"] #mirror-sessions-section .session-item--mirror.active {
  background: rgba(0, 0, 0, 0.055);
  color: #707068;
}

body[data-title-key="chat.title"] #mirror-sessions-section .session-item--mirror .name {
  color: inherit;
  font-weight: 400;
}

body[data-title-key="chat.title"] #mirror-sessions-section .session-item--mirror .session-age {
  color: #aaa9a1;
}

body[data-title-key="chat.title"] #mirror-sessions-section .session-item--mirror .session-route-icon {
  color: #9a9992;
}

body[data-title-key="chat.title"] #mirror-sessions-section .session-item--mirror .session-main {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
}

body[data-title-key="chat.title"] #mirror-sessions-section .session-item--mirror .name {
  flex: 1 1 auto;
  min-width: 0;
}

body[data-title-key="chat.title"] #mirror-sessions-section .session-item--mirror .session-age,
body[data-title-key="chat.title"] #mirror-sessions-section .session-item--mirror .session-route-icon,
body[data-title-key="chat.title"] #mirror-sessions-section .session-item--mirror .session-route-badge {
  flex: 0 0 auto;
}

body[data-title-key="chat.title"] .sessions-section__actions {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 4px;
}

body[data-title-key="chat.title"] .sessions-section__actions:not(:has(.sessions-show-more:not([hidden]))) {
  display: none;
}

body[data-title-key="chat.title"] .sidebar-projects {
  flex-shrink: 0;
  margin-bottom: 4px;
}

body[data-title-key="chat.title"] .sidebar-projects__label,
body[data-title-key="chat.title"] .sidebar-section__label.sidebar-projects__label {
  font-size: 11px;
  font-weight: 500;
  color: var(--qw-text-muted);
  padding: 4px 10px 6px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

body[data-title-key="chat.title"] .sidebar-project__head {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--qw-text);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

body[data-title-key="chat.title"] .sidebar-project__head:hover {
  background: var(--qw-hover);
}

body[data-title-key="chat.title"] .sidebar-project__sessions {
  margin-left: 10px;
  padding-left: 8px;
  border-left: 1px solid var(--qw-border);
}

body[data-title-key="chat.title"] .session-time-group__label {
  padding: 8px 10px 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--qw-text-muted);
  letter-spacing: 0.02em;
}

body[data-title-key="chat.title"] .sessions-show-more {
  display: block;
  width: 100%;
  margin: 0;
  padding: 6px 8px;
  text-align: center;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .ideas-subview,
body[data-title-key="chat.title"] .skills-subview {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

body[data-title-key="chat.title"] .ideas-subview[hidden],
body[data-title-key="chat.title"] .skills-subview[hidden] {
  display: none !important;
}

body[data-title-key="chat.title"] .ideas-group__label {
  display: block;
  width: 100%;
  margin: 10px 0 6px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--qw-text-muted);
  text-transform: uppercase;
}

body[data-title-key="chat.title"] .idea-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid var(--qw-border);
  border-radius: 12px;
  background: var(--qw-surface);
  cursor: pointer;
}

body[data-title-key="chat.title"] .idea-row__text {
  flex: 1;
  min-width: 0;
}

/* Files workbench (Finder-style) */
body[data-title-key="chat.title"] .files-pane {
  padding: 0;
}

body[data-title-key="chat.title"] .files-workbench {
  display: flex;
  flex: 1;
  min-height: 0;
  height: 100%;
  background: var(--qw-canvas);
}

body[data-title-key="chat.title"] .files-state {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px;
  color: var(--qw-text-muted);
  font-size: 14px;
}

body[data-title-key="chat.title"] .files-state__spinner {
  width: 22px;
  height: 22px;
  border: 2px solid var(--qw-border);
  border-top-color: var(--qw-text-secondary);
  border-radius: 50%;
  animation: files-spin 0.8s linear infinite;
}

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

body[data-title-key="chat.title"] .files-workbench__main {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
}

body[data-title-key="chat.title"] .files-locations {
  width: 176px;
  flex-shrink: 0;
  padding: 12px 8px;
  border-right: 1px solid var(--qw-border);
  background: var(--qw-surface-muted);
}

body[data-title-key="chat.title"] .files-locations__label {
  margin: 0 8px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .files-locations__active {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  font-size: 13px;
  font-weight: 500;
}

body[data-title-key="chat.title"] .files-locations__hint {
  margin: 8px 8px 12px;
  line-height: 1.4;
}

body[data-title-key="chat.title"] .files-locations__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--qw-text);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}

body[data-title-key="chat.title"] .files-locations__item:hover {
  background: var(--qw-hover);
}

body[data-title-key="chat.title"] .files-locations__icon .ui-icon {
  display: block;
}

body[data-title-key="chat.title"] .files-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

body[data-title-key="chat.title"] .files-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--qw-border);
  background: var(--qw-surface);
}

body[data-title-key="chat.title"] .files-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--qw-text-secondary);
  cursor: pointer;
}

body[data-title-key="chat.title"] .files-icon-btn:hover:not(:disabled),
body[data-title-key="chat.title"] .files-icon-btn.is-active {
  background: var(--qw-hover);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .files-icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

body[data-title-key="chat.title"] .files-breadcrumb {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  min-width: 120px;
  font-size: 12px;
}

body[data-title-key="chat.title"] .files-crumb {
  border: 0;
  background: transparent;
  padding: 2px 4px;
  border-radius: 6px;
  color: var(--qw-text-secondary);
  cursor: pointer;
  font: inherit;
}

body[data-title-key="chat.title"] .files-crumb:hover,
body[data-title-key="chat.title"] .files-crumb.is-current {
  background: var(--qw-hover);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .files-crumb-sep {
  display: inline-flex;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .files-crumb-sep .ui-icon {
  width: 12px;
  height: 12px;
}

body[data-title-key="chat.title"] .files-toolbar__search {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--qw-border);
  border-radius: 10px;
  background: var(--qw-surface);
}

body[data-title-key="chat.title"] .files-toolbar__search input {
  width: 96px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 12px;
  outline: none;
}

body[data-title-key="chat.title"] .files-toolbar__search input:focus {
  width: 140px;
}

body[data-title-key="chat.title"] .files-toolbar__view-toggle {
  display: flex;
  padding: 2px;
  border: 1px solid var(--qw-border);
  border-radius: 10px;
}

body[data-title-key="chat.title"] .files-toolbar__sort {
  position: relative;
}

body[data-title-key="chat.title"] .files-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: 1px solid var(--qw-border);
  border-radius: 10px;
  background: var(--qw-surface);
  color: var(--qw-text-secondary);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

body[data-title-key="chat.title"] .files-sort-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  min-width: 140px;
  padding: 4px;
  border: 1px solid var(--qw-border);
  border-radius: 12px;
  background: var(--qw-surface);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

body[data-title-key="chat.title"] .files-sort-menu button {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

body[data-title-key="chat.title"] .files-sort-menu button:hover {
  background: var(--qw-hover);
}

body[data-title-key="chat.title"] .files-toolbar__action {
  gap: 6px;
}

body[data-title-key="chat.title"] .files-new-folder-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--qw-border);
  background: var(--qw-surface-muted);
}

body[data-title-key="chat.title"] .files-new-folder-bar input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--qw-border);
  border-radius: 8px;
  font: inherit;
}

body[data-title-key="chat.title"] .files-ask-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--qw-border);
  background: var(--qw-surface);
}

body[data-title-key="chat.title"] .files-ask-bar input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--qw-border);
  border-radius: 10px;
  font: inherit;
  font-size: 13px;
}

body[data-title-key="chat.title"] .files-selection-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--qw-border);
  background: rgba(59, 130, 246, 0.06);
  font-size: 13px;
}

body[data-title-key="chat.title"] .files-danger-btn {
  color: #dc2626;
}

body[data-title-key="chat.title"] .files-body {
  display: flex;
  flex: 1;
  min-height: 0;
  min-width: 0;
}

body[data-title-key="chat.title"] .files-body--split .files-list-area {
  flex: 1;
  min-width: 0;
  border-right: 1px solid var(--qw-border);
}

body[data-title-key="chat.title"] .files-list-area {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

body[data-title-key="chat.title"] .files-preview {
  display: flex;
  flex-direction: column;
  width: min(44%, 520px);
  min-width: 280px;
  flex-shrink: 0;
  background: var(--qw-surface);
  border-left: 1px solid var(--qw-border);
}

body[data-title-key="chat.title"] .files-preview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--qw-border);
  background: var(--qw-surface-muted);
}

body[data-title-key="chat.title"] .files-preview__title {
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-title-key="chat.title"] .files-preview__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px 16px;
}

body[data-title-key="chat.title"] .files-preview__message {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

body[data-title-key="chat.title"] .files-preview__message--error {
  color: #dc2626;
}

body[data-title-key="chat.title"] .files-preview__text {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .files-preview__markdown {
  font-size: 14px;
  line-height: 1.6;
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .files-preview__markdown code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: #f4f4f5;
}

body[data-title-key="chat.title"] .files-preview__code {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f4f4f5;
  overflow-x: auto;
  font-size: 12px;
  line-height: 1.45;
}

body[data-title-key="chat.title"] .files-preview__image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
}

body[data-title-key="chat.title"] .files-row.is-previewing,
body[data-title-key="chat.title"] .files-grid__item.is-previewing {
  background: rgba(59, 130, 246, 0.08);
}

body[data-title-key="chat.title"] .files-dropzone {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

body[data-title-key="chat.title"] .files-dropzone__overlay {
  position: absolute;
  inset: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #2563eb;
  border-radius: 16px;
  background: rgba(59, 130, 246, 0.08);
  color: #2563eb;
  font-size: 14px;
  font-weight: 500;
  pointer-events: none;
}

body[data-title-key="chat.title"] .files-empty,
body[data-title-key="chat.title"] .files-search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 240px;
  padding: 32px;
  text-align: center;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .files-table-wrap {
  overflow: auto;
}

body[data-title-key="chat.title"] .files-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

body[data-title-key="chat.title"] .files-table thead {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--qw-surface);
}

body[data-title-key="chat.title"] .files-table th {
  padding: 8px 12px;
  border-bottom: 1px solid var(--qw-border);
  text-align: left;
  font-size: 11px;
  font-weight: 500;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .files-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

body[data-title-key="chat.title"] .files-table tr.files-row {
  cursor: pointer;
}

body[data-title-key="chat.title"] .files-table tr.files-row:hover {
  background: var(--qw-hover);
}

body[data-title-key="chat.title"] .files-table tr.files-row.is-selected {
  background: rgba(59, 130, 246, 0.1);
}

body[data-title-key="chat.title"] .files-row__name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

body[data-title-key="chat.title"] .files-row__name {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--qw-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-title-key="chat.title"] .files-row-menu-btn {
  display: inline-flex;
  padding: 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--qw-text-muted);
  cursor: pointer;
}

body[data-title-key="chat.title"] .files-row-menu-btn:hover {
  background: var(--qw-hover);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  padding: 16px;
}

body[data-title-key="chat.title"] .files-grid__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 10px;
  border: 1px solid var(--qw-border);
  border-radius: 12px;
  background: var(--qw-surface);
  cursor: pointer;
  font: inherit;
  text-align: center;
}

body[data-title-key="chat.title"] .files-grid__item:hover {
  background: var(--qw-hover);
}

body[data-title-key="chat.title"] .files-grid__item.is-selected {
  border-color: #2563eb;
  background: rgba(59, 130, 246, 0.08);
}

body[data-title-key="chat.title"] .files-grid__icon .ui-icon {
  width: 28px;
  height: 28px;
}

body[data-title-key="chat.title"] .files-grid__name {
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

body[data-title-key="chat.title"] .files-status-line {
  padding: 8px 14px 12px;
}

body[data-title-key="chat.title"] .session-item {
  min-height: 30px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .session-item:hover {
  background: var(--qw-hover);
}

body[data-title-key="chat.title"] .session-item.active {
  background: var(--qw-selected);
}

body[data-title-key="chat.title"] .sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px 10px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--qw-border);
  margin-top: auto;
  flex-shrink: 0;
  background: var(--qw-sidebar);
  position: relative;
  z-index: 2;
}

body[data-title-key="chat.title"] .sidebar-footer__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}

body[data-title-key="chat.title"] .sidebar-footer__icon-btn {
  position: relative;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .sidebar-footer__badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 14px;
  height: 14px;
  padding: 0 4px;
  border-radius: 999px;
  background: #e5484d;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}

body[data-title-key="chat.title"] .sidebar-footer__icon-btn.nav-item--active,
body[data-title-key="chat.title"] .sidebar-footer__icon-btn[data-nav-key].nav-item--active {
  background: var(--qw-selected);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .sidebar-footer__icon-btn:hover {
  background: var(--qw-hover);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .content-topbar__host-chip {
  display: block;
  position: relative;
  flex-shrink: 1;
  min-width: 0;
  margin-right: 2px;
  overflow: visible;
  z-index: 70;
}

body[data-title-key="chat.title"] .content-topbar {
  position: relative;
  z-index: 65;
}

body[data-title-key="chat.title"] .content-topbar__host-chip .host-chip {
  display: inline-flex;
  align-items: center;
  width: auto;
  max-width: min(220px, 34vw);
  height: 28px;
  padding: 0 9px 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(31, 35, 40, 0.1);
  background: var(--qw-chip-bg);
  font-size: 12px;
  font-weight: 500;
  gap: 6px;
  min-width: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  color: var(--qw-text-secondary);
  cursor: pointer;
}

body[data-title-key="chat.title"] .content-topbar__host-chip .host-chip[data-state="online"] {
  border-color: rgba(29, 143, 93, 0.22);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .content-topbar__host-chip .host-chip[data-state="offline"],
body[data-title-key="chat.title"] .content-topbar__host-chip .host-chip[data-state="connecting"] {
  border-color: rgba(240, 179, 65, 0.28);
  color: var(--qw-text-secondary);
}

body[data-title-key="chat.title"] .content-topbar__host-chip .host-chip > .dot {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  min-width: 7px;
  min-height: 7px;
  border-radius: 50%;
}

body[data-title-key="chat.title"] .content-topbar__host-chip .host-chip-label {
  flex: 1;
  min-width: 0;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-title-key="chat.title"] .content-topbar__host-chip .host-chip-caret {
  flex-shrink: 0;
  font-size: 9px;
  opacity: 0.45;
  margin-left: -2px;
}

body[data-title-key="chat.title"] .content-topbar__host-chip .host-chip:hover:not(:disabled) {
  background: var(--qw-hover);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .host-menu--portal {
  position: fixed;
  z-index: 1200;
  min-width: 280px;
}

body[data-title-key="chat.title"] .host-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1190;
  background: transparent;
}

body[data-title-key="chat.title"] .thin-titlebar .host-chip-wrap {
  display: block;
  position: relative;
  flex-shrink: 1;
  min-width: 0;
  margin-left: 8px;
  overflow: visible;
}

body[data-title-key="chat.title"] .thin-titlebar .host-chip {
  display: inline-flex;
  align-items: center;
  width: auto;
  max-width: min(240px, 34vw);
  height: 28px;
  padding: 0 9px 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(31, 35, 40, 0.1);
  background: var(--qw-chip-bg);
  font-size: 12px;
  font-weight: 500;
  gap: 6px;
  min-width: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  color: var(--qw-text-secondary);
}

body[data-title-key="chat.title"] .thin-titlebar .host-chip[data-state="online"] {
  border-color: rgba(29, 143, 93, 0.22);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .thin-titlebar .host-chip[data-state="offline"] {
  border-color: rgba(240, 179, 65, 0.28);
  color: var(--qw-text-secondary);
}

body[data-title-key="chat.title"] .thin-titlebar .host-chip > .dot {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  min-width: 7px;
  min-height: 7px;
  border-radius: 50%;
}

body[data-title-key="chat.title"] .thin-titlebar .host-chip-label {
  flex: 1;
  min-width: 0;
  max-width: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-title-key="chat.title"] .thin-titlebar .host-chip-caret {
  flex-shrink: 0;
  font-size: 9px;
  opacity: 0.45;
  margin-left: -2px;
}

body[data-title-key="chat.title"] .thin-titlebar .host-menu {
  top: calc(100% + 6px);
  right: 0;
  left: auto;
  bottom: auto;
  min-width: 280px;
  z-index: 1200;
}

body[data-title-key="chat.title"] .host-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1190;
  background: transparent;
}

body[data-title-key="chat.title"] .sidebar-footer__pill {
  display: none;
}

body[data-title-key="chat.title"] .sidebar-footer__settings {
  display: none;
}

/* Chat pane + stage */
body[data-title-key="chat.title"] .chat-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: var(--qw-canvas);
}

body[data-title-key="chat.title"] .chat-header {
  display: none;
}

body[data-title-key="chat.title"] .chat-stage {
  --composer-column-max: min(56rem, calc(100% - clamp(24px, 4vw, 64px)));
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  align-content: stretch;
}

body[data-title-key="chat.title"] .chat-start-page[hidden] {
  display: none;
}

body[data-title-key="chat.title"] .chat-stage.is-empty {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto auto minmax(0, 1fr);
  overflow-y: auto;
  align-content: stretch;
  justify-items: stretch;
  padding-top: 0;
}

body[data-title-key="chat.title"] .chat-stage.is-empty .chat-start-page {
  grid-row: 2;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  align-self: stretch;
  min-height: 0;
  padding: 0 24px 10px;
  text-align: center;
}

body[data-title-key="chat.title"] .chat-stage.is-empty .messages {
  display: none;
}

body[data-title-key="chat.title"] .chat-stage.is-empty .composer-shell {
  grid-row: 3;
  flex-shrink: 0;
  align-self: center;
  width: var(--composer-column-max);
  max-width: var(--composer-column-max);
  margin: 0 auto 8px;
}

body[data-title-key="chat.title"] .chat-stage.is-empty .composer {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  flex-shrink: 0;
  align-self: center;
  grid-row: unset;
  margin-top: 0;
  margin-bottom: 0;
  width: 100%;
  max-width: none;
}

body[data-title-key="chat.title"] .chat-stage.is-empty .chat-start-suggestions {
  grid-row: 4;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  align-self: center;
  width: var(--composer-column-max);
  max-width: var(--composer-column-max);
  margin: 0 auto 24px;
  padding: 0 4px;
  border-top: 0;
}

body[data-title-key="chat.title"] .chat-start-suggestions[hidden] {
  display: none !important;
}

body[data-title-key="chat.title"] .messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 32px clamp(20px, 6vw, 80px) 28px;
  gap: 28px;
  background: var(--qw-canvas);
}

body[data-title-key="chat.title"] .chat-start-page {
  text-align: center;
  padding: 0 24px 8px;
}

body[data-title-key="chat.title"] .chat-start-page__title {
  font-size: clamp(22px, 1.1rem + 0.85vw, 32px);
  font-weight: 460;
  letter-spacing: -0.01em;
  color: var(--qw-text);
  margin: 0;
}

body[data-title-key="chat.title"] .chat-start-page__cleared-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  margin-bottom: 4px;
}

body[data-title-key="chat.title"] .chat-start-page__assistant-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--qw-border);
  border-radius: 999px;
  background: var(--qw-item-rgb);
  color: var(--qw-text-secondary);
  font-size: 12px;
  line-height: 1.3;
}

body[data-title-key="chat.title"] .chat-start-page__assistant-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--qw-accent, #007aff);
  flex-shrink: 0;
}

body[data-title-key="chat.title"] .chat-start-page__cleared-body {
  max-width: 28rem;
  margin: 0;
  color: var(--qw-text-secondary);
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}

body[data-title-key="chat.title"] .chat-start-suggestion {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--qw-text-secondary);
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

body[data-title-key="chat.title"] button.chat-start-suggestion:hover:not(:disabled) {
  background: var(--qw-item-rgb);
  border-color: transparent;
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .chat-start-suggestion__icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: rgba(31, 35, 40, 0.42);
}

body[data-title-key="chat.title"] .chat-start-suggestion:hover .chat-start-suggestion__icon {
  color: rgba(31, 35, 40, 0.58);
}

body[data-title-key="chat.title"] .chat-start-suggestion__label {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-title-key="chat.title"] .empty-state {
  display: none;
}

body[data-title-key="chat.title"] .message.user .part-text {
  background: var(--qw-bubble);
  border: 0;
  border-radius: 18px;
  max-width: min(560px, 86%);
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.58;
}

body[data-title-key="chat.title"] .message.assistant .part-text {
  font-size: 15px;
  line-height: 1.78;
}

body[data-title-key="chat.title"] .composer {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  width: min(58rem, calc(100% - clamp(24px, 4vw, 64px)));
  max-width: 58rem;
  margin: 0 auto 20px;
  min-height: 86px;
  padding: 12px 14px 10px;
  border: 1px solid var(--qw-border-strong);
  border-radius: 20px;
  background: var(--qw-composer-bg);
  box-shadow: var(--qw-composer-shadow);
  backdrop-filter: blur(12px);
}

body[data-title-key="chat.title"] .composer textarea {
  border: 0;
  background: transparent;
  min-height: 34px;
  max-height: 160px;
  font-size: 15px;
  line-height: 1.6;
  padding: 3px 4px 3px 2px;
  overflow-y: auto;
  overflow-x: hidden;
  resize: none;
  scrollbar-width: thin;
  scrollbar-color: var(--qw-scroll-thumb) transparent;
}

body[data-title-key="chat.title"] .composer textarea::-webkit-scrollbar {
  width: 5px;
}

body[data-title-key="chat.title"] .composer textarea::-webkit-scrollbar-track {
  background: transparent;
}

body[data-title-key="chat.title"] .composer textarea::-webkit-scrollbar-thumb {
  background: var(--qw-scroll-thumb);
  border-radius: 999px;
}

body[data-title-key="chat.title"] .composer textarea::-webkit-scrollbar-thumb:hover {
  background: var(--qw-scroll-thumb-rgb);
}

body[data-title-key="chat.title"] .composer-input-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

body[data-title-key="chat.title"] .composer-input-row {
  display: block;
  min-width: 0;
}

body[data-title-key="chat.title"] .composer-input-row textarea {
  display: block;
  width: 100%;
  min-width: 0;
}

body[data-title-key="chat.title"] .attachment-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 0 2px 8px;
}

body[data-title-key="chat.title"] .attachment-strip--refs {
  padding-bottom: 6px;
}

body[data-title-key="chat.title"] .composer-ref-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: min(220px, 46vw);
  padding: 3px 6px 3px 8px;
  border: 1px solid rgba(31, 35, 40, 0.1);
  border-radius: 999px;
  background: rgba(31, 35, 40, 0.03);
  color: var(--qw-text-secondary, #55544f);
  font-size: 12px;
  line-height: 1.25;
}

body[data-title-key="chat.title"] .composer-ref-chip--note {
  border-color: rgba(168, 120, 0, 0.22);
  background: rgba(168, 120, 0, 0.07);
  color: #8a6200;
}

body[data-title-key="chat.title"] .composer-ref-chip--calendar {
  border-color: rgba(11, 107, 203, 0.2);
  background: rgba(11, 107, 203, 0.07);
  color: #0b6bcb;
}

body[data-title-key="chat.title"] .composer-ref-chip__icon .ui-icon {
  width: 12px;
  height: 12px;
  opacity: 0.85;
}

body[data-title-key="chat.title"] .composer-ref-chip__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  font-weight: 560;
}

body[data-title-key="chat.title"] .composer-ref-chip__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 1px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  opacity: 0.55;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

body[data-title-key="chat.title"] .composer-ref-chip__remove:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.06);
}

/* Paste-to-pill: collapsed pasted-text chip (Cursor parity). */
body[data-title-key="chat.title"] .composer-paste-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: min(260px, 50vw);
  padding: 4px 6px 4px 8px;
  border: 1px solid rgba(31, 35, 40, 0.1);
  border-radius: 10px;
  background: rgba(31, 35, 40, 0.03);
  color: var(--qw-text-secondary, #55544f);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

body[data-title-key="chat.title"] .composer-paste-chip:hover {
  background: rgba(31, 35, 40, 0.06);
}

body[data-title-key="chat.title"] .composer-paste-chip__icon .ui-icon {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

body[data-title-key="chat.title"] .composer-paste-chip__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

body[data-title-key="chat.title"] .composer-paste-chip__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 560;
  color: var(--qw-text, #1f2328);
}

body[data-title-key="chat.title"] .composer-paste-chip__meta {
  font-size: 11px;
  opacity: 0.7;
}

body[data-title-key="chat.title"] .composer-paste-chip__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  opacity: 0.55;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

body[data-title-key="chat.title"] .composer-paste-chip__remove:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.06);
}

.paste-text-viewer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.4);
}

.paste-text-viewer__panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 640px;
  max-height: 70vh;
  overflow: hidden;
  border: 1px solid rgba(31, 35, 40, 0.12);
  border-radius: 16px;
  background: var(--qw-surface, #fff);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.paste-text-viewer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(31, 35, 40, 0.1);
}

.paste-text-viewer__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--qw-text, #1f2328);
}

.paste-text-viewer__title .ui-icon {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.paste-text-viewer__meta {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.6;
}

.paste-text-viewer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--qw-text-secondary, #55544f);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.paste-text-viewer__close:hover {
  background: rgba(0, 0, 0, 0.06);
}

.paste-text-viewer__body {
  flex: 1;
  margin: 0;
  overflow: auto;
  padding: 14px 16px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--qw-text-secondary, #55544f);
}

/* Long user messages collapse to a clamped preview (Cursor parity). */
.part-text .user-text-content.is-collapsed {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 10;
  line-clamp: 10;
  overflow: hidden;
}

.part-text .user-text-toggle {
  display: inline-flex;
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--qw-text-secondary, #55544f);
  opacity: 0.7;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.part-text .user-text-toggle:hover {
  opacity: 1;
  text-decoration: underline;
}

body[data-title-key="chat.title"] .composer-skill-breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  max-width: min(280px, 100%);
  padding: 5px 8px 5px 10px;
  border: 1px solid var(--qw-border-strong);
  border-radius: 999px;
  background: var(--qw-surface-muted);
  color: var(--qw-text-secondary, #55544f);
  font-size: 13px;
  line-height: 1.2;
}

body[data-title-key="chat.title"] .composer-skill-breadcrumb[hidden] {
  display: none;
}

body[data-title-key="chat.title"] .composer-skill-breadcrumb__prefix {
  color: var(--qw-text-tertiary, #8a8983);
}

body[data-title-key="chat.title"] .composer-skill-breadcrumb__sep {
  color: var(--qw-text-tertiary, #aaa9a1);
}

body[data-title-key="chat.title"] .composer-skill-breadcrumb__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

body[data-title-key="chat.title"] .composer-skill-breadcrumb__clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 2px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--qw-text-tertiary, #8a8983);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

body[data-title-key="chat.title"] .composer-input-row textarea {
  flex: none;
  width: 100%;
  min-width: 0;
}

body[data-title-key="chat.title"] .composer-shell {
  width: var(--composer-column-max, min(52rem, calc(100% - 48px)));
  max-width: 52rem;
  margin: 0 auto 20px;
}

body[data-title-key="chat.title"] .composer-shell .composer {
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 20px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 24px rgba(15, 23, 42, 0.045);
}

body[data-title-key="chat.title"] .composer-tools {
  align-items: center;
  gap: 6px;
}

body[data-title-key="chat.title"] .composer-menu-anchor {
  position: relative;
}

body[data-title-key="chat.title"] .composer-menu-anchor--end {
  margin-left: auto;
}

body[data-title-key="chat.title"] .composer-icon-btn,
body[data-title-key="chat.title"] .composer .attach-btn {
  width: 34px;
  height: 34px;
  font-size: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

body[data-title-key="chat.title"] .composer-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 12rem;
  padding: 6px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--qw-text-secondary);
  font-size: 13px;
  line-height: 1.3;
  cursor: pointer;
}

body[data-title-key="chat.title"] .composer-picker-btn:hover:not(:disabled),
body[data-title-key="chat.title"] .composer-picker-btn.is-open {
  background: rgba(31, 35, 40, 0.06);
  color: var(--qw-text-primary, #222220);
}

body[data-title-key="chat.title"] .composer-picker-btn.is-accent {
  color: var(--qw-accent, #0b6bcb);
}

body[data-title-key="chat.title"] .composer-picker-btn.is-danger {
  background: rgba(214, 51, 77, 0.1);
  color: var(--web-danger, #d6334d);
}

body[data-title-key="chat.title"] .composer-picker-btn.is-danger:hover:not(:disabled),
body[data-title-key="chat.title"] .composer-picker-btn.is-danger.is-open {
  background: rgba(214, 51, 77, 0.08);
  color: var(--web-danger, #d6334d);
}

body[data-title-key="chat.title"] .composer-picker-btn:disabled,
body[data-title-key="chat.title"] .composer-picker-btn.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

body[data-title-key="chat.title"] .composer-picker-btn__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-title-key="chat.title"] .composer-picker-btn__icon .ui-icon,
body[data-title-key="chat.title"] .composer-picker-btn__chevron .ui-icon {
  width: 15px;
  height: 15px;
}

body[data-title-key="chat.title"] .composer-picker-btn__chevron .ui-icon {
  opacity: 0.55;
}

body[data-title-key="chat.title"] .composer-dropdown {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 40;
  min-width: 14rem;
  padding: 4px;
  border: 1px solid var(--qw-border-strong);
  border-radius: 12px;
  background: var(--qw-surface);
  box-shadow: 0 12px 28px rgba(13, 13, 13, 0.12);
}

body[data-title-key="chat.title"] .composer-dropdown--align-right {
  left: auto;
  right: 0;
}

body[data-title-key="chat.title"] .composer-dropdown__item {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--qw-text-primary, #222220);
  text-align: left;
  cursor: pointer;
}

body[data-title-key="chat.title"] .composer-dropdown__item:hover:not(:disabled) {
  background: rgba(31, 35, 40, 0.05);
}

body[data-title-key="chat.title"] .composer-dropdown__item:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

body[data-title-key="chat.title"] .composer-dropdown__icon .ui-icon {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  color: var(--qw-text-secondary);
}

body[data-title-key="chat.title"] .composer-dropdown__body {
  min-width: 0;
  flex: 1;
}

body[data-title-key="chat.title"] .composer-dropdown__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 1.35;
}

body[data-title-key="chat.title"] .composer-dropdown__subtitle {
  display: block;
  margin-top: 2px;
  color: var(--qw-text-tertiary, #8a8983);
  font-size: 11px;
  line-height: 1.4;
}

body[data-title-key="chat.title"] .composer-dropdown__badge {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(31, 35, 40, 0.06);
  color: var(--qw-text-tertiary, #8a8983);
  font-size: 10px;
  line-height: 1.5;
}

body[data-title-key="chat.title"] .composer-dropdown__check .ui-icon {
  width: 13px;
  height: 13px;
  color: var(--qw-accent, #0b6bcb);
}

body[data-title-key="chat.title"] .composer-dropdown__hint {
  padding: 8px 10px 6px;
  border-bottom: 1px solid var(--qw-border);
}

body[data-title-key="chat.title"] .composer-dropdown__hint-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .composer-dropdown__hint-path {
  margin-top: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  line-height: 1.4;
  color: var(--qw-text-tertiary, #8a8983);
  word-break: break-all;
}

body[data-title-key="chat.title"] .composer-dropdown__divider {
  height: 1px;
  margin: 8px 10px 4px;
  background: var(--qw-border);
}

body[data-title-key="chat.title"] .composer-dropdown__section-label {
  padding: 4px 12px 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .composer-dropdown__item--danger:hover:not(:disabled) {
  background: #fef2f2;
  color: #dc2626;
}

body[data-title-key="chat.title"] .composer-ref-picker-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(15, 15, 15, 0.28);
}

body[data-title-key="chat.title"] .composer-ref-picker-backdrop[hidden] {
  display: none;
}

body[data-title-key="chat.title"] .composer-ref-picker {
  width: min(420px, 100%);
  max-height: min(70vh, 520px);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--qw-border);
  border-radius: 16px;
  background: var(--qw-surface);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.14);
}

body[data-title-key="chat.title"] .composer-ref-picker__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--qw-border);
}

body[data-title-key="chat.title"] .composer-ref-picker__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

body[data-title-key="chat.title"] .composer-ref-picker__close {
  width: 28px;
  height: 28px;
  padding: 0;
}

body[data-title-key="chat.title"] .composer-ref-picker__list {
  overflow: auto;
  padding: 6px;
}

body[data-title-key="chat.title"] .composer-ref-picker__row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

body[data-title-key="chat.title"] .composer-ref-picker__row:hover {
  background: var(--qw-hover);
}

body[data-title-key="chat.title"] .composer-ref-picker__row-icon .ui-icon {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .composer-ref-picker__row-body {
  min-width: 0;
  flex: 1;
}

body[data-title-key="chat.title"] .composer-ref-picker__row-title {
  display: block;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
}

body[data-title-key="chat.title"] .composer-ref-picker__row-sub {
  display: block;
  margin-top: 2px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-title-key="chat.title"] .composer-ref-picker__empty {
  margin: 0;
  padding: 24px 16px;
  text-align: center;
}

body[data-title-key="chat.title"] .composer-ref-picker__foot {
  padding: 8px 10px 10px;
  border-top: 1px solid var(--qw-border);
  display: flex;
  justify-content: flex-end;
}

body[data-title-key="chat.title"] .composer-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 10px;
  padding: 6px 8px;
  border: 1px solid rgba(31, 35, 40, 0.08);
  border-radius: 14px;
  background: var(--qw-overlay-scrim);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

body[data-title-key="chat.title"] .composer-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: min(15rem, 52vw);
  padding: 6px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--qw-text-secondary);
  font-size: 13px;
  line-height: 1.3;
  cursor: pointer;
}

body[data-title-key="chat.title"] .composer-toolbar-btn .composer-picker-btn__icon .ui-icon,
body[data-title-key="chat.title"] .composer-toolbar-btn .composer-picker-btn__chevron .ui-icon {
  width: 15px;
  height: 15px;
}

body[data-title-key="chat.title"] .composer-toolbar-btn .composer-picker-btn__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

body[data-title-key="chat.title"] .composer-toolbar-btn .composer-picker-btn__chevron .ui-icon {
  opacity: 0.55;
}

body[data-title-key="chat.title"] .composer-toolbar-btn:hover:not(:disabled),
body[data-title-key="chat.title"] .composer-toolbar-btn.is-open {
  background: rgba(31, 35, 40, 0.05);
  color: var(--qw-text-primary, #222220);
}

body[data-title-key="chat.title"] .composer-toolbar-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

body[data-title-key="chat.title"] .composer-toolbar-env {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 6px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--qw-text-secondary);
  font-size: 13px;
  line-height: 1.3;
  white-space: nowrap;
  max-width: min(12rem, 40vw);
}

body[data-title-key="chat.title"] .composer-toolbar-env #composer-env-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

body[data-title-key="chat.title"] .composer-toolbar-env .ui-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.72;
}

body[data-title-key="chat.title"] .composer-toolbar .composer-dropdown {
  bottom: calc(100% + 6px);
  top: auto;
}

body[data-title-key="chat.title"] .composer-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: transparent;
}

body[data-title-key="chat.title"] #send-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  background: #898983;
  border-color: #898983;
}

body[data-title-key="chat.title"] #send-btn .ui-icon {
  width: 19px;
  height: 19px;
  stroke-width: 2;
}

/* Feature panes */
body[data-title-key="chat.title"] .feature-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: var(--qw-canvas);
  overflow: hidden;
}

body[data-title-key="chat.title"] .feature-pane__head {
  display: none;
}

body[data-title-key="chat.title"] .feature-pane__body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 20px 24px;
}

body[data-title-key="chat.title"] .calendar-pane .feature-pane__body,
body[data-title-key="chat.title"] .calendar-pane__body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}

body[data-title-key="chat.title"] .calendar-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
}

body[data-title-key="chat.title"] .calendar-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px 10px;
  border-bottom: 1px solid var(--qw-border);
  background: var(--qw-canvas);
  flex-shrink: 0;
}

body[data-title-key="chat.title"] .calendar-toolbar .cal-nav {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--qw-text-secondary);
  cursor: pointer;
  padding: 0;
  line-height: 0;
}

body[data-title-key="chat.title"] .calendar-toolbar .cal-nav .ui-icon-slot {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
}

body[data-title-key="chat.title"] .calendar-toolbar .cal-nav .ui-icon {
  width: 18px;
  height: 18px;
}

body[data-title-key="chat.title"] .calendar-toolbar .cal-nav:hover {
  background: var(--qw-hover);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .calendar-toolbar .cal-month-label {
  min-width: 9rem;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--qw-text);
  text-align: center;
}

body[data-title-key="chat.title"] .calendar-toolbar #cal-today {
  height: 28px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
  border: 1px solid var(--qw-border-strong);
  background: var(--qw-surface);
}

body[data-title-key="chat.title"] .content-topbar__feature-actions .apple-btn .ui-icon-slot {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  line-height: 0;
}

body[data-title-key="chat.title"] .content-topbar__feature-actions .apple-btn .ui-icon {
  width: 14px;
  height: 14px;
}

body[data-title-key="chat.title"] .content-topbar__feature-actions .apple-btn--accent .ui-icon-slot {
  width: 15px;
  height: 15px;
}

body[data-title-key="chat.title"] .content-topbar__feature-actions .apple-btn--accent .ui-icon {
  width: 15px;
  height: 15px;
}

body[data-title-key="chat.title"] .notes-pane .feature-pane__body.notes-split {
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 0;
  height: 100%;
}

body[data-title-key="chat.title"] .quiet-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--qw-border-strong);
  background: var(--qw-surface);
  font-size: 13px;
  color: var(--qw-text);
  cursor: pointer;
}

body[data-title-key="chat.title"] .quiet-btn:hover:not(:disabled):not(.quiet-btn--primary) {
  background: var(--qw-hover);
}

body[data-title-key="chat.title"] .quiet-btn--primary {
  background: #1a1c1f;
  border-color: #1a1c1f;
  color: #fff;
}

body[data-title-key="chat.title"] button.quiet-btn--primary:hover:not(:disabled) {
  background: #2f3238;
  border-color: #2f3238;
  color: #fff;
}

/* Preserve styled button intent on hover (generic :where(button):hover is low-specificity). */
body[data-title-key="chat.title"] button.ghost:hover:not(:disabled) {
  background: var(--qw-hover);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] button.ghost.danger-text:hover:not(:disabled),
body[data-title-key="chat.title"] button.danger-text:hover:not(:disabled) {
  color: #c33b4a;
}

body[data-title-key="chat.title"] button.apple-btn:hover:not(:disabled):not(.apple-btn--accent):not(.apple-btn--danger):not(.apple-btn--ghost) {
  background: var(--qw-surface);
  border-color: var(--qw-border-strong);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] button.apple-btn--accent:hover:not(:disabled) {
  background: #2f3238;
  border-color: #2f3238;
  color: #fff;
}

body[data-title-key="chat.title"] button.apple-btn--ghost:hover:not(:disabled) {
  background: var(--qw-hover);
  border-color: var(--qw-border-strong);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] button.apple-btn--danger:hover:not(:disabled) {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(195, 59, 74, 0.35);
  color: #c33b4a;
}

body[data-title-key="chat.title"] button.primary:hover:not(:disabled) {
  background: #111110;
  border-color: #111110;
  color: #fff;
}

body[data-title-key="chat.title"] button#send-btn:hover:not(:disabled) {
  background: #767670;
  border-color: #767670;
  color: #fff;
}

body[data-title-key="chat.title"] button#stop-btn:hover:not(:disabled) {
  background: #111110;
  border-color: #111110;
  color: #fff;
}

body[data-title-key="chat.title"] button.files-danger-btn:hover:not(:disabled) {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.22);
  color: #dc2626;
}

body[data-title-key="chat.title"] .thin-titlebar .host-chip:hover:not(:disabled) {
  background: var(--qw-surface);
}

body[data-title-key="chat.title"] .tasks-view-toggle__btn:hover:not(:disabled):not(.tasks-view-toggle__btn--active) {
  background: var(--qw-overlay-scrim);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .ideas-filter-bar__seg:hover:not(:disabled):not(.ideas-filter-bar__seg--active) {
  background: var(--qw-overlay-scrim);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] button.host-menu-item:hover:not(:disabled) {
  background: var(--qw-hover);
}

body[data-title-key="chat.title"] button.host-menu-action:hover:not(:disabled) {
  background: var(--qw-hover);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .quiet-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 36px;
  border: 1px solid var(--qw-border-strong);
  border-radius: 10px;
  background: var(--qw-surface);
  margin-bottom: 12px;
}

body[data-title-key="chat.title"] .quiet-search input {
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 13px;
  min-width: 0;
}

body[data-title-key="chat.title"] .quiet-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--qw-border);
  background: var(--qw-surface);
  font-size: 12px;
  color: var(--qw-text-secondary);
  cursor: pointer;
}

body[data-title-key="chat.title"] .quiet-chip.is-active {
  background: var(--qw-selected);
  border-color: transparent;
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .quiet-chip__count {
  font-size: 11px;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .quiet-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

body[data-title-key="chat.title"] .skills-hero {
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--qw-border);
  border-radius: 12px;
  background: var(--qw-surface-elevated);
}

body[data-title-key="chat.title"] .skills-hero__body {
  margin: 0 0 10px;
  line-height: 1.45;
}

body[data-title-key="chat.title"] .skills-hero__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 20px;
  font-size: 13px;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .skills-metric strong {
  color: var(--qw-text);
  font-weight: 650;
}

body[data-title-key="chat.title"] .skills-detail {
  padding: 16px;
  border: 1px solid var(--qw-border);
  border-radius: 12px;
  background: var(--qw-surface-elevated);
}

body[data-title-key="chat.title"] .skills-detail__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

body[data-title-key="chat.title"] .skills-detail__close {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
}

body[data-title-key="chat.title"] .skills-detail__desc {
  margin: 10px 0 8px;
  font-size: 14px;
  line-height: 1.45;
}

body[data-title-key="chat.title"] .skills-detail__missing {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--qw-warning, #b45309);
}

body[data-title-key="chat.title"] .skills-detail__actions {
  margin-top: 12px;
}

body[data-title-key="chat.title"] .skill-row__missing {
  display: block;
  margin-top: 2px;
}

body[data-title-key="chat.title"] .skill-row,
body[data-title-key="chat.title"] .task-row,
body[data-title-key="chat.title"] .message-feed-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--qw-border);
  border-radius: 12px;
  background: var(--qw-surface);
  margin-bottom: 8px;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

body[data-title-key="chat.title"] .skill-row:hover {
  background: var(--qw-hover);
}

body[data-title-key="chat.title"] .skills-market-load-more {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px;
  border-top: 1px solid var(--qw-border);
  text-align: center;
}

body[data-title-key="chat.title"] .skill-row__avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--qw-sidebar);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

body[data-title-key="chat.title"] .skill-row__body {
  flex: 1;
  min-width: 0;
}

body[data-title-key="chat.title"] .skill-row__head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

body[data-title-key="chat.title"] .skill-row__name {
  font-weight: 600;
  font-size: 13px;
}

body[data-title-key="chat.title"] .skill-row__badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--qw-hover);
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .skill-row__badge--platform {
  background: color-mix(in srgb, var(--qw-accent) 18%, transparent);
  color: var(--qw-accent);
}

body[data-title-key="chat.title"] .skill-row__badge--provisioned {
  background: color-mix(in srgb, #6b7cff 16%, transparent);
  color: #5a6be6;
}

body[data-title-key="chat.title"] .skill-row__badge--personal {
  background: color-mix(in srgb, #b87512 14%, transparent);
  color: #b87512;
}

body[data-title-key="chat.title"] .skills-hero__summary {
  margin: 0 0 8px;
}

body[data-title-key="chat.title"] .skills-metric--builtin strong {
  color: var(--qw-accent);
}

body[data-title-key="chat.title"] .skill-row__desc {
  font-size: 12px;
  color: var(--qw-text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body[data-title-key="chat.title"] .skill-row__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--qw-text-muted);
  flex-shrink: 0;
}

body[data-title-key="chat.title"] .skill-row__status--ready .dot {
  background: #1d8f5d;
}

body[data-title-key="chat.title"] .skill-row__status--setup .dot {
  background: #b87512;
}

body[data-title-key="chat.title"] .task-row__title {
  font-weight: 600;
  font-size: 13px;
}

body[data-title-key="chat.title"] .task-row__main {
  flex: 1;
  min-width: 0;
}

body[data-title-key="chat.title"] .message-feed-row__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

body[data-title-key="chat.title"] .message-feed-row__dot--approval {
  background: #b87512;
}

body[data-title-key="chat.title"] .message-feed-row__dot--task {
  background: #1d8f5d;
}

body[data-title-key="chat.title"] .feature-empty {
  padding: 24px 0;
  text-align: center;
}

/* Notes/calendar quiet overrides */
body[data-title-key="chat.title"] .apple-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--qw-border-strong);
  background: var(--qw-surface);
  font-size: 13px;
  cursor: pointer;
}

body[data-title-key="chat.title"] .apple-btn--accent {
  background: #1a1c1f;
  border-color: #1a1c1f;
  color: #fff;
}

body[data-title-key="chat.title"] .apple-btn--ghost {
  background: transparent;
}

body[data-title-key="chat.title"] .calendar-grid {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  padding: 8px 20px 20px;
  border-right: 1px solid var(--qw-border);
  background: var(--qw-canvas);
  overflow-y: auto;
}

body[data-title-key="chat.title"] .calendar-grid__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--qw-text-muted);
  padding-bottom: 4px;
}

body[data-title-key="chat.title"] .calendar-grid__cells {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(64px, auto);
  gap: 4px;
}

body[data-title-key="chat.title"] .cal-cell {
  min-height: 64px;
  border-radius: 10px;
  padding: 6px 4px;
  gap: 4px;
}

body[data-title-key="chat.title"] .cal-cell:hover {
  background: var(--qw-hover);
}

body[data-title-key="chat.title"] .cal-cell--other {
  opacity: 0.4;
}

body[data-title-key="chat.title"] .cal-cell__num {
  width: 24px;
  height: 24px;
  font-size: 13px;
  border-radius: 999px;
}

body[data-title-key="chat.title"] .cal-cell--today .cal-cell__num {
  background: #ff3b30;
  color: #fff;
  font-weight: 600;
}

body[data-title-key="chat.title"] .cal-cell--selected {
  background: rgba(31, 35, 40, 0.05);
  box-shadow: inset 0 0 0 1px var(--qw-border);
}

body[data-title-key="chat.title"] .cal-cell__dots {
  gap: 2px;
  min-height: 6px;
}

body[data-title-key="chat.title"] .cal-dot {
  width: 6px;
  height: 6px;
}

body[data-title-key="chat.title"] .calendar-agenda {
  padding: 12px 16px;
  border-left: none;
  background: var(--qw-canvas);
  overflow-y: auto;
}

body[data-title-key="chat.title"] .calendar-agenda__head {
  padding: 0 0 8px;
  font-size: 14px;
  font-weight: 650;
  color: var(--qw-text);
  border-bottom: none;
  position: static;
  background: transparent;
}

body[data-title-key="chat.title"] .calendar-agenda__list {
  gap: 2px;
}

body[data-title-key="chat.title"] .calendar-agenda__empty {
  border-color: var(--qw-border);
  border-radius: 10px;
  background: rgba(31, 35, 40, 0.03);
  color: var(--qw-text-secondary);
  padding: 24px 12px;
  font-size: 12px;
}

body[data-title-key="chat.title"] .agenda-row {
  padding: 8px;
  border-radius: 10px;
  gap: 10px;
}

body[data-title-key="chat.title"] .agenda-row:hover {
  background: var(--qw-hover);
}

body[data-title-key="chat.title"] .agenda-row__bar {
  width: 4px;
  border-radius: 2px;
  min-height: 28px;
}

body[data-title-key="chat.title"] .agenda-row__time {
  width: 56px;
  font-size: 12px;
  color: var(--qw-text-muted);
  padding-top: 1px;
}

body[data-title-key="chat.title"] .agenda-row__title {
  font-size: 14px;
  font-weight: 600;
}

body[data-title-key="chat.title"] .agenda-badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--qw-text-muted);
  border: 1px solid var(--qw-border);
  border-radius: 999px;
  padding: 1px 6px;
  flex-shrink: 0;
}

body[data-title-key="chat.title"] .calendar-pane .modal-backdrop {
  position: absolute;
  background: rgba(0, 0, 0, 0.4);
}

body[data-title-key="chat.title"] .calendar-pane .modal-card {
  border-color: var(--qw-border-strong);
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(13, 13, 13, 0.12);
  background: var(--qw-surface);
}

body[data-title-key="chat.title"] .calendar-pane .event-readonly-hint {
  border-radius: 10px;
  background: rgba(31, 35, 40, 0.04);
  color: var(--qw-text-muted);
  font-size: 12px;
}

body[data-title-key="chat.title"] .calendar-pane .source-row {
  border-color: var(--qw-border);
  border-radius: 10px;
}

body[data-title-key="chat.title"] .calendar-pane .sources-add {
  border-top-color: var(--qw-border);
}

body[data-title-key="chat.title"] .notes-split {
  gap: 0;
  min-height: 0;
  height: 100%;
}

body[data-title-key="chat.title"] .note-list-column {
  border-right: 1px solid var(--qw-border);
  background: #f7f7f6;
}

body[data-title-key="chat.title"] .note-list-search {
  border-bottom: 0;
  background: #f7f7f6;
}

body[data-title-key="chat.title"] .note-list-search__input {
  background: var(--qw-item-rgb);
}

body[data-title-key="chat.title"] .note-list {
  background: transparent;
  padding: 0 0 8px;
}

body[data-title-key="chat.title"] .note-list-footer {
  border-top: 1px solid var(--qw-border);
  background: #f7f7f6;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .note-item {
  width: calc(100% - 16px);
  margin: 0 8px;
  border-radius: 8px;
  border: 0;
  padding: 8px 12px;
  background: transparent;
}

body[data-title-key="chat.title"] .note-item:hover {
  background: var(--qw-item-rgb);
}

body[data-title-key="chat.title"] .note-item--active {
  background: rgba(251, 191, 36, 0.55);
  border: 0;
  box-shadow: none;
}

body[data-title-key="chat.title"] .note-detail-column {
  background: var(--qw-surface);
}

body[data-title-key="chat.title"] .note-editor {
  padding: 0;
  background: var(--qw-surface);
}

body[data-title-key="chat.title"] .note-editor__scroll {
  padding: 12px 0 0;
}

body[data-title-key="chat.title"] .note-editor__content {
  max-width: 48rem;
  margin: 0 auto;
  padding: 0 40px 24px;
}

body[data-title-key="chat.title"] .note-editor__divider {
  border-bottom-color: var(--qw-border);
}

body[data-title-key="chat.title"] .note-editor__toolbar {
  border-top: 1px solid var(--qw-border);
  background: var(--qw-surface);
}

body[data-title-key="chat.title"] .note-editor__tool-btn {
  color: var(--qw-accent, #0b6bcb);
}

body[data-title-key="chat.title"] .note-editor__tool-btn:hover {
  background: var(--qw-item-rgb);
}

body[data-title-key="chat.title"] .note-detail-empty {
  background: var(--qw-surface);
  color: var(--qw-text-muted);
}

@media (max-width: 860px) {
  body[data-title-key="chat.title"] .notes-pane .feature-pane__body.notes-split {
    grid-template-columns: 1fr;
  }
}

body[data-title-key="chat.title"] .note-backlinks {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--qw-border);
  border-radius: 12px;
  background: rgba(31, 35, 40, 0.02);
}

body[data-title-key="chat.title"] .note-backlinks ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

body[data-title-key="chat.title"] .note-backlinks .linkish {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--qw-accent, #0b6bcb);
  font-size: 12px;
  cursor: pointer;
}

body[data-title-key="chat.title"] .apple-btn--danger {
  color: #c33b4a;
  border-color: rgba(195, 59, 74, 0.35);
}

@media (max-width: 800px) {
  body[data-title-key="chat.title"] .thin-titlebar__brand span,
  body[data-title-key="chat.title"] .thin-titlebar__nav {
    display: none;
  }

  body[data-title-key="chat.title"] .chat-layout {
    display: block;
  }

  body[data-title-key="chat.title"] .sidebar {
    position: fixed;
    top: 40px;
    left: 0;
    bottom: 0;
    z-index: 50;
    width: min(300px, calc(100vw - 24px));
    transform: translateX(-102%);
    transition: transform 180ms ease;
  }

  body[data-title-key="chat.title"] .chat-layout.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body[data-title-key="chat.title"] .composer {
    width: calc(100% - 24px);
    margin-bottom: max(12px, env(safe-area-inset-bottom));
  }

  body[data-title-key="chat.title"] .composer-shell {
    width: calc(100% - 24px);
    margin-bottom: max(12px, env(safe-area-inset-bottom));
  }

  body[data-title-key="chat.title"] .composer-picker-btn__label {
    max-width: 5.5rem;
  }

  body[data-title-key="chat.title"] .calendar-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  body[data-title-key="chat.title"] .calendar-grid {
    border-right: none;
    border-bottom: 1px solid var(--qw-border);
    padding-bottom: 12px;
  }
}

/* Settings page (Mac SettingsView-style left rail + detail) */
body[data-title-key="chat.title"] .settings-pane .feature-pane__body.settings-layout {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 0;
  height: 100%;
  padding: 0;
  overflow: hidden;
}

body[data-title-key="chat.title"] .settings-rail {
  flex: 0 0 224px;
  width: 224px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 10px;
  border-right: 1px solid var(--qw-border);
  background: var(--qw-canvas);
  overflow-y: auto;
}

body[data-title-key="chat.title"] .settings-rail__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--qw-text-secondary);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

body[data-title-key="chat.title"] .settings-rail__item:hover:not(.is-active) {
  background: var(--qw-hover);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .settings-rail__item.is-active {
  background: var(--qw-selected);
  color: var(--qw-text);
  font-weight: 500;
}

body[data-title-key="chat.title"] .settings-rail__icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: inherit;
}

body[data-title-key="chat.title"] .settings-rail__item.is-active .settings-rail__icon {
  color: inherit;
}

body[data-title-key="chat.title"] .settings-detail {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  background: var(--qw-canvas);
}

body[data-title-key="chat.title"] .settings-section {
  width: 100%;
  max-width: 672px;
  margin: 0;
  padding: 24px 32px 48px;
}

body[data-title-key="chat.title"] .settings-section__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .settings-section__desc {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .settings-section__head {
  margin-bottom: 24px;
}

body[data-title-key="chat.title"] .settings-panel {
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--qw-border);
  border-radius: 12px;
  background: var(--qw-canvas);
}

body[data-title-key="chat.title"] .settings-panel--flush {
  padding: 0;
  overflow: hidden;
  background: var(--qw-canvas);
}

body[data-title-key="chat.title"] .settings-panel__intro {
  margin-bottom: 12px;
}

body[data-title-key="chat.title"] .settings-panel__label {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .settings-panel__hint {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--qw-text-muted);
  line-height: 1.45;
}

body[data-title-key="chat.title"] .settings-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

body[data-title-key="chat.title"] .settings-panel__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

body[data-title-key="chat.title"] .settings-lang-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

body[data-title-key="chat.title"] .settings-lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--qw-border);
  border-radius: 8px;
  background: var(--qw-canvas);
  color: var(--qw-text-secondary);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

body[data-title-key="chat.title"] .settings-lang-btn:hover:not(.is-active) {
  background: var(--qw-hover);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .settings-lang-btn.is-active {
  border-color: var(--qw-border-strong);
  background: var(--qw-selected);
  color: var(--qw-text);
  font-weight: 500;
}

body[data-title-key="chat.title"] .settings-lang-btn .ui-icon-slot {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

body[data-title-key="chat.title"] .settings-option-grid {
  display: grid;
  gap: 8px;
}

body[data-title-key="chat.title"] .settings-option-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body[data-title-key="chat.title"] .settings-option-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body[data-title-key="chat.title"] .settings-option-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--qw-border);
  border-radius: 8px;
  background: var(--qw-canvas);
  color: var(--qw-text-secondary);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

body[data-title-key="chat.title"] .settings-option-card:hover:not(.is-active) {
  background: var(--qw-hover);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .settings-option-card--tile {
  align-items: center;
  text-align: center;
  padding: 16px 12px;
  border-radius: 12px;
}

body[data-title-key="chat.title"] .settings-option-card__head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

body[data-title-key="chat.title"] .settings-option-card .ui-icon-slot {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: inherit;
}

body[data-title-key="chat.title"] .settings-option-card--tile .ui-icon-slot {
  width: 20px;
  height: 20px;
  margin-bottom: 4px;
}

body[data-title-key="chat.title"] .settings-option-card.is-active {
  border-color: var(--qw-border-strong);
  background: var(--qw-selected);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .settings-option-card__title {
  font-size: 14px;
  font-weight: 500;
  color: inherit;
}

body[data-title-key="chat.title"] .settings-option-card__hint {
  font-size: 11px;
  color: var(--qw-text-muted);
  line-height: 1.4;
}

body[data-title-key="chat.title"] .settings-option-card.is-active .settings-option-card__hint {
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .settings-kv-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

body[data-title-key="chat.title"] .settings-kv-list--bordered {
  border: none;
}

body[data-title-key="chat.title"] .settings-kv-list--bordered .settings-kv {
  padding: 12px 16px;
  border-bottom: 1px solid var(--qw-border);
}

body[data-title-key="chat.title"] .settings-kv-list--bordered .settings-kv:last-child {
  border-bottom: none;
}

body[data-title-key="chat.title"] .settings-kv {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
}

body[data-title-key="chat.title"] .settings-kv__label {
  color: var(--qw-text-secondary);
}

body[data-title-key="chat.title"] .settings-kv__value {
  color: var(--qw-text);
  font-weight: 500;
  text-align: right;
  word-break: break-word;
}

body[data-title-key="chat.title"] .settings-card__action {
  padding: 6px 12px;
  border: 1px solid var(--qw-border);
  border-radius: 8px;
  background: transparent;
  color: var(--qw-text-secondary);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

body[data-title-key="chat.title"] .settings-card__action:hover:not(:disabled) {
  background: var(--qw-hover);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .settings-signout-btn {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 6px 12px;
  border: 1px solid var(--qw-border);
  border-radius: 8px;
  background: transparent;
  color: var(--qw-text-secondary);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

body[data-title-key="chat.title"] .settings-signout-btn:hover:not(:disabled) {
  background: var(--qw-hover);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .settings-help-about {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

body[data-title-key="chat.title"] .settings-help-about__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--qw-hover);
  color: var(--qw-text-secondary);
}

body[data-title-key="chat.title"] .settings-help-about__icon.ui-icon-slot {
  width: 36px;
  height: 36px;
}

body[data-title-key="chat.title"] .settings-help-steps {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body[data-title-key="chat.title"] .settings-help-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

body[data-title-key="chat.title"] .settings-help-step__num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--qw-hover);
  color: var(--qw-text-secondary);
  font-size: 12px;
  font-weight: 600;
}

body[data-title-key="chat.title"] .settings-help-step__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

body[data-title-key="chat.title"] .settings-help-step__title {
  font-size: 14px;
  font-weight: 400;
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .settings-help-step__desc {
  font-size: 12px;
  color: var(--qw-text-muted);
  line-height: 1.45;
}

body[data-title-key="chat.title"] .settings-faq {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

body[data-title-key="chat.title"] .settings-faq__item {
  border: none;
  border-radius: 0;
  border-top: 1px solid var(--qw-border);
  overflow: visible;
}

body[data-title-key="chat.title"] .settings-faq__item:first-child {
  border-top: none;
}

body[data-title-key="chat.title"] .settings-faq__item summary {
  padding: 10px 0;
  font-size: 14px;
  font-weight: 400;
  color: var(--qw-text);
  cursor: pointer;
  list-style: none;
}

body[data-title-key="chat.title"] .settings-faq__item summary::-webkit-details-marker {
  display: none;
}

body[data-title-key="chat.title"] .settings-faq__item p {
  margin: 0 0 10px;
  padding: 0;
  font-size: 12px;
  color: var(--qw-text-muted);
  line-height: 1.5;
}

body[data-title-key="chat.title"] .settings-pane .device-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body[data-title-key="chat.title"] .settings-pane .device-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--qw-border);
  border-radius: 10px;
  background: var(--qw-surface);
}

body[data-title-key="chat.title"] .settings-pane .device-item:hover {
  background: var(--qw-surface-hover, rgba(0, 0, 0, 0.02));
}

body[data-title-key="chat.title"] .settings-pane .device-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--qw-selected);
  color: var(--qw-text-secondary);
}

body[data-title-key="chat.title"] .settings-pane .device-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .settings-pane .device-item .danger-text {
  color: var(--qw-danger, #d92d20);
}

@media (max-width: 768px) {
  body[data-title-key="chat.title"] .settings-pane .feature-pane__body.settings-layout {
    flex-direction: column;
  }

  body[data-title-key="chat.title"] .settings-rail {
    flex: none;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    border-right: none;
    border-bottom: 1px solid var(--qw-border);
    padding: 10px;
  }

  body[data-title-key="chat.title"] .settings-rail__item {
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
  }

  body[data-title-key="chat.title"] .settings-section {
    padding: 16px 16px 32px;
  }

  body[data-title-key="chat.title"] .settings-lang-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body[data-title-key="chat.title"] .settings-option-grid--2,
  body[data-title-key="chat.title"] .settings-option-grid--3 {
    grid-template-columns: 1fr;
  }
}

/* Dialogs / settings / onboarding */
body[data-title-key="chat.title"] dialog.settings-spa,
body[data-title-key="chat.title"] dialog.session-info-dialog,
body[data-title-key="chat.title"] dialog.search-conversations-dialog,
body[data-title-key="chat.title"] dialog#child-sessions-dialog,
body[data-title-key="chat.title"] dialog.approval-dialog {
  border: 1px solid var(--qw-border-strong);
  border-radius: 14px;
  box-shadow: 0 24px 48px rgba(13, 13, 13, 0.12);
  background: var(--qw-surface);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] dialog.session-info-dialog {
  width: min(560px, calc(100vw - 36px));
  max-height: min(82vh, 760px);
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  box-shadow: 0 28px 72px rgba(13, 13, 13, 0.18);
}

body[data-title-key="chat.title"] dialog.session-info-dialog::backdrop {
  background: rgba(13, 13, 13, 0.58);
}

body[data-title-key="chat.title"] dialog.session-info-dialog .dialog-head {
  min-height: 60px;
  padding: 0 22px;
  border-bottom: 1px solid var(--qw-border);
  background: var(--qw-surface);
}

body[data-title-key="chat.title"] dialog.session-info-dialog .dialog-head strong {
  font-size: 15px;
  font-weight: 680;
  color: var(--qw-text);
}

body[data-title-key="chat.title"] #session-info-close-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  color: var(--qw-text-secondary);
  background: transparent;
}

body[data-title-key="chat.title"] #session-info-close-btn:hover {
  background: var(--qw-hover);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] #session-info-close-btn .ui-icon {
  width: 17px;
  height: 17px;
}

body[data-title-key="chat.title"] #session-info-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: calc(min(82vh, 760px) - 61px);
  padding: 22px;
  overflow: auto;
}

body[data-title-key="chat.title"] .session-info-summary {
  align-items: center;
}

body[data-title-key="chat.title"] .session-info-title {
  font-size: 17px;
  font-weight: 680;
  letter-spacing: 0;
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .session-info-count {
  font-size: 13px;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .session-info-section {
  gap: 9px;
}

body[data-title-key="chat.title"] .session-info-section-title {
  font-size: 12px;
  font-weight: 650;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .session-info-workdir {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--qw-surface-sunken);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .session-info-workdir code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
}

body[data-title-key="chat.title"] .session-info-workdir__icon,
body[data-title-key="chat.title"] .session-info-meta-icon,
body[data-title-key="chat.title"] .session-info-action__icon,
body[data-title-key="chat.title"] .session-info-action__chevron {
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .session-info-meta {
  gap: 2px;
  padding: 2px 0;
}

body[data-title-key="chat.title"] .session-info-meta-row {
  grid-template-columns: 24px minmax(120px, 1fr) minmax(0, 1.2fr);
  min-height: 32px;
  gap: 10px;
  font-size: 13px;
}

body[data-title-key="chat.title"] .session-info-meta-label {
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .session-info-meta-value {
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .session-info-actions {
  gap: 4px;
}

body[data-title-key="chat.title"] .session-info-action,
body[data-title-key="chat.title"] .session-info-artifact {
  min-height: 38px;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  color: var(--qw-text);
  background: transparent;
}

body[data-title-key="chat.title"] .session-info-action:hover:not(:disabled),
body[data-title-key="chat.title"] .session-info-artifact:hover:not(:disabled) {
  background: var(--qw-hover);
}

body[data-title-key="chat.title"] .session-info-action:disabled {
  color: var(--qw-text-quaternary);
  cursor: default;
}

body[data-title-key="chat.title"] .session-info-action.danger-text {
  color: var(--danger);
}

body[data-title-key="chat.title"] .session-info-action.danger-text:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.08);
}

body[data-title-key="chat.title"] .session-info-artifacts {
  gap: 4px;
}

body[data-title-key="chat.title"] .session-info-artifact__title {
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .provisioning-overlay {
  background: var(--qw-overlay-scrim);
}

body[data-title-key="chat.title"] .provisioning-card,
body[data-title-key="chat.title"] .onboarding-card {
  border-color: var(--qw-border-strong);
  background: var(--qw-surface);
  box-shadow: 0 20px 48px rgba(13, 13, 13, 0.08);
}

body[data-title-key="chat.title"] dialog.settings-spa {
  width: min(480px, calc(100vw - 32px));
  max-height: min(85vh, 720px);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body[data-title-key="chat.title"] .settings-spa__head {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--qw-border);
}

body[data-title-key="chat.title"] .settings-spa__title {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .settings-spa__done {
  border: none;
  background: transparent;
  color: var(--qw-text);
  font-size: 14px;
  font-weight: 500;
  padding: 4px 0;
  border-radius: 0;
}

body[data-title-key="chat.title"] .settings-spa__done:hover:not(:disabled) {
  background: transparent;
  opacity: 0.72;
}

body[data-title-key="chat.title"] .settings-spa__tabs {
  gap: 8px;
  padding: 10px 20px 12px;
  border-bottom: 1px solid var(--qw-border);
}

body[data-title-key="chat.title"] .settings-tab {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--qw-text-secondary);
  background: transparent;
}

body[data-title-key="chat.title"] .settings-tab.is-active {
  color: var(--qw-text);
  border-color: #0b6bcb;
  background: var(--qw-surface);
}

body[data-title-key="chat.title"] .settings-tab:hover:not(.is-active) {
  color: var(--qw-text);
  background: transparent;
}

body[data-title-key="chat.title"] .settings-spa__body {
  padding: 16px 20px 20px;
  gap: 12px;
}

body[data-title-key="chat.title"] .settings-card {
  border-color: var(--qw-border);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--qw-surface);
  gap: 10px;
}

body[data-title-key="chat.title"] .settings-card__title {
  font-size: 12px;
  font-weight: 500;
  color: var(--qw-text-muted);
  text-transform: none;
  letter-spacing: normal;
}

body[data-title-key="chat.title"] .settings-card__action {
  font-size: 12px;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .settings-card__action:hover:not(:disabled) {
  color: var(--qw-text);
  background: transparent;
}

body[data-title-key="chat.title"] .settings-card__desc {
  color: var(--qw-text-secondary);
}

body[data-title-key="chat.title"] .settings-field__label {
  font-size: 13px;
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .settings-field__value {
  font-size: 13px;
  color: var(--qw-text-secondary);
}

body[data-title-key="chat.title"] .settings-select,
body[data-title-key="chat.title"] #settings-theme-select {
  border-color: var(--qw-border);
  border-radius: 8px;
  background-color: var(--qw-item-rgb);
  color: var(--qw-text);
  font-size: 13px;
}

body[data-title-key="chat.title"] .settings-spa .language-switcher--dropdown .language-switcher-trigger {
  border-radius: 8px;
  border-color: var(--qw-border);
  background: var(--qw-item-rgb);
  color: var(--qw-text);
  font-size: 13px;
  min-width: 148px;
  padding: 6px 10px;
}

body[data-title-key="chat.title"] .settings-spa .language-switcher-menu {
  border-color: var(--qw-border-strong);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(13, 13, 13, 0.1);
}

body[data-title-key="chat.title"] .settings-signout-btn {
  color: var(--qw-text);
  font-size: 14px;
  font-weight: 500;
}

body[data-title-key="chat.title"] .settings-signout-btn:hover:not(:disabled) {
  color: #c33b4a;
  background: transparent;
}

body[data-title-key="chat.title"] .settings-spa .device-item {
  border-color: var(--qw-border);
  border-radius: 10px;
  background: rgba(31, 35, 40, 0.02);
  padding: 10px 12px;
}

body[data-title-key="chat.title"] .settings-spa .device-item:hover {
  background: var(--qw-hover);
}

body[data-title-key="chat.title"] .settings-spa .device-badge {
  border-color: rgba(11, 107, 203, 0.28);
  background: rgba(11, 107, 203, 0.08);
  color: #0b6bcb;
}

body[data-title-key="chat.title"] .settings-spa .device-empty {
  border-color: var(--qw-border);
  border-style: dashed;
  border-radius: 10px;
  color: var(--qw-text-muted);
  background: rgba(31, 35, 40, 0.02);
}

body[data-title-key="chat.title"] .settings-spa .device-item .ghost.small {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
}

body[data-title-key="chat.title"] dialog.settings-spa::backdrop {
  background: rgba(13, 13, 13, 0.32);
}

body[data-title-key="chat.title"] .settings-spa .device-item .danger-text {
  color: var(--qw-text-muted);
  font-size: 12px;
}

body[data-title-key="chat.title"] .settings-spa .device-item .danger-text:hover:not(:disabled) {
  color: #c33b4a;
  background: transparent;
}

/* ---- Skills master-detail split layout (mirrors the desktop client) ---- */

body[data-title-key="chat.title"] .skills-pane {
  position: relative;
}

body[data-title-key="chat.title"] .skills-pane--split {
  flex-direction: row;
}

body[data-title-key="chat.title"] .skills-pane--split #skills-list-view {
  flex: 0 0 38%;
  min-width: 300px;
  max-width: 440px;
  border-right: 1px solid var(--qw-border);
}

body[data-title-key="chat.title"] .skills-pane--split #skills-detail-view {
  flex: 1;
  min-width: 0;
}

body[data-title-key="chat.title"] .skill-row.is-selected {
  background: var(--qw-selected);
  border-color: transparent;
}

/* In split layout the detail pane keeps its own eyebrow + title (the topbar
   only shows one title), mirroring the desktop client's detail scaffold. */
body[data-title-key="chat.title"]
  .skills-pane--split
  .feature-pane__head.skills-detail-head
  .skills-detail-head__titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

body[data-title-key="chat.title"] .skills-detail-head__eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .skills-detail-head__titles h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 620;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-title-key="chat.title"] .skills-detail-empty {
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 200px;
  font-size: 13px;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .skills-detail__hero {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

body[data-title-key="chat.title"] .skills-detail__avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--qw-sidebar);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 18px;
  flex-shrink: 0;
}

body[data-title-key="chat.title"] .skills-detail__hero-meta {
  min-width: 0;
  flex: 1;
}

body[data-title-key="chat.title"] .skills-detail__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

body[data-title-key="chat.title"] .skills-detail__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .skills-detail__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

body[data-title-key="chat.title"] .skills-detail__dot--ready {
  background: #1d8f5d;
}

body[data-title-key="chat.title"] .skills-detail__dot--setup {
  background: #b87512;
}

body[data-title-key="chat.title"] .skills-detail__section {
  margin-top: 18px;
}

body[data-title-key="chat.title"] .skills-detail__label {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .skills-detail-warning {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, #b87512 40%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, #b87512 8%, transparent);
}

body[data-title-key="chat.title"] .skills-detail-warning__title {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #b45309;
}

body[data-title-key="chat.title"] .skills-detail-warning__hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--qw-text-secondary);
}

body[data-title-key="chat.title"] .skills-detail-warning .skills-detail__missing {
  margin: 8px 0 0;
}

body[data-title-key="chat.title"] .skills-detail-warning__btn {
  margin-top: 10px;
  background: var(--qw-surface);
}

body[data-title-key="chat.title"] .skills-detail__meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  margin: 18px 0 0;
}

body[data-title-key="chat.title"] .skills-detail__meta-grid dt {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .skills-detail__meta-grid dd {
  margin: 2px 0 0;
  font-size: 13px;
  word-break: break-all;
}

body[data-title-key="chat.title"] .skills-detail__meta-wide {
  grid-column: 1 / -1;
}

body[data-title-key="chat.title"] .skills-detail__path {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--qw-text-muted);
  word-break: break-all;
}

body[data-title-key="chat.title"] .skills-detail__file-label {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--qw-text-secondary);
}

body[data-title-key="chat.title"] .skills-detail__preview {
  margin: 6px 0 0;
  max-height: 220px;
  overflow: auto;
  padding: 12px;
  border-radius: 10px;
  background: var(--qw-sidebar);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

body[data-title-key="chat.title"] .skills-detail__link {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--qw-accent);
  cursor: pointer;
}

body[data-title-key="chat.title"] .skills-detail__link:hover {
  text-decoration: underline;
}

body[data-title-key="chat.title"] .skills-detail__files {
  margin-top: 12px;
  border: 1px solid var(--qw-border);
  border-radius: 10px;
  overflow: hidden;
}

body[data-title-key="chat.title"] .skills-detail__file-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-bottom: 1px solid var(--qw-border);
  background: var(--qw-surface);
  text-align: left;
  cursor: pointer;
}

body[data-title-key="chat.title"] .skills-detail__file-row:last-child {
  border-bottom: 0;
}

body[data-title-key="chat.title"] .skills-detail__file-row:hover {
  background: var(--qw-hover);
}

body[data-title-key="chat.title"] .skills-detail__file-path {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

body[data-title-key="chat.title"] .skill-file-modal {
  position: absolute;
  inset: 0;
  z-index: 30;
}

body[data-title-key="chat.title"] .skill-file-card {
  max-width: 720px;
}

body[data-title-key="chat.title"] .skill-file-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

body[data-title-key="chat.title"] .skill-file-card__title {
  margin: 0;
  font-size: 13px;
  word-break: break-all;
}

body[data-title-key="chat.title"] .skill-file-card__content {
  margin: 0;
  max-height: 60vh;
  overflow: auto;
  padding: 12px;
  border-radius: 10px;
  background: var(--qw-sidebar);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Automations workbench (Mac TasksView-aligned) */
body[data-title-key="chat.title"] .tasks-workbench-wrap {
  padding: 0 !important;
  overflow: hidden;
}

body[data-title-key="chat.title"] .tasks-workbench {
  height: 100%;
  min-height: 0;
}

body[data-title-key="chat.title"] .tasks-workbench__grid {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

body[data-title-key="chat.title"] .tasks-workbench__grid--split {
  flex-direction: row;
}

body[data-title-key="chat.title"] .tasks-list-pane {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 16px 20px 24px;
}

body[data-title-key="chat.title"] .tasks-list-pane--split {
  flex: 0 0 38%;
  max-width: 460px;
  min-width: 320px;
  border-right: 1px solid var(--qw-border);
}

body[data-title-key="chat.title"] .tasks-list-pane__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

body[data-title-key="chat.title"] .tasks-list-pane__section-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

body[data-title-key="chat.title"] .tasks-list-pane__count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--qw-hover);
  font-size: 11px;
  font-weight: 500;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .tasks-view-toggle {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border-radius: 10px;
  background: var(--qw-hover);
}

body[data-title-key="chat.title"] .tasks-view-toggle__btn {
  border: 0;
  background: transparent;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--qw-text-muted);
  cursor: pointer;
}

body[data-title-key="chat.title"] .tasks-view-toggle__btn--active {
  background: var(--qw-surface);
  color: var(--qw-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

body[data-title-key="chat.title"] .tasks-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

body[data-title-key="chat.title"] .tasks-stats__item--ok::before,
body[data-title-key="chat.title"] .tasks-stats__item--fail::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: middle;
}

body[data-title-key="chat.title"] .tasks-stats__item--ok::before {
  background: #16a34a;
}

body[data-title-key="chat.title"] .tasks-stats__item--fail::before {
  background: #dc2626;
}

body[data-title-key="chat.title"] .tasks-stats__history {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--qw-accent);
  font-size: 12px;
  cursor: pointer;
}

body[data-title-key="chat.title"] .tasks-group + .tasks-group {
  margin-top: 16px;
}

body[data-title-key="chat.title"] .tasks-group__label {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body[data-title-key="chat.title"] .tasks-cron-list {
  overflow: hidden;
  border: 1px solid var(--qw-border);
  border-radius: 14px;
  background: var(--qw-surface);
}

body[data-title-key="chat.title"] .tasks-cron-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-top: 1px solid var(--qw-border);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

body[data-title-key="chat.title"] .tasks-cron-row:first-child {
  border-top: 0;
}

body[data-title-key="chat.title"] .tasks-cron-row:hover,
body[data-title-key="chat.title"] .tasks-cron-row--active {
  background: var(--qw-hover);
}

body[data-title-key="chat.title"] .tasks-cron-row__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--qw-border);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 16px;
}

body[data-title-key="chat.title"] .tasks-cron-row__icon--paused {
  opacity: 0.55;
}

body[data-title-key="chat.title"] .tasks-cron-row__body {
  flex: 1;
  min-width: 0;
}

body[data-title-key="chat.title"] .tasks-cron-row__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

body[data-title-key="chat.title"] .tasks-cron-row__title {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-title-key="chat.title"] .tasks-cron-row__badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--qw-hover);
  color: var(--qw-text-muted);
  text-transform: uppercase;
}

body[data-title-key="chat.title"] .tasks-cron-row__meta {
  display: block;
  margin-top: 2px;
}

body[data-title-key="chat.title"] .tasks-cron-row__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

body[data-title-key="chat.title"] .tasks-cron-row__run {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--qw-border);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--qw-text-secondary);
}

body[data-title-key="chat.title"] .tasks-cron-row__dot.tasks-status--ok {
  background: #16a34a;
}

body[data-title-key="chat.title"] .tasks-cron-row__dot.tasks-status--error {
  background: #dc2626;
}

body[data-title-key="chat.title"] .tasks-cron-row__dot.tasks-status--neutral {
  background: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .tasks-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  width: fit-content;
}

body[data-title-key="chat.title"] .tasks-status-pill.tasks-status--ok {
  color: #166534;
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
}

body[data-title-key="chat.title"] .tasks-status-pill.tasks-status--error {
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

body[data-title-key="chat.title"] .tasks-status-pill.tasks-status--neutral {
  color: var(--qw-text-secondary);
  background: var(--qw-surface-muted);
  border: 1px solid var(--qw-border);
}

body[data-title-key="chat.title"] .tasks-run-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--qw-border);
  border-radius: 12px;
  background: var(--qw-surface);
  margin-bottom: 8px;
}

body[data-title-key="chat.title"] .tasks-run-row__main {
  flex: 1;
  min-width: 0;
}

body[data-title-key="chat.title"] .tasks-run-row__title {
  font-size: 13px;
  font-weight: 600;
}

body[data-title-key="chat.title"] .tasks-run-row__status {
  font-size: 11px;
  flex-shrink: 0;
}

body[data-title-key="chat.title"] .tasks-empty {
  text-align: center;
  padding: 48px 20px;
  border: 1px dashed var(--qw-border-strong);
  border-radius: 16px;
}

body[data-title-key="chat.title"] .tasks-empty--error {
  color: #dc2626;
  border-style: solid;
}

body[data-title-key="chat.title"] .tasks-empty__icon {
  font-size: 32px;
  margin-bottom: 12px;
}

body[data-title-key="chat.title"] .tasks-detail {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 20px 24px 32px;
}

body[data-title-key="chat.title"] .tasks-detail--empty {
  max-width: 760px;
}

body[data-title-key="chat.title"] .tasks-detail__heading {
  margin: 0 0 8px;
  font-size: 16px;
}

body[data-title-key="chat.title"] .tasks-detail__back {
  margin-bottom: 12px;
}

body[data-title-key="chat.title"] .tasks-detail__eyebrow {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body[data-title-key="chat.title"] .tasks-detail__title {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.2;
}

body[data-title-key="chat.title"] .tasks-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

body[data-title-key="chat.title"] .tasks-detail__fields {
  margin: 0 0 24px;
  display: grid;
  gap: 14px;
}

body[data-title-key="chat.title"] .tasks-detail__label {
  margin: 0 0 4px;
}

body[data-title-key="chat.title"] .tasks-detail__value {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

body[data-title-key="chat.title"] .tasks-detail__runs-title {
  margin: 0 0 10px;
  font-size: 14px;
}

body[data-title-key="chat.title"] .tasks-detail-run {
  border: 1px solid var(--qw-border);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--qw-surface);
  margin-bottom: 8px;
}

body[data-title-key="chat.title"] .tasks-detail-run__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body[data-title-key="chat.title"] .tasks-detail-run__summary {
  margin: 8px 0 0;
  line-height: 1.45;
}

body[data-title-key="chat.title"] .tasks-template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

body[data-title-key="chat.title"] .tasks-template-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 124px;
  padding: 14px;
  border: 1px solid var(--qw-border);
  border-radius: 14px;
  background: var(--qw-surface);
  text-align: left;
  cursor: pointer;
}

body[data-title-key="chat.title"] .tasks-template-card:hover {
  background: var(--qw-hover);
}

body[data-title-key="chat.title"] .tasks-template-card--blank {
  border-style: dashed;
  align-items: center;
  justify-content: center;
}

body[data-title-key="chat.title"] .tasks-template-card__title {
  font-size: 14px;
  font-weight: 600;
}

body[data-title-key="chat.title"] .tasks-run-history {
  margin-top: 24px;
}

body[data-title-key="chat.title"] .tasks-run-history__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

body[data-title-key="chat.title"] .tasks-run-history__title {
  margin: 0;
  font-size: 14px;
}

body[data-title-key="chat.title"] .tasks-run-history__pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

/* Ideas workbench (Mac IdeasView-aligned) */
body[data-title-key="chat.title"] .ideas-workbench-wrap {
  padding: 0 !important;
  overflow: hidden;
}

body[data-title-key="chat.title"] .ideas-workbench {
  height: 100%;
  min-height: 0;
}

body[data-title-key="chat.title"] .ideas-workbench__grid {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

body[data-title-key="chat.title"] .ideas-workbench__grid--split {
  flex-direction: row;
}

body[data-title-key="chat.title"] .ideas-list-pane {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 16px 20px 24px;
}

body[data-title-key="chat.title"] .ideas-list-pane--split {
  flex: 0 0 38%;
  max-width: 440px;
  min-width: 300px;
  border-right: 1px solid var(--qw-border);
}

body[data-title-key="chat.title"] .ideas-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

body[data-title-key="chat.title"] .ideas-filter-bar__segments {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border-radius: 10px;
  background: var(--qw-hover);
}

body[data-title-key="chat.title"] .ideas-filter-bar__seg {
  border: 0;
  background: transparent;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--qw-text-muted);
  cursor: pointer;
}

body[data-title-key="chat.title"] .ideas-filter-bar__seg--active {
  background: var(--qw-surface);
  color: var(--qw-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

body[data-title-key="chat.title"] .ideas-filter-bar__count {
  font-variant-numeric: tabular-nums;
}

body[data-title-key="chat.title"] .ideas-filter-bar__refresh {
  margin-left: auto;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--qw-text-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

body[data-title-key="chat.title"] .ideas-filter-bar__refresh:hover:not(:disabled) {
  background: var(--qw-hover);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .ideas-filter-bar__refresh .ui-icon-slot {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
}

body[data-title-key="chat.title"] .ideas-filter-bar__refresh .ui-icon {
  width: 15px;
  height: 15px;
}

body[data-title-key="chat.title"] .today-refresh-icon-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
}

body[data-title-key="chat.title"] .ideas-notice {
  margin: 0 0 12px;
}

body[data-title-key="chat.title"] .ideas-group + .ideas-group {
  margin-top: 16px;
}

body[data-title-key="chat.title"] .ideas-group__label {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body[data-title-key="chat.title"] .ideas-group__count {
  font-variant-numeric: tabular-nums;
}

body[data-title-key="chat.title"] .ideas-cron-list {
  overflow: hidden;
  border: 1px solid var(--qw-border);
  border-radius: 14px;
  background: var(--qw-surface);
}

body[data-title-key="chat.title"] .ideas-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid var(--qw-border);
  cursor: pointer;
}

body[data-title-key="chat.title"] .ideas-row:first-child {
  border-top: 0;
}

body[data-title-key="chat.title"] .ideas-row:hover,
body[data-title-key="chat.title"] .ideas-row--active {
  background: var(--qw-hover);
}

body[data-title-key="chat.title"] .ideas-row__check {
  margin-top: 2px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

body[data-title-key="chat.title"] .ideas-row__check-dot {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1.5px solid var(--qw-border-strong, #d4d4d8);
  font-size: 10px;
  color: transparent;
}

body[data-title-key="chat.title"] .ideas-row__check-dot--done {
  border-color: #16a34a;
  background: #16a34a;
  color: #fff;
}

body[data-title-key="chat.title"] .ideas-row__main {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

body[data-title-key="chat.title"] .ideas-row__text {
  display: block;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-title-key="chat.title"] .ideas-row__text--done {
  color: var(--qw-text-muted);
  text-decoration: line-through;
}

body[data-title-key="chat.title"] .ideas-row__meta {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .ideas-row__sep {
  margin: 0 4px;
}

body[data-title-key="chat.title"] .ideas-row__exec.ideas-exec--ok {
  color: #16a34a;
}

body[data-title-key="chat.title"] .ideas-row__exec.ideas-exec--error {
  color: #dc2626;
}

body[data-title-key="chat.title"] .ideas-row__exec.ideas-exec--running {
  color: #2563eb;
}

body[data-title-key="chat.title"] .ideas-row__result-ready {
  color: var(--qw-accent, #2563eb);
}

body[data-title-key="chat.title"] .ideas-row__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

body[data-title-key="chat.title"] .ideas-row:hover .ideas-row__actions,
body[data-title-key="chat.title"] .ideas-row--active .ideas-row__actions {
  opacity: 1;
}

body[data-title-key="chat.title"] .ideas-row__icon-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--qw-text-muted);
  cursor: pointer;
  flex-shrink: 0;
}

body[data-title-key="chat.title"] .ideas-row__icon-btn:hover:not(:disabled) {
  background: var(--qw-hover);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .ideas-row__icon-btn--accent {
  color: var(--qw-accent, #2563eb);
}

body[data-title-key="chat.title"] .ideas-row__icon-btn--accent:hover:not(:disabled) {
  background: color-mix(in srgb, var(--qw-accent, #2563eb) 10%, transparent);
  color: var(--qw-accent, #2563eb);
}

body[data-title-key="chat.title"] .ideas-row__icon-btn--danger:hover:not(:disabled) {
  background: #fef2f2;
  color: #dc2626;
}

body[data-title-key="chat.title"] .ideas-row__chevron {
  align-self: center;
  color: var(--qw-text-muted);
  font-size: 18px;
}

body[data-title-key="chat.title"] .ideas-empty {
  text-align: center;
  padding: 48px 20px;
  border: 1px dashed var(--qw-border-strong);
  border-radius: 16px;
}

body[data-title-key="chat.title"] .ideas-empty--error {
  color: #dc2626;
  border-style: solid;
}

body[data-title-key="chat.title"] .ideas-empty__icon {
  font-size: 32px;
  margin-bottom: 12px;
}

body[data-title-key="chat.title"] .ideas-empty__title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
}

body[data-title-key="chat.title"] .ideas-detail-pane {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 20px 40px 32px 24px;
}

body[data-title-key="chat.title"] .ideas-detail-pane--selected {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

body[data-title-key="chat.title"] .ideas-detail-pane__header {
  flex-shrink: 0;
  padding: 16px 24px;
  border-bottom: 1px solid var(--qw-border);
}

body[data-title-key="chat.title"] .ideas-detail-pane__scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 20px 24px;
}

body[data-title-key="chat.title"] .ideas-detail-pane__footer {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 24px;
  border-top: 1px solid var(--qw-border);
}

body[data-title-key="chat.title"] .ideas-detail-pane--selected .ideas-detail {
  max-width: 42rem;
  margin: 0 auto;
}

body[data-title-key="chat.title"] .ideas-detail--empty {
  max-width: 760px;
  padding: 20px 40px 32px 24px;
}

body[data-title-key="chat.title"] .ideas-detail__back {
  margin-bottom: 8px;
  padding-left: 0;
}

body[data-title-key="chat.title"] .ideas-detail-pane__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
}

body[data-title-key="chat.title"] .ideas-detail__card {
  padding: 20px;
  border: 1px solid var(--qw-border);
  border-radius: 14px;
  background: var(--qw-surface);
}

body[data-title-key="chat.title"] .ideas-detail__card-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

body[data-title-key="chat.title"] .ideas-detail__card-body {
  min-width: 0;
  flex: 1;
}

body[data-title-key="chat.title"] .ideas-detail__bulb {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--qw-border);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 2px;
}

body[data-title-key="chat.title"] .ideas-detail__text {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

body[data-title-key="chat.title"] .ideas-detail__footnote {
  margin: 8px 0 0;
  font-size: 12px;
}

body[data-title-key="chat.title"] .ideas-detail__followup {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--qw-border);
}

body[data-title-key="chat.title"] .ideas-detail__followup-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .ideas-detail__followup-sub {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--qw-muted);
}

body[data-title-key="chat.title"] .ideas-detail__followup-hint {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--qw-muted);
}

body[data-title-key="chat.title"] .ideas-detail__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

body[data-title-key="chat.title"] .ideas-detail__primary-btn {
  width: 100%;
  justify-content: center;
  padding: 10px 16px;
  font-size: 14px;
  border-radius: 10px;
}

body[data-title-key="chat.title"] .ideas-detail__secondary-btn {
  width: 100%;
  justify-content: center;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 10px;
  border: none;
  background: transparent;
}

body[data-title-key="chat.title"] .ideas-detail__outline-btn {
  width: 100%;
  justify-content: center;
  padding: 10px 16px;
  font-size: 14px;
  border-radius: 10px;
}

body[data-title-key="chat.title"] .ideas-detail__footer-btn {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 10px;
}

body[data-title-key="chat.title"] .ideas-detail__result-sunken {
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  background: var(--qw-hover);
}

body[data-title-key="chat.title"] .ideas-detail__result-md {
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
}

body[data-title-key="chat.title"] .ideas-detail__result-md pre.files-preview__code {
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--qw-surface);
  overflow-x: auto;
  font-size: 12px;
}

body[data-title-key="chat.title"] .ideas-detail__result-md code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

body[data-title-key="chat.title"] .ideas-detail__error {
  margin: 4px 0 0;
  color: #dc2626;
  font-size: 14px;
  line-height: 1.45;
}

body[data-title-key="chat.title"] .ideas-detail__view-chat {
  align-self: flex-start;
  margin-top: 12px;
  padding-left: 0;
  font-size: 14px;
}

body[data-title-key="chat.title"] .ideas-detail__exec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

body[data-title-key="chat.title"] .ideas-detail__exec-head h4 {
  margin: 0;
  font-size: 14px;
}

body[data-title-key="chat.title"] .ideas-detail__exec-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--qw-border);
}

body[data-title-key="chat.title"] .ideas-detail__exec-badge.ideas-exec--ok {
  color: #166534;
  background: #ecfdf3;
  border-color: #bbf7d0;
}

body[data-title-key="chat.title"] .ideas-detail__exec-badge.ideas-exec--error {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

body[data-title-key="chat.title"] .ideas-detail__exec-badge.ideas-exec--running {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

body[data-title-key="chat.title"] .ideas-detail__session-meta {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}

body[data-title-key="chat.title"] .ideas-detail__session-meta dt {
  margin: 0;
}

body[data-title-key="chat.title"] .ideas-detail__session-meta dd {
  margin: 2px 0 0;
  font-size: 13px;
}

body[data-title-key="chat.title"] .ideas-detail__header {
  margin-bottom: 16px;
}

body[data-title-key="chat.title"] .ideas-detail__eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body[data-title-key="chat.title"] .ideas-detail__title {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

body[data-title-key="chat.title"] .ideas-detail__hero {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

body[data-title-key="chat.title"] .ideas-detail__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body[data-title-key="chat.title"] .ideas-detail__tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid var(--qw-border);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--qw-muted);
}

body[data-title-key="chat.title"] .ideas-detail__status-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0 0;
}

body[data-title-key="chat.title"] .ideas-detail__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #f59e0b;
}

body[data-title-key="chat.title"] .ideas-detail__dot--ok {
  background: #16a34a;
}

body[data-title-key="chat.title"] .ideas-detail__dot--error {
  background: #dc2626;
}

body[data-title-key="chat.title"] .ideas-detail__section {
  margin-bottom: 16px;
}

body[data-title-key="chat.title"] .ideas-detail__section-label {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--qw-muted);
}

body[data-title-key="chat.title"] .ideas-detail__section-label--warn {
  color: #b45309;
}

body[data-title-key="chat.title"] .ideas-detail__section-label--error {
  color: #dc2626;
}

body[data-title-key="chat.title"] .ideas-detail__hint {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--qw-muted);
}

body[data-title-key="chat.title"] .ideas-detail__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin: 0 0 16px;
}

body[data-title-key="chat.title"] .ideas-detail__meta-wide {
  grid-column: 1 / -1;
}

body[data-title-key="chat.title"] .ideas-detail__meta dd {
  margin: 4px 0 0;
  font-size: 14px;
}

body[data-title-key="chat.title"] .ideas-detail__callout {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
}

body[data-title-key="chat.title"] .ideas-detail__callout--pending {
  border: 1px solid #fcd34d;
  background: #fffbeb;
}

body[data-title-key="chat.title"] .ideas-detail__callout--error {
  border: 1px solid #fecaca;
  background: #fef2f2;
}

/* ---- Ideas: linear icon sizing (replaces text glyphs) ---- */

body[data-title-key="chat.title"] .ideas-row__check-dot .ui-icon {
  width: 11px;
  height: 11px;
}

body[data-title-key="chat.title"] .ideas-row__icon-btn {
  display: inline-grid;
  place-items: center;
}

body[data-title-key="chat.title"] .ideas-row__icon-btn .ui-icon {
  width: 15px;
  height: 15px;
}

body[data-title-key="chat.title"] .ideas-row__chevron {
  display: inline-flex;
  align-items: center;
}

body[data-title-key="chat.title"] .ideas-row__chevron .ui-icon {
  width: 14px;
  height: 14px;
}

body[data-title-key="chat.title"] .ideas-detail__bulb {
  color: #c77d1b;
  background: #fdf3e3;
  border-color: transparent;
}

body[data-title-key="chat.title"] .ideas-detail__bulb--done {
  color: #1f9d5b;
  background: #e8f6ef;
}

body[data-title-key="chat.title"] .ideas-detail__bulb .ui-icon {
  width: 17px;
  height: 17px;
}

body[data-title-key="chat.title"] .ideas-empty__icon .ui-icon,
body[data-title-key="chat.title"] .ideas-detail__placeholder-icon .ui-icon {
  width: 30px;
  height: 30px;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .skill-row__chevron,
body[data-title-key="chat.title"] .sidebar-project__chevron {
  display: inline-flex;
  align-items: center;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .skill-row__chevron .ui-icon {
  width: 14px;
  height: 14px;
}

body[data-title-key="chat.title"] .sidebar-project__chevron .ui-icon {
  width: 12px;
  height: 12px;
}

/* ---- New-chat landing: continue-last + suggestion sections + hint ---- */

body[data-title-key="chat.title"] .chat-start-section {
  margin-top: 16px;
}

body[data-title-key="chat.title"] .chat-start-section:first-child {
  margin-top: 0;
}

body[data-title-key="chat.title"] .chat-start-section__label {
  padding-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .chat-start-section__list {
  display: flex;
  flex-direction: column;
}

@media (min-width: 1280px) {
  body[data-title-key="chat.title"] .chat-start-section__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 2rem;
    row-gap: 2px;
  }

  body[data-title-key="chat.title"] .chat-start-section__list > .chat-start-suggestion:last-child {
    grid-column: 1 / -1;
  }

  body[data-title-key="chat.title"] .chat-start-suggestion {
    font-size: 14px;
    padding: 8px 10px;
  }

  body[data-title-key="chat.title"] .chat-start-section__label {
    font-size: 12px;
  }
}

@media (min-width: 1440px) {
  body[data-title-key="chat.title"] .chat-stage {
    --composer-column-max: min(64rem, calc(100% - clamp(32px, 5vw, 80px)));
  }
}

body[data-title-key="chat.title"] .chat-start-recent-row__end {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .chat-start-hint {
  margin-top: 18px;
  text-align: center;
  font-size: 11.5px;
  color: var(--qw-text-muted);
}

/* ---- Today feed (mirrors mac-today-mockup) ---- */

body[data-title-key="chat.title"] .today-pane {
  display: flex;
  flex-direction: column;
}

body[data-title-key="chat.title"] .today-workbench-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 12px 32px;
}

body[data-title-key="chat.title"] .today-composer-dock {
  flex-shrink: 0;
  padding: 8px 20px 18px;
  background: linear-gradient(transparent, var(--qw-canvas) 30%);
}

body[data-title-key="chat.title"] .today-composer-dock .composer-shell {
  width: min(720px, 100%);
  max-width: 720px;
  margin: 0 auto;
  --composer-column-max: min(720px, 100%);
}

body[data-title-key="chat.title"] .today-composer-dock .composer-shell .composer {
  margin-bottom: 0;
}

body[data-title-key="chat.title"] .today-workbench {
  max-width: 880px;
  margin: 0 auto;
}

body[data-title-key="chat.title"] .today-feed {
  animation: today-feed-in 0.35s both;
}

@keyframes today-feed-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

body[data-title-key="chat.title"] .today-greet {
  margin: 4px 0 0;
  padding: 0 2px;
}

body[data-title-key="chat.title"] .today-greet h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .today-greet__sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.4;
}

body[data-title-key="chat.title"] .today-greet__date {
  color: var(--qw-text-secondary);
}

body[data-title-key="chat.title"] .today-greet__sep {
  color: var(--qw-text-quaternary);
  user-select: none;
}

body[data-title-key="chat.title"] .today-greet__meta {
  color: var(--qw-text-secondary);
  font-size: 13px;
}

body[data-title-key="chat.title"] .today-greet__weather {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid var(--qw-border);
  border-radius: 999px;
  background: var(--qw-item-rgb);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--qw-text);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

body[data-title-key="chat.title"] .today-greet__weather-emoji {
  font-size: 15px;
  line-height: 1;
}

body[data-title-key="chat.title"] .today-greet__weather-temp {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

body[data-title-key="chat.title"] .today-greet__weather:hover,
body[data-title-key="chat.title"] .today-greet__weather:focus-visible {
  background: rgba(26, 28, 31, 0.07);
  border-color: rgba(26, 28, 31, 0.12);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  outline: none;
}

body[data-title-key="chat.title"] .today-greet__weather--loading {
  cursor: default;
  font-weight: 400;
  color: var(--qw-text-secondary);
}

body[data-title-key="chat.title"] .today-weather {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border: 1px solid var(--qw-border);
  border-radius: 999px;
  background: var(--qw-item-rgb);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--qw-text);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

body[data-title-key="chat.title"] .today-weather:hover,
body[data-title-key="chat.title"] .today-weather:focus-visible {
  background: rgba(26, 28, 31, 0.07);
  border-color: rgba(26, 28, 31, 0.12);
  outline: none;
}

body[data-title-key="chat.title"] .today-weather--loading {
  cursor: default;
}

.today-weather-picker {
  position: absolute;
  z-index: 120;
  inset: 0 auto auto 0;
  width: min(320px, calc(100vw - 24px));
}

.today-weather-picker__panel {
  border: 1px solid var(--qw-border);
  border-radius: 14px;
  background: var(--qw-surface);
  box-shadow: 0 8px 28px rgba(13, 13, 13, 0.12);
  padding: 12px;
}

.today-weather-picker__head {
  font-size: 13px;
  font-weight: 600;
  color: var(--qw-text);
  margin-bottom: 4px;
}

.today-weather-picker__current {
  margin-bottom: 10px;
}

.today-weather-picker__search {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--qw-border);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  margin-bottom: 8px;
}

.today-weather-picker__search:focus {
  outline: none;
  border-color: var(--qw-border-strong);
}

.today-weather-picker__auto {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--qw-text);
  background: var(--qw-accent-soft);
  cursor: pointer;
  margin-bottom: 8px;
}

.today-weather-picker__auto:hover {
  background: var(--qw-accent-soft-rgb);
}

.today-weather-picker__results {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 220px;
  overflow-y: auto;
}

.today-weather-picker__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 10px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.today-weather-picker__item:hover {
  border-color: var(--qw-border);
  background: var(--qw-item-rgb);
}

.today-weather-picker__item-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--qw-text);
}

.today-weather-picker__hint {
  padding: 8px 4px;
}

body[data-title-key="chat.title"] .today-loading {
  margin: 12px 0;
}

body[data-title-key="chat.title"] .today-section-label {
  margin: 0;
  padding: 22px 2px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--qw-text-quaternary);
}

body[data-title-key="chat.title"] .today-greet + .today-loading + .today-section-label,
body[data-title-key="chat.title"] .today-greet + .today-section-label {
  padding-top: 18px;
}

body[data-title-key="chat.title"] .today-card {
  border: 1px solid var(--qw-border);
  border-radius: 14px;
  background: var(--qw-surface);
  padding: 14px 16px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

body[data-title-key="chat.title"] .today-feed > .today-card + .today-card {
  margin-top: 8px;
}

body[data-title-key="chat.title"] .today-card--clickable {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body[data-title-key="chat.title"] .today-card--clickable:hover {
  border-color: var(--qw-border-strong);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--qw-text) 7%, transparent);
}

body[data-title-key="chat.title"] .today-card__row {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}

body[data-title-key="chat.title"] .today-card__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex-shrink: 0;
}

body[data-title-key="chat.title"] .today-card__icon .ui-icon {
  width: 17px;
  height: 17px;
}

body[data-title-key="chat.title"] .today-card__icon--accent {
  background: var(--qw-pin-accent-bg);
  color: var(--qw-pin-accent-fg);
}

body[data-title-key="chat.title"] .today-card__icon--amber {
  background: var(--qw-pin-amber-bg);
  color: var(--qw-pin-amber-fg);
}

body[data-title-key="chat.title"] .today-card__icon--green {
  background: var(--qw-pin-green-bg);
  color: var(--qw-pin-green-fg);
}

body[data-title-key="chat.title"] .today-card__icon--purple {
  background: var(--qw-pin-purple-bg);
  color: var(--qw-pin-purple-fg);
}

body[data-title-key="chat.title"] .today-card__body {
  flex: 1;
  min-width: 0;
}

body[data-title-key="chat.title"] .today-card__head {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .today-card__headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body[data-title-key="chat.title"] .today-card__headline-actions {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
}

body[data-title-key="chat.title"] .today-card__live {
  flex-shrink: 0;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--qw-accent);
  background: var(--qw-accent-soft);
}

body[data-title-key="chat.title"] .today-card__refresh {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--qw-border);
  border-radius: 999px;
  background: var(--qw-item-rgb);
  color: var(--qw-text-muted);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

body[data-title-key="chat.title"] .today-card__refresh:hover:not(:disabled) {
  border-color: rgba(26, 28, 31, 0.16);
  background: var(--qw-item-rgb);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .today-card__refresh:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

body[data-title-key="chat.title"] .today-card__refresh .ui-icon {
  width: 13px;
  height: 13px;
}

body[data-title-key="chat.title"] .today-card--tier1 {
  min-height: 118px;
}

body[data-title-key="chat.title"] .today-card--loading {
  opacity: 0.98;
}

body[data-title-key="chat.title"] .today-card--module .today-card__row {
  align-items: center;
}

body[data-title-key="chat.title"] .today-card__chevron {
  flex-shrink: 0;
  align-self: center;
  margin-left: 2px;
  font-size: 22px;
  line-height: 1;
  color: var(--qw-text-quaternary);
}

body[data-title-key="chat.title"] .today-pin-skeleton {
  margin-top: 10px;
  display: grid;
  gap: 7px;
}

body[data-title-key="chat.title"] .today-pin-skeleton__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body[data-title-key="chat.title"] .today-pin-skeleton__bone {
  display: block;
  height: 11px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    var(--skeleton-base) 0%,
    var(--skeleton-shine) 50%,
    var(--skeleton-base) 100%
  );
  background-size: 200% 100%;
  animation: today-skeleton-shimmer 1.4s ease-in-out infinite;
}

body[data-title-key="chat.title"] .today-pin-skeleton__bone--label {
  width: 56px;
}

body[data-title-key="chat.title"] .today-pin-skeleton__bone--value {
  width: 92px;
}

@keyframes today-skeleton-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

body[data-title-key="chat.title"] .today-card__desc {
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--qw-text-secondary);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

body[data-title-key="chat.title"] .today-card__meta {
  margin-top: 6px;
  font-size: 11px;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .news-digest-shell {
  display: grid;
  gap: 4px;
}

body[data-title-key="chat.title"] .news-digest-shell__hero {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

body[data-title-key="chat.title"] .news-digest-shell__accent {
  width: 3px;
  align-self: stretch;
  border-radius: 2px;
  background: var(--qw-accent, #0285ff);
  flex-shrink: 0;
}

body[data-title-key="chat.title"] .news-digest-shell__hero-headline {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .news-digest-shell__trail {
  flex-shrink: 0;
  font-size: 11px;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .news-digest-shell__hook {
  padding-left: 11px;
  font-size: 11px;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .news-digest-shell__secondary {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--qw-text-secondary);
}

body[data-title-key="chat.title"] .news-digest-shell__secondary-headline {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-title-key="chat.title"] .news-briefing-onboard {
  margin-top: 10px;
}

body[data-title-key="chat.title"] .news-briefing-onboard__label {
  font-size: 11px;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .news-briefing-onboard__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

body[data-title-key="chat.title"] .news-briefing-chip {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--qw-border);
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  color: var(--qw-text-secondary);
  cursor: pointer;
}

body[data-title-key="chat.title"] .news-briefing-chip--active {
  border-color: rgba(2, 133, 255, 0.35);
  background: rgba(2, 133, 255, 0.08);
  color: var(--qw-accent, #0285ff);
}

body[data-title-key="chat.title"] .news-briefing-chip--ghost {
  color: var(--qw-text-secondary);
}

body[data-title-key="chat.title"] .news-briefing-start {
  margin-top: 10px;
}

body[data-title-key="chat.title"] .market-channel--news-briefing .news-briefing-panel,
body[data-title-key="chat.title"] .market-channel--news-briefing .news-briefing-empty,
body[data-title-key="chat.title"] .market-channel--news-briefing .news-briefing-sub {
  border: 1px solid var(--qw-border);
  border-radius: 14px;
  background: var(--qw-surface);
  padding: 16px;
}

body[data-title-key="chat.title"] .news-briefing-panel__head,
body[data-title-key="chat.title"] .news-briefing-sub__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

body[data-title-key="chat.title"] .news-briefing-panel__title,
body[data-title-key="chat.title"] .news-briefing-empty__title,
body[data-title-key="chat.title"] .news-briefing-sub__name {
  font-size: 14px;
  font-weight: 700;
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .news-briefing-panel__desc,
body[data-title-key="chat.title"] .news-briefing-empty__desc,
body[data-title-key="chat.title"] .news-briefing-sub__summary {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--qw-text-secondary);
}

body[data-title-key="chat.title"] .news-briefing-panel__meta,
body[data-title-key="chat.title"] .news-briefing-sub__meta {
  font-size: 11px;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .news-briefing-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

body[data-title-key="chat.title"] .news-briefing-empty {
  text-align: center;
}

body[data-title-key="chat.title"] .news-briefing-empty .ui-icon {
  margin: 0 auto;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .news-briefing-sub + .news-briefing-sub {
  margin-top: 10px;
}

body[data-title-key="chat.title"] .news-briefing-sub__badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: var(--qw-item-rgb);
  color: var(--qw-text-secondary);
}

body[data-title-key="chat.title"] .today-card__actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

body[data-title-key="chat.title"] .today-pill {
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--qw-border-strong);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: var(--qw-text-secondary);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

body[data-title-key="chat.title"] .today-pill:hover:not(.today-pill--primary) {
  background: var(--qw-item-rgb);
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .today-pill--primary {
  background: var(--qw-btn-primary-bg);
  border-color: var(--qw-btn-primary-bg);
  color: var(--qw-btn-primary-fg);
}

body[data-title-key="chat.title"] .today-pill--primary:hover {
  background: var(--qw-btn-primary-rgb);
  border-color: var(--qw-btn-primary-rgb);
  color: var(--qw-btn-primary-fg);
  opacity: 0.92;
}

body[data-title-key="chat.title"] .today-grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

body[data-title-key="chat.title"] .today-pin-body {
  margin-top: 8px;
  display: grid;
  gap: 4px;
}

body[data-title-key="chat.title"] .today-pin-quote-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
}

body[data-title-key="chat.title"] .today-pin-quote-row__label {
  color: var(--qw-text-secondary);
}

body[data-title-key="chat.title"] .today-pin-quote-row__value {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

body[data-title-key="chat.title"] .today-pin-line {
  font-size: 12.5px;
  line-height: 1.45;
}

body[data-title-key="chat.title"] .today-pin-footnote {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--qw-text-quaternary);
}

body[data-title-key="chat.title"] .today-pin-change--up {
  color: var(--success);
}

body[data-title-key="chat.title"] .today-pin-change--down {
  color: var(--warn);
}

body[data-title-key="chat.title"] .today-quote-tiles {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

body[data-title-key="chat.title"] .today-quote-tile {
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
}

body[data-title-key="chat.title"] .today-quote-tile__label {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--qw-text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-title-key="chat.title"] .today-quote-tile__value {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
  color: var(--qw-text);
  font-variant-numeric: tabular-nums;
}

body[data-title-key="chat.title"] .today-quote-tile__change {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

body[data-title-key="chat.title"] .today-quote-chips {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body[data-title-key="chat.title"] .today-quote-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border: 1px solid var(--qw-border);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

body[data-title-key="chat.title"] .today-fx {
  gap: 8px;
}

body[data-title-key="chat.title"] .today-fx__hero {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--qw-border);
  background: linear-gradient(135deg, rgba(31, 157, 91, 0.12) 0%, rgba(31, 157, 91, 0.03) 100%);
}

body[data-title-key="chat.title"] .today-fx__hero-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

body[data-title-key="chat.title"] .today-fx__flag {
  font-size: 13px;
  line-height: 1;
}

body[data-title-key="chat.title"] .today-fx__pair {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--qw-text);
}

body[data-title-key="chat.title"] .today-fx__change {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

body[data-title-key="chat.title"] .today-fx__rate {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--qw-text);
  font-variant-numeric: tabular-nums;
}

body[data-title-key="chat.title"] .today-fx__sample {
  margin-top: 4px;
  font-size: 11px;
  color: var(--qw-text-quaternary);
  font-variant-numeric: tabular-nums;
}

body[data-title-key="chat.title"] .today-fx__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

body[data-title-key="chat.title"] .today-fx__chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--qw-border-strong);
  background: var(--qw-surface-muted);
  color: var(--qw-text-secondary);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

body[data-title-key="chat.title"] .today-fx__chip-flag {
  line-height: 1;
}

body[data-title-key="chat.title"] .today-fx__insight {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--qw-text-quaternary);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

body[data-title-key="chat.title"] .today-progress {
  margin-top: 10px;
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--qw-surface-sunken);
}

body[data-title-key="chat.title"] .today-progress__bar {
  display: block;
  height: 100%;
  width: 62%;
  border-radius: 2px;
  background: linear-gradient(90deg, #0285ff, #7cbcff, #0285ff);
  background-size: 200% 100%;
  animation: today-progress-shimmer 1.6s linear infinite;
}

@keyframes today-progress-shimmer {
  from { background-position: 200% 0; }
  to { background-position: 0 0; }
}

.today-report-sheet {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.today-report-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 13, 13, 0.32);
}

.today-report-sheet__panel {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(720px, 100%);
  max-height: min(88vh, 720px);
  flex-direction: column;
  border-radius: 16px 16px 0 0;
  background: var(--surface, #fff);
  box-shadow: 0 -8px 32px rgba(13, 13, 13, 0.12);
}

.today-report-sheet__header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px 8px;
}

.today-report-sheet__title {
  flex: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.today-report-sheet__close {
  border: 0;
  background: transparent;
  color: var(--fg-quaternary, #8a8f98);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.today-report-sheet__meta {
  padding: 0 20px 8px;
  font-size: 12px;
  color: var(--fg-tertiary, #6b7280);
}

.today-report-sheet__body {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px 16px;
}

.today-report-sheet__line {
  font-size: 13.5px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.today-report-sheet__line--head {
  font-weight: 600;
}

.today-report-sheet__footer {
  padding: 8px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--line, #ececec);
}

.today-report-sheet__continue {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  background: #0d0d0d;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

body[data-title-key="chat.title"] .today-card--list {
  padding: 4px 8px;
}

body[data-title-key="chat.title"] .today-event {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 8px;
  border: 0;
  border-top: 1px solid var(--qw-border);
  background: transparent;
  font-size: 13px;
  color: var(--qw-text);
  text-align: left;
  cursor: pointer;
}

body[data-title-key="chat.title"] .today-event:first-child {
  border-top: 0;
}

body[data-title-key="chat.title"] .today-event:hover {
  background: var(--qw-hover);
}

body[data-title-key="chat.title"] .today-event__time {
  flex-shrink: 0;
  min-width: 42px;
  font-variant-numeric: tabular-nums;
  color: var(--qw-text-secondary);
}

body[data-title-key="chat.title"] .today-event__title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 600;
}

body[data-title-key="chat.title"] .today-event__loc {
  flex-shrink: 0;
  font-size: 11.5px;
  color: var(--qw-text-muted);
}

body[data-title-key="chat.title"] .today-schedule-empty {
  padding: 16px 8px 14px;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--qw-text-quaternary);
}

/* Fork dialog: keep it aligned with the Mac-style light chat surface. */
body[data-title-key="chat.title"] dialog.fork-turn-dialog {
  width: min(520px, calc(100vw - 32px));
  max-width: min(520px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 18px;
  outline: none;
  background: #fbfbf8;
  color: #242420;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

body[data-title-key="chat.title"] dialog.fork-turn-dialog:focus,
body[data-title-key="chat.title"] dialog.fork-turn-dialog:focus-visible {
  outline: none;
}

body[data-title-key="chat.title"] dialog.fork-turn-dialog::backdrop {
  background: rgba(31, 31, 29, 0.32);
  backdrop-filter: blur(2px);
}

body[data-title-key="chat.title"] .fork-turn-dialog__form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

body[data-title-key="chat.title"] .fork-turn-dialog__header {
  padding: 22px 26px 8px;
}

body[data-title-key="chat.title"] .fork-turn-dialog__header h2 {
  margin: 0;
  color: #1f1f1d;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: 0;
}

body[data-title-key="chat.title"] .fork-turn-dialog__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0 26px 18px;
}

body[data-title-key="chat.title"] .fork-turn-dialog__hint,
body[data-title-key="chat.title"] .fork-turn-dialog__body-text {
  margin: 0;
  color: #67665f;
  font-size: 14px;
  line-height: 1.55;
}

body[data-title-key="chat.title"] .fork-turn-dialog__hint {
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  background: #f1f1ed;
}

body[data-title-key="chat.title"] .fork-turn-dialog__modes {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

body[data-title-key="chat.title"] .fork-turn-dialog__modes--disabled {
  opacity: 0.58;
  pointer-events: none;
}

body[data-title-key="chat.title"] .fork-turn-dialog__mode {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  min-height: 68px;
  padding: 14px 16px;
  border: 1px solid #deded8;
  border-radius: 14px;
  background: #fff;
  color: #242420;
  cursor: pointer;
  box-sizing: border-box;
}

body[data-title-key="chat.title"] .fork-turn-dialog__mode:hover {
  border-color: #c9c9c2;
  background: #fdfdfb;
}

body[data-title-key="chat.title"] .fork-turn-dialog__mode:has(input:checked) {
  border-color: #8fb79e;
  background: #f4faf6;
}

body[data-title-key="chat.title"] .fork-turn-dialog__mode input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: #2f7d4f;
}

body[data-title-key="chat.title"] .fork-turn-dialog__mode-title {
  display: block;
  color: #2a2a26;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 650;
}

body[data-title-key="chat.title"] .fork-turn-dialog__mode-hint {
  display: block;
  margin-top: 4px;
  color: #74736b;
  font-size: 13px;
  line-height: 1.45;
}

body[data-title-key="chat.title"] .fork-turn-dialog__progress {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 13px 14px;
  border-radius: 12px;
  background: #f1f1ed;
}

body[data-title-key="chat.title"] .fork-turn-dialog__spinner {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 2px solid rgba(47, 125, 79, 0.18);
  border-top-color: #2f7d4f;
  border-radius: 50%;
  animation: fork-turn-spin 0.8s linear infinite;
}

body[data-title-key="chat.title"] .fork-turn-dialog__progress-title {
  color: #2a2a26;
  font-size: 14px;
  font-weight: 650;
}

body[data-title-key="chat.title"] .fork-turn-dialog__progress-detail {
  margin-top: 4px;
  color: #74736b;
  font-size: 13px;
}

body[data-title-key="chat.title"] .fork-turn-dialog__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 26px 22px;
}

body[data-title-key="chat.title"] .fork-turn-dialog__footer button {
  min-width: 88px;
  height: 38px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
}

body[data-title-key="chat.title"] .fork-turn-dialog__footer button.ghost {
  border: 0;
  background: transparent;
  color: #85847c;
}

body[data-title-key="chat.title"] .fork-turn-dialog__footer button.ghost:hover {
  background: #f0f0ec;
  color: #4f4e48;
}

body[data-title-key="chat.title"] .fork-turn-dialog__footer button.primary {
  border: 0;
  background: #2f7d4f;
  color: #fff;
  box-shadow: none;
}

body[data-title-key="chat.title"] .fork-turn-dialog__footer button.primary:hover {
  background: #286d45;
}

body[data-title-key="chat.title"] .fork-turn-dialog__footer button:disabled {
  opacity: 0.55;
  cursor: default;
}

/* AIHost workdir picker: web counterpart of the desktop remote directory picker. */
body[data-title-key="chat.title"] .workdir-picker {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(8px);
}

body[data-title-key="chat.title"] .workdir-picker__panel {
  width: min(720px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(24, 20, 16, 0.94);
  color: #f8f4ec;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

body[data-title-key="chat.title"] .workdir-picker__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

body[data-title-key="chat.title"] .workdir-picker__header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 680;
  letter-spacing: 0;
}

body[data-title-key="chat.title"] .workdir-picker__icon-btn,
body[data-title-key="chat.title"] .workdir-picker__crumb,
body[data-title-key="chat.title"] .workdir-picker__root,
body[data-title-key="chat.title"] .workdir-picker__row,
body[data-title-key="chat.title"] .workdir-picker__new-btn,
body[data-title-key="chat.title"] .workdir-picker__ghost,
body[data-title-key="chat.title"] .workdir-picker__primary {
  border: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

body[data-title-key="chat.title"] .workdir-picker__icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: rgba(248, 244, 236, 0.68);
}

body[data-title-key="chat.title"] .workdir-picker__icon-btn:hover,
body[data-title-key="chat.title"] .workdir-picker__crumb:hover,
body[data-title-key="chat.title"] .workdir-picker__root:hover,
body[data-title-key="chat.title"] .workdir-picker__new-btn:hover,
body[data-title-key="chat.title"] .workdir-picker__ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

body[data-title-key="chat.title"] .workdir-picker__roots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-title-key="chat.title"] .workdir-picker__root {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: rgba(248, 244, 236, 0.72);
}

body[data-title-key="chat.title"] .workdir-picker__root.is-active {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

body[data-title-key="chat.title"] .workdir-picker__crumbs {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  overflow-x: auto;
  color: rgba(248, 244, 236, 0.7);
}

body[data-title-key="chat.title"] .workdir-picker__crumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  max-width: 180px;
  min-height: 32px;
  padding: 0 9px;
  border-radius: 9px;
  white-space: nowrap;
}

body[data-title-key="chat.title"] .workdir-picker__crumb span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-title-key="chat.title"] .workdir-picker__crumb:disabled {
  cursor: default;
  opacity: 0.35;
}

body[data-title-key="chat.title"] .workdir-picker__crumb-sep {
  width: 14px;
  height: 14px;
  display: inline-flex;
  color: rgba(248, 244, 236, 0.38);
}

body[data-title-key="chat.title"] .workdir-picker__listing {
  min-height: 240px;
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
}

body[data-title-key="chat.title"] .workdir-picker__row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  text-align: left;
  color: rgba(248, 244, 236, 0.88);
}

body[data-title-key="chat.title"] .workdir-picker__row:last-child {
  border-bottom: 0;
}

body[data-title-key="chat.title"] .workdir-picker__row:hover {
  background: rgba(255, 255, 255, 0.08);
}

body[data-title-key="chat.title"] .workdir-picker__row span:nth-child(2) {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-title-key="chat.title"] .workdir-picker__row-chevron {
  color: rgba(248, 244, 236, 0.34);
}

body[data-title-key="chat.title"] .workdir-picker__empty {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  color: rgba(248, 244, 236, 0.48);
  text-align: center;
}

body[data-title-key="chat.title"] .workdir-picker__spinner {
  display: inline-flex;
  animation: workdir-picker-spin 0.9s linear infinite;
}

@keyframes workdir-picker-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

body[data-title-key="chat.title"] .workdir-picker__new {
  min-height: 36px;
}

body[data-title-key="chat.title"] .workdir-picker__new-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 9px;
  color: rgba(248, 244, 236, 0.74);
}

body[data-title-key="chat.title"] .workdir-picker__new-form {
  display: flex;
  gap: 8px;
}

body[data-title-key="chat.title"] .workdir-picker__new-form input {
  min-width: 0;
  flex: 1;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 0 12px;
  outline: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

body[data-title-key="chat.title"] .workdir-picker__new-form button {
  min-width: 78px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

body[data-title-key="chat.title"] .workdir-picker__manual {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

body[data-title-key="chat.title"] .workdir-picker__manual label {
  color: rgba(248, 244, 236, 0.48);
  font-size: 12px;
  font-weight: 600;
}

body[data-title-key="chat.title"] .workdir-picker__manual-row {
  display: flex;
  gap: 8px;
}

body[data-title-key="chat.title"] .workdir-picker__manual-row input {
  min-width: 0;
  flex: 1;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 11px;
  padding: 0 12px;
  outline: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
}

body[data-title-key="chat.title"] .workdir-picker__manual-row input:focus {
  border-color: rgba(248, 244, 236, 0.44);
  background: rgba(255, 255, 255, 0.11);
}

body[data-title-key="chat.title"] .workdir-picker__manual-row button {
  min-width: 92px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

body[data-title-key="chat.title"] .workdir-picker__manual-row button:hover {
  background: rgba(255, 255, 255, 0.16);
}

body[data-title-key="chat.title"] .workdir-picker__selected {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

body[data-title-key="chat.title"] .workdir-picker__selected span {
  display: block;
  margin-bottom: 4px;
  color: rgba(248, 244, 236, 0.42);
  font-size: 12px;
}

body[data-title-key="chat.title"] .workdir-picker__selected code {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(248, 244, 236, 0.76);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
}

body[data-title-key="chat.title"] .workdir-picker__error {
  margin: 0;
  color: #ffb4a8;
  font-size: 13px;
}

body[data-title-key="chat.title"] .workdir-picker__footer {
  display: flex;
  align-items: center;
  gap: 10px;
}

body[data-title-key="chat.title"] .workdir-picker__spacer {
  flex: 1;
}

body[data-title-key="chat.title"] .workdir-picker__ghost,
body[data-title-key="chat.title"] .workdir-picker__primary {
  min-height: 40px;
  border-radius: 14px;
  padding: 0 18px;
}

body[data-title-key="chat.title"] .workdir-picker__ghost {
  color: rgba(248, 244, 236, 0.7);
}

body[data-title-key="chat.title"] .workdir-picker__primary {
  background: #f8f4ec;
  color: #171411;
  font-weight: 620;
}

body[data-title-key="chat.title"] .workdir-picker__primary:hover {
  background: #fff;
}

body[data-title-key="chat.title"] .workdir-picker button:disabled {
  cursor: default;
  opacity: 0.45;
}

@media (max-width: 720px) {
  body[data-title-key="chat.title"] .workdir-picker {
    padding: 16px;
    align-items: flex-end;
  }

  body[data-title-key="chat.title"] .workdir-picker__panel {
    width: 100%;
    max-height: calc(100vh - 32px);
    padding: 18px;
    border-radius: 18px;
  }

  body[data-title-key="chat.title"] .workdir-picker__listing {
    max-height: 42vh;
  }

  body[data-title-key="chat.title"] .workdir-picker__manual-row {
    flex-direction: column;
  }

  body[data-title-key="chat.title"] .workdir-picker__manual-row button {
    min-height: 38px;
  }
}
