/* Codex Mini Shell v2
   Structural redesign layer. It is intentionally scoped to body.shell-v2 so it
   can be disabled without touching Codex Mini's original runtime. */

body.shell-v2 {
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
  --v2-bg: #fcfcfd;
  --v2-panel: #ffffff;
  --v2-panel-muted: #f8f8f9;
  --v2-panel-strong: #efeff1;
  --v2-control-bg: #f5f5f6;
  --v2-control-bg-hover: #eeeeef;
  --v2-card-flat: #fbfbfc;
  --v2-queue-bg: #f6f6f7;
  --v2-queue-accent: #6b4f92;
  --v2-queue-accent-soft: #f7f3fc;
  --v2-border: #e6e5e8;
  --v2-border-soft: #f0eff2;
  --v2-line: rgba(34, 34, 38, .105);
  --v2-line-soft: rgba(34, 34, 38, .065);
  --v2-header-shadow: 0 12px 26px rgba(15, 23, 42, .078);
  --v2-composer-shadow: 0 -12px 26px rgba(15, 23, 42, .082);
  --v2-text: #242424;
  --v2-muted: #707070;
  --v2-faint: #9a9a9a;
  --v2-accent: #6b4f92;
  --v2-accent-soft: #f7f3fc;
  --v2-accent-tint: #f3eef9;
  --v2-accent-tint-strong: #eee7f7;
  --v2-success: #6b4f92;
  --v2-success-soft: #f4f4f4;
  --v2-warning: #b7791f;
  --v2-warning-soft: #fff7df;
  --v2-danger: #c93c37;
  --v2-danger-soft: #fff0ef;
  --v2-card-shadow: 0 1px 2px rgba(15, 23, 42, .028);
  --v2-control-shadow: inset 0 1px 0 rgba(255, 255, 255, .82), 0 1px 1px rgba(15, 23, 42, .022);
  --v2-soft-shadow: 0 1px 2px rgba(15, 23, 42, .03);
  --v2-inner-highlight: inset 0 1px 0 rgba(255, 255, 255, .72);
  --v2-focus-ring: 0 0 0 2px color-mix(in srgb, var(--v2-accent) 20%, transparent);
  --v2-motion-fast: 110ms cubic-bezier(.2, .7, .3, 1);
  --v2-motion-standard: 160ms cubic-bezier(.2, .7, .3, 1);
  --v2-sidebar: clamp(272px, 22vw, 320px);
  --v2-sidebar-effective: var(--v2-sidebar);
  --v2-header: 52px;
  --v2-mobile-header: 44px;
  --v2-composer: 52px;
  --v2-radius-control: 6px;
  --v2-radius-card: 8px;
  --v2-radius-bubble: 10px;
  --v2-content-max: 920px;
  --mobile-composer-height: 52px !important;
  --keyboard-composer-gap: 0px !important;
  --local-ime-guard: 0px !important;
  --shell-v2-keyboard-offset: var(--keyboard-shift, 0px);
  --queued-send-height: 0px;
  --recent-thread-strip-height: 0px;
  --v2-mobile-composer-edge: 0px;
  color: var(--v2-text) !important;
  background: var(--v2-bg) !important;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, "PingFang SC", sans-serif !important;
}

/* 2026-07-14 unified task-surface refinement.
   The message rail, operation disclosure, goal/queue dock and composer share
   one visual grammar while their state and actions remain runtime-owned. */
html.shell-v2 body.shell-v2 .message.user .bubble-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  margin-left: auto !important;
  margin-right: 0 !important;
}

html.shell-v2 body.shell-v2 .message.user .bubble-wrap > .meta {
  width: 100% !important;
  text-align: right !important;
}

html.shell-v2 body.shell-v2 .message.user .bubble.markdown-body {
  align-self: flex-end !important;
  width: fit-content !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: 0 !important;
}

html.shell-v2 body.shell-v2 #thread article.thread-view-process-group {
  margin-block: 8px !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-details {
  width: min(100%, 680px) !important;
  max-width: min(100%, 680px) !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-details > summary {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 30px !important;
  padding: 4px 9px 4px 7px !important;
  gap: 7px !important;
  border-color: color-mix(in srgb, var(--v2-border) 58%, transparent) !important;
  border-radius: 9px !important;
  background: color-mix(in srgb, var(--v2-panel-muted) 58%, transparent) !important;
  box-shadow: 0 0 0 .5px rgba(28, 28, 30, .018), 0 1px 2px rgba(28, 28, 30, .022), inset 0 1px 0 rgba(255, 255, 255, .62) !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-details > summary::before {
  display: none !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-summary-kind {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 34px !important;
  height: 20px !important;
  padding-inline: 6px !important;
  border-radius: 6px !important;
  background: color-mix(in srgb, var(--v2-control-bg) 78%, transparent) !important;
  color: color-mix(in srgb, var(--v2-text) 74%, var(--v2-muted)) !important;
  font-size: 10.5px !important;
  font-weight: 560 !important;
  line-height: 1 !important;
  letter-spacing: .01em !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-details[data-operation-kind="plugin"] .canonical-process-summary-kind,
html.shell-v2 body.shell-v2 #thread .canonical-process-details[data-operation-kind="browser"] .canonical-process-summary-kind {
  background: color-mix(in srgb, var(--v2-accent-tint) 76%, var(--v2-panel)) !important;
  color: color-mix(in srgb, var(--v2-accent) 78%, var(--v2-text)) !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-summary-label {
  align-self: center !important;
  color: color-mix(in srgb, var(--v2-text) 78%, var(--v2-muted)) !important;
  font-size: 11.75px !important;
  font-weight: 450 !important;
  letter-spacing: -.002em !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-summary-count {
  align-self: center !important;
  color: var(--v2-faint) !important;
  font-size: 10.75px !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-list {
  gap: 3px !important;
  margin-top: 5px !important;
  padding: 4px 7px 3px !important;
  border-left: 1px solid color-mix(in srgb, var(--v2-border) 62%, transparent) !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-line {
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) !important;
  gap: 7px !important;
  color: color-mix(in srgb, var(--v2-text) 72%, var(--v2-muted)) !important;
  font-size: 11.5px !important;
  line-height: 1.42 !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-line::before {
  content: attr(data-operation-label) !important;
  color: var(--v2-faint) !important;
  font-size: 10.5px !important;
  font-weight: 500 !important;
}

html.shell-v2 body.shell-v2 #queued-send .canonical-goal-card {
  order: -1 !important;
}

html.shell-v2 body.shell-v2 #queued-send .canonical-dock-title {
  display: flex !important;
  align-items: baseline !important;
  min-width: 0 !important;
  gap: 7px !important;
}

html.shell-v2 body.shell-v2 #queued-send .canonical-dock-title::before {
  flex: 0 0 auto !important;
  content: "排队" !important;
  color: var(--v2-faint) !important;
  font-size: 10.5px !important;
  font-weight: 520 !important;
  letter-spacing: .01em !important;
}

html.shell-v2 body.shell-v2 #queued-send .canonical-goal-card .canonical-dock-title::before {
  content: "目标" !important;
  color: color-mix(in srgb, var(--v2-accent) 74%, var(--v2-muted)) !important;
}

@media (min-width: 901px) {
  html.shell-v2-desktop body.shell-v2 .message.user .bubble-wrap {
    width: fit-content !important;
    max-width: min(72%, 680px) !important;
  }

  html.shell-v2-desktop body.shell-v2 .message.user .bubble.markdown-body {
    border-radius: 14px !important;
    background: color-mix(in srgb, var(--v2-panel-muted) 78%, var(--v2-panel)) !important;
    box-shadow: 0 0 0 .5px rgba(28, 28, 30, .02), 0 1px 2px rgba(28, 28, 30, .03), 0 5px 16px rgba(28, 28, 30, .025), inset 0 1px 0 rgba(255, 255, 255, .74) !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-view-run .bubble-wrap {
    padding-bottom: 2px !important;
    border-bottom: 1px solid color-mix(in srgb, var(--v2-border) 44%, transparent) !important;
  }
}

@media (max-width: 900px) {
  html.shell-v2-mobile body.shell-v2 .message.user .bubble-wrap {
    width: fit-content !important;
    max-width: min(88%, 344px) !important;
  }

  html.shell-v2-mobile body.shell-v2 #thread .canonical-process-details {
    width: 100% !important;
    max-width: 100% !important;
  }

  html.shell-v2-mobile body.shell-v2 #thread .canonical-process-details > summary {
    min-height: 36px !important;
    padding: 7px 9px 7px 7px !important;
  }

  html.shell-v2-mobile body.shell-v2 #thread .canonical-process-summary-label {
    font-size: 12px !important;
  }

  html.shell-v2-mobile body.shell-v2 #queued-send .canonical-dock-title {
    gap: 5px !important;
  }

  html.shell-v2-mobile body.shell-v2 #queued-send .canonical-dock-title::before {
    font-size: 9.75px !important;
  }
}

/* Canonical BottomDock. Queue and goal cards are independent Store-driven rows;
   this is the only layout owner for content above the composer. */
html.shell-v2 body.shell-v2 #queued-send.canonical-bottom-dock {
  position: absolute !important;
  left: max(8px, var(--v2-mobile-composer-edge, 10px)) !important;
  right: max(8px, var(--v2-mobile-composer-edge, 10px)) !important;
  top: auto !important;
  bottom: calc(100% + 6px) !important;
  width: auto !important;
  max-width: none !important;
  max-height: min(38vh, 230px) !important;
  z-index: 8 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

html.shell-v2 body.shell-v2 #queued-send.canonical-bottom-dock::before,
html.shell-v2 body.shell-v2 #queued-send.canonical-bottom-dock::after {
  content: none !important;
  display: none !important;
}

html.shell-v2 body.shell-v2 #queued-send.canonical-bottom-dock[hidden] {
  display: none !important;
}

html.shell-v2 body.shell-v2 #queued-send .canonical-dock-card {
  box-sizing: border-box !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px !important;
  display: grid !important;
  grid-template-columns: 28px minmax(0, 1fr) auto 36px !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 5px 8px 5px 10px !important;
  border: 1px solid color-mix(in srgb, var(--v2-border) 58%, transparent) !important;
  border-radius: 14px !important;
  background: color-mix(in srgb, var(--v2-panel) 97%, var(--v2-bg)) !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .055) !important;
  color: var(--v2-text) !important;
  transition:
    border-color var(--v2-motion-standard),
    background-color var(--v2-motion-standard),
    box-shadow var(--v2-motion-standard),
    transform var(--v2-motion-fast) !important;
}

/* Queue handoff: reserve one compact row while the selected desktop thread
   exposes its queue portal. The row carries no stale thread actions. */
html.shell-v2 body.shell-v2 #queued-send .canonical-queue-card.is-queue-loading {
  grid-template-columns: 28px minmax(0, 1fr) !important;
  color: var(--v2-muted) !important;
  pointer-events: none !important;
}

html.shell-v2 body.shell-v2 #queued-send .canonical-queue-card.is-queue-loading .canonical-dock-title {
  font-weight: 500 !important;
}

html.shell-v2-dark body.shell-v2 #queued-send .canonical-dock-card {
  background: color-mix(in srgb, var(--v2-panel) 96%, #000) !important;
  border-color: color-mix(in srgb, var(--v2-border) 72%, transparent) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22) !important;
}

html.shell-v2 body.shell-v2 #queued-send .canonical-dock-icon,
html.shell-v2 body.shell-v2 #queued-send .canonical-dock-icon svg {
  width: 20px !important;
  height: 20px !important;
}

html.shell-v2 body.shell-v2 #queued-send .canonical-dock-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: color-mix(in srgb, var(--v2-muted) 78%, var(--v2-accent)) !important;
}

html.shell-v2 body.shell-v2 #queued-send button.canonical-dock-promote {
  cursor: pointer !important;
  transition: color var(--v2-motion-fast), background-color var(--v2-motion-fast), transform var(--v2-motion-fast) !important;
}

html.shell-v2 body.shell-v2 #queued-send button.canonical-dock-promote:hover,
html.shell-v2 body.shell-v2 #queued-send button.canonical-dock-promote:focus-visible {
  color: var(--v2-accent) !important;
  background: color-mix(in srgb, var(--v2-accent-soft) 72%, transparent) !important;
  outline: none !important;
}

html.shell-v2 body.shell-v2 #queued-send button.canonical-dock-promote:active {
  transform: scale(.94) !important;
}

html.shell-v2 body.shell-v2 #queued-send button.canonical-dock-promote:disabled {
  cursor: progress !important;
  opacity: .48 !important;
}

html.shell-v2 body.shell-v2 #queued-send .canonical-dock-icon svg,
html.shell-v2 body.shell-v2 #queued-send .canonical-dock-icon-action svg {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.55 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

html.shell-v2 body.shell-v2 #queued-send .canonical-goal-card.is-running .canonical-dock-icon {
  color: var(--v2-accent) !important;
}

html.shell-v2 body.shell-v2 #queued-send .canonical-dock-title {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 13px !important;
  font-weight: 620 !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
}

html.shell-v2 body.shell-v2 #queued-send .canonical-dock-text-action,
html.shell-v2 body.shell-v2 #queued-send .canonical-dock-icon-action {
  height: 30px !important;
  min-height: 30px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: color-mix(in srgb, var(--v2-muted) 84%, var(--v2-text)) !important;
  box-shadow: none !important;
  transition:
    color var(--v2-motion-fast),
    background-color var(--v2-motion-fast),
    transform var(--v2-motion-fast) !important;
}

html.shell-v2 body.shell-v2 #queued-send .canonical-dock-text-action {
  min-width: 42px !important;
  padding: 0 6px !important;
  font-size: 12.5px !important;
  font-weight: 620 !important;
}

html.shell-v2 body.shell-v2 #queued-send .canonical-dock-icon-action {
  width: 32px !important;
  min-width: 32px !important;
  padding: 0 !important;
}

html.shell-v2 body.shell-v2 #queued-send .canonical-dock-icon-action svg {
  width: 18px !important;
  height: 18px !important;
}

html.shell-v2 body.shell-v2 #queued-send .canonical-dock-text-action:hover,
html.shell-v2 body.shell-v2 #queued-send .canonical-dock-icon-action:hover {
  background: color-mix(in srgb, var(--v2-control-bg) 78%, transparent) !important;
  color: var(--v2-text) !important;
}

html.shell-v2 body.shell-v2 #queued-send .canonical-dock-text-action:focus-visible,
html.shell-v2 body.shell-v2 #queued-send .canonical-dock-icon-action:focus-visible {
  outline: none !important;
  background: color-mix(in srgb, var(--v2-control-bg) 84%, transparent) !important;
  box-shadow: var(--v2-focus-ring) !important;
}

html.shell-v2 body.shell-v2 #queued-send .canonical-dock-text-action:active,
html.shell-v2 body.shell-v2 #queued-send .canonical-dock-icon-action:active {
  transform: scale(.96) !important;
}

@media (hover: hover) and (pointer: fine) {
  html.shell-v2 body.shell-v2 #queued-send .canonical-dock-card:hover {
    border-color: color-mix(in srgb, var(--v2-accent) 16%, var(--v2-border)) !important;
    background: color-mix(in srgb, var(--v2-panel) 98%, var(--v2-accent-soft)) !important;
    box-shadow: 0 7px 20px rgba(15, 23, 42, .07) !important;
    transform: translateY(-1px) !important;
  }
}

html.shell-v2 body.shell-v2 #queued-send .canonical-dock-card:focus-within {
  border-color: color-mix(in srgb, var(--v2-accent) 24%, var(--v2-border)) !important;
}

@media (min-width: 901px) {
  html.shell-v2-desktop body.shell-v2 #queued-send.canonical-bottom-dock {
    left: 50% !important;
    right: auto !important;
    width: min(var(--v2-desktop-composer-width), calc(100vw - var(--v2-sidebar-effective) - 96px)) !important;
    max-width: min(var(--v2-desktop-composer-width), calc(100vw - var(--v2-sidebar-effective) - 96px)) !important;
    bottom: calc(100% + 8px) !important;
    transform: translateX(-50%) !important;
  }

  html.shell-v2-desktop body.shell-v2 #queued-send .canonical-dock-card {
    min-height: 36px !important;
    grid-template-columns: 24px minmax(0, 1fr) auto 32px !important;
    padding: 3px 8px 3px 10px !important;
    border-radius: 12px !important;
  }
}

/* Canonical active-turn rows. Process text stays ordinary prose; tool activity
   is a compact muted line and never inherits Markdown heading/card styling. */
html.shell-v2 body.shell-v2 #thread article.thread-view-process,
html.shell-v2 body.shell-v2 #thread article.thread-view-tool {
  margin-block: 7px !important;
}

html.shell-v2 body.shell-v2 #thread .bubble.process-step {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  letter-spacing: 0 !important;
}

html.shell-v2 body.shell-v2 #thread .bubble.process-text-line {
  color: var(--v2-text) !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
}

html.shell-v2 body.shell-v2 #thread .bubble.process-tool-line {
  color: color-mix(in srgb, var(--v2-muted) 88%, transparent) !important;
  font-size: 11.5px !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Active operations are grouped into one quiet disclosure. They stay available
   without pushing the current answer or composer out of the reading area. */
html.shell-v2 body.shell-v2 #thread article.thread-view-process-group {
  margin-block: 7px !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-details {
  width: fit-content !important;
  max-width: 100% !important;
  margin: 0 !important;
  color: var(--v2-muted) !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-details > summary {
  display: inline-flex !important;
  align-items: center !important;
  max-width: min(100%, 560px) !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  gap: 6px !important;
  min-height: 24px !important;
  padding: 3px 8px !important;
  border: 1px solid color-mix(in srgb, var(--v2-border) 70%, transparent) !important;
  border-radius: 8px !important;
  background: color-mix(in srgb, var(--v2-surface) 72%, transparent) !important;
  color: var(--v2-muted) !important;
  cursor: pointer !important;
  list-style: none !important;
  user-select: none !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-summary-label {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-summary-count {
  flex: 0 0 auto !important;
  color: color-mix(in srgb, var(--v2-muted) 82%, transparent) !important;
  font-variant-numeric: tabular-nums !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-details > summary::-webkit-details-marker {
  display: none !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-details > summary::before {
  content: '+';
  font-size: 15px;
  line-height: 1;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-details[open] > summary::before {
  content: '-';
}

html.shell-v2 body.shell-v2 #thread .canonical-process-list {
  display: grid !important;
  gap: 5px !important;
  max-width: min(680px, 100%) !important;
  margin-top: 7px !important;
  padding: 0 2px !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-details:not([open]) .canonical-process-list {
  display: none !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-line {
  overflow-wrap: anywhere !important;
  white-space: pre-wrap !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-line.is-tool {
  color: color-mix(in srgb, var(--v2-muted) 88%, transparent) !important;
  font-size: 11.5px !important;
}

@media (max-width: 900px) {
  html.shell-v2-mobile body.shell-v2 #thread article.thread-view-process,
  html.shell-v2-mobile body.shell-v2 #thread article.thread-view-tool {
    margin-block: 8px !important;
  }

  html.shell-v2-mobile body.shell-v2 #thread .bubble.process-text-line {
    font-size: 15px !important;
    line-height: 1.52 !important;
  }

  html.shell-v2-mobile body.shell-v2 #thread .bubble.process-tool-line {
    font-size: 12.5px !important;
    line-height: 1.35 !important;
  }

  html.shell-v2-mobile body.shell-v2 #thread .canonical-process-details {
    font-size: 12.5px !important;
  }

  html.shell-v2-mobile body.shell-v2 #thread .canonical-process-line.is-tool {
    font-size: 12px !important;
  }
}

/* Lazy history feedback stays outside document flow so loading an older window
   never moves the reader's current anchor. */
html.shell-v2 body.shell-v2 .canonical-history-loader {
  position: sticky !important;
  top: 8px !important;
  z-index: 24 !important;
  width: 100% !important;
  height: 0 !important;
  min-height: 0 !important;
  display: flex !important;
  justify-content: center !important;
  overflow: visible !important;
  opacity: 0 !important;
  transform: translateY(-5px) !important;
  pointer-events: none !important;
  transition: opacity 140ms ease, transform 180ms cubic-bezier(.22, .61, .36, 1) !important;
}

html.shell-v2 body.shell-v2 .canonical-history-loader.is-visible {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

html.shell-v2 body.shell-v2 .canonical-history-loader-label {
  min-height: 28px !important;
  max-width: min(82vw, 320px) !important;
  padding: 5px 11px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  border: 1px solid color-mix(in srgb, var(--v2-border) 68%, transparent) !important;
  border-radius: 14px !important;
  background: color-mix(in srgb, var(--v2-panel) 94%, transparent) !important;
  color: var(--v2-muted) !important;
  box-shadow: 0 5px 16px rgba(15, 23, 42, .07) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  white-space: nowrap !important;
}

html.shell-v2 body.shell-v2 .canonical-history-loader[data-state="loading"] .canonical-history-loader-label::before {
  content: "" !important;
  width: 10px !important;
  height: 10px !important;
  flex: 0 0 10px !important;
  border: 1.5px solid color-mix(in srgb, var(--v2-accent) 28%, transparent) !important;
  border-top-color: var(--v2-accent) !important;
  border-radius: 50% !important;
  animation: canonical-history-loader-spin 720ms linear infinite !important;
}

html.shell-v2-dark body.shell-v2 .canonical-history-loader-label {
  background: color-mix(in srgb, var(--v2-panel) 96%, #000) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .22) !important;
}

@keyframes canonical-history-loader-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  html.shell-v2 body.shell-v2 .canonical-history-loader {
    transition: none !important;
  }

  html.shell-v2 body.shell-v2 .canonical-history-loader[data-state="loading"] .canonical-history-loader-label::before {
    animation: none !important;
  }
}

@media (min-width: 901px) {
  html.shell-v2-desktop body.shell-v2 .shell-v2-more-button,
  html.shell-v2-desktop body.shell-v2 .shell-v2-control-drawer {
    display: none !important;
  }
}

html.shell-v2-standalone body.shell-v2 {
  background: var(--v2-bg) !important;
}

html.shell-v2.android-keyboard-mode {
  --keyboard-shift-trim: 0px !important;
  --keyboard-composer-gap: 8px !important;
}

html.shell-v2-dark body.shell-v2 {
  --v2-bg: #111016;
  --v2-panel: #17151c;
  --v2-panel-muted: #211f27;
  --v2-panel-strong: #2b2833;
  --v2-control-bg: #24212d;
  --v2-control-bg-hover: #2f2b3a;
  --v2-card-flat: #1a1820;
  --v2-queue-bg: #211f29;
  --v2-queue-accent: #aaa0bc;
  --v2-queue-accent-soft: #282334;
  --v2-border: #34303c;
  --v2-border-soft: #292631;
  --v2-line: rgba(255, 255, 255, .105);
  --v2-line-soft: rgba(255, 255, 255, .06);
  --v2-header-shadow: 0 12px 26px rgba(0, 0, 0, .36);
  --v2-composer-shadow: 0 -12px 28px rgba(0, 0, 0, .38);
  --v2-text: #f4f1f7;
  --v2-muted: #aaa4b3;
  --v2-faint: #7e7789;
  --v2-accent: #c3a8ee;
  --v2-accent-soft: #2a2039;
  --v2-accent-tint: #241d31;
  --v2-accent-tint-strong: #30233f;
  --v2-success: #c3a8ee;
  --v2-success-soft: #2a2335;
  --v2-warning: #e0b45b;
  --v2-warning-soft: #2a2214;
  --v2-danger: #ff817b;
  --v2-danger-soft: #2a1718;
  --v2-card-shadow: 0 1px 2px rgba(0, 0, 0, .16);
  --v2-control-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 1px 1px rgba(0, 0, 0, .18);
  --v2-soft-shadow: 0 1px 2px rgba(0, 0, 0, .14);
  --v2-inner-highlight: inset 0 1px 0 rgba(255, 255, 255, .045);
}

body.shell-v2 *,
body.shell-v2 *::before,
body.shell-v2 *::after {
  box-sizing: border-box !important;
  letter-spacing: 0 !important;
  text-shadow: none !important;
}

body.shell-v2,
body.shell-v2 .app,
body.shell-v2 .topbar,
body.shell-v2 .thread,
body.shell-v2 .thread-menu,
body.shell-v2 .composer-shell {
  background-image: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.shell-v2 .app {
  color: var(--v2-text) !important;
  background: var(--v2-bg) !important;
}

body.shell-v2 .thread {
  background: var(--v2-bg) !important;
}

body.shell-v2 button,
body.shell-v2 .icon-btn,
body.shell-v2 .send-btn,
body.shell-v2 .thread-option,
body.shell-v2 .pinned-thread-option,
body.shell-v2 .file-attachment-preview,
body.shell-v2 .shell-v2-recent-thread-chip {
  -webkit-tap-highlight-color: transparent !important;
}

body.shell-v2 button svg,
body.shell-v2 .icon-btn svg,
body.shell-v2 .send-btn svg {
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

body.shell-v2 .title-dot,
body.shell-v2 .composer-signature,
body.shell-v2 .thread-menu::after {
  display: none !important;
}

body.shell-v2 .thread-name,
body.shell-v2 .settings-label,
body.shell-v2 .thread-option-title,
body.shell-v2 .pinned-thread-name,
body.shell-v2 .bubble,
body.shell-v2 .queued-send-card-text,
body.shell-v2 .file-attachment-name {
  color: var(--v2-text) !important;
}

body.shell-v2 .shell-v2-thread-status {
  flex: 0 0 auto !important;
  width: 0 !important;
  height: 13px !important;
  display: inline-grid !important;
  place-items: center !important;
  align-items: center !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  padding: 0 !important;
  color: var(--v2-muted) !important;
  font-size: 0 !important;
  line-height: 0 !important;
  opacity: .9 !important;
}

body.shell-v2 .shell-v2-thread-status-dot {
  position: relative !important;
  width: 0 !important;
  height: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.shell-v2 .shell-v2-thread-status-label {
  display: none !important;
}

body.shell-v2 .shell-v2-thread-status.is-running,
body.shell-v2 .shell-v2-thread-status.is-waiting,
body.shell-v2 .shell-v2-thread-status.is-failed {
  width: 13px !important;
  margin-left: 6px !important;
}

body.shell-v2 .shell-v2-thread-status.is-running .shell-v2-thread-status-dot {
  width: 7px !important;
  height: 7px !important;
  background: var(--v2-accent) !important;
  box-shadow: none !important;
  animation: shell-v2-thread-running-pulse 1.2s ease-in-out infinite !important;
}

body.shell-v2 .shell-v2-thread-status.is-waiting .shell-v2-thread-status-dot {
  width: 6px !important;
  height: 6px !important;
  border: 1px solid color-mix(in srgb, #9a7a2f 68%, var(--v2-muted)) !important;
  background: transparent !important;
}

body.shell-v2 .shell-v2-thread-status.is-completed .shell-v2-thread-status-dot {
  width: 0 !important;
  height: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.shell-v2 .shell-v2-thread-status.is-failed .shell-v2-thread-status-dot {
  width: 10px !important;
  height: 10px !important;
  background: #b54742 !important;
}

body.shell-v2 .shell-v2-thread-status.is-failed .shell-v2-thread-status-dot::before {
  content: "!" !important;
  position: absolute !important;
  inset: 0 !important;
  display: grid !important;
  place-items: center !important;
  color: #fff !important;
  font-size: 8px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

@keyframes shell-v2-thread-running-pulse {
  0%, 100% { opacity: .62; transform: scale(.86); }
  50% { opacity: 1; transform: scale(1); }
}

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

body.shell-v2 .shell-v2-goal-status {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  min-width: 46px !important;
  max-width: 54px !important;
  margin-left: 5px !important;
  padding: 1px 5px !important;
  border: 1px solid color-mix(in srgb, var(--v2-accent) 12%, var(--v2-border-soft)) !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--v2-accent-tint) 68%, transparent) !important;
  color: color-mix(in srgb, var(--v2-accent) 80%, var(--v2-muted)) !important;
  font-size: 10.5px !important;
  font-weight: 650 !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  opacity: .88 !important;
  justify-content: center !important;
  transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease !important;
}

body.shell-v2 .shell-v2-goal-status[hidden] {
  display: none !important;
}

body.shell-v2 .shell-v2-goal-status-dot {
  width: 5px !important;
  height: 5px !important;
  border-radius: 999px !important;
  background: var(--v2-accent) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--v2-accent) 10%, transparent) !important;
}

body.shell-v2 .shell-v2-goal-status.is-running .shell-v2-goal-status-dot {
  animation: shell-v2-goal-pulse 1.2s ease-in-out infinite !important;
}

body.shell-v2 .shell-v2-goal-status.is-paused {
  background: color-mix(in srgb, var(--v2-muted) 8%, transparent) !important;
  border-color: color-mix(in srgb, var(--v2-muted) 18%, var(--v2-border-soft)) !important;
  color: var(--v2-muted) !important;
}

body.shell-v2 .shell-v2-goal-status.is-paused .shell-v2-goal-status-dot {
  animation: none !important;
  background: var(--v2-muted) !important;
  box-shadow: none !important;
}

body.shell-v2 .shell-v2-goal-status.is-failed {
  color: var(--v2-danger) !important;
  border-color: color-mix(in srgb, var(--v2-danger) 20%, var(--v2-border-soft)) !important;
}

body.shell-v2 .shell-v2-goal-status.is-failed .shell-v2-goal-status-dot {
  background: var(--v2-danger) !important;
}

body.shell-v2 .thread-option-title .shell-v2-thread-goal-status {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  max-width: 30px !important;
  margin-left: 6px !important;
  padding: 1px 4px !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--v2-accent-tint) 72%, transparent) !important;
  color: color-mix(in srgb, var(--v2-accent) 82%, var(--v2-muted)) !important;
  font-size: 10px !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

body.shell-v2 .thread-option-title .shell-v2-thread-goal-status.is-failed,
body.shell-v2 .thread-option-title .shell-v2-thread-goal-status.is-error {
  background: rgba(181, 71, 66, .08) !important;
  color: var(--v2-danger) !important;
}

@keyframes shell-v2-goal-pulse {
  0%, 100% { opacity: .55; transform: scale(.86); }
  50% { opacity: 1; transform: scale(1); }
}

body.shell-v2 .meta,
body.shell-v2 .day-note,
body.shell-v2 .settings-subtitle,
body.shell-v2 .thread-option-state,
body.shell-v2 .pinned-thread-meta,
body.shell-v2 .process-tool,
body.shell-v2 .process-tool-row,
body.shell-v2 .attachment-note,
body.shell-v2 .memory-citation-note {
  color: var(--v2-muted) !important;
}

body.shell-v2 button,
body.shell-v2 [role="button"] {
  font-family: inherit !important;
}

body.shell-v2 .thread-button,
body.shell-v2 .permission-badge,
body.shell-v2 .reasoning-badge,
body.shell-v2 .model-badge,
body.shell-v2 .route-badge,
body.shell-v2 .settings-btn,
body.shell-v2 .new-thread-btn,
body.shell-v2 .local-theme-toggle,
body.shell-v2 .context-status,
body.shell-v2 .thread-action-button,
body.shell-v2 .approval-action,
body.shell-v2 .settings-switch,
body.shell-v2 .settings-nav-row,
body.shell-v2 .settings-row,
body.shell-v2 .bubble-copy-btn {
  border: 1px solid var(--v2-border) !important;
  border-radius: var(--v2-radius-control) !important;
  background: var(--v2-control-bg) !important;
  color: var(--v2-text) !important;
  box-shadow: var(--v2-control-shadow) !important;
  background-image: none !important;
}

body.shell-v2 .thread-button:active,
body.shell-v2 .model-badge:active,
body.shell-v2 .route-badge:active,
body.shell-v2 .settings-btn:active,
body.shell-v2 .new-thread-btn:active,
body.shell-v2 .thread-option:active,
body.shell-v2 .settings-nav-row:active {
  background: var(--v2-control-bg-hover) !important;
  transform: none !important;
}

body.shell-v2 .message.assistant .bubble-actions {
  display: none !important;
}

@media (hover: hover) and (pointer: fine) {
  body.shell-v2 .message.assistant:hover .bubble-actions,
  body.shell-v2 .message.assistant:focus-within .bubble-actions {
    display: flex !important;
  }
}

@media (hover: none), (pointer: coarse) {
  body.shell-v2 .message.assistant .bubble-actions {
    display: none !important;
  }
}

body.shell-v2 .thread-button,
body.shell-v2 .thread-button *,
body.shell-v2 .thread-name {
  -webkit-tap-highlight-color: transparent !important;
}

body.shell-v2 #attach,
body.shell-v2 #attach *,
body.shell-v2 #file-input.shell-v2-native-file-hit,
body.shell-v2 #file-input.shell-v2-native-file-hit:active,
body.shell-v2 #file-input.shell-v2-native-file-hit:focus,
body.shell-v2 #file-input.shell-v2-native-file-hit:focus-visible {
  -webkit-tap-highlight-color: transparent !important;
  tap-highlight-color: transparent !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  background-color: transparent !important;
}

body.shell-v2 #file-input.shell-v2-native-file-hit {
  color: transparent !important;
  caret-color: transparent !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

body.shell-v2 #file-input.shell-v2-native-file-hit::file-selector-button,
body.shell-v2 #file-input.shell-v2-native-file-hit::-webkit-file-upload-button {
  -webkit-tap-highlight-color: transparent !important;
  border: 0 !important;
  background: transparent !important;
  color: transparent !important;
  box-shadow: none !important;
}

body.shell-v2 .thread-button:hover,
body.shell-v2 .thread-button:active,
body.shell-v2 .thread-button:focus,
body.shell-v2 .thread-button:focus-visible {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  outline: 0 !important;
}

body.shell-v2 .thread-menu,
body.shell-v2 .thread-menu *,
body.shell-v2 .thread-option,
body.shell-v2 .thread-option *,
body.shell-v2 .pinned-thread-option,
body.shell-v2 .pinned-thread-option * {
  -webkit-tap-highlight-color: transparent !important;
}

body.shell-v2 .thread-menu .thread-option:hover,
body.shell-v2 .thread-menu .thread-option:active,
body.shell-v2 .thread-menu .thread-option:focus,
body.shell-v2 .thread-menu .thread-option:focus-visible,
body.shell-v2 .thread-menu .pinned-thread-option:hover,
body.shell-v2 .thread-menu .pinned-thread-option:active,
body.shell-v2 .thread-menu .pinned-thread-option:focus,
body.shell-v2 .thread-menu .pinned-thread-option:focus-visible {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  outline: 0 !important;
}

body.shell-v2 .thread-menu .thread-option[aria-current="true"],
body.shell-v2 .thread-menu .thread-option[aria-current="true"]:active,
body.shell-v2 .thread-menu .thread-option[aria-current="true"]:focus,
body.shell-v2 .thread-menu .pinned-thread-option[aria-current="true"],
body.shell-v2 .thread-menu .pinned-thread-option[aria-current="true"]:active,
body.shell-v2 .thread-menu .pinned-thread-option[aria-current="true"]:focus {
  background: color-mix(in srgb, var(--v2-accent-soft) 72%, var(--v2-control-bg)) !important;
  box-shadow: var(--v2-inner-highlight) !important;
  outline: 0 !important;
}

body.shell-v2 .route-badge,
body.shell-v2 .send-btn {
  color: var(--v2-accent) !important;
}

body.shell-v2 a:not(.shell-v2-reader-open):not(.file-attachment-preview):not(.shell-v2-image-thumb):not(.shell-v2-image-viewer-download) {
  color: #0969da !important;
}

body.shell-v2 .shell-v2-local-file-link {
  color: color-mix(in srgb, var(--v2-accent) 84%, var(--v2-text)) !important;
  text-decoration: underline !important;
  text-decoration-color: color-mix(in srgb, var(--v2-accent) 34%, transparent) !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 3px !important;
  word-break: break-all !important;
  overflow-wrap: anywhere !important;
}

body.shell-v2 .shell-v2-local-file-link:active {
  color: var(--v2-accent) !important;
}

html.shell-v2-dark body.shell-v2 a:not(.shell-v2-reader-open):not(.file-attachment-preview):not(.shell-v2-image-thumb):not(.shell-v2-image-viewer-download) {
  color: #8ab4f8 !important;
}

body.shell-v2 #send.send-btn {
  color: var(--v2-text) !important;
}

body.shell-v2 #send .shell-v2-send-icon {
  width: 25px !important;
  height: 25px !important;
  display: block !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

body.shell-v2 #send.send-btn:active {
  background: var(--v2-panel-muted) !important;
}

body.shell-v2 #send.send-btn:disabled {
  color: var(--v2-faint) !important;
}

body.shell-v2 .shell-v2-context-ring {
  --context-percent: 0;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  width: auto !important;
  height: 2px !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background:
    linear-gradient(90deg, var(--v2-accent) calc(var(--context-percent) * 1%), color-mix(in srgb, var(--v2-line-soft) 58%, transparent) 0) !important;
  color: transparent !important;
  box-shadow: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  opacity: .9 !important;
  pointer-events: none !important;
  z-index: 8 !important;
}

body.shell-v2 .shell-v2-context-ring {
  position: absolute !important;
}

body.shell-v2 .shell-v2-context-ring::before {
  content: none !important;
  display: none !important;
}

body.shell-v2 .shell-v2-context-ring.is-warn {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--v2-accent) 88%, var(--v2-warning)) calc(var(--context-percent) * 1%), color-mix(in srgb, var(--v2-line-soft) 58%, transparent) 0) !important;
}

body.shell-v2 .shell-v2-context-ring.is-danger {
  background:
    linear-gradient(90deg, var(--v2-danger) calc(var(--context-percent) * 1%), color-mix(in srgb, var(--v2-line-soft) 58%, transparent) 0) !important;
}

body.shell-v2 .shell-v2-context-ring[hidden] {
  display: none !important;
}

body.shell-v2 .route-badge.is-local,
body.shell-v2 .model-badge.is-relay {
  color: color-mix(in srgb, var(--v2-accent) 76%, var(--v2-text)) !important;
}

body.shell-v2 .queued-send-card-state {
  color: var(--v2-queue-accent) !important;
  font-weight: 690 !important;
}

body.shell-v2 .route-badge.is-local,
body.shell-v2 .model-badge.is-relay {
  background: color-mix(in srgb, var(--v2-accent-soft) 34%, var(--v2-control-bg)) !important;
}

body.shell-v2 .bubble code,
body.shell-v2 .bubble pre,
body.shell-v2 .notice-mono-number {
  border: 1px solid color-mix(in srgb, var(--v2-border-soft) 82%, transparent) !important;
  border-radius: 5px !important;
  background: color-mix(in srgb, var(--v2-control-bg) 54%, transparent) !important;
  color: var(--v2-text) !important;
}

body.shell-v2 .bubble pre code,
body.shell-v2 .bubble code code {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.shell-v2 .message.assistant .bubble pre {
  margin-bottom: 0 !important;
  border-bottom-left-radius: 5px !important;
  border-bottom-right-radius: 5px !important;
}

body.shell-v2 .shell-v2-block-copy-bar {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  min-height: 28px !important;
  margin: -1px 0 10px !important;
  padding: 2px 4px 0 !important;
  border: 1px solid color-mix(in srgb, var(--v2-accent) 13%, var(--v2-border-soft)) !important;
  border-top: 0 !important;
  border-radius: 0 0 7px 7px !important;
  background: color-mix(in srgb, var(--v2-accent-tint) 72%, var(--v2-panel)) !important;
}

body.shell-v2 .shell-v2-block-copy-btn {
  min-height: 22px !important;
  padding: 0 9px !important;
  border: 0 !important;
  border-radius: 5px !important;
  background: transparent !important;
  color: color-mix(in srgb, var(--v2-accent) 78%, var(--v2-muted)) !important;
  box-shadow: none !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

body.shell-v2 .shell-v2-block-copy-btn:active {
  background: var(--v2-control-bg-hover) !important;
}

body.shell-v2 .shell-v2-block-copy-btn.is-copied {
  color: var(--v2-success) !important;
}

body.shell-v2 .message {
  margin-bottom: 11px !important;
}

body.shell-v2 .bubble {
  font-size: 14.5px !important;
  line-height: 1.54 !important;
}

body.shell-v2 .message.assistant .bubble {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

body.shell-v2 .message.user .bubble {
  border: 1px solid #e5e5e5 !important;
  border-radius: var(--v2-radius-bubble) !important;
  background: #f7f7f7 !important;
  box-shadow: none !important;
}

body.shell-v2 .message.user .bubble.shell-v2-goal-command {
  border-color: color-mix(in srgb, var(--v2-accent) 14%, #e5e5e5) !important;
}

body.shell-v2 .shell-v2-goal-ack {
  align-self: flex-end !important;
  width: fit-content !important;
  max-width: 100% !important;
  margin: 4px 2px 0 auto !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--v2-control-bg) 84%, var(--v2-panel)) !important;
  color: var(--v2-muted) !important;
  font-size: 11px !important;
  font-weight: 560 !important;
  line-height: 1.35 !important;
  box-shadow: none !important;
}

body.shell-v2 .message.user .bubble.shell-v2-has-images {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

body.shell-v2 .message.user .bubble .shell-v2-image-strip {
  order: -1 !important;
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  padding: 1px 0 2px !important;
  -webkit-overflow-scrolling: touch !important;
  scrollbar-width: none !important;
}

body.shell-v2 .message.user .bubble .shell-v2-image-strip::-webkit-scrollbar {
  display: none !important;
}

body.shell-v2 .message.user .bubble .shell-v2-image-thumb {
  flex: 0 0 auto !important;
  width: 88px !important;
  height: 118px !important;
  display: block !important;
  overflow: hidden !important;
  border: 1px solid var(--v2-border) !important;
  border-radius: 7px !important;
  background: var(--v2-panel) !important;
}

body.shell-v2 .message.user .bubble .shell-v2-image-thumb:empty {
  display: none !important;
}

body.shell-v2 .message.user .bubble .shell-v2-image-thumb img.attachment-preview,
body.shell-v2 .message.user .bubble .shell-v2-image-strip img.attachment-preview {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  display: block !important;
  object-fit: cover !important;
  border-radius: 0 !important;
}

body.shell-v2 .message.user .bubble .shell-v2-file-thumb {
  display: grid !important;
  place-items: center !important;
  color: var(--v2-muted) !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  letter-spacing: .02em !important;
}

body.shell-v2 .memory-citation-card,
body.shell-v2 .queued-send-card,
body.shell-v2 .bubble .file-attachment-preview,
body.shell-v2 .thread-action-card,
body.shell-v2 .permission-menu-card,
body.shell-v2 .model-menu-card,
body.shell-v2 .reasoning-menu-card,
body.shell-v2 .composer-menu-card,
body.shell-v2 .context-quick-card,
body.shell-v2 .notice-pill,
body.shell-v2 .tool-call,
body.shell-v2 .process-tool-pill,
body.shell-v2 .approval-sheet {
  border: 1px solid var(--v2-border-soft) !important;
  border-radius: var(--v2-radius-card) !important;
  background: var(--v2-card-flat) !important;
  color: var(--v2-text) !important;
  box-shadow: none !important;
  background-image: none !important;
}

body.shell-v2 .memory-citation-card,
body.shell-v2 .queued-send-card,
body.shell-v2 .bubble .file-attachment-preview {
  border-color: color-mix(in srgb, var(--v2-accent) 13%, var(--v2-border-soft)) !important;
}

body.shell-v2 .memory-citation-card {
  background: color-mix(in srgb, var(--v2-card-flat) 88%, var(--v2-accent-tint)) !important;
  box-shadow: var(--v2-control-shadow) !important;
}

body.shell-v2 .file-attachment-preview.shell-v2-readable-file {
  cursor: pointer !important;
  grid-template-columns: auto minmax(0, 1fr) auto auto !important;
}

body.shell-v2 .file-attachment-preview.shell-v2-readable-file:hover {
  border-color: color-mix(in srgb, var(--v2-accent) 24%, var(--v2-border)) !important;
  background: color-mix(in srgb, var(--v2-card-flat) 82%, var(--v2-accent-tint)) !important;
}

body.shell-v2 .shell-v2-readable-file-action {
  color: var(--v2-accent) !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  white-space: nowrap !important;
}

body.shell-v2 .shell-v2-download-file-action {
  color: var(--v2-muted) !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  white-space: nowrap !important;
  padding-left: 6px !important;
}

html.shell-v2-image-viewer-open,
html.shell-v2-image-viewer-open body.shell-v2,
body.shell-v2.shell-v2-image-viewer-open {
  overflow: hidden !important;
  height: var(--app-height, 100dvh) !important;
  overscroll-behavior: none !important;
}

body.shell-v2 .shell-v2-image-thumb,
body.shell-v2 img.attachment-preview {
  cursor: zoom-in !important;
}

body.shell-v2 .shell-v2-image-viewer {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147482800 !important;
  display: none !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  background: color-mix(in srgb, var(--v2-bg) 12%, #050506 88%) !important;
  color: rgba(255, 255, 255, .92) !important;
  touch-action: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

body.shell-v2 .shell-v2-image-viewer.is-open {
  display: grid !important;
}

body.shell-v2 .shell-v2-image-viewer-bar {
  min-height: calc(46px + env(safe-area-inset-top, 0px)) !important;
  padding: calc(7px + env(safe-area-inset-top, 0px)) 16px 7px !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  background: linear-gradient(180deg, color-mix(in srgb, var(--v2-bg) 10%, rgba(0, 0, 0, .72)), rgba(0, 0, 0, 0)) !important;
}

body.shell-v2 .shell-v2-image-viewer-close,
body.shell-v2 .shell-v2-image-viewer-system-open,
body.shell-v2 .shell-v2-image-viewer-download,
body.shell-v2 .shell-v2-image-viewer-controls button {
  min-width: 0 !important;
  width: auto !important;
  height: 34px !important;
  min-height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 13px !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--v2-control-bg) 16%, rgba(255, 255, 255, .08)) !important;
  color: rgba(255, 255, 255, .88) !important;
  box-shadow: var(--v2-control-shadow) !important;
  font-size: 13px !important;
  font-weight: 620 !important;
  line-height: 1 !important;
  text-decoration: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

body.shell-v2 .shell-v2-image-viewer-download {
  color: color-mix(in srgb, var(--v2-accent) 18%, rgba(255, 255, 255, .90)) !important;
  font-weight: 680 !important;
}

body.shell-v2 .shell-v2-image-viewer-actions {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 7px !important;
}

body.shell-v2 .shell-v2-image-viewer-system-open {
  display: none !important;
  color: rgba(255, 255, 255, .74) !important;
}

body.shell-v2 .shell-v2-image-viewer.can-open-system .shell-v2-image-viewer-system-open {
  display: inline-flex !important;
}

body.shell-v2 .shell-v2-image-viewer-title {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1.25 !important;
}

body.shell-v2 .shell-v2-image-viewer-title strong {
  max-width: 44vw !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: rgba(255, 255, 255, .92) !important;
  font-size: 14px !important;
  font-weight: 690 !important;
}

body.shell-v2 .shell-v2-image-viewer-title span {
  max-width: 52vw !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: rgba(255, 255, 255, .50) !important;
  font-size: 11px !important;
}

body.shell-v2 .shell-v2-image-viewer-stage {
  position: relative !important;
  min-width: 0 !important;
  min-height: 0 !important;
  display: grid !important;
  place-items: center !important;
  overflow: hidden !important;
  touch-action: none !important;
}

body.shell-v2 .shell-v2-image-viewer-img {
  max-width: 100vw !important;
  max-height: 100% !important;
  object-fit: contain !important;
  transform-origin: center center !important;
  transition: transform 160ms ease-out !important;
  will-change: transform !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  -webkit-user-drag: none !important;
}

body.shell-v2 .shell-v2-image-viewer.is-zoomed .shell-v2-image-viewer-img {
  cursor: grab !important;
  transition-duration: 40ms !important;
}

body.shell-v2 .shell-v2-image-viewer.is-panning .shell-v2-image-viewer-img {
  cursor: grabbing !important;
  transition: none !important;
}

body.shell-v2 .shell-v2-image-viewer-nav {
  position: absolute !important;
  z-index: 2 !important;
  top: 50% !important;
  width: 42px !important;
  height: 56px !important;
  min-height: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, .14) !important;
  border-radius: 999px !important;
  background: rgba(12, 12, 14, .42) !important;
  color: rgba(255, 255, 255, .88) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .22) !important;
  font-size: 30px !important;
  font-weight: 360 !important;
  line-height: 1 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(-50%) !important;
  transition: opacity 140ms ease !important;
  -webkit-tap-highlight-color: transparent !important;
}

body.shell-v2 .shell-v2-image-viewer.can-navigate .shell-v2-image-viewer-nav {
  opacity: 1 !important;
  pointer-events: auto !important;
}

body.shell-v2 .shell-v2-image-viewer-nav.is-previous { left: max(12px, env(safe-area-inset-left, 0px)) !important; }
body.shell-v2 .shell-v2-image-viewer-nav.is-next { right: max(12px, env(safe-area-inset-right, 0px)) !important; }

body.shell-v2 .shell-v2-image-viewer-controls {
  width: fit-content !important;
  max-width: calc(100vw - 28px) !important;
  margin: 0 auto calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  padding: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  border: 1px solid rgba(255, 255, 255, .10) !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--v2-panel) 12%, rgba(16, 16, 18, .72)) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22), var(--v2-inner-highlight) !important;
  backdrop-filter: blur(14px) saturate(125%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(125%) !important;
}

body.shell-v2 .shell-v2-image-viewer-controls button {
  min-width: 42px !important;
  height: 34px !important;
  padding: 0 12px !important;
  background: rgba(255, 255, 255, .08) !important;
  box-shadow: none !important;
}

body.shell-v2 .shell-v2-image-viewer-zoom {
  min-width: 58px !important;
  padding: 0 4px !important;
  color: rgba(255, 255, 255, .74) !important;
  font-size: 12px !important;
  font-weight: 640 !important;
  text-align: center !important;
}

/* Image viewer visual alignment: use the same quiet capsule language as Shell v2 controls. */

html.shell-v2-reader-open,
html.shell-v2-reader-open body.shell-v2,
body.shell-v2.shell-v2-reader-open {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  height: auto !important;
  min-height: var(--app-height, 100dvh) !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  overscroll-behavior-y: auto !important;
  background: var(--v2-bg) !important;
}

body.shell-v2.shell-v2-reader-open > .app {
  display: none !important;
}

body.shell-v2 .shell-v2-reader {
  position: fixed !important;
  z-index: 240 !important;
  inset: 0 !important;
  display: block !important;
  height: var(--app-height, 100dvh) !important;
  max-height: var(--app-height, 100dvh) !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  overscroll-behavior-y: auto !important;
  scrollbar-width: thin !important;
  scrollbar-color: color-mix(in srgb, var(--v2-muted) 46%, transparent) transparent !important;
  background: var(--v2-bg) !important;
  color: var(--v2-text) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(10px) !important;
  transition: opacity 150ms ease, transform 150ms ease !important;
}

body.shell-v2 .shell-v2-reader.is-open {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}

body.shell-v2.shell-v2-reader-open .shell-v2-reader.is-open {
  position: relative !important;
  inset: auto !important;
  display: block !important;
  height: auto !important;
  min-height: var(--app-height, 100dvh) !important;
  max-height: none !important;
  overflow: visible !important;
  transform: none !important;
}

body.shell-v2 .shell-v2-reader::-webkit-scrollbar {
  width: 6px !important;
}

body.shell-v2 .shell-v2-reader::-webkit-scrollbar-thumb {
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--v2-muted) 38%, transparent) !important;
}

body.shell-v2 .shell-v2-reader-top {
  position: sticky !important;
  top: 0 !important;
  z-index: 2 !important;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 48px !important;
  padding: calc(env(safe-area-inset-top, 0px) + 7px) 14px 7px !important;
  border-bottom: 1px solid color-mix(in srgb, var(--v2-border) 78%, transparent) !important;
  background: var(--v2-panel) !important;
  box-shadow: 0 1px 0 rgba(15, 23, 42, .025), 0 4px 14px rgba(15, 23, 42, .03) !important;
}

body.shell-v2 .shell-v2-reader-back,
body.shell-v2 .shell-v2-reader-open {
  min-height: 30px !important;
  padding: 0 7px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: var(--v2-muted) !important;
  box-shadow: none !important;
  text-decoration: none !important;
  font-size: 13.5px !important;
  font-weight: 680 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.shell-v2 .shell-v2-reader-back:active,
body.shell-v2 .shell-v2-reader-open:active {
  background: var(--v2-control-bg) !important;
  color: var(--v2-text) !important;
}

body.shell-v2 .shell-v2-reader-open {
  color: var(--v2-accent) !important;
}

body.shell-v2 .shell-v2-reader-open.is-disabled {
  opacity: .42 !important;
  pointer-events: none !important;
}

body.shell-v2 .shell-v2-reader-title {
  min-width: 0 !important;
  display: grid !important;
  gap: 1px !important;
}

body.shell-v2 .shell-v2-reader-title strong {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: var(--v2-text) !important;
  font-size: 15px !important;
  font-weight: 720 !important;
}

body.shell-v2 .shell-v2-reader-title span {
  color: var(--v2-muted) !important;
  font-size: 11px !important;
  font-weight: 620 !important;
  text-transform: uppercase !important;
}

body.shell-v2 .shell-v2-reader-body {
  display: block !important;
  min-height: calc(var(--app-height, 100dvh) - 48px) !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  padding: 18px clamp(18px, 4vw, 34px) calc(26px + env(safe-area-inset-bottom, 0px)) !important;
  touch-action: pan-y !important;
  background: var(--v2-bg) !important;
}

body.shell-v2.shell-v2-reader-open .shell-v2-reader-body {
  min-height: auto !important;
}

body.shell-v2 .shell-v2-reader:has(.shell-v2-reader-frame) {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

body.shell-v2 .shell-v2-reader:has(.shell-v2-reader-frame) .shell-v2-reader-top {
  position: relative !important;
  top: auto !important;
}

body.shell-v2 .shell-v2-reader:has(.shell-v2-reader-frame) .shell-v2-reader-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body.shell-v2 .shell-v2-reader-doc {
  width: min(100%, 820px) !important;
  margin: 0 auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.shell-v2 .shell-v2-reader-markdown {
  padding: 0 0 30px !important;
  font-size: 15px !important;
  line-height: 1.72 !important;
}

body.shell-v2 .shell-v2-reader-markdown h1,
body.shell-v2 .shell-v2-reader-markdown h2,
body.shell-v2 .shell-v2-reader-markdown h3 {
  margin: 1em 0 .55em !important;
  color: color-mix(in srgb, var(--v2-text) 88%, var(--v2-accent)) !important;
  line-height: 1.35 !important;
}

body.shell-v2 .shell-v2-reader-markdown h1:first-child,
body.shell-v2 .shell-v2-reader-markdown h2:first-child,
body.shell-v2 .shell-v2-reader-markdown h3:first-child {
  margin-top: 0 !important;
}

body.shell-v2 .shell-v2-reader-markdown p,
body.shell-v2 .shell-v2-reader-markdown ul {
  margin: .55em 0 !important;
}

body.shell-v2 .shell-v2-reader-markdown code,
body.shell-v2 .shell-v2-reader-plain {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
}

body.shell-v2 .shell-v2-reader-markdown code {
  padding: 1px 5px !important;
  border-radius: 5px !important;
  background: color-mix(in srgb, var(--v2-control-bg) 54%, transparent) !important;
}

body.shell-v2 .shell-v2-reader-plain {
  padding: 0 0 30px !important;
  white-space: pre-wrap !important;
  word-break: break-word !important;
  font-size: 13px !important;
  line-height: 1.62 !important;
}

body.shell-v2 .shell-v2-reader-frame {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--v2-panel) !important;
  box-shadow: none !important;
}

body.shell-v2 .shell-v2-reader-state {
  width: min(100%, 520px) !important;
  margin: 18vh auto 0 !important;
  padding: 18px !important;
  border: 1px solid var(--v2-border-soft) !important;
  border-radius: var(--v2-radius-card) !important;
  background: var(--v2-panel) !important;
  color: var(--v2-muted) !important;
  box-shadow: var(--v2-soft-shadow) !important;
  display: grid !important;
  gap: 8px !important;
  text-align: center !important;
}

body.shell-v2 .shell-v2-reader-state strong {
  color: var(--v2-text) !important;
}

body.shell-v2 .thread-action-card,
body.shell-v2 .context-quick-card,
body.shell-v2 .approval-sheet,
body.shell-v2 .permission-menu-card,
body.shell-v2 .model-menu-card,
body.shell-v2 .reasoning-menu-card,
body.shell-v2 .composer-menu-card {
  box-shadow: var(--v2-card-shadow) !important;
}

body.shell-v2 .composer,
body.shell-v2 .composer textarea,
body.shell-v2 textarea#text,
body.shell-v2 .icon-btn,
body.shell-v2 .send-btn {
  background: var(--v2-panel) !important;
  color: var(--v2-text) !important;
  box-shadow: none !important;
}

body.shell-v2 .composer textarea::placeholder,
body.shell-v2 textarea#text::placeholder {
  color: var(--v2-faint) !important;
  opacity: 0.52 !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}

body.shell-v2 .shell-v2-recent-threads {
  display: none !important;
}

body.shell-v2 .shell-v2-draft-notice {
  display: none !important;
}

body.shell-v2 .attachment-tray,
body.shell-v2 .queued-send-bar {
  border-top: 1px solid var(--v2-border-soft) !important;
  background: var(--v2-card-flat) !important;
  box-shadow: none !important;
}

body.shell-v2 .queued-send-bar {
  background: color-mix(in srgb, var(--v2-queue-bg) 64%, transparent) !important;
  backdrop-filter: blur(14px) saturate(1.05) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.05) !important;
}

body.shell-v2 .queued-send-card {
  min-height: 36px !important;
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) 32px 24px !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 4px 8px !important;
}

body.shell-v2 .queued-send-card-state {
  display: none !important;
}

body.shell-v2 .queued-send-card-text {
  color: color-mix(in srgb, var(--v2-muted) 88%, var(--v2-text)) !important;
  font-size: 11.8px !important;
  font-weight: 560 !important;
  order: 2 !important;
}

body.shell-v2 .queued-send-card.is-editing {
  background: color-mix(in srgb, var(--v2-queue-accent-soft) 82%, transparent) !important;
}

body.shell-v2 .queued-send-card.is-busy {
  opacity: .72 !important;
}

body.shell-v2 .queued-send-promote,
body.shell-v2 .queued-send-edit,
body.shell-v2 .queued-send-delete {
  min-height: 26px !important;
  padding: 0 3px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: color-mix(in srgb, var(--v2-queue-accent) 84%, var(--v2-muted)) !important;
  box-shadow: none !important;
  background-image: none !important;
  font-size: 11.6px !important;
  font-weight: 640 !important;
}

body.shell-v2 .queued-send-promote:disabled,
body.shell-v2 .queued-send-edit:disabled,
body.shell-v2 .queued-send-delete:disabled {
  opacity: .45 !important;
  pointer-events: none !important;
}

body.shell-v2 .queued-send-promote {
  order: 1 !important;
  width: 44px !important;
  max-width: 44px !important;
  justify-self: start !important;
}

body.shell-v2 .queued-send-edit {
  order: 3 !important;
  width: 32px !important;
  max-width: 32px !important;
}

body.shell-v2 .queued-send-delete {
  order: 4 !important;
  width: 24px !important;
  max-width: 24px !important;
}

body.shell-v2 .queued-send-promote svg,
body.shell-v2 .queued-send-delete svg {
  width: 16px !important;
  height: 16px !important;
  stroke-width: 1.9 !important;
}

body.shell-v2 .tool-call,
body.shell-v2 .process-tool-pill,
body.shell-v2 .notice-pill {
  background: color-mix(in srgb, var(--v2-control-bg) 78%, var(--v2-panel)) !important;
  border-color: transparent !important;
  box-shadow: var(--v2-control-shadow) !important;
}

body.shell-v2 .notice-pill {
  pointer-events: none !important;
}

body.shell-v2 .settings-card {
  border: 1px solid var(--v2-border) !important;
  background: var(--v2-panel) !important;
  color: var(--v2-text) !important;
  box-shadow: none !important;
  background-image: none !important;
}

body.shell-v2 .settings-title,
body.shell-v2 .settings-row,
body.shell-v2 .settings-nav-row {
  border-color: var(--v2-border-soft) !important;
}

body.shell-v2 .thread-option,
body.shell-v2 .pinned-thread-option,
body.shell-v2 .composer-menu-item,
body.shell-v2 .permission-menu-item,
body.shell-v2 .model-menu-item,
body.shell-v2 .reasoning-menu-item {
  border-radius: var(--v2-radius-control) !important;
  background: transparent !important;
  color: var(--v2-text) !important;
  box-shadow: none !important;
}

body.shell-v2 .thread-menu svg,
body.shell-v2 .thread-menu .folder-icon,
body.shell-v2 .thread-menu .folder-icon *,
body.shell-v2 .thread-menu [class*="folder"] svg,
body.shell-v2 .thread-menu [class*="folder"] svg * {
  color: var(--v2-muted) !important;
  stroke: currentColor !important;
  fill: none !important;
}

body.shell-v2 .thread-option[aria-current="true"],
body.shell-v2 .pinned-thread-option[aria-current="true"],
body.shell-v2 .composer-menu-item.is-active,
body.shell-v2 .permission-menu-item.is-current,
body.shell-v2 .model-menu-item.is-current,
body.shell-v2 .reasoning-menu-item.is-current {
  background: color-mix(in srgb, var(--v2-accent-soft) 72%, var(--v2-control-bg)) !important;
  border-color: transparent !important;
  box-shadow: var(--v2-inner-highlight) !important;
}

body.shell-v2 .thread-option-spinner {
  width: 15px !important;
  height: 15px !important;
  border-width: 2px !important;
  border-style: solid !important;
  border-color: #b6bcc4 !important;
  border-top-color: var(--v2-accent) !important;
  box-shadow: none !important;
}

html.shell-v2-dark body.shell-v2 .thread-option-spinner {
  border-color: #42464d !important;
  border-top-color: #d8dbe0 !important;
}

body.shell-v2 .shell-v2-task-toast {
  position: fixed !important;
  top: calc(var(--v2-header) + 10px) !important;
  left: 50% !important;
  right: auto !important;
  z-index: 240 !important;
  width: min(320px, calc(100vw - 28px)) !important;
  min-height: 44px !important;
  padding: 7px 8px !important;
  display: grid !important;
  grid-template-columns: 10px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  border: 1px solid var(--v2-border) !important;
  border-radius: var(--v2-radius-card) !important;
  background: var(--v2-panel) !important;
  color: var(--v2-text) !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translate(-50%, -6px) !important;
  transition: opacity 140ms ease, transform 140ms ease !important;
}

body.shell-v2 .shell-v2-task-toast.is-open {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translate(-50%, 0) !important;
}

body.shell-v2 .shell-v2-task-toast-dot {
  width: 7px !important;
  height: 7px !important;
  border-radius: 50% !important;
  background: var(--v2-success) !important;
}

body.shell-v2 .shell-v2-task-toast.is-error .shell-v2-task-toast-dot {
  background: var(--v2-danger) !important;
}

body.shell-v2 .shell-v2-task-toast-text {
  min-width: 0 !important;
  display: grid !important;
  gap: 1px !important;
}

body.shell-v2 .shell-v2-task-toast-text strong {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: var(--v2-text) !important;
  font-size: 13px !important;
  font-weight: 720 !important;
  line-height: 1.2 !important;
}

body.shell-v2 .shell-v2-task-toast-text span {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: var(--v2-muted) !important;
  font-size: 12px !important;
  font-weight: 550 !important;
  line-height: 1.2 !important;
}

body.shell-v2 .shell-v2-task-toast-link {
  height: 30px !important;
  min-width: 46px !important;
  padding: 0 9px !important;
  border: 1px solid var(--v2-border) !important;
  border-radius: var(--v2-radius-control) !important;
  background: var(--v2-panel-muted) !important;
  color: var(--v2-accent) !important;
  box-shadow: none !important;
  font: inherit !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

body.shell-v2 .shell-v2-task-toast-link:active {
  background: var(--v2-panel-strong) !important;
}

body.shell-v2 .shell-v2-more-button,
body.shell-v2 .shell-v2-sidebar-toggle,
body.shell-v2 .shell-v2-control-drawer {
  display: none !important;
}

body.shell-v2 .shell-v2-thread-menu-dock {
  display: none !important;
}

body.shell-v2 .thread-section-label {
  color: var(--v2-faint) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: none !important;
}

/* Desktop: TailAdmin-like workbench */
@media (min-width: 901px) {
  html.shell-v2-desktop,
  html.shell-v2-desktop body.shell-v2 {
    height: 100% !important;
    overflow: hidden !important;
  }

  html.shell-v2-sidebar-collapsed body.shell-v2 {
    --v2-sidebar-effective: 0px;
  }

  body.shell-v2 .app {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100dvh !important;
    display: grid !important;
    grid-template-columns: var(--v2-sidebar-effective) minmax(0, 1fr) !important;
    grid-template-rows: var(--v2-header) minmax(0, 1fr) auto !important;
    overflow: hidden !important;
  }

  body.shell-v2 .thread-menu {
    grid-column: 1 !important;
    grid-row: 1 / 4 !important;
    position: relative !important;
    inset: auto !important;
    display: block !important;
    width: auto !important;
    height: 100dvh !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 14px 12px 70px !important;
    overflow-y: auto !important;
    border: 0 !important;
    border-right: 1px solid var(--v2-border) !important;
    border-radius: 0 !important;
    background: var(--v2-panel-muted) !important;
  }

  body.shell-v2 .thread-menu .shell-v2-thread-menu-dock {
    position: fixed !important;
    left: 12px !important;
    bottom: 12px !important;
    z-index: 80 !important;
    width: calc(var(--v2-sidebar-effective) - 24px) !important;
    min-width: 0 !important;
    height: 42px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    border: 0 !important;
    background: linear-gradient(to top, var(--v2-panel-muted) 68%, color-mix(in srgb, var(--v2-panel-muted) 0%, transparent)) !important;
    pointer-events: none !important;
  }

  html.shell-v2-sidebar-collapsed body.shell-v2 .thread-menu .shell-v2-thread-menu-dock {
    display: none !important;
  }

  body.shell-v2 .thread-menu .shell-v2-thread-menu-settings {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid color-mix(in srgb, var(--v2-border) 78%, transparent) !important;
    border-radius: 8px !important;
    background: color-mix(in srgb, var(--v2-panel) 80%, var(--v2-panel-muted)) !important;
    color: color-mix(in srgb, var(--v2-muted) 84%, var(--v2-text)) !important;
    box-shadow: var(--v2-control-shadow) !important;
    pointer-events: auto !important;
  }

  body.shell-v2 .thread-menu .shell-v2-thread-menu-settings:hover,
  body.shell-v2 .thread-menu .shell-v2-thread-menu-settings:active {
    background: var(--v2-control-bg-hover) !important;
    color: var(--v2-text) !important;
  }

  body.shell-v2 .thread-menu .shell-v2-thread-menu-settings svg {
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 18px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.75 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
  }

  html.shell-v2-sidebar-collapsed body.shell-v2 .thread-menu {
    width: 0 !important;
    min-width: 0 !important;
    padding: 0 !important;
    border-right: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  body.shell-v2 .topbar {
    grid-column: 2 !important;
    grid-row: 1 !important;
    position: relative !important;
    z-index: 50 !important;
    height: var(--v2-header) !important;
    min-height: var(--v2-header) !important;
    padding: 8px 18px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    border-bottom: 1px solid color-mix(in srgb, var(--v2-border) 74%, transparent) !important;
    background: var(--v2-panel) !important;
    box-shadow: var(--v2-header-shadow) !important;
  }

  body.shell-v2 .title {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    gap: 8px !important;
  }

  body.shell-v2 .shell-v2-sidebar-toggle {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    display: inline-grid !important;
    place-items: center !important;
    border: 0 !important;
    border-radius: var(--v2-radius-control) !important;
    background: color-mix(in srgb, var(--v2-control-bg) 84%, var(--v2-panel)) !important;
    color: var(--v2-muted) !important;
    box-shadow: var(--v2-control-shadow) !important;
  }

  body.shell-v2 .shell-v2-sidebar-toggle:hover,
  body.shell-v2 .shell-v2-sidebar-toggle:active {
    background: var(--v2-control-bg-hover) !important;
    color: var(--v2-text) !important;
  }

  body.shell-v2 .shell-v2-sidebar-toggle svg {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
  }

  body.shell-v2 .shell-v2-sidebar-toggle.is-collapsed svg {
    transform: scaleX(-1) !important;
  }

  body.shell-v2 .thread-button {
    max-width: min(52vw, 520px) !important;
    height: 34px !important;
    padding: 0 10px !important;
    background: transparent !important;
    border-color: transparent !important;
  }

  body.shell-v2 .thread-name {
    font-size: 15px !important;
    font-weight: 700 !important;
  }

  body.shell-v2 .top-actions {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    overflow: visible !important;
  }

  body.shell-v2 .permission-badge,
  body.shell-v2 .reasoning-badge,
  body.shell-v2 .model-badge,
  body.shell-v2 .route-badge,
  body.shell-v2 .settings-btn,
  body.shell-v2 .new-thread-btn,
  body.shell-v2 .local-theme-toggle,
  body.shell-v2 .context-status {
    display: none !important;
  }

  /* shell-v2-desktop-compact-actions */
  body.shell-v2 .shell-v2-quota-pill {
    width: auto !important;
    height: 32px !important;
    min-width: 0 !important;
    max-width: 190px !important;
    padding: 0 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 0 !important;
    border-radius: var(--v2-radius-control) !important;
    background: transparent !important;
    color: var(--v2-muted) !important;
    box-shadow: none !important;
    font-size: 12px !important;
    font-weight: 650 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    font-variant-numeric: tabular-nums !important;
  }

  body.shell-v2 .shell-v2-quota-pill .shell-v2-quota-value.is-warn {
    color: var(--v2-warning) !important;
  }

  body.shell-v2 .shell-v2-quota-pill .shell-v2-quota-value.is-danger {
    color: var(--v2-danger) !important;
  }

  body.shell-v2 .shell-v2-more-button {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    display: inline-grid !important;
    place-items: center !important;
    border: 0 !important;
    border-radius: var(--v2-radius-control) !important;
    background: color-mix(in srgb, var(--v2-control-bg) 84%, var(--v2-panel)) !important;
    color: var(--v2-muted) !important;
    box-shadow: var(--v2-control-shadow) !important;
  }

  body.shell-v2 .shell-v2-more-button:hover,
  body.shell-v2 .shell-v2-more-button:active {
    background: var(--v2-control-bg-hover) !important;
    color: var(--v2-text) !important;
  }

  body.shell-v2 .shell-v2-more-button svg {
    width: 16px !important;
    height: 16px !important;
    display: block !important;
    fill: none !important;
    stroke: currentColor !important;
  }

  body.shell-v2 .shell-v2-control-drawer {
    position: absolute !important;
    z-index: 170 !important;
    top: calc(100% + 8px) !important;
    right: 18px !important;
    width: min(318px, calc(100vw - var(--v2-sidebar-effective) - 36px)) !important;
    max-height: min(520px, calc(100dvh - var(--v2-header) - 18px)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: 6px !important;
    border: 1px solid var(--v2-border-soft) !important;
    border-radius: var(--v2-radius-card) !important;
    background: var(--v2-panel) !important;
    color: var(--v2-text) !important;
    box-shadow: var(--v2-soft-shadow) !important;
    display: none !important;
  }

  body.shell-v2 .shell-v2-control-drawer.is-open {
    display: block !important;
  }

  body.shell-v2 .shell-v2-control-mainpage,
  body.shell-v2 .shell-v2-control-subpage {
    display: grid !important;
    gap: 2px !important;
  }

  body.shell-v2 .shell-v2-control-drawer.is-subpage .shell-v2-control-mainpage {
    display: none !important;
  }

  body.shell-v2 .shell-v2-control-drawer:not(.is-subpage) .shell-v2-control-subpage {
    display: none !important;
  }

  body.shell-v2 .shell-v2-control-head,
  body.shell-v2 .shell-v2-control-subhead {
    min-height: 32px !important;
    padding: 2px 8px 5px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 8px !important;
    border-bottom: 1px solid var(--v2-border-soft) !important;
    margin-bottom: 3px !important;
  }

  body.shell-v2 .shell-v2-control-subhead {
    grid-template-columns: 28px minmax(0, 1fr) !important;
  }

  body.shell-v2 .shell-v2-control-head strong,
  body.shell-v2 .shell-v2-control-subhead strong {
    color: var(--v2-text) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
  }

  body.shell-v2 .shell-v2-control-head span {
    color: var(--v2-faint) !important;
    font-size: 11px !important;
    font-weight: 560 !important;
  }

  body.shell-v2 .shell-v2-control-drawer button,
  body.shell-v2 .shell-v2-control-option {
    width: 100% !important;
    min-height: 34px !important;
    padding: 0 9px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(54px, auto) !important;
    align-items: center !important;
    gap: 8px !important;
    border: 0 !important;
    border-radius: var(--v2-radius-control) !important;
    background: transparent !important;
    color: var(--v2-text) !important;
    text-align: left !important;
    box-shadow: none !important;
  }

  body.shell-v2 .shell-v2-control-drawer [data-shell-submenu="true"] {
    grid-template-columns: minmax(0, 1fr) minmax(54px, auto) 10px !important;
  }

  body.shell-v2 .shell-v2-control-drawer [data-shell-submenu="true"]::after {
    content: ">" !important;
    color: var(--v2-faint) !important;
    font-size: 12px !important;
    line-height: 1 !important;
  }

  body.shell-v2 .shell-v2-control-drawer button:hover,
  body.shell-v2 .shell-v2-control-drawer button:active,
  body.shell-v2 .shell-v2-control-option:hover,
  body.shell-v2 .shell-v2-control-option:active,
  body.shell-v2 .shell-v2-control-option.is-current {
    background: color-mix(in srgb, var(--v2-control-bg) 78%, var(--v2-panel)) !important;
  }

  body.shell-v2 .shell-v2-control-drawer span,
  body.shell-v2 .shell-v2-control-option span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 12.5px !important;
    font-weight: 620 !important;
  }

  body.shell-v2 .shell-v2-control-drawer strong,
  body.shell-v2 .shell-v2-control-option strong {
    min-width: 0 !important;
    max-width: 118px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    color: var(--v2-muted) !important;
    font-size: 11px !important;
    font-weight: 620 !important;
    text-align: right !important;
  }

  body.shell-v2 .shell-v2-control-back {
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 !important;
    display: inline-grid !important;
    place-items: center !important;
    color: var(--v2-accent) !important;
    font-size: 0 !important;
  }

  body.shell-v2 .shell-v2-control-back::before {
    content: "<" !important;
    font-size: 18px !important;
    line-height: 1 !important;
  }

  body.shell-v2 .thread {
    grid-column: 2 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    overflow-y: auto !important;
    padding: 18px max(24px, calc((100vw - var(--v2-sidebar-effective) - var(--v2-content-max)) / 2)) !important;
    background: var(--v2-bg) !important;
    scroll-padding-bottom: 18px !important;
  }

  body.shell-v2 .thread > * {
    max-width: var(--v2-content-max) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.shell-v2 .composer-shell {
    grid-column: 2 !important;
    grid-row: 3 !important;
    position: relative !important;
    z-index: 40 !important;
    padding: 8px max(24px, calc((100vw - var(--v2-sidebar-effective) - var(--v2-content-max)) / 2)) 10px !important;
    border-top: 1px solid color-mix(in srgb, var(--v2-border) 76%, transparent) !important;
    background: var(--v2-panel) !important;
    box-shadow: var(--v2-composer-shadow) !important;
  }

  body.shell-v2 .composer,
  body.shell-v2 .attachment-tray,
  body.shell-v2 .queued-send-bar {
    max-width: var(--v2-content-max) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.shell-v2 .queued-send-bar {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  body.shell-v2 .composer-shell:has(.queued-send-card) .queued-send-card {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  body.shell-v2 .composer-shell:has(.queued-send-card) .composer {
    border-radius: var(--v2-radius-card) !important;
    border-top-color: color-mix(in srgb, var(--v2-border) 76%, transparent) !important;
    position: relative !important;
    z-index: 2 !important;
  }

  body.shell-v2 .composer {
    min-height: 46px !important;
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) 44px !important;
    gap: 4px !important;
    align-items: center !important;
    padding: 4px !important;
    border: 1px solid var(--v2-border-soft) !important;
    border-radius: var(--v2-radius-card) !important;
  }

  body.shell-v2 .composer:has(.shell-v2-context-ring:not([hidden])) {
    grid-template-columns: 42px minmax(0, 1fr) 44px !important;
  }

  body.shell-v2 textarea#text {
    min-height: 36px !important;
    max-height: 140px !important;
    padding: 8px 4px !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
    border: 0 !important;
  }

  body.shell-v2 .icon-btn,
  body.shell-v2 .send-btn {
    width: 42px !important;
    height: 38px !important;
    min-width: 42px !important;
    border: 0 !important;
    border-radius: var(--v2-radius-control) !important;
    background: var(--v2-control-bg) !important;
  }

  body.shell-v2 .settings-card {
    position: fixed !important;
    top: 0 !important;
    right: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    width: min(420px, 92vw) !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    padding: 16px !important;
    border-radius: 0 !important;
    border-width: 0 1px 0 0 !important;
    transform: translateX(-104%) !important;
    transition: transform 180ms ease !important;
    display: block !important;
    pointer-events: none !important;
  }

  body.shell-v2 .settings-card.is-open {
    transform: translateX(0) !important;
    pointer-events: auto !important;
  }

  body.shell-v2 .model-menu-card,
  body.shell-v2 .permission-menu-card,
  body.shell-v2 .reasoning-menu-card {
    top: calc(var(--v2-header) + 8px) !important;
    right: 18px !important;
    left: auto !important;
    min-width: 220px !important;
  }

  body.shell-v2 .thread-menu-scrim {
    display: none !important;
  }
}

/* Mobile: Open WebUI / Avian-like chat shell */
@media (max-width: 900px) {
  html.shell-v2-mobile,
  html.shell-v2-mobile body.shell-v2 {
    height: 100% !important;
    overflow: hidden !important;
  }

  html.shell-v2-mobile body.shell-v2 {
    position: fixed !important;
    inset: 0 !important;
  }

  body.shell-v2 .app {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: var(--app-height, 100dvh) !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-rows: var(--v2-mobile-header) minmax(0, 1fr) auto !important;
    overflow: hidden !important;
    background: var(--v2-bg) !important;
  }

  body.shell-v2 .topbar {
    grid-row: 1 !important;
    position: relative !important;
    z-index: 80 !important;
    height: var(--v2-mobile-header) !important;
    min-height: var(--v2-mobile-header) !important;
    padding: 6px 10px 4px 9px !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    border-bottom: 1px solid var(--v2-line-soft) !important;
    background: var(--v2-panel) !important;
    box-shadow: var(--v2-header-shadow) !important;
  }

  body.shell-v2 .title {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  body.shell-v2 .thread-button {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 32px !important;
    padding: 0 3px !important;
    justify-content: flex-start !important;
    align-items: center !important;
    background: transparent !important;
    border-color: transparent !important;
    transition: background-color 120ms ease, color 120ms ease !important;
  }

  body.shell-v2 .thread-button:active {
    background: color-mix(in srgb, var(--v2-control-bg) 58%, transparent) !important;
  }

  body.shell-v2 .thread-name {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 15px !important;
    font-weight: 720 !important;
  }

  body.shell-v2 .shell-v2-thread-status {
    width: 0 !important;
    max-width: 0 !important;
    font-size: 0 !important;
  }

  body.shell-v2 .shell-v2-thread-status.is-running,
  body.shell-v2 .shell-v2-thread-status.is-waiting,
  body.shell-v2 .shell-v2-thread-status.is-failed {
    width: 13px !important;
    max-width: 13px !important;
  }

  body.shell-v2 .top-actions {
    flex: 0 0 auto !important;
    display: flex !important;
    gap: 6px !important;
    align-items: center !important;
    overflow: visible !important;
  }

  body.shell-v2 .shell-v2-more-button,
  body.shell-v2 .shell-v2-control-drawer {
    display: none !important;
  }

  body.shell-v2 .new-thread-btn,
  body.shell-v2 .context-status,
  body.shell-v2 .local-theme-toggle {
    display: none !important;
  }

  body.shell-v2 .permission-badge,
  body.shell-v2 .reasoning-badge,
  body.shell-v2 .model-badge,
  body.shell-v2 .route-badge,
  body.shell-v2 .settings-btn {
    display: none !important;
  }

  body.shell-v2 .shell-v2-more-button {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    padding: 0 !important;
    display: none !important;
    place-items: center !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: color-mix(in srgb, var(--v2-control-bg) 82%, var(--v2-panel)) !important;
    color: var(--v2-muted) !important;
    box-shadow: var(--v2-control-shadow) !important;
  }

  body.shell-v2 .shell-v2-more-button:active {
    background: var(--v2-control-bg-hover) !important;
    color: var(--v2-text) !important;
  }

  body.shell-v2 .shell-v2-quota-pill {
    width: auto !important;
    height: 32px !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 0 2px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--v2-faint) !important;
    box-shadow: none !important;
    font-size: 11.5px !important;
    font-weight: 650 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    font-variant-numeric: tabular-nums !important;
  }

  body.shell-v2 .shell-v2-quota-pill:active {
    background: transparent !important;
    color: var(--v2-muted) !important;
  }

  body.shell-v2 .shell-v2-quota-pill.is-warn {
    background: transparent !important;
  }

  body.shell-v2 .shell-v2-quota-pill.is-danger {
    background: transparent !important;
  }

  body.shell-v2 .shell-v2-quota-pill.is-calibrating {
    color: color-mix(in srgb, var(--v2-accent) 62%, var(--v2-muted)) !important;
  }

  body.shell-v2 .shell-v2-quota-pill .shell-v2-quota-label,
  body.shell-v2 .shell-v2-quota-pill .shell-v2-quota-sep {
    color: color-mix(in srgb, var(--v2-faint) 78%, var(--v2-muted)) !important;
    font-weight: 600 !important;
  }

  body.shell-v2 .shell-v2-quota-pill .shell-v2-quota-value {
    color: var(--v2-muted) !important;
    font-weight: 720 !important;
  }

  body.shell-v2 .shell-v2-quota-pill .shell-v2-quota-value.is-warn {
    color: var(--v2-warning) !important;
  }

  body.shell-v2 .shell-v2-quota-pill .shell-v2-quota-value.is-danger {
    color: var(--v2-danger) !important;
  }

  body.shell-v2 .shell-v2-quota-calibrate {
    width: 100% !important;
    min-height: 40px !important;
    margin: 4px 0 10px !important;
    padding: 0 14px !important;
    border: 1px solid color-mix(in srgb, var(--v2-accent) 22%, var(--v2-border)) !important;
    border-radius: 10px !important;
    background: color-mix(in srgb, var(--v2-accent-tint) 48%, var(--v2-panel)) !important;
    color: color-mix(in srgb, var(--v2-accent) 82%, var(--v2-text)) !important;
    font-size: 14px !important;
    font-weight: 720 !important;
    text-align: center !important;
    box-shadow: none !important;
  }

  body.shell-v2 .shell-v2-quota-calibrate:disabled,
  body.shell-v2 .shell-v2-quota-calibrate-row:disabled {
    opacity: .64 !important;
  }

  body.shell-v2 .shell-v2-quota-calibrate-row {
    border-color: color-mix(in srgb, var(--v2-accent) 16%, var(--v2-border)) !important;
    background: color-mix(in srgb, var(--v2-accent-tint) 34%, var(--v2-panel)) !important;
  }

  body.shell-v2 .shell-v2-more-button svg {
    width: 16px !important;
    height: 16px !important;
    display: block !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.7 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
  }

  body.shell-v2 .shell-v2-task-toast {
    top: calc(var(--v2-mobile-header) + 8px) !important;
    left: 50% !important;
    right: auto !important;
    width: min(300px, calc(100vw - 20px)) !important;
    min-height: 42px !important;
    padding: 6px 8px !important;
    z-index: 170 !important;
  }

  body.shell-v2 .shell-v2-control-drawer {
    position: absolute !important;
    z-index: 160 !important;
    top: calc(100% + 4px) !important;
    right: 8px !important;
    width: min(248px, calc(100vw - 16px)) !important;
    padding: 5px !important;
    border: 1px solid var(--v2-border-soft) !important;
    border-radius: 8px !important;
    background: var(--v2-panel) !important;
    box-shadow: var(--v2-soft-shadow) !important;
  }

  body.shell-v2 .shell-v2-control-drawer.is-open {
    display: block !important;
  }

  body.shell-v2 .shell-v2-control-mainpage,
  body.shell-v2 .shell-v2-control-subpage {
    display: grid !important;
    gap: 1px !important;
  }

  body.shell-v2 .shell-v2-control-head {
    min-height: 26px !important;
    padding: 1px 7px 3px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 8px !important;
    border-bottom: 1px solid var(--v2-border-soft) !important;
    margin-bottom: 2px !important;
  }

  body.shell-v2 .shell-v2-control-head strong {
    max-width: none !important;
    color: var(--v2-text) !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
  }

  body.shell-v2 .shell-v2-control-head span {
    color: var(--v2-faint) !important;
    font-size: 10px !important;
    font-weight: 560 !important;
  }

  body.shell-v2 .shell-v2-control-drawer.is-subpage .shell-v2-control-mainpage {
    display: none !important;
  }

  body.shell-v2 .shell-v2-control-drawer:not(.is-subpage) .shell-v2-control-subpage {
    display: none !important;
  }

  body.shell-v2 .shell-v2-control-drawer button,
  body.shell-v2 .shell-v2-control-option {
    width: 100% !important;
    min-height: 30px !important;
    padding: 0 8px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 8px !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: var(--v2-text) !important;
    text-align: left !important;
    box-shadow: none !important;
  }

  body.shell-v2 .shell-v2-control-drawer [data-shell-submenu="true"]::after {
    content: "›" !important;
    color: var(--v2-faint) !important;
    font-size: 15px !important;
    line-height: 1 !important;
  }

  body.shell-v2 .shell-v2-control-drawer [data-shell-submenu="true"] {
    grid-template-columns: minmax(0, 1fr) minmax(42px, auto) 10px !important;
  }

  body.shell-v2 .shell-v2-control-drawer button:active,
  body.shell-v2 .shell-v2-control-option:active {
    background: color-mix(in srgb, var(--v2-control-bg) 76%, var(--v2-panel)) !important;
  }

  body.shell-v2 .shell-v2-control-drawer span,
  body.shell-v2 .shell-v2-control-option span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 12px !important;
    font-weight: 620 !important;
  }

  body.shell-v2 .shell-v2-control-drawer strong,
  body.shell-v2 .shell-v2-control-option strong {
    max-width: 86px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    color: var(--v2-muted) !important;
    font-size: 10.5px !important;
    font-weight: 620 !important;
  }

  body.shell-v2 .shell-v2-control-option.is-current {
    background: color-mix(in srgb, var(--v2-control-bg) 84%, var(--v2-panel)) !important;
    box-shadow: var(--v2-control-shadow) !important;
  }

  body.shell-v2 .shell-v2-control-option.is-current strong {
    color: var(--v2-text) !important;
  }

  body.shell-v2 .shell-v2-control-readonly {
    cursor: default !important;
  }

  body.shell-v2 .shell-v2-control-readonly:active {
    background: transparent !important;
  }

  body.shell-v2 .shell-v2-control-subhead {
    min-height: 30px !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 0 2px 4px !important;
    border-bottom: 1px solid var(--v2-border-soft) !important;
    margin-bottom: 2px !important;
  }

  body.shell-v2 .shell-v2-control-subhead strong {
    color: var(--v2-text) !important;
    font-size: 13px !important;
    font-weight: 700 !important;
  }

  body.shell-v2 .shell-v2-control-back {
    width: 28px !important;
    min-height: 28px !important;
    padding: 0 !important;
    border: 0 !important;
    color: var(--v2-accent) !important;
    background: transparent !important;
    font-size: 0 !important;
  }

  body.shell-v2 .shell-v2-control-back::before {
    content: "‹" !important;
    font-size: 22px !important;
    line-height: 1 !important;
  }

  body.shell-v2.shell-mobile .permission-menu-card,
  body.shell-v2.shell-mobile .reasoning-menu-card,
  body.shell-v2.shell-mobile .model-menu-card {
    display: none !important;
  }

  body.shell-v2 .thread {
    grid-row: 2 !important;
    min-height: 0 !important;
    height: auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    padding: 12px 12px calc(9px + var(--queued-send-height, 0px) + var(--recent-thread-strip-height, 0px)) !important;
    background: var(--v2-bg) !important;
    scroll-padding-bottom: calc(var(--v2-composer) + var(--queued-send-height, 0px) + var(--recent-thread-strip-height, 0px) + 10px) !important;
  }

  body.shell-v2 .thread .message,
  body.shell-v2 .thread .bubble {
    touch-action: pan-y !important;
  }

  body.shell-v2.keyboard-open .thread,
  body.shell-v2 .thread.keyboard-open {
    padding-bottom: calc(var(--v2-composer) + var(--queued-send-height, 0px) + var(--recent-thread-strip-height, 0px) + var(--local-ime-guard, 12px) + 10px) !important;
    scroll-padding-bottom: calc(var(--v2-composer) + var(--queued-send-height, 0px) + var(--recent-thread-strip-height, 0px) + var(--local-ime-guard, 12px) + 10px) !important;
  }

  body.shell-v2 .message.user .bubble-wrap {
    max-width: min(84%, 352px) !important;
  }

  body.shell-v2 .message.assistant .bubble-wrap {
    width: 100% !important;
    max-width: 100% !important;
  }

  body.shell-v2 .thread-menu {
    position: fixed !important;
    z-index: 130 !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: min(68vw, 300px) !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    padding: max(14px, env(safe-area-inset-top)) 12px max(86px, calc(env(safe-area-inset-bottom) + 78px)) !important;
    border: 0 !important;
    border-right: 1px solid var(--v2-line-soft) !important;
    border-radius: 0 !important;
    background: var(--v2-panel) !important;
    overflow-y: auto !important;
    box-shadow: 10px 0 30px rgba(15, 23, 42, .075) !important;
    transform: translateX(-104%) !important;
    transition: transform 180ms ease !important;
    display: block !important;
    pointer-events: none !important;
  }

  body.shell-v2 .thread-menu .shell-v2-thread-menu-dock {
    position: absolute !important;
    left: 12px !important;
    right: auto !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    z-index: 3 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    border: 0 !important;
    background: transparent !important;
  }

  body.shell-v2 .shell-v2-thread-menu-settings {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 0 !important;
    border: 1px solid var(--v2-line-soft) !important;
    border-radius: 8px !important;
    background: color-mix(in srgb, var(--v2-panel-muted) 72%, var(--v2-panel)) !important;
    color: color-mix(in srgb, var(--v2-muted) 88%, var(--v2-text)) !important;
    box-shadow: var(--v2-control-shadow) !important;
    font: inherit !important;
  }

  body.shell-v2 .shell-v2-thread-menu-settings:active {
    background: color-mix(in srgb, var(--v2-accent-tint) 56%, transparent) !important;
    color: var(--v2-accent) !important;
  }

  body.shell-v2 .shell-v2-thread-menu-settings svg {
    width: 19px !important;
    height: 19px !important;
    flex: 0 0 19px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.7 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
  }

  body.shell-v2 .thread-menu.is-open,
  body.shell-v2.shell-thread-menu-open .thread-menu {
    transform: translateX(0) !important;
    pointer-events: auto !important;
  }

  body.shell-v2 .thread-menu-scrim {
    position: fixed !important;
    z-index: 120 !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, .18) !important;
    display: none !important;
  }

  body.shell-v2.shell-thread-menu-open .thread-menu-scrim,
  body.shell-v2.shell-v2-settings-open .thread-menu-scrim,
  body.shell-v2:has(.thread-menu.is-open) .thread-menu-scrim {
    display: block !important;
  }

  body.shell-v2.shell-v2-settings-open:not(.shell-thread-menu-open) .thread-menu-scrim {
    display: none !important;
    pointer-events: none !important;
  }

  body.shell-v2 .composer-shell {
    grid-row: 3 !important;
    position: relative !important;
    z-index: 70 !important;
    min-height: var(--v2-composer) !important;
    padding: 0 0 max(0px, env(safe-area-inset-bottom)) !important;
    border-top: 1px solid var(--v2-line-soft) !important;
    background: var(--v2-panel) !important;
    box-shadow: var(--v2-composer-shadow) !important;
    transform: translate3d(0, calc(-1 * var(--shell-v2-keyboard-offset, var(--keyboard-shift, 0px))), 0) !important;
    transition: none !important;
    overflow: visible !important;
  }

  body.shell-v2 .composer-shell:has(.queued-send-card)::before {
    content: none !important;
    display: none !important;
  }

  body.shell-v2.keyboard-open .composer-shell {
    transform: translate3d(0, calc(-1 * var(--shell-v2-keyboard-offset, var(--keyboard-shift, 0px))), 0) !important;
    transition: none !important;
  }

  html.shell-v2-mobile body.shell-v2.keyboard-open .composer-shell {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: auto !important;
    transform: translate3d(0, calc(-1 * var(--shell-v2-keyboard-offset, var(--keyboard-shift, 0px))), 0) !important;
    transition: none !important;
  }

  body.shell-v2 .attachment-tray,
  body.shell-v2 .queued-send-bar {
    margin: 0 !important;
    padding: 4px 8px !important;
    border-top: 1px solid var(--v2-line-soft) !important;
  }

  body.shell-v2 .composer-shell:has(.queued-send-card) .queued-send-bar {
    position: absolute !important;
    left: var(--v2-mobile-composer-edge) !important;
    right: var(--v2-mobile-composer-edge) !important;
    bottom: calc(100% + 5px) !important;
    margin: 0 !important;
    padding: 2px 8px !important;
    border: 1px solid color-mix(in srgb, var(--v2-line-soft) 86%, transparent) !important;
    border-radius: 8px !important;
    background: color-mix(in srgb, var(--v2-panel) 90%, var(--v2-queue-bg)) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    z-index: 5 !important;
    max-height: min(132px, calc(100dvh - var(--v2-mobile-header) - var(--v2-composer) - 128px)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
  }

  body.shell-v2 .composer-shell:has(.queued-send-card) .queued-send-bar::after {
    content: none !important;
    display: none !important;
  }

  body.shell-v2 .composer-shell:has(.queued-send-card) .queued-send-card {
    min-height: 31px !important;
    padding: 1px 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    gap: 6px !important;
    overflow: hidden !important;
    grid-template-columns: 56px minmax(0, 1fr) 36px 32px !important;
  }

  body.shell-v2 .composer-shell:has(.queued-send-card) .queued-send-card-summary {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.shell-v2 .composer-shell:has(.queued-send-card) .queued-send-card + .queued-send-card {
    border-top: 1px solid color-mix(in srgb, var(--v2-border-soft) 72%, transparent) !important;
  }

  body.shell-v2 .composer-shell:has(.queued-send-card) .queued-send-card-text {
    font-size: 11.8px !important;
    color: color-mix(in srgb, var(--v2-muted) 82%, var(--v2-text)) !important;
    order: 2 !important;
  }

  body.shell-v2 .composer-shell:has(.queued-send-card) .queued-send-promote,
  body.shell-v2 .composer-shell:has(.queued-send-card) .queued-send-edit,
  body.shell-v2 .composer-shell:has(.queued-send-card) .queued-send-delete {
    height: 30px !important;
    min-height: 30px !important;
    min-width: 0 !important;
    padding: 0 3px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: color-mix(in srgb, var(--v2-queue-accent) 74%, var(--v2-muted)) !important;
    box-shadow: none !important;
    font-size: 12.8px !important;
    font-weight: 640 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    justify-self: end !important;
    overflow: hidden !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex: 0 0 auto !important;
  }

  body.shell-v2 .composer-shell:has(.queued-send-card) .queued-send-promote {
    order: 1 !important;
    width: 64px !important;
    max-width: 64px !important;
    justify-self: start !important;
  }

  body.shell-v2 .composer-shell:has(.queued-send-card) .queued-send-edit {
    order: 3 !important;
    width: 44px !important;
    max-width: 44px !important;
  }

  body.shell-v2 .composer-shell:has(.queued-send-card) .queued-send-delete {
    order: 4 !important;
    width: 32px !important;
    max-width: 32px !important;
  }

  body.shell-v2 .composer-shell:has(.queued-send-card) .queued-send-promote svg,
  body.shell-v2 .composer-shell:has(.queued-send-card) .queued-send-delete svg {
    width: 16px !important;
    height: 16px !important;
    flex: 0 0 16px !important;
  }

  body.shell-v2 .composer {
    min-height: 52px !important;
    max-height: 116px !important;
    display: grid !important;
    grid-template-columns: 46px minmax(0, 1fr) 52px !important;
    gap: 0 !important;
    align-items: end !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--v2-panel) !important;
  }

  body.shell-v2 .composer:has(.shell-v2-context-ring:not([hidden])) {
    grid-template-columns: 46px minmax(0, 1fr) 52px !important;
  }

  body.shell-v2 .composer-shell:has(.queued-send-card) .composer {
    margin: 0 var(--v2-mobile-composer-edge) !important;
    border: 0 !important;
    border-top: 0 !important;
    border-radius: 0 !important;
    background: var(--v2-panel) !important;
    box-shadow: none !important;
    position: relative !important;
    z-index: 4 !important;
  }

  body.shell-v2 textarea#text {
    min-height: 52px !important;
    max-height: 108px !important;
    padding: 14px 3px 10px !important;
    align-self: stretch !important;
    border: 0 !important;
    border-radius: 0 !important;
    font-size: 16px !important;
    line-height: 28px !important;
  }

  body.shell-v2 textarea#text::placeholder {
    font-size: 14px !important;
    color: color-mix(in srgb, var(--v2-faint) 76%, transparent) !important;
    opacity: 0.5 !important;
  }

  body.shell-v2 .icon-btn,
  body.shell-v2 .send-btn {
    align-self: center !important;
    width: 46px !important;
    height: 52px !important;
    min-width: 46px !important;
    border: 0 !important;
    border-radius: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    background: transparent !important;
    color: var(--v2-text) !important;
    transition: background-color 120ms ease, color 120ms ease, transform 120ms ease !important;
  }

  body.shell-v2 .icon-btn:active,
  body.shell-v2 .send-btn:active {
    background: color-mix(in srgb, var(--v2-control-bg) 72%, transparent) !important;
    transform: scale(.98) !important;
  }

  body.shell-v2 .composer .send-btn[hidden],
  body.shell-v2 .composer .send-btn.composer-action-hidden {
    display: none !important;
  }

  body.shell-v2 .send-btn {
    width: 52px !important;
    min-width: 52px !important;
    font-size: 25px !important;
  }

  body.shell-v2 .icon-btn {
    font-size: 30px !important;
    font-weight: 520 !important;
  }

  body.shell-v2 .settings-card {
    position: fixed !important;
    z-index: 140 !important;
    top: 0 !important;
    left: 0 !important;
    right: 8px !important;
    bottom: 0 !important;
    width: min(86vw, 340px) !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    padding: max(14px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom)) !important;
    border: 0 !important;
    border-right: 1px solid var(--v2-border) !important;
    border-radius: 0 !important;
    background: var(--v2-panel) !important;
    overflow-y: auto !important;
    transform: translateX(-104%) !important;
    transition: transform 180ms ease, box-shadow 180ms ease !important;
    display: block !important;
    pointer-events: none !important;
    box-shadow: 14px 0 30px rgba(15, 23, 42, .12) !important;
  }

  body.shell-v2 .settings-card.is-open {
    transform: translateX(0) !important;
    pointer-events: auto !important;
  }

  body.shell-v2.shell-v2-settings-open .settings-card {
    z-index: 220 !important;
    opacity: 1 !important;
    filter: none !important;
  }

  body.shell-v2 .settings-card .settings-page.is-active {
    gap: 2px !important;
  }

  body.shell-v2 .settings-card .settings-nav-row,
  body.shell-v2 .settings-card .settings-row {
    min-height: 44px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 6px 12px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--v2-text) !important;
  }

  body.shell-v2 .settings-card .settings-nav-row.shell-v2-legacy-theme-row,
  body.shell-v2 .settings-card .settings-row.shell-v2-legacy-theme-row,
  body.shell-v2 .settings-card .shell-v2-legacy-theme-row {
    display: none !important;
  }

  body.shell-v2 .settings-card .settings-row-text {
    min-width: 0 !important;
    display: grid !important;
    gap: 2px !important;
  }

  body.shell-v2 .settings-card .settings-nav-row:active,
  body.shell-v2 .settings-card .settings-row:active {
    background: color-mix(in srgb, var(--v2-accent-tint) 52%, transparent) !important;
    transform: none !important;
  }

  body.shell-v2 .settings-card .settings-label {
    font-size: 14px !important;
    line-height: 1.25 !important;
    font-weight: 620 !important;
    color: var(--v2-text) !important;
  }

  body.shell-v2 .settings-card .settings-subtitle,
  body.shell-v2 .settings-card .settings-hint {
    font-size: 11.5px !important;
    line-height: 1.25 !important;
    font-weight: 500 !important;
    color: var(--v2-muted) !important;
  }

  body.shell-v2 .settings-card .settings-hint {
    padding: 1px 12px 7px !important;
  }

  body.shell-v2 .settings-card .settings-chevron {
    color: var(--v2-muted) !important;
    font-size: 18px !important;
    font-weight: 500 !important;
  }

  body.shell-v2 .settings-card #settings-title-text {
    color: var(--v2-text) !important;
    opacity: 1 !important;
    font-size: 16px !important;
    font-weight: 650 !important;
  }

  body.shell-v2 .settings-card #settings-back {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    padding: 0 !important;
    border: 1px solid var(--v2-border-soft) !important;
    border-radius: 9px !important;
    background: color-mix(in srgb, var(--v2-control-bg) 74%, transparent) !important;
    color: var(--v2-muted) !important;
    box-shadow: none !important;
    opacity: 1 !important;
    font-size: 0 !important;
  }

  body.shell-v2 .settings-card #settings-back::before {
    content: "‹" !important;
    display: block !important;
    font-size: 24px !important;
    line-height: 30px !important;
    font-weight: 420 !important;
  }

  body.shell-v2 .settings-card #settings-back:active {
    color: var(--v2-text) !important;
    background: color-mix(in srgb, var(--v2-accent-tint) 64%, transparent) !important;
  }

  body.shell-v2 .settings-card #settings-back[hidden] {
    display: none !important;
  }

  body.shell-v2 .settings-card .settings-switch {
    position: relative !important;
    box-sizing: border-box !important;
    width: 36px !important;
    height: 22px !important;
    min-width: 36px !important;
    padding: 0 !important;
    border: 1px solid color-mix(in srgb, var(--v2-border) 82%, transparent) !important;
    border-radius: 999px !important;
    background: color-mix(in srgb, var(--v2-panel) 84%, #d9d9dc) !important;
    box-shadow: none !important;
    vertical-align: middle !important;
  }

  body.shell-v2 .settings-card .settings-switch::after {
    top: 2px !important;
    left: 2px !important;
    width: 18px !important;
    height: 18px !important;
    background: #fff !important;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .12) !important;
  }

  body.shell-v2 .settings-card .settings-switch.is-on {
    border-color: color-mix(in srgb, var(--v2-accent) 44%, transparent) !important;
    background: color-mix(in srgb, var(--v2-accent) 62%, #ffffff) !important;
  }

  body.shell-v2 .settings-card .settings-switch.is-on::after {
    transform: translateX(14px) !important;
  }

  body.shell-v2 .settings-card .settings-input {
    min-height: 38px !important;
    padding: 8px 12px !important;
    border: 1px solid var(--v2-border-soft) !important;
    border-radius: 10px !important;
    background: color-mix(in srgb, var(--v2-panel) 92%, var(--v2-control-bg)) !important;
    box-shadow: none !important;
    color: var(--v2-text) !important;
    font-size: 14px !important;
  }

  body.shell-v2 .settings-card .top-control-settings-list {
    display: grid !important;
    gap: 3px !important;
  }

  body.shell-v2 .settings-card .top-control-setting {
    min-height: 44px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 6px 12px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.shell-v2 .settings-card .top-control-actions {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0 !important;
  }

  body.shell-v2 .settings-card .order-button {
    display: none !important;
  }

  body.shell-v2 .settings-card .order-button:active {
    background: color-mix(in srgb, var(--v2-accent-tint) 56%, transparent) !important;
    color: var(--v2-accent) !important;
  }

  body.shell-v2 .settings-card .order-button:disabled {
    opacity: .22 !important;
  }

  body.shell-v2 .settings-card .shell-v2-settings-row-value {
    max-width: 96px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    color: var(--v2-muted) !important;
    font-size: 12px !important;
    font-weight: 560 !important;
    line-height: 1.25 !important;
    text-align: right !important;
  }

  body.shell-v2 .settings-card .shell-v2-settings-choice-row.is-current {
    background: color-mix(in srgb, var(--v2-accent-tint) 46%, transparent) !important;
  }

  body.shell-v2 .settings-card .shell-v2-settings-choice-row.is-current .settings-label,
  body.shell-v2 .settings-card .shell-v2-settings-choice-row.is-current .shell-v2-settings-row-value {
    color: var(--v2-accent) !important;
  }

  body.shell-v2 .approval-sheet {
    position: fixed !important;
    z-index: 150 !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    padding: max(16px, env(safe-area-inset-top)) 14px max(16px, env(safe-area-inset-bottom)) !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--v2-panel) !important;
    overflow-y: auto !important;
    transform: translateY(104%) !important;
    transition: transform 180ms ease !important;
    display: block !important;
    pointer-events: none !important;
  }

  body.shell-v2 .approval-sheet.is-open {
    transform: translateY(0) !important;
    pointer-events: auto !important;
  }

  body.shell-v2 .settings-title {
    position: relative !important;
    min-height: 40px !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 10px !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    border-bottom: 0 !important;
  }

  body.shell-v2 .shell-v2-settings-close {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: transparent !important;
    color: var(--v2-muted) !important;
    font: inherit !important;
    font-size: 0 !important;
    font-weight: 650 !important;
  }

  body.shell-v2 .shell-v2-settings-close::before {
    content: "×" !important;
    font-size: 24px !important;
    line-height: 1 !important;
    font-weight: 420 !important;
  }

  body.shell-v2 .shell-v2-settings-close:active {
    background: color-mix(in srgb, var(--v2-control-bg) 72%, transparent) !important;
    color: var(--v2-text) !important;
  }

  body.shell-v2 .model-menu-card,
  body.shell-v2 .permission-menu-card,
  body.shell-v2 .reasoning-menu-card,
  body.shell-v2 .composer-menu-card {
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-width: none !important;
  }

  body.shell-v2 .context-quick-card {
    right: 8px !important;
    bottom: calc(var(--v2-composer) + var(--keyboard-shift, 0px) + var(--local-ime-guard, 0px) + 8px) !important;
  }
}

/* Final composer guard for desktop. */
@media (min-width: 901px) {
  html.shell-v2 body.shell-v2 form.composer#composer {
    border-radius: var(--v2-radius-card) !important;
    border: 1px solid var(--v2-border) !important;
    background: var(--v2-panel) !important;
    box-shadow: none !important;
    background-image: none !important;
  }

  /* Desktop gets the same quiet handoff without a blocking overlay. */
  html.shell-v2 body.shell-v2 .thread {
    isolation: isolate !important;
    transition: opacity 150ms ease, transform 180ms cubic-bezier(.22, .61, .36, 1) !important;
  }

  html.shell-v2 body.shell-v2.shell-v2-thread-warmup .thread {
    opacity: .96 !important;
    transform: translateY(1px) !important;
  }
}

@media (min-width: 901px) and (prefers-reduced-motion: reduce) {
  html.shell-v2 body.shell-v2 .thread {
    transition: none !important;
  }
}

/* Final color guard: keep the main canvas neutral and user bubbles purple-accented. */
html.local-ui-light.shell-v2 body.shell-v2,
html.local-ui-light.shell-v2 body.shell-v2 .app,
html.local-ui-light.shell-v2 body.shell-v2 .thread {
  background: var(--v2-bg) !important;
  background-image: none !important;
}

html.local-ui-light.shell-v2 body.shell-v2 .topbar,
html.local-ui-light.shell-v2 body.shell-v2 .composer-shell,
html.local-ui-light.shell-v2 body.shell-v2 form.composer#composer {
  background: #ffffff !important;
}

html.local-ui-light.shell-v2 body.shell-v2 .memory-citation-card,
html.local-ui-light.shell-v2 body.shell-v2 .bubble .file-attachment-preview,
html.local-ui-light.shell-v2 body.shell-v2 .tool-call,
html.local-ui-light.shell-v2 body.shell-v2 .process-tool-pill {
  border-color: color-mix(in srgb, var(--v2-accent) 10%, #e8e8e8) !important;
  background: color-mix(in srgb, #fbfbfb 96%, var(--v2-accent-tint)) !important;
}

html.local-ui-light.shell-v2 body.shell-v2 .bubble code,
html.local-ui-light.shell-v2 body.shell-v2 .bubble pre,
html.local-ui-light.shell-v2 body.shell-v2 .notice-mono-number,
html.local-ui-light.shell-v2 body.shell-v2 .shell-v2-reader-markdown code {
  border-color: color-mix(in srgb, var(--v2-border-soft) 82%, transparent) !important;
  background: color-mix(in srgb, #f4f4f4 54%, transparent) !important;
}

html.local-ui-light.shell-v2 body.shell-v2 .memory-citation-note,
html.local-ui-light.shell-v2 body.shell-v2 .shell-v2-readable-file-action {
  color: color-mix(in srgb, var(--v2-accent) 82%, var(--v2-muted)) !important;
}

html.local-ui-light.shell-v2 body.shell-v2 .message.user .bubble,
html.local-ui-light.shell-v2 body.shell-v2 .message.user .bubble.markdown-body,
html.local-ui-light.shell-v2 body.shell-v2 .message.user .bubble.is-copyable {
  border-color: #e5e5e5 !important;
  background: #f7f7f7 !important;
  background-image: none !important;
  box-shadow: none !important;
}

html.shell-v2-dark body.shell-v2 .message.user .bubble,
html.shell-v2-dark body.shell-v2 .message.user .bubble.markdown-body,
html.shell-v2-dark body.shell-v2 .message.user .bubble.is-copyable {
  border-color: #3a3048 !important;
  background: #241d2f !important;
  background-image: none !important;
}

/* Final composer guard: keep the input area integrated with the native bottom UI. */
@media (max-width: 900px) {
  html.shell-v2 body.shell-v2 {
    --v2-mobile-header: 38px;
  }

  html.shell-v2-standalone body.shell-v2 {
    --v2-mobile-header: calc(38px + env(safe-area-inset-top, 0px));
  }

  html.shell-v2 body.shell-v2 .topbar {
    position: relative !important;
    border-bottom: 1px solid var(--v2-line-soft) !important;
    padding-top: 2px !important;
    padding-bottom: 0 !important;
    background: var(--v2-bg) !important;
    box-shadow: var(--v2-header-shadow) !important;
  }

  html.shell-v2-standalone body.shell-v2 .topbar {
    padding-top: env(safe-area-inset-top, 0px) !important;
    padding-bottom: 0 !important;
    background: var(--v2-bg) !important;
    box-shadow: var(--v2-header-shadow) !important;
  }

  html.shell-v2-standalone.shell-v2-dark body.shell-v2 .topbar {
    box-shadow: var(--v2-header-shadow) !important;
  }

  html.shell-v2 body.shell-v2 .thread-button,
  html.shell-v2 body.shell-v2 .thread-button:hover,
  html.shell-v2 body.shell-v2 .thread-button:active,
  html.shell-v2 body.shell-v2 .thread-button:focus,
  html.shell-v2 body.shell-v2 .thread-button:focus-visible {
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
  }

html.shell-v2 body.shell-v2 .composer-shell {
    border-top: 1px solid var(--v2-line-soft) !important;
    border-bottom: 0 !important;
    background: var(--v2-bg) !important;
    box-shadow: var(--v2-composer-shadow) !important;
  }

  html.shell-v2 body.shell-v2.shell-v2-page-entering .topbar,
  html.shell-v2 body.shell-v2.shell-v2-page-entering .thread,
  html.shell-v2 body.shell-v2.shell-v2-page-entering .composer-shell {
    animation: shell-v2-page-soft-enter 260ms cubic-bezier(.22, .61, .36, 1) both !important;
  }

  html.shell-v2 body.shell-v2.shell-v2-page-entering .thread {
    animation-duration: 320ms !important;
  }

  html.shell-v2 body.shell-v2.shell-v2-thread-switching .topbar::after {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: -1px !important;
    height: 2px !important;
    pointer-events: none !important;
    background: linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--v2-accent) 72%, transparent) 42%, transparent 78%) !important;
    background-size: 220% 100% !important;
    opacity: .68 !important;
    animation: shell-v2-thread-switch-bar 880ms ease-in-out infinite !important;
  }

  html.shell-v2 body.shell-v2 .thread {
    isolation: isolate !important;
  }

  /* Keep conversation readable while giving the handoff a small, stable settle. */
  html.shell-v2 body.shell-v2 .thread {
    transition: opacity 150ms ease, transform 180ms cubic-bezier(.22, .61, .36, 1) !important;
  }

  html.shell-v2 body.shell-v2.shell-v2-thread-warmup .thread {
    opacity: .92 !important;
    transform: translateY(2px) !important;
  }

  html.shell-v2 body.shell-v2.shell-v2-thread-warmup .thread::before,
  html.shell-v2 body.shell-v2.shell-v2-thread-warmup .thread::after {
    content: none !important;
    display: none !important;
  }

  html.shell-v2 body.shell-v2.shell-v2-thread-warmup .thread > article.message {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  body.shell-v2.shell-v2-thread-warmup .thread::before,
  body.shell-v2.shell-v2-thread-warmup .thread::after {
    content: none !important;
    display: none !important;
    animation: none !important;
  }

  body.shell-v2.shell-v2-thread-warmup .thread > article.message {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }

  @keyframes shell-v2-page-soft-enter {
    0% { opacity: .001; filter: blur(3px); }
    100% { opacity: 1; filter: blur(0); }
  }

  @keyframes shell-v2-thread-switch-bar {
    0% { background-position: 120% 0; opacity: .25; }
    45% { opacity: .72; }
    100% { background-position: -80% 0; opacity: .25; }
  }

  @media (prefers-reduced-motion: reduce) {
    html.shell-v2 body.shell-v2.shell-v2-page-entering .topbar,
    html.shell-v2 body.shell-v2.shell-v2-page-entering .thread,
    html.shell-v2 body.shell-v2.shell-v2-page-entering .composer-shell,
    html.shell-v2 body.shell-v2.shell-v2-thread-switching .topbar::after,
    html.shell-v2 body.shell-v2 .thread {
      animation: none !important;
      transition: none !important;
    }
  }

  html.shell-v2-dark body.shell-v2 .composer-shell {
    box-shadow: var(--v2-composer-shadow) !important;
  }

  html.shell-v2 body.shell-v2 .shell-v2-recent-threads {
    position: absolute !important;
    left: 9px !important;
    right: 9px !important;
    bottom: calc(100% + var(--queued-send-height, 0px) + 11px) !important;
    z-index: 3 !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    min-height: 32px !important;
    max-height: 36px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 2px 0 !important;
    pointer-events: auto !important;
    touch-action: pan-y !important;
    overscroll-behavior-x: contain !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
  }

  html.shell-v2 body.shell-v2 .shell-v2-draft-notice {
    position: absolute !important;
    right: 10px !important;
    bottom: calc(100% + var(--queued-send-height, 0px) + var(--recent-thread-strip-height, 0px) + 8px) !important;
    z-index: 4 !important;
    display: inline-flex !important;
    align-items: center !important;
    max-width: min(62vw, 260px) !important;
    min-height: 26px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    border: 1px solid color-mix(in srgb, var(--v2-border-soft) 80%, transparent) !important;
    background: color-mix(in srgb, var(--v2-bg) 78%, var(--v2-panel-muted)) !important;
    color: color-mix(in srgb, var(--v2-muted) 86%, var(--v2-text)) !important;
    box-shadow: none !important;
    font-size: 11.5px !important;
    font-weight: 560 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    pointer-events: none !important;
  }

  html.shell-v2 body.shell-v2 .shell-v2-draft-notice[hidden] {
    display: none !important;
  }

  html.shell-v2 body.shell-v2 .shell-v2-recent-threads[hidden] {
    display: none !important;
  }

  html.shell-v2 body.shell-v2 .shell-v2-recent-threads::-webkit-scrollbar {
    display: none !important;
  }

  html.shell-v2 body.shell-v2 .shell-v2-recent-thread-chip {
    appearance: none !important;
    -webkit-appearance: none !important;
    flex: 0 0 auto !important;
    width: max-content !important;
    max-width: min(46vw, 184px) !important;
    height: 30px !important;
    min-height: 30px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    padding: 0 10px !important;
    border: 1px solid var(--v2-line-soft) !important;
    border-radius: 999px !important;
    background: color-mix(in srgb, var(--v2-bg) 76%, var(--v2-panel-muted)) !important;
    color: color-mix(in srgb, var(--v2-muted) 86%, var(--v2-text)) !important;
    box-shadow: var(--v2-control-shadow), 0 4px 14px rgba(15, 23, 42, .04) !important;
    font-size: 11.6px !important;
    font-weight: 540 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    touch-action: pan-y !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    transition: transform 120ms ease, background 120ms ease, border-color 120ms ease !important;
  }

  html.shell-v2 body.shell-v2 .shell-v2-recent-thread-chip:active {
    transform: translateY(1px) !important;
    background: color-mix(in srgb, var(--v2-accent-soft) 34%, var(--v2-bg)) !important;
    border-color: color-mix(in srgb, var(--v2-accent) 20%, var(--v2-line-soft)) !important;
  }

  html.shell-v2 body.shell-v2 .shell-v2-recent-thread-title {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  html.shell-v2 body.shell-v2 .shell-v2-recent-thread-state {
    width: 7px !important;
    height: 7px !important;
    flex: 0 0 7px !important;
    border-radius: 999px !important;
    background: color-mix(in srgb, var(--v2-muted) 32%, transparent) !important;
    box-shadow: none !important;
  }

  html.shell-v2 body.shell-v2 .shell-v2-recent-thread-state.is-running {
    width: 9px !important;
    height: 9px !important;
    flex-basis: 9px !important;
    border: 2px solid color-mix(in srgb, var(--v2-accent) 34%, var(--v2-border-soft)) !important;
    border-top-color: var(--v2-accent) !important;
    background: transparent !important;
    animation: shell-v2-spin .9s linear infinite !important;
  }

  html.shell-v2 body.shell-v2 .shell-v2-recent-thread-state.is-completed {
    background: color-mix(in srgb, var(--v2-muted) 45%, var(--v2-bg)) !important;
  }

  html.shell-v2 body.shell-v2 .shell-v2-recent-thread-state.is-completed-unread {
    background: #22c55e !important;
    box-shadow: none !important;
  }

  html.shell-v2 body.shell-v2 .composer-shell::after,
  html.shell-v2 body.shell-v2 form.composer#composer::after {
    display: none !important;
    content: none !important;
  }

  html.shell-v2 body.shell-v2 form.composer#composer,
  html.shell-v2 body.shell-v2 .composer-shell:has(.queued-send-card) form.composer#composer {
    border: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
    background: var(--v2-panel) !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
    contain: paint !important;
  }

  html.shell-v2 body.shell-v2 form.composer#composer .icon-btn,
  html.shell-v2 body.shell-v2 form.composer#composer .send-btn,
  html.shell-v2 body.shell-v2 form.composer#composer #attach {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 6 !important;
  }

  html.shell-v2 body.shell-v2 form.composer#composer:has(.shell-v2-context-ring:not([hidden])),
  html.shell-v2 body.shell-v2 .composer-shell:has(.queued-send-card) form.composer#composer:has(.shell-v2-context-ring:not([hidden])) {
    grid-template-columns: 46px minmax(0, 1fr) 52px !important;
  }

  html.shell-v2 body.shell-v2 .attachment-tray {
    margin: 0 !important;
    padding: 6px 12px 4px !important;
    border: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    background: var(--v2-panel) !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }

  html.shell-v2 body.shell-v2 .attachment-tray:empty {
    display: none !important;
    padding: 0 !important;
  }

  html.shell-v2 body.shell-v2 .attachment-tray .attachment-preview,
  html.shell-v2 body.shell-v2 .attachment-tray .file-attachment-preview,
  html.shell-v2 body.shell-v2 .attachment-tray [class*="attachment"] {
    border-color: color-mix(in srgb, var(--v2-border-soft) 74%, transparent) !important;
    background: color-mix(in srgb, var(--v2-bg) 88%, var(--v2-panel-muted)) !important;
    box-shadow: none !important;
  }

  html.shell-v2 body.shell-v2 .attachment-tray img {
    background: var(--v2-panel-muted) !important;
  }

  html.shell-v2 body.shell-v2 textarea#text {
    background: var(--v2-panel) !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-shadow: none !important;
    outline: 0 !important;
  }

  html.shell-v2 body.shell-v2 textarea#text:placeholder-shown {
    min-height: 52px !important;
    height: 52px !important;
    padding: 0 3px !important;
    line-height: 52px !important;
    overflow: hidden !important;
  }

  html.shell-v2 body.shell-v2 textarea#text:placeholder-shown::placeholder {
    line-height: 52px !important;
    color: color-mix(in srgb, var(--v2-muted) 64%, transparent) !important;
    opacity: 0.62 !important;
    font-size: 12.6px !important;
    font-weight: 440 !important;
  }

  html.shell-v2 body.shell-v2 .icon-btn,
  html.shell-v2 body.shell-v2 .send-btn {
    background: var(--v2-panel) !important;
  }
}

/* Final readability guard: keep dynamic app rewrites from fading real content. */
html.shell-v2 body.shell-v2 .thread,
html.shell-v2 body.shell-v2 .messages,
html.shell-v2 body.shell-v2 .message,
html.shell-v2 body.shell-v2 .bubble,
html.shell-v2 body.shell-v2 .bubble *,
html.shell-v2 body.shell-v2 .markdown-body,
html.shell-v2 body.shell-v2 .markdown-body p,
html.shell-v2 body.shell-v2 .markdown-body li,
html.shell-v2 body.shell-v2 .thread-menu,
html.shell-v2 body.shell-v2 .thread-menu .thread-option,
html.shell-v2 body.shell-v2 .thread-menu .pinned-thread-option,
html.shell-v2 body.shell-v2 .thread-option-title,
html.shell-v2 body.shell-v2 .pinned-thread-name,
html.shell-v2 body.shell-v2 .memory-citation-card,
html.shell-v2 body.shell-v2 .memory-citation-card *,
html.shell-v2 body.shell-v2 .file-attachment-name {
  opacity: 1 !important;
  color: var(--v2-text) !important;
}

html.shell-v2 body.shell-v2 .meta,
html.shell-v2 body.shell-v2 .process-tool,
html.shell-v2 body.shell-v2 .process-tool-row,
html.shell-v2 body.shell-v2 .thread-option-state,
html.shell-v2 body.shell-v2 .pinned-thread-meta,
html.shell-v2 body.shell-v2 .memory-citation-note,
html.shell-v2 body.shell-v2 .attachment-note {
  opacity: 1 !important;
  color: var(--v2-muted) !important;
}

html.shell-v2 body.shell-v2 .thread-menu svg,
html.shell-v2 body.shell-v2 .thread-menu svg *,
html.shell-v2 body.shell-v2 .thread-menu .folder-icon,
html.shell-v2 body.shell-v2 .thread-menu .folder-icon *,
html.shell-v2 body.shell-v2 .thread-menu [class*="icon"],
html.shell-v2 body.shell-v2 .thread-menu [class*="icon"] *,
html.shell-v2 body.shell-v2 .thread-menu [class*="folder"] svg,
html.shell-v2 body.shell-v2 .thread-menu [class*="folder"] svg *,
html.shell-v2 body.shell-v2 .thread-menu [class*="root"] svg,
html.shell-v2 body.shell-v2 .thread-menu [class*="root"] svg * {
  color: var(--v2-muted) !important;
  stroke: currentColor !important;
  fill: none !important;
  stroke-width: 1.72 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

html.shell-v2 body.shell-v2 .thread-menu .thread-option,
html.shell-v2 body.shell-v2 .thread-menu .pinned-thread-option {
  border-radius: 8px !important;
  transition: background-color 120ms ease, color 120ms ease, box-shadow 120ms ease !important;
}

html.shell-v2 body.shell-v2 .thread-menu .thread-option:active,
html.shell-v2 body.shell-v2 .thread-menu .pinned-thread-option:active {
  background: color-mix(in srgb, var(--v2-accent-tint) 44%, var(--v2-panel)) !important;
}

html.shell-v2 body.shell-v2 .thread-menu .thread-option,
html.shell-v2 body.shell-v2 .thread-menu .pinned-thread-option,
html.shell-v2 body.shell-v2 .thread-menu .thread-option-title,
html.shell-v2 body.shell-v2 .thread-menu .pinned-thread-name,
html.shell-v2 body.shell-v2 .thread-menu [class*="title"],
html.shell-v2 body.shell-v2 .thread-menu [class*="name"] {
  opacity: 1 !important;
  color: var(--v2-text) !important;
}

html.shell-v2 body.shell-v2 .thread-menu .thread-option-state,
html.shell-v2 body.shell-v2 .thread-menu .pinned-thread-meta,
html.shell-v2 body.shell-v2 .thread-menu [class*="count"],
html.shell-v2 body.shell-v2 .thread-menu [class*="time"],
html.shell-v2 body.shell-v2 .thread-menu [class*="meta"] {
  opacity: 1 !important;
  color: var(--v2-muted) !important;
}

html.shell-v2 body.shell-v2 .file-attachment-ext,
html.shell-v2 body.shell-v2 .attachment-ext,
html.shell-v2 body.shell-v2 .attachment-type,
html.shell-v2 body.shell-v2 .bubble .file-attachment-preview [class*="ext"],
html.shell-v2 body.shell-v2 .bubble .file-attachment-preview [class*="type"] {
  opacity: 1 !important;
  color: var(--v2-muted) !important;
  font-weight: 680 !important;
}

html.shell-v2 body.shell-v2 .bubble a,
html.shell-v2 body.shell-v2 .markdown-body a {
  color: #0969da !important;
}

/* Final hint color guard: keep purple as a small accent, not a second fill inside text boxes. */
html.shell-v2 body.shell-v2 .bubble code,
html.shell-v2 body.shell-v2 .bubble pre,
html.shell-v2 body.shell-v2 .notice-mono-number,
html.shell-v2 body.shell-v2 .shell-v2-reader-markdown code {
  border-color: color-mix(in srgb, var(--v2-border-soft) 82%, transparent) !important;
  background: color-mix(in srgb, var(--v2-control-bg) 52%, transparent) !important;
  background-color: color-mix(in srgb, var(--v2-control-bg) 52%, transparent) !important;
}

html.shell-v2 body.shell-v2 .bubble pre code,
html.shell-v2 body.shell-v2 .bubble code code,
html.shell-v2 body.shell-v2 .shell-v2-reader-markdown pre code {
  border-color: transparent !important;
  background: transparent !important;
  background-color: transparent !important;
}

html.shell-v2 body.shell-v2 .memory-citation-card,
html.shell-v2 body.shell-v2 .tool-call,
html.shell-v2 body.shell-v2 .process-tool-pill,
html.shell-v2 body.shell-v2 .bubble .file-attachment-preview,
html.shell-v2 body.shell-v2 .bubble a.file-attachment-preview,
html.shell-v2 body.shell-v2 .file-attachment-preview.shell-v2-readable-file {
  border-color: color-mix(in srgb, var(--v2-accent) 10%, var(--v2-border-soft)) !important;
  background: color-mix(in srgb, var(--v2-card-flat) 96%, var(--v2-accent-tint)) !important;
  background-color: color-mix(in srgb, var(--v2-card-flat) 96%, var(--v2-accent-tint)) !important;
  border-radius: var(--v2-radius-card) !important;
  box-shadow: none !important;
}

html.shell-v2 body.shell-v2 .shell-v2-block-copy-bar {
  border-color: color-mix(in srgb, var(--v2-accent) 10%, var(--v2-border-soft)) !important;
  background: color-mix(in srgb, var(--v2-card-flat) 96%, var(--v2-accent-tint)) !important;
  background-color: color-mix(in srgb, var(--v2-card-flat) 96%, var(--v2-accent-tint)) !important;
  box-shadow: none !important;
}

html.shell-v2 body.shell-v2 .icon-btn svg,
html.shell-v2 body.shell-v2 .send-btn svg,
html.shell-v2 body.shell-v2 .shell-v2-more-button svg {
  stroke-width: 1.82 !important;
}

html.shell-v2 body.shell-v2 .send-btn svg {
  width: 23px !important;
  height: 23px !important;
}

/* Final reader scroll guard. Keep the reader as its own scroller: the original
   app pins window scroll to 0 for keyboard layout, so document scrolling is not reliable. */
html.shell-v2-reader-open,
html.shell-v2-reader-open body.shell-v2,
html.shell-v2-mobile.shell-v2-reader-open,
html.shell-v2-mobile.shell-v2-reader-open body.shell-v2,
body.shell-v2.shell-v2-reader-open {
  height: var(--app-height, 100dvh) !important;
  min-height: var(--app-height, 100dvh) !important;
  max-height: var(--app-height, 100dvh) !important;
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
}

body.shell-v2.shell-v2-reader-open > .app {
  display: none !important;
}

body.shell-v2.shell-v2-reader-open .shell-v2-reader.is-open {
  position: fixed !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: var(--app-height, 100dvh) !important;
  min-height: var(--app-height, 100dvh) !important;
  max-height: var(--app-height, 100dvh) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  overscroll-behavior-y: auto !important;
  transform: none !important;
}

body.shell-v2.shell-v2-reader-open .shell-v2-reader.is-open:not(:has(.shell-v2-reader-frame)) {
  display: block !important;
}

body.shell-v2.shell-v2-reader-open .shell-v2-reader.is-open:not(:has(.shell-v2-reader-frame)) .shell-v2-reader-body {
  min-height: calc(var(--app-height, 100dvh) - 48px) !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Final command menu readability guard. The native slash menu can keep its
   dark-menu text colors while Shell v2 turns the card light. */
html.shell-v2 body.shell-v2 .composer-menu-card {
  background: var(--v2-panel) !important;
  background-color: var(--v2-panel) !important;
  color: var(--v2-text) !important;
}

html.shell-v2 body.shell-v2 .composer-menu-card .composer-menu-item,
html.shell-v2 body.shell-v2 .composer-menu-card .composer-menu-item-title {
  color: var(--v2-text) !important;
  opacity: 1 !important;
}

html.shell-v2 body.shell-v2 .composer-menu-card .composer-menu-item-desc,
html.shell-v2 body.shell-v2 .composer-menu-card .composer-menu-group,
html.shell-v2 body.shell-v2 .composer-menu-card .composer-menu-empty,
html.shell-v2 body.shell-v2 .composer-menu-card .composer-menu-loading {
  color: var(--v2-muted) !important;
  opacity: 1 !important;
}

html.shell-v2 body.shell-v2 .composer-menu-card .composer-menu-item.is-active {
  background: color-mix(in srgb, var(--v2-accent-tint) 72%, var(--v2-panel)) !important;
  color: var(--v2-text) !important;
}

html.shell-v2 body.shell-v2 .composer-menu-card .composer-menu-item.is-disabled,
html.shell-v2 body.shell-v2 .composer-menu-card .composer-menu-item.is-disabled .composer-menu-item-title,
html.shell-v2 body.shell-v2 .composer-menu-card .composer-menu-item.is-disabled .composer-menu-item-desc {
  color: var(--v2-faint) !important;
  opacity: 1 !important;
}

/* Final settings drawer polish. Keep thread switching drawer roomy, but make
   settings subdrawers lighter and reserve a real footer space for settings. */
@media (max-width: 900px) {
  html.shell-v2 body.shell-v2 .thread-menu {
    width: min(72vw, 320px) !important;
    height: var(--app-height, 100dvh) !important;
    max-height: var(--app-height, 100dvh) !important;
    padding: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    touch-action: pan-y !important;
  }

  html.shell-v2 body.shell-v2 .thread-menu.shell-v2-thread-menu-framed {
    height: var(--app-height, 100dvh) !important;
    max-height: var(--app-height, 100dvh) !important;
  }

  html.shell-v2 body.shell-v2 .thread-menu .shell-v2-thread-menu-head {
    flex: 0 0 auto !important;
    min-height: max(10px, env(safe-area-inset-top)) !important;
    pointer-events: none !important;
  }

  html.shell-v2 body.shell-v2 .thread-menu .shell-v2-thread-menu-scroll {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: scroll !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    padding: max(10px, env(safe-area-inset-top)) 12px 6px !important;
  }

html.shell-v2 body.shell-v2 .thread-menu .shell-v2-thread-menu-dock {
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    flex: 0 0 max(54px, calc(env(safe-area-inset-bottom) + 44px)) !important;
    width: 100% !important;
    min-height: max(54px, calc(env(safe-area-inset-bottom) + 44px)) !important;
    padding: 6px 16px max(8px, env(safe-area-inset-bottom)) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    background: var(--v2-panel) !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    z-index: 4 !important;
    pointer-events: auto !important;
  }

  html.shell-v2 body.shell-v2 .shell-v2-thread-menu-settings {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    border-radius: 10px !important;
    border: 1px solid color-mix(in srgb, var(--v2-border) 86%, transparent) !important;
    background: color-mix(in srgb, var(--v2-panel-muted) 82%, var(--v2-panel)) !important;
    color: color-mix(in srgb, var(--v2-muted) 84%, var(--v2-text)) !important;
    box-shadow: var(--v2-control-shadow) !important;
  }

  html.shell-v2 body.shell-v2 .shell-v2-thread-menu-settings:active {
    background: color-mix(in srgb, var(--v2-accent-tint) 64%, transparent) !important;
    color: var(--v2-accent) !important;
  }

  html.shell-v2 body.shell-v2 .shell-v2-thread-menu-settings svg {
    width: 21px !important;
    height: 21px !important;
    flex: 0 0 21px !important;
    stroke-width: 1.9 !important;
  }

  html.shell-v2 body.shell-v2 .settings-card {
    width: min(76vw, 380px) !important;
    right: auto !important;
    padding: max(14px, env(safe-area-inset-top)) 18px max(16px, env(safe-area-inset-bottom)) !important;
    box-shadow: 1px 0 0 var(--v2-line-soft) !important;
  }

  html.shell-v2 body.shell-v2 .settings-card .settings-header {
    min-height: 48px !important;
    gap: 12px !important;
  }

  html.shell-v2 body.shell-v2 .settings-card .settings-page.is-active {
    gap: 8px !important;
  }

  html.shell-v2 body.shell-v2 .settings-card .settings-nav-row,
  html.shell-v2 body.shell-v2 .settings-card .settings-row,
  html.shell-v2 body.shell-v2 .settings-card .top-control-setting {
    min-height: 52px !important;
    padding: 8px 8px !important;
    border-radius: 10px !important;
  }

  html.shell-v2 body.shell-v2 .settings-card .settings-label {
    font-size: 15px !important;
    line-height: 1.28 !important;
    font-weight: 650 !important;
  }

  html.shell-v2 body.shell-v2 .settings-card .settings-subtitle,
  html.shell-v2 body.shell-v2 .settings-card .settings-hint {
    font-size: 12px !important;
    line-height: 1.3 !important;
  }

  html.shell-v2 body.shell-v2 .settings-card .settings-chevron {
    font-size: 21px !important;
    color: color-mix(in srgb, var(--v2-muted) 82%, transparent) !important;
  }

  html.shell-v2 body.shell-v2 .settings-card #settings-back {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border-color: transparent !important;
    background: transparent !important;
  }

  html.shell-v2 body.shell-v2 .settings-card #settings-back::before {
    font-size: 28px !important;
    line-height: 34px !important;
  }
}

/* Thread selection changes the existing row only. Layout never animates or
   reorders as acknowledgement for a tap. */
html.shell-v2 body.shell-v2 .thread-menu .thread-option.is-thread-selection-pending {
  transition: background-color 120ms ease-out, color 120ms ease-out !important;
}

/* Final desktop settings panel polish. Desktop uses a compact workbench side
   panel; mobile keeps the larger touch drawer above. */
@media (min-width: 901px) {
  html.shell-v2-desktop body.shell-v2 .settings-card {
    top: 8px !important;
    right: auto !important;
    bottom: 8px !important;
    left: 8px !important;
    width: min(352px, calc(100vw - 24px)) !important;
    height: calc(100dvh - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
    padding: 12px !important;
    border: 1px solid color-mix(in srgb, var(--v2-border) 78%, transparent) !important;
    border-radius: 8px !important;
    background: color-mix(in srgb, var(--v2-panel-muted) 86%, var(--v2-panel)) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .035) !important;
    transform: translateX(calc(-100% - 16px)) !important;
    overflow-y: auto !important;
  }

  html.shell-v2-desktop body.shell-v2 .settings-card.is-open {
    transform: translateX(0) !important;
  }

  html.shell-v2-desktop body.shell-v2 .settings-card .settings-title {
    min-height: 34px !important;
    margin: 0 0 8px !important;
    padding: 0 2px 8px !important;
    display: grid !important;
    grid-template-columns: 30px minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 8px !important;
    border-bottom: 1px solid color-mix(in srgb, var(--v2-border-soft) 88%, transparent) !important;
  }

  html.shell-v2-desktop body.shell-v2 .settings-card #settings-pro-pill {
    display: none !important;
  }

  html.shell-v2-desktop body.shell-v2 .settings-card #settings-title-text {
    color: var(--v2-text) !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    font-weight: 680 !important;
  }

  html.shell-v2-desktop body.shell-v2 .settings-card .shell-v2-settings-close,
  html.shell-v2-desktop body.shell-v2 .settings-card #settings-back {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: transparent !important;
    color: var(--v2-muted) !important;
    box-shadow: none !important;
    font-size: 0 !important;
  }

  html.shell-v2-desktop body.shell-v2 .settings-card .shell-v2-settings-close::before {
    content: "×" !important;
    display: block !important;
    font-size: 20px !important;
    line-height: 26px !important;
    font-weight: 420 !important;
  }

  html.shell-v2-desktop body.shell-v2 .settings-card #settings-back::before {
    font-size: 22px !important;
    line-height: 26px !important;
    font-weight: 420 !important;
  }

  html.shell-v2-desktop body.shell-v2 .settings-card .shell-v2-settings-close:hover,
  html.shell-v2-desktop body.shell-v2 .settings-card .shell-v2-settings-close:active,
  html.shell-v2-desktop body.shell-v2 .settings-card #settings-back:hover,
  html.shell-v2-desktop body.shell-v2 .settings-card #settings-back:active {
    background: color-mix(in srgb, var(--v2-control-bg) 70%, transparent) !important;
    color: var(--v2-text) !important;
  }

  html.shell-v2-desktop body.shell-v2 .settings-card .settings-page.is-active,
  html.shell-v2-desktop body.shell-v2 .settings-card .top-control-settings-list {
    gap: 2px !important;
  }

  html.shell-v2-desktop body.shell-v2 .settings-card .settings-nav-row,
  html.shell-v2-desktop body.shell-v2 .settings-card .settings-row,
  html.shell-v2-desktop body.shell-v2 .settings-card .top-control-setting {
    min-height: 40px !important;
    padding: 7px 8px !important;
    border: 1px solid transparent !important;
    border-radius: 7px !important;
    background: transparent !important;
    box-shadow: none !important;
    gap: 8px !important;
  }

  html.shell-v2-desktop body.shell-v2 .settings-card .settings-nav-row:hover,
  html.shell-v2-desktop body.shell-v2 .settings-card .settings-row:hover,
  html.shell-v2-desktop body.shell-v2 .settings-card .top-control-setting:hover {
    background: color-mix(in srgb, var(--v2-control-bg) 68%, transparent) !important;
    border-color: color-mix(in srgb, var(--v2-border-soft) 72%, transparent) !important;
  }

  html.shell-v2-desktop body.shell-v2 .settings-card .shell-v2-settings-primary {
    background: color-mix(in srgb, var(--v2-accent-tint) 34%, transparent) !important;
    border-color: color-mix(in srgb, var(--v2-accent) 18%, transparent) !important;
  }

  html.shell-v2-desktop body.shell-v2 .settings-card .settings-label {
    font-size: 13px !important;
    line-height: 1.24 !important;
    font-weight: 640 !important;
  }

  html.shell-v2-desktop body.shell-v2 .settings-card .settings-subtitle,
  html.shell-v2-desktop body.shell-v2 .settings-card .settings-hint {
    font-size: 11px !important;
    line-height: 1.25 !important;
  }

  html.shell-v2-desktop body.shell-v2 .settings-card .settings-hint {
    padding: 0 8px 6px !important;
  }

  html.shell-v2-desktop body.shell-v2 .settings-card .settings-chevron {
    font-size: 17px !important;
    color: color-mix(in srgb, var(--v2-muted) 80%, transparent) !important;
  }

  html.shell-v2-desktop body.shell-v2 .settings-card .shell-v2-settings-row-value {
    max-width: 92px !important;
    color: var(--v2-muted) !important;
    font-size: 11.5px !important;
    font-weight: 560 !important;
  }

  html.shell-v2-desktop body.shell-v2 .settings-card .settings-switch {
    width: 32px !important;
    height: 18px !important;
    min-width: 32px !important;
  }

  html.shell-v2-desktop body.shell-v2 .settings-card .settings-switch::after {
    width: 14px !important;
    height: 14px !important;
  }

  html.shell-v2-desktop body.shell-v2 .settings-card .settings-switch.is-on::after {
    transform: translateX(14px) !important;
  }

html.shell-v2-desktop body.shell-v2 .settings-card .settings-input {
    min-height: 32px !important;
    padding: 6px 9px !important;
    border-radius: 7px !important;
    font-size: 13px !important;
  }
}

/* Final recent strip polish. Keep bottom thread chips light and quiet without
   changing their layout contract. */
html.shell-v2 body.shell-v2 .shell-v2-recent-threads {
  padding: 2px 4px !important;
  gap: 7px !important;
  mask-image: none !important;
  -webkit-mask-image: none !important;
  scroll-snap-type: none !important;
  touch-action: pan-y !important;
}

@media (max-width: 900px) {
  html.shell-v2 body.shell-v2 .shell-v2-recent-threads {
    padding: 3px 2px !important;
  }

  html.shell-v2 body.shell-v2 .shell-v2-recent-thread-chip {
    padding: 0 11px !important;
  }
}

/* Lightweight UI polish: quiet edges, clearer focus, no heavy depth. */
html.shell-v2 body.shell-v2 .topbar {
  border-bottom-color: color-mix(in srgb, var(--v2-line-soft) 72%, transparent) !important;
  box-shadow: var(--v2-header-shadow) !important;
}

html.shell-v2 body.shell-v2 .thread-name {
  font-weight: 700 !important;
}

html.shell-v2 body.shell-v2 form.composer#composer {
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease !important;
}

html.shell-v2 body.shell-v2 form.composer#composer:focus-within {
  border-color: color-mix(in srgb, var(--v2-accent) 22%, var(--v2-border)) !important;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--v2-accent) 8%, transparent) !important;
}

html.shell-v2 body.shell-v2 form.composer#composer:not(.is-running):focus-within {
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--v2-accent) 10%, transparent) !important;
}

html.shell-v2 body.shell-v2 .composer-shell {
  box-shadow: var(--v2-composer-shadow) !important;
}

html.shell-v2 body.shell-v2 .shell-v2-recent-thread-chip[aria-current="true"],
html.shell-v2 body.shell-v2 .shell-v2-recent-thread-chip.is-active {
  color: color-mix(in srgb, var(--v2-text) 88%, var(--v2-accent)) !important;
  border-color: color-mix(in srgb, var(--v2-accent) 18%, var(--v2-line-soft)) !important;
}

@media (hover: hover) and (pointer: fine) {
  html.shell-v2 body.shell-v2 .icon-btn:hover,
  html.shell-v2 body.shell-v2 .send-btn:hover,
  html.shell-v2 body.shell-v2 .shell-v2-recent-thread-chip:hover {
    background-color: color-mix(in srgb, var(--v2-control-bg-hover) 72%, transparent) !important;
  }
}

/* Refined layer separation: keep progress as a single line and separate chrome from content with pure directional shadows. */
html.shell-v2 body.shell-v2 {
  --v2-header-shadow: 0 12px 26px rgba(15, 23, 42, .078);
  --v2-composer-shadow: 0 -12px 26px rgba(15, 23, 42, .082);
}

html.shell-v2-dark body.shell-v2 {
  --v2-header-shadow: 0 12px 26px rgba(0, 0, 0, .36);
  --v2-composer-shadow: 0 -12px 28px rgba(0, 0, 0, .38);
}

html.shell-v2 body.shell-v2 .topbar {
  border-bottom-color: transparent !important;
  box-shadow: var(--v2-header-shadow) !important;
}

html.shell-v2 body.shell-v2 .composer-shell {
  border-top-color: transparent !important;
  box-shadow: var(--v2-composer-shadow) !important;
}

html.shell-v2 body.shell-v2 .shell-v2-context-ring,
html.shell-v2 body.shell-v2 .shell-v2-context-ring.is-warn,
html.shell-v2 body.shell-v2 .shell-v2-context-ring.is-danger {
  height: 2px !important;
  background: linear-gradient(
    90deg,
    var(--v2-accent) 0 calc(var(--context-percent) * 1%),
    transparent calc(var(--context-percent) * 1%) 100%
  ) !important;
  opacity: .96 !important;
}

html.shell-v2 body.shell-v2 .shell-v2-context-ring.is-warn {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--v2-accent) 88%, var(--v2-warning)) 0 calc(var(--context-percent) * 1%),
    transparent calc(var(--context-percent) * 1%) 100%
  ) !important;
}

html.shell-v2 body.shell-v2 .shell-v2-context-ring.is-danger {
  background: linear-gradient(
    90deg,
    var(--v2-danger) 0 calc(var(--context-percent) * 1%),
    transparent calc(var(--context-percent) * 1%) 100%
  ) !important;
}

html.shell-v2 body.shell-v2 .thread-name {
  color: var(--v2-text) !important;
  font-weight: 720 !important;
}

html.shell-v2 body.shell-v2 .meta,
html.shell-v2 body.shell-v2 .day-note,
html.shell-v2 body.shell-v2 .attachment-note,
html.shell-v2 body.shell-v2 .memory-citation-note {
  color: color-mix(in srgb, var(--v2-muted) 82%, transparent) !important;
  font-size: 12.5px !important;
  font-weight: 520 !important;
}

html.shell-v2 body.shell-v2 .message.assistant .bubble {
  color: color-mix(in srgb, var(--v2-text) 94%, var(--v2-muted)) !important;
  line-height: 1.62 !important;
}

html.shell-v2 body.shell-v2 .message.user .bubble {
  color: color-mix(in srgb, var(--v2-text) 96%, var(--v2-accent)) !important;
  line-height: 1.55 !important;
  font-weight: 400 !important;
}

html.shell-v2 body.shell-v2 .bubble code {
  border-color: color-mix(in srgb, var(--v2-border-soft) 84%, transparent) !important;
  background: color-mix(in srgb, var(--v2-control-bg) 72%, transparent) !important;
}

html.shell-v2 body.shell-v2 .shell-v2-recent-thread-chip {
  background: color-mix(in srgb, var(--v2-panel) 84%, var(--v2-bg)) !important;
  border-color: color-mix(in srgb, var(--v2-line-soft) 82%, transparent) !important;
  box-shadow: none !important;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 120ms ease !important;
}

/* Unified running dot: bottom thread chips use the same breathing indicator as the top thread title.
   Stronger running affordance: slightly larger shared dot with a clearer breathing halo. */
html.shell-v2 body.shell-v2 .shell-v2-thread-status.is-running .shell-v2-thread-status-dot,
html.shell-v2 body.shell-v2 .shell-v2-recent-thread-state.is-running,
html.shell-v2 body.shell-v2 .shell-v2-recent-thread-chip[data-state="running"] .shell-v2-recent-thread-state {
  width: 8px !important;
  height: 8px !important;
  flex: 0 0 8px !important;
  border: 0 !important;
  opacity: 1 !important;
  background: var(--v2-accent) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--v2-accent) 16%, transparent) !important;
  animation: shell-v2-thread-running-pulse 1.05s ease-in-out infinite !important;
}

@keyframes shell-v2-thread-running-pulse {
  0%, 100% {
    opacity: .58;
    transform: scale(.82);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--v2-accent) 10%, transparent);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--v2-accent) 20%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  html.shell-v2 body.shell-v2 .shell-v2-thread-status.is-running .shell-v2-thread-status-dot,
  html.shell-v2 body.shell-v2 .shell-v2-recent-thread-state.is-running,
  html.shell-v2 body.shell-v2 .shell-v2-recent-thread-chip[data-state="running"] .shell-v2-recent-thread-state {
    animation: none !important;
    transform: none !important;
  }
}

/* Lean visual polish: tighter process rhythm without extra shadows or decorative layers. */
html.shell-v2 body.shell-v2 .process-feed {
  gap: 7px !important;
}

html.shell-v2 body.shell-v2 .process-tool-pill {
  min-height: 28px !important;
  padding: 5px 9px !important;
  font-size: 12.5px !important;
  line-height: 1.35 !important;
}

html.shell-v2 body.shell-v2 .message.assistant .bubble p,
html.shell-v2 body.shell-v2 .message.assistant .bubble li {
  margin-block: .34em !important;
}

/* Desktop Codex-like composer: floating input, image paste friendly attachment tray, quiet controls. */
@media (min-width: 901px) {
  html.shell-v2-desktop body.shell-v2 {
    --v2-desktop-composer-width: min(760px, calc(100vw - var(--v2-sidebar-effective) - 96px));
    --v2-composer-shadow: none;
  }

  html.shell-v2-desktop body.shell-v2 .composer-shell {
    grid-column: 2 !important;
    grid-row: 3 !important;
    position: relative !important;
    z-index: 45 !important;
    width: 100% !important;
    padding: 10px 24px 18px !important;
    border: 0 !important;
    background: linear-gradient(to top, var(--v2-bg) 74%, color-mix(in srgb, var(--v2-bg) 0%, transparent)) !important;
    box-shadow: none !important;
  }

  html.shell-v2-desktop body.shell-v2 form.composer#composer,
  html.shell-v2-desktop body.shell-v2 .composer-shell:has(.queued-send-card) form.composer#composer {
    width: var(--v2-desktop-composer-width) !important;
    max-width: var(--v2-desktop-composer-width) !important;
    min-height: 112px !important;
    margin: 0 auto !important;
    padding: 16px 16px 12px !important;
    display: grid !important;
    grid-template-columns: 36px minmax(0, 1fr) auto auto 42px !important;
    grid-template-rows: minmax(54px, auto) 30px !important;
    align-items: end !important;
    column-gap: 10px !important;
    row-gap: 8px !important;
    border: 1px solid color-mix(in srgb, var(--v2-border) 88%, transparent) !important;
    border-radius: 22px !important;
    background: color-mix(in srgb, var(--v2-panel) 98%, var(--v2-bg)) !important;
    box-shadow: 0 20px 48px rgba(15, 23, 42, .10), 0 1px 0 rgba(255, 255, 255, .82) inset !important;
    overflow: hidden !important;
    contain: layout paint !important;
  }

  html.shell-v2-desktop.shell-v2-dark body.shell-v2 form.composer#composer,
  html.shell-v2-desktop.shell-v2-dark body.shell-v2 .composer-shell:has(.queued-send-card) form.composer#composer {
    background: color-mix(in srgb, var(--v2-panel) 96%, #000) !important;
    border-color: color-mix(in srgb, var(--v2-border) 84%, transparent) !important;
    box-shadow: 0 20px 48px rgba(0, 0, 0, .34), 0 1px 0 rgba(255, 255, 255, .045) inset !important;
  }

  html.shell-v2-desktop body.shell-v2 form.composer#composer:focus-within {
    border-color: color-mix(in srgb, var(--v2-accent) 24%, var(--v2-border)) !important;
    box-shadow: 0 22px 54px rgba(15, 23, 42, .12), 0 0 0 1px color-mix(in srgb, var(--v2-accent) 8%, transparent) !important;
  }

  html.shell-v2-desktop.shell-v2-dark body.shell-v2 form.composer#composer:focus-within {
    box-shadow: 0 22px 54px rgba(0, 0, 0, .38), 0 0 0 1px color-mix(in srgb, var(--v2-accent) 14%, transparent) !important;
  }

  html.shell-v2-desktop body.shell-v2 textarea#text {
    grid-column: 1 / 6 !important;
    grid-row: 1 !important;
    min-height: 54px !important;
    max-height: 180px !important;
    /* The native autosize handler owns the inline height. An important CSS
       height here would pin every non-empty desktop draft to one row. */
    padding: 0 4px !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--v2-text) !important;
    font-size: 15px !important;
    line-height: 1.55 !important;
    resize: none !important;
  }

  html.shell-v2-desktop body.shell-v2 textarea#text:placeholder-shown {
    min-height: 54px !important;
    height: 54px !important;
    line-height: 54px !important;
    padding: 0 4px !important;
  }

  html.shell-v2-desktop body.shell-v2 textarea#text::placeholder {
    color: color-mix(in srgb, var(--v2-muted) 62%, transparent) !important;
    opacity: .72 !important;
    font-size: 15px !important;
    font-weight: 420 !important;
  }

  html.shell-v2-desktop body.shell-v2 form.composer#composer .icon-btn,
  html.shell-v2-desktop body.shell-v2 form.composer#composer #attach,
  html.shell-v2-desktop body.shell-v2 form.composer#composer .send-btn {
    grid-row: 2 !important;
    align-self: center !important;
    width: 34px !important;
    height: 30px !important;
    min-width: 34px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: transparent !important;
    color: color-mix(in srgb, var(--v2-muted) 88%, var(--v2-text)) !important;
    box-shadow: none !important;
  }

  html.shell-v2-desktop body.shell-v2 form.composer#composer #attach {
    grid-column: 1 !important;
    justify-self: start !important;
  }

  html.shell-v2-desktop body.shell-v2 form.composer#composer .context-status,
  html.shell-v2-desktop body.shell-v2 form.composer#composer .model-badge,
  html.shell-v2-desktop body.shell-v2 form.composer#composer .reasoning-badge,
  html.shell-v2-desktop body.shell-v2 form.composer#composer .permission-badge,
  html.shell-v2-desktop body.shell-v2 form.composer#composer .route-badge {
    grid-row: 2 !important;
    align-self: center !important;
    min-height: 28px !important;
    padding: 0 8px !important;
    border: 0 !important;
    background: transparent !important;
    color: color-mix(in srgb, var(--v2-muted) 86%, var(--v2-text)) !important;
    box-shadow: none !important;
    font-size: 12px !important;
    font-weight: 560 !important;
  }

  html.shell-v2-desktop body.shell-v2 form.composer#composer .send-btn {
    grid-column: 5 !important;
    justify-self: end !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 999px !important;
    background: color-mix(in srgb, var(--v2-text) 88%, var(--v2-muted)) !important;
    color: var(--v2-panel) !important;
  }

  html.shell-v2-desktop body.shell-v2 form.composer#composer .send-btn:disabled {
    opacity: .36 !important;
    background: color-mix(in srgb, var(--v2-muted) 68%, var(--v2-panel-muted)) !important;
  }

  html.shell-v2-desktop body.shell-v2 .attachment-tray {
    width: var(--v2-desktop-composer-width) !important;
    max-width: var(--v2-desktop-composer-width) !important;
    margin: 0 auto 8px !important;
    padding: 0 10px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  html.shell-v2-desktop body.shell-v2 .attachment-tray .attachment-preview,
html.shell-v2-desktop body.shell-v2 .attachment-tray .file-attachment-preview,
html.shell-v2-desktop body.shell-v2 .attachment-tray [class*="attachment"] {
    border-radius: 12px !important;
    background: color-mix(in srgb, var(--v2-panel) 92%, var(--v2-control-bg)) !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05) !important;
  }
}

/* Desktop Codex parity final override: keep this last so old desktop guards cannot re-expand the composer. */
@media (min-width: 901px) {
  html.shell-v2-desktop body.shell-v2 {
    --v2-desktop-composer-width: min(1040px, calc(100vw - var(--v2-sidebar-effective) - 72px));
    --v2-desktop-composer-min: 88px;
    --v2-desktop-composer-radius: 22px;
    --v2-header-shadow: none;
    --v2-composer-shadow: none;
  }

  html.shell-v2-desktop body.shell-v2 .topbar {
    border-bottom: 1px solid color-mix(in srgb, var(--v2-border) 72%, transparent) !important;
    background: var(--v2-panel) !important;
    box-shadow: none !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-menu {
    border-right-color: color-mix(in srgb, var(--v2-border) 54%, transparent) !important;
    background: color-mix(in srgb, var(--v2-panel-muted) 96%, var(--v2-panel)) !important;
    box-shadow: 14px 0 34px rgba(15, 23, 42, .065) !important;
  }

  html.shell-v2-desktop body.shell-v2 .shell-v2-context-ring,
  html.shell-v2-desktop body.shell-v2 .shell-v2-context-ring.is-warn,
  html.shell-v2-desktop body.shell-v2 .shell-v2-context-ring.is-danger {
    display: none !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread {
    padding-bottom: 12px !important;
  }

  html.shell-v2-desktop body.shell-v2 .composer-shell {
    padding: 8px 24px 14px !important;
    border: 0 !important;
    background: linear-gradient(
      to top,
      var(--v2-bg) 72%,
      color-mix(in srgb, var(--v2-bg) 78%, transparent) 88%,
      color-mix(in srgb, var(--v2-bg) 0%, transparent) 100%
    ) !important;
    box-shadow: none !important;
  }

  html.shell-v2-desktop body.shell-v2 form.composer#composer,
  html.shell-v2-desktop body.shell-v2 .composer-shell:has(.queued-send-card) form.composer#composer {
    width: var(--v2-desktop-composer-width) !important;
    max-width: var(--v2-desktop-composer-width) !important;
    min-height: var(--v2-desktop-composer-min) !important;
    margin: 0 auto !important;
    padding: 12px 14px 10px !important;
    grid-template-columns: 36px minmax(0, 1fr) auto auto 40px !important;
    grid-template-rows: minmax(38px, auto) 28px !important;
    column-gap: 9px !important;
    row-gap: 6px !important;
    border: 1px solid color-mix(in srgb, var(--v2-border) 82%, transparent) !important;
    border-radius: var(--v2-desktop-composer-radius) !important;
    background: color-mix(in srgb, var(--v2-panel) 98%, var(--v2-bg)) !important;
    box-shadow: 0 18px 46px rgba(15, 23, 42, .12), 0 1px 0 rgba(255, 255, 255, .88) inset !important;
    contain: layout paint !important;
  }

  html.shell-v2-desktop.shell-v2-dark body.shell-v2 form.composer#composer,
  html.shell-v2-desktop.shell-v2-dark body.shell-v2 .composer-shell:has(.queued-send-card) form.composer#composer {
    box-shadow: 0 18px 46px rgba(0, 0, 0, .38), 0 1px 0 rgba(255, 255, 255, .045) inset !important;
  }

  html.shell-v2-desktop body.shell-v2 form.composer#composer:focus-within {
    border-color: color-mix(in srgb, var(--v2-accent) 22%, var(--v2-border)) !important;
    box-shadow: 0 20px 52px rgba(15, 23, 42, .13), 0 0 0 1px color-mix(in srgb, var(--v2-accent) 7%, transparent) !important;
  }

  html.shell-v2-desktop body.shell-v2 textarea#text {
    min-height: 38px !important;
    max-height: 172px !important;
    padding: 0 4px !important;
    line-height: 1.5 !important;
  }

  html.shell-v2-desktop body.shell-v2 textarea#text:placeholder-shown {
    min-height: 38px !important;
    height: 38px !important;
    line-height: 38px !important;
  }

  html.shell-v2-desktop body.shell-v2 textarea#text:placeholder-shown::placeholder {
    line-height: 38px !important;
  }

  html.shell-v2-desktop body.shell-v2 form.composer#composer .send-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    align-self: end !important;
  }

  html.shell-v2-desktop body.shell-v2 .attachment-tray {
    width: var(--v2-desktop-composer-width) !important;
    max-width: var(--v2-desktop-composer-width) !important;
    margin-bottom: 6px !important;
  }

  /* Desktop Codex-like queue card: keep guide/delete/edit controls visible. */
  html.shell-v2-desktop body.shell-v2 .composer-shell:has(.queued-send-card) {
    overflow: visible !important;
  }

  html.shell-v2-desktop body.shell-v2 .queued-send-card {
    width: 100% !important;
    min-height: 34px !important;
    display: grid !important;
    grid-template-columns: 20px minmax(0, 1fr) auto 24px 24px !important;
    grid-template-rows: 1fr !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 4px 12px !important;
    border: 1px solid color-mix(in srgb, var(--v2-border) 72%, transparent) !important;
    border-radius: 14px !important;
    background: color-mix(in srgb, var(--v2-panel) 98%, var(--v2-bg)) !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .055), 0 1px 0 rgba(255, 255, 255, .9) inset !important;
    color: var(--v2-text) !important;
  }

  html.shell-v2-desktop.shell-v2-dark body.shell-v2 .queued-send-card {
    background: color-mix(in srgb, var(--v2-panel) 96%, #000) !important;
    box-shadow: 0 14px 38px rgba(0, 0, 0, .34), 0 1px 0 rgba(255, 255, 255, .045) inset !important;
  }

  html.shell-v2-desktop body.shell-v2 .queued-send-card::before {
    content: "↳";
    grid-column: 1 !important;
    align-self: center !important;
    width: 18px !important;
    height: 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: color-mix(in srgb, var(--v2-muted) 82%, var(--v2-text)) !important;
    font-size: 14px !important;
    line-height: 1 !important;
    grid-row: 1 !important;
  }

  html.shell-v2-desktop body.shell-v2 .queued-send-card-text {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: center !important;
    order: 0 !important;
    min-width: 0 !important;
    display: block !important;
    color: color-mix(in srgb, var(--v2-text) 78%, var(--v2-muted)) !important;
    font-size: 13px !important;
    font-weight: 650 !important;
    line-height: 1.2 !important;
  }

  html.shell-v2-desktop body.shell-v2 .queued-send-card-state {
    display: none !important;
  }

  html.shell-v2-desktop body.shell-v2 .queued-send-card-summary {
    display: block !important;
    max-height: 18px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    -webkit-line-clamp: initial !important;
    -webkit-box-orient: initial !important;
    text-overflow: ellipsis !important;
  }

  html.shell-v2-desktop body.shell-v2 .queued-send-promote,
  html.shell-v2-desktop body.shell-v2 .queued-send-edit,
  html.shell-v2-desktop body.shell-v2 .queued-send-delete {
    grid-row: 1 !important;
    align-self: center !important;
    order: 0 !important;
    height: 24px !important;
    min-height: 24px !important;
    padding: 0 6px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: color-mix(in srgb, var(--v2-muted) 86%, var(--v2-text)) !important;
    box-shadow: none !important;
    font-size: 12.5px !important;
    font-weight: 620 !important;
  }

  html.shell-v2-desktop body.shell-v2 .queued-send-promote {
    grid-column: 3 !important;
    width: auto !important;
    max-width: none !important;
    justify-self: end !important;
  }

  html.shell-v2-desktop body.shell-v2 .queued-send-delete {
    grid-column: 4 !important;
    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    padding: 0 !important;
  }

  html.shell-v2-desktop body.shell-v2 .queued-send-edit {
    grid-column: 5 !important;
    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    padding: 0 !important;
    font-size: 0 !important;
  }

  html.shell-v2-desktop body.shell-v2 .queued-send-edit::before {
    content: "…";
    font-size: 16px !important;
    line-height: 1 !important;
  }

  html.shell-v2-desktop body.shell-v2 .queued-send-promote:hover,
  html.shell-v2-desktop body.shell-v2 .queued-send-edit:hover,
  html.shell-v2-desktop body.shell-v2 .queued-send-delete:hover {
    background: color-mix(in srgb, var(--v2-control-bg) 74%, transparent) !important;
    color: var(--v2-text) !important;
  }

  /* Desktop hierarchy refinement: content projects into the sidebar, composer edge is the input edge. */
  html.shell-v2-desktop body.shell-v2 {
    --v2-header: 44px;
    --v2-sidebar-panel: color-mix(in srgb, var(--v2-panel-muted) 88%, #f3f1f4);
    --v2-content-left-shadow: -12px 0 28px rgba(15, 23, 42, .052);
    --v2-header-shadow: none;
    --v2-composer-shadow: none;
  }

  html.shell-v2-desktop.shell-v2-dark body.shell-v2 {
    --v2-sidebar-panel: color-mix(in srgb, var(--v2-panel-muted) 88%, #191720);
    --v2-content-left-shadow: -12px 0 30px rgba(0, 0, 0, .32);
  }

  html.shell-v2-desktop body.shell-v2 .topbar {
    height: var(--v2-header) !important;
    min-height: var(--v2-header) !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: 1px solid color-mix(in srgb, var(--v2-border) 28%, transparent) !important;
    background: color-mix(in srgb, var(--v2-panel) 98%, var(--v2-bg)) !important;
    box-shadow: var(--v2-content-left-shadow) !important;
    z-index: 18 !important;
  }

  html.shell-v2-desktop body.shell-v2 .topbar .thread-name,
  html.shell-v2-desktop body.shell-v2 .topbar .title,
  html.shell-v2-desktop body.shell-v2 .topbar h1 {
    font-size: 14px !important;
    font-weight: 650 !important;
    letter-spacing: 0 !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-menu {
    background: var(--v2-sidebar-panel) !important;
    border-right: 0 !important;
    box-shadow: none !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-menu .thread-option,
  html.shell-v2-desktop body.shell-v2 .thread-menu .pinned-thread-option {
    color: color-mix(in srgb, var(--v2-text) 82%, var(--v2-muted)) !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-menu .thread-option[aria-current="true"],
  html.shell-v2-desktop body.shell-v2 .thread-menu .pinned-thread-option[aria-current="true"] {
    background: color-mix(in srgb, var(--v2-panel) 62%, transparent) !important;
    color: var(--v2-text) !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread {
    position: relative !important;
    z-index: 12 !important;
    background: var(--v2-bg) !important;
    box-shadow: var(--v2-content-left-shadow) !important;
  }

  html.shell-v2-desktop body.shell-v2 .composer-shell {
    position: relative !important;
    z-index: 16 !important;
    padding: 16px 24px 14px !important;
    background: transparent !important;
    box-shadow: var(--v2-content-left-shadow) !important;
    overflow: visible !important;
  }

  html.shell-v2-desktop body.shell-v2 .composer-shell::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: -28px !important;
    height: 38px !important;
    display: block !important;
    background: var(--v2-composer-feather, transparent) !important;
    box-shadow: var(--v2-composer-feather-shadow, none) !important;
    pointer-events: none !important;
    z-index: 0 !important;
  }

  html.shell-v2-desktop body.shell-v2 .composer-shell::after {
    content: none !important;
    display: none !important;
  }

  html.shell-v2.shell-v2-desktop.local-ui-light body.shell-v2 .composer-shell,
  html.shell-v2.shell-v2-desktop.shell-v2-dark body.shell-v2 .composer-shell,
  html.shell-v2.shell-v2-desktop body.shell-v2 .composer-shell {
    background: transparent !important;
    background-image: none !important;
  }

  html.shell-v2-desktop body.shell-v2 form.composer#composer,
  html.shell-v2-desktop body.shell-v2 .composer-shell:has(.queued-send-card) form.composer#composer {
    position: relative !important;
    z-index: 1 !important;
    border-color: color-mix(in srgb, var(--v2-border) 78%, transparent) !important;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .105) !important;
    contain: layout !important;
  }

  html.shell-v2-desktop.shell-v2-dark body.shell-v2 form.composer#composer,
  html.shell-v2-desktop.shell-v2-dark body.shell-v2 .composer-shell:has(.queued-send-card) form.composer#composer {
    box-shadow: 0 18px 44px rgba(0, 0, 0, .36) !important;
  }

  html.shell-v2-desktop body.shell-v2 form.composer#composer:focus-within {
    box-shadow: 0 18px 44px rgba(15, 23, 42, .12), 0 0 0 1px color-mix(in srgb, var(--v2-accent) 8%, transparent) !important;
  }

  /* Desktop content-to-sidebar shadow seal: only the content side casts into the thread list. */
  html.shell-v2-desktop body.shell-v2 {
    --v2-content-max: 840px;
    --v2-content-left-line: color-mix(in srgb, var(--v2-border) 42%, transparent);
    --v2-content-left-shadow: -10px 0 24px rgba(15, 23, 42, .028);
    --v2-sidebar-feather: linear-gradient(to left, rgba(15, 23, 42, .024), rgba(15, 23, 42, 0));
    --v2-topbar-feather: linear-gradient(to bottom, color-mix(in srgb, var(--v2-panel) 76%, transparent), color-mix(in srgb, var(--v2-panel) 0%, transparent));
    --v2-composer-feather: linear-gradient(to bottom, color-mix(in srgb, var(--v2-bg) 0%, transparent) 0%, color-mix(in srgb, var(--v2-bg) 18%, transparent) 46%, color-mix(in srgb, var(--v2-bg) 70%, transparent) 86%, var(--v2-bg) 100%);
    --v2-composer-feather-shadow: 0 -7px 16px rgba(15, 23, 42, .005);
  }

  html.shell-v2-desktop.shell-v2-dark body.shell-v2 {
    --v2-content-left-line: color-mix(in srgb, var(--v2-border) 62%, transparent);
    --v2-content-left-shadow: -12px 0 28px rgba(0, 0, 0, .22);
    --v2-sidebar-feather: linear-gradient(to left, rgba(0, 0, 0, .20), rgba(0, 0, 0, 0));
    --v2-topbar-feather: linear-gradient(to bottom, color-mix(in srgb, var(--v2-panel) 74%, transparent), color-mix(in srgb, var(--v2-panel) 0%, transparent));
    --v2-composer-feather: linear-gradient(to bottom, color-mix(in srgb, var(--v2-bg) 0%, transparent) 0%, color-mix(in srgb, var(--v2-bg) 20%, transparent) 46%, color-mix(in srgb, var(--v2-bg) 74%, transparent) 86%, var(--v2-bg) 100%);
    --v2-composer-feather-shadow: 0 -7px 18px rgba(0, 0, 0, .035);
  }

  html.shell-v2-desktop body.shell-v2 .app::before {
    content: "" !important;
    position: fixed !important;
    left: calc(var(--v2-sidebar-effective) - 42px) !important;
    top: var(--v2-header) !important;
    bottom: 0 !important;
    width: 42px !important;
    display: block !important;
    background: var(--v2-sidebar-feather) !important;
    pointer-events: none !important;
    z-index: 17 !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-menu,
  html.shell-v2-desktop body.shell-v2 .thread-menu.shell-v2-thread-menu-framed {
    box-shadow: none !important;
    border-right: 0 !important;
  }

  html.shell-v2-desktop body.shell-v2 .shell-v2-sidebar-toggle {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: color-mix(in srgb, var(--v2-muted) 70%, transparent) !important;
    opacity: .82 !important;
  }

  html.shell-v2-desktop body.shell-v2 .shell-v2-sidebar-toggle:hover,
  html.shell-v2-desktop body.shell-v2 .shell-v2-sidebar-toggle:active {
    background: transparent !important;
    color: color-mix(in srgb, var(--v2-text) 58%, var(--v2-muted)) !important;
    box-shadow: none !important;
  }

  html.shell-v2-desktop body.shell-v2 .shell-v2-sidebar-toggle svg {
    width: 16px !important;
    height: 16px !important;
    stroke-width: 1.8 !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-menu .thread-option,
  html.shell-v2-desktop body.shell-v2 .thread-menu .pinned-thread-option,
  html.shell-v2-desktop body.shell-v2 .thread-menu .thread-option-title,
  html.shell-v2-desktop body.shell-v2 .thread-menu .pinned-thread-name,
  html.shell-v2-desktop body.shell-v2 .thread-menu [class*="title"],
  html.shell-v2-desktop body.shell-v2 .thread-menu [class*="name"] {
    font-size: 14px !important;
    line-height: 1.28 !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-menu .thread-option-state,
  html.shell-v2-desktop body.shell-v2 .thread-menu .pinned-thread-meta,
  html.shell-v2-desktop body.shell-v2 .thread-menu [class*="time"],
  html.shell-v2-desktop body.shell-v2 .thread-menu [class*="meta"] {
    font-size: 12px !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread,
  html.shell-v2-desktop body.shell-v2 .composer-shell {
    border-left: 1px solid var(--v2-content-left-line) !important;
    box-shadow: var(--v2-content-left-shadow) !important;
  }

  html.shell-v2-desktop body.shell-v2 .topbar {
    gap: 6px !important;
    border-left: 1px solid var(--v2-content-left-line) !important;
    border-bottom-color: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  html.shell-v2-desktop body.shell-v2 .topbar::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: -18px !important;
    height: 18px !important;
    display: block !important;
    background: var(--v2-topbar-feather) !important;
    pointer-events: none !important;
    z-index: -1 !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-button {
    margin-left: -2px !important;
    padding-left: 4px !important;
  }

  /* Desktop queue/recent final seal: no thread capsules on desktop, queue cards anchor above the composer. */
  html.shell-v2-desktop body.shell-v2 {
    --recent-thread-strip-height: 0px !important;
  }

  html.shell-v2-desktop body.shell-v2 .shell-v2-recent-threads,
  html.shell-v2-desktop body.shell-v2 .shell-v2-recent-thread-chip {
    display: none !important;
    pointer-events: none !important;
  }

  html.shell-v2-desktop body.shell-v2 #queued-send.queued-send-bar:has(.queued-send-card),
  html.shell-v2-desktop body.shell-v2 .queued-send-bar.is-visible:has(.queued-send-card) {
    position: absolute !important;
    left: 50% !important;
    right: auto !important;
    top: auto !important;
    bottom: calc(100% - 16px) !important;
    width: min(calc(var(--v2-desktop-composer-width) - 96px), calc(100vw - var(--v2-sidebar-effective) - 132px)) !important;
    max-width: min(calc(var(--v2-desktop-composer-width) - 96px), calc(100vw - var(--v2-sidebar-effective) - 132px)) !important;
    max-height: min(28vh, 128px) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: translateX(-50%) !important;
    overflow: visible !important;
    z-index: 0 !important;
    pointer-events: auto !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  html.shell-v2-desktop body.shell-v2 #queued-send.queued-send-bar:has(.queued-send-card) .queued-send-card,
  html.shell-v2-desktop body.shell-v2 .queued-send-bar.is-visible:has(.queued-send-card) .queued-send-card {
    border-radius: 14px !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .05), 0 1px 0 rgba(255, 255, 255, .92) inset !important;
  }

  html.shell-v2-desktop.shell-v2-dark body.shell-v2 #queued-send.queued-send-bar:has(.queued-send-card) .queued-send-card,
  html.shell-v2-desktop.shell-v2-dark body.shell-v2 .queued-send-bar.is-visible:has(.queued-send-card) .queued-send-card {
    box-shadow: 0 12px 34px rgba(0, 0, 0, .30), 0 1px 0 rgba(255, 255, 255, .045) inset !important;
  }

}

/* Desktop sidebar/settings layer seal: keep settings inside the sidebar and let
   the content edge cast onto the thread list without stealing clicks. */
@media (min-width: 901px) {
  html.shell-v2-desktop body.shell-v2 {
    --v2-sidebar-settings-width: max(220px, calc(var(--v2-sidebar-effective) - 20px));
    --v2-sidebar-shadow-line: color-mix(in srgb, var(--v2-border) 24%, transparent);
    --v2-sidebar-shadow-cast: linear-gradient(to left, rgba(15, 23, 42, .024), rgba(15, 23, 42, 0));
    --v2-sidebar-current-bg: color-mix(in srgb, var(--v2-accent) 10%, #ebe8ef 90%);
  }

  html.shell-v2-desktop.shell-v2-dark body.shell-v2 {
    --v2-sidebar-shadow-cast: linear-gradient(to left, rgba(0, 0, 0, .14), rgba(0, 0, 0, 0));
    --v2-sidebar-current-bg: color-mix(in srgb, var(--v2-accent) 16%, var(--v2-panel) 84%);
  }

  html.shell-v2-desktop body.shell-v2 .thread-menu,
  html.shell-v2-desktop body.shell-v2 .thread-menu.shell-v2-thread-menu-framed {
    position: relative !important;
    z-index: 8 !important;
    overflow-x: hidden !important;
    box-shadow: none !important;
  }

  html.shell-v2-desktop body.shell-v2 .app::before {
    left: calc(var(--v2-sidebar-effective) - 38px) !important;
    top: 0 !important;
    width: 38px !important;
    background: var(--v2-sidebar-shadow-cast) !important;
    z-index: 22 !important;
    pointer-events: none !important;
  }

  html.shell-v2-desktop body.shell-v2 .app::after {
    content: "" !important;
    position: fixed !important;
    left: calc(var(--v2-sidebar-effective) - 1px) !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 1px !important;
    display: block !important;
    background: var(--v2-sidebar-shadow-line) !important;
    pointer-events: none !important;
    z-index: 23 !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread,
  html.shell-v2-desktop body.shell-v2 .composer-shell {
    z-index: 18 !important;
  }

  html.shell-v2-desktop body.shell-v2 .topbar {
    z-index: 20 !important;
    box-shadow: none !important;
  }

  html.shell-v2-desktop body.shell-v2 .settings-card {
    left: 10px !important;
    right: auto !important;
    top: 10px !important;
    bottom: 10px !important;
    width: var(--v2-sidebar-settings-width) !important;
    max-width: calc(var(--v2-sidebar-effective) - 20px) !important;
    height: calc(100dvh - 20px) !important;
    max-height: calc(100dvh - 20px) !important;
    z-index: 60 !important;
    border-color: color-mix(in srgb, var(--v2-border) 58%, transparent) !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .042) !important;
    transform: translateX(calc(-100% - 12px)) !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-menu .thread-option[aria-current="true"],
  html.shell-v2-desktop body.shell-v2 .thread-menu .pinned-thread-option[aria-current="true"] {
    background: var(--v2-sidebar-current-bg) !important;
    color: var(--v2-text) !important;
  }

  html.shell-v2-desktop body.shell-v2 .settings-card.is-open,
  html.shell-v2-desktop body.shell-v2.shell-v2-settings-open .settings-card {
    transform: translateX(0) !important;
  }

  html.shell-v2-desktop.shell-v2-dark body.shell-v2 .settings-card {
    box-shadow: 0 12px 28px rgba(0, 0, 0, .18) !important;
  }
}

/* Mobile keyboard final seal: keep the composer tied to the real keyboard offset. */
html.shell-v2-mobile body.shell-v2.keyboard-open .composer-shell {
  --shell-v2-keyboard-join-overlap: 6px;
  animation: none !important;
  transform: translate3d(0, calc(var(--shell-v2-keyboard-join-overlap, 0px) - var(--shell-v2-keyboard-offset, var(--keyboard-shift, 0px))), 0) !important;
  transition: none !important;
}

/* Final micro interaction polish: shared feedback, keyboard clarity, no layout shift. */
html.shell-v2 body.shell-v2 .send-btn,
html.shell-v2 body.shell-v2 .shell-v2-recent-thread-chip,
html.shell-v2 body.shell-v2 .thread-option,
html.shell-v2 body.shell-v2 .pinned-thread-option,
html.shell-v2 body.shell-v2 .canonical-dock-card,
html.shell-v2 body.shell-v2 .canonical-dock-card button {
  -webkit-tap-highlight-color: transparent !important;
}

html.shell-v2 body.shell-v2 .send-btn:focus-visible,
html.shell-v2 body.shell-v2 .shell-v2-recent-thread-chip:focus-visible {
  outline: none !important;
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--v2-accent) 18%, transparent),
    var(--v2-control-shadow) !important;
}

html.shell-v2 body.shell-v2 .send-btn:active,
html.shell-v2 body.shell-v2 .shell-v2-recent-thread-chip:active {
  transform: scale(.975) !important;
}

html.shell-v2 body.shell-v2 form.composer#composer {
  transition:
    border-color var(--v2-motion-standard),
    box-shadow var(--v2-motion-standard),
    background-color var(--v2-motion-standard) !important;
}

html.shell-v2 body.shell-v2 form.composer#composer:focus-within {
  border-color: color-mix(in srgb, var(--v2-accent) 24%, var(--v2-border)) !important;
}

html.shell-v2 body.shell-v2 form.composer#composer textarea {
  caret-color: var(--v2-accent) !important;
}

html.shell-v2 body.shell-v2 .thread-menu .thread-option,
html.shell-v2 body.shell-v2 .thread-menu .pinned-thread-option {
  transition:
    color var(--v2-motion-fast),
    background-color var(--v2-motion-fast),
    box-shadow var(--v2-motion-fast) !important;
}

html.shell-v2 body.shell-v2 .thread-menu .thread-option:focus-visible,
html.shell-v2 body.shell-v2 .thread-menu .pinned-thread-option:focus-visible {
  outline: none !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--v2-accent) 26%, transparent), var(--v2-focus-ring) !important;
}

@media (hover: hover) and (pointer: fine) {
  html.shell-v2 body.shell-v2 .thread-menu .thread-option:hover:not([aria-current="true"]),
  html.shell-v2 body.shell-v2 .thread-menu .pinned-thread-option:hover:not([aria-current="true"]) {
    background: color-mix(in srgb, var(--v2-control-bg) 66%, transparent) !important;
  }

  html.shell-v2 body.shell-v2 a:not(.shell-v2-reader-open):not(.file-attachment-preview):not(.shell-v2-image-thumb):not(.shell-v2-image-viewer-download):hover {
    text-decoration-thickness: 1px !important;
    text-underline-offset: 3px !important;
  }
}

html.shell-v2 body.shell-v2 #thread,
html.shell-v2 body.shell-v2 .shell-v2-thread-menu-scroll {
  scrollbar-width: thin !important;
  scrollbar-color: transparent transparent !important;
}

@media (hover: hover) and (pointer: fine) {
  html.shell-v2 body.shell-v2 #thread:hover,
  html.shell-v2 body.shell-v2 .shell-v2-thread-menu-scroll:hover {
    scrollbar-color: color-mix(in srgb, var(--v2-muted) 34%, transparent) transparent !important;
  }

  html.shell-v2 body.shell-v2 #thread::-webkit-scrollbar,
  html.shell-v2 body.shell-v2 .shell-v2-thread-menu-scroll::-webkit-scrollbar {
    width: 8px !important;
  }

  html.shell-v2 body.shell-v2 #thread::-webkit-scrollbar-thumb,
  html.shell-v2 body.shell-v2 .shell-v2-thread-menu-scroll::-webkit-scrollbar-thumb {
    border: 2px solid transparent !important;
    border-radius: 999px !important;
    background: transparent !important;
    background-clip: padding-box !important;
  }

  html.shell-v2 body.shell-v2 #thread:hover::-webkit-scrollbar-thumb,
  html.shell-v2 body.shell-v2 .shell-v2-thread-menu-scroll:hover::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--v2-muted) 34%, transparent) !important;
    background-clip: padding-box !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.shell-v2 body.shell-v2 form.composer#composer,
  html.shell-v2 body.shell-v2 .thread-option,
  html.shell-v2 body.shell-v2 .pinned-thread-option,
  html.shell-v2 body.shell-v2 .canonical-dock-card,
  html.shell-v2 body.shell-v2 .canonical-dock-card button {
    transition: none !important;
    transform: none !important;
  }
}

html.shell-v2 body.shell-v2 .shell-v2-recent-thread-chip[aria-current="true"],
html.shell-v2 body.shell-v2 .shell-v2-recent-thread-chip.is-active {
  background: color-mix(in srgb, var(--v2-accent) 9%, var(--v2-panel)) !important;
  border-color: color-mix(in srgb, var(--v2-accent) 28%, var(--v2-line-soft)) !important;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--v2-accent) 8%, transparent) !important;
}

/* Desktop send button final refinement: keep the corner action quieter than the composer. */
html.shell-v2-desktop body.shell-v2 form.composer#composer .send-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--v2-text) 84%, var(--v2-muted)) !important;
  color: var(--v2-panel) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08) !important;
  transition: background-color 140ms ease, box-shadow 140ms ease, transform 110ms ease !important;
}

html.shell-v2-desktop body.shell-v2 form.composer#composer .send-btn svg,
html.shell-v2-desktop body.shell-v2 form.composer#composer .send-btn .shell-v2-send-icon {
  width: 17px !important;
  height: 17px !important;
  stroke-width: 1.9 !important;
}

html.shell-v2-desktop body.shell-v2 form.composer#composer .send-btn:focus-visible {
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--v2-accent) 16%, transparent),
    0 1px 2px rgba(15, 23, 42, .08) !important;
}

@media (hover: hover) and (pointer: fine) {
  html.shell-v2-desktop body.shell-v2 form.composer#composer .send-btn:hover:not(:disabled) {
    background: color-mix(in srgb, var(--v2-text) 90%, var(--v2-muted)) !important;
    box-shadow: 0 2px 5px rgba(15, 23, 42, .12) !important;
  }
}

html.shell-v2-desktop body.shell-v2 form.composer#composer .send-btn:disabled {
  opacity: .42 !important;
  background: color-mix(in srgb, var(--v2-muted) 58%, var(--v2-panel-muted)) !important;
}

html.shell-v2-desktop.shell-v2-dark body.shell-v2 form.composer#composer .send-btn {
  background: color-mix(in srgb, var(--v2-text) 78%, var(--v2-muted)) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .22) !important;
}

/* Desktop process rhythm: keep final answers roomy, compact only transient process rows. */
html.shell-v2-desktop body.shell-v2 .process-tool-row {
  margin-top: 1px !important;
  margin-bottom: 2px !important;
  line-height: 1.15 !important;
}

html.shell-v2-desktop body.shell-v2 .process-tool {
  font-size: 10.8px !important;
  line-height: 1.15 !important;
}

/* Codex-like answer typography: make final results easier to scan without
   touching transient process rows. */
html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body {
  color: color-mix(in srgb, var(--v2-text) 97%, var(--v2-muted)) !important;
  font-variant-numeric: tabular-nums !important;
  letter-spacing: 0 !important;
}

html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body > :first-child {
  margin-top: 0 !important;
}

html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body > :last-child {
  margin-bottom: 0 !important;
}

html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body p {
  margin-block: .52em !important;
  line-height: 1.62 !important;
}

html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body ol,
html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body ul {
  margin-block: .62em .72em !important;
  padding-inline-start: 1.55em !important;
}

html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body li {
  margin-block: .46em !important;
  padding-inline-start: .22em !important;
  line-height: 1.62 !important;
}

html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body li > p {
  margin-block: .28em !important;
}

html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body.shell-v2-answer-list-normalized ol {
  padding-inline-start: 1.9em !important;
}

html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body.shell-v2-answer-list-normalized li > p {
  margin-block: .42em .18em !important;
  color: color-mix(in srgb, var(--v2-text) 92%, var(--v2-muted)) !important;
}

html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body li::marker {
  color: color-mix(in srgb, var(--v2-text) 88%, var(--v2-muted)) !important;
  font-weight: 500 !important;
}

html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body ol ol,
html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body ol ul,
html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body ul ol,
html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body ul ul {
  margin-block: .28em .36em !important;
  padding-inline-start: 1.35em !important;
}

html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body blockquote {
  margin: .74em 0 !important;
  padding: .1em 0 .1em 1em !important;
  border-left: 2px solid color-mix(in srgb, var(--v2-muted) 18%, transparent) !important;
  color: color-mix(in srgb, var(--v2-text) 84%, var(--v2-muted)) !important;
}

html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body pre {
  margin-block: .72em !important;
  line-height: 1.54 !important;
}

html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body code {
  font-size: .94em !important;
}

@media (min-width: 901px) {
  html.shell-v2-desktop body.shell-v2 .message.assistant .bubble.markdown-body {
    font-size: 15.25px !important;
    line-height: 1.62 !important;
  }

  html.shell-v2-desktop body.shell-v2 .message.assistant .bubble.markdown-body ol,
  html.shell-v2-desktop body.shell-v2 .message.assistant .bubble.markdown-body ul {
    padding-inline-start: 1.75em !important;
  }

  html.shell-v2-desktop body.shell-v2 .message.assistant .bubble.markdown-body.shell-v2-answer-list-normalized ol {
    padding-inline-start: 2.05em !important;
  }

  html.shell-v2-desktop body.shell-v2 .message.assistant .bubble.markdown-body li {
    padding-inline-start: .28em !important;
  }
}

@media (max-width: 900px) {
  html.shell-v2-mobile body.shell-v2 .message.assistant .bubble.markdown-body {
    font-size: 15px !important;
    line-height: 1.58 !important;
  }

  html.shell-v2-mobile body.shell-v2 .message.assistant .bubble.markdown-body p {
    margin-block: .5em !important;
    font-size: 15px !important;
    line-height: 1.58 !important;
  }

  html.shell-v2-mobile body.shell-v2 .message.assistant .bubble.markdown-body ol,
  html.shell-v2-mobile body.shell-v2 .message.assistant .bubble.markdown-body ul {
    padding-inline-start: 1.42em !important;
    margin-block: .58em .68em !important;
  }

  html.shell-v2-mobile body.shell-v2 .message.assistant .bubble.markdown-body.shell-v2-answer-list-normalized ol {
    padding-inline-start: 1.65em !important;
  }

  html.shell-v2-mobile body.shell-v2 .message.assistant .bubble.markdown-body li {
    margin-block: .42em !important;
    padding-inline-start: .18em !important;
    font-size: 15px !important;
    line-height: 1.58 !important;
  }

  html.shell-v2-mobile body.shell-v2 .message.assistant .bubble.markdown-body code,
  html.shell-v2-mobile body.shell-v2 .process-tool,
  html.shell-v2-mobile body.shell-v2 .process-tool-row {
    font-size: 12.5px !important;
    line-height: 1.28 !important;
  }
}

/* 2026-07-08 table rendering restore: clear Markdown tables without changing
   surrounding message, queue, goal, or composer layout. */
html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body table {
  width: 100% !important;
  max-width: 100% !important;
  margin: .82em 0 .9em !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  outline: 0 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: color-mix(in srgb, var(--v2-text) 92%, var(--v2-muted)) !important;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, .035),
    0 2px 8px rgba(15, 23, 42, .018) !important;
}

html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body thead,
html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body tbody,
html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body tr {
  background: transparent !important;
}

html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body th,
html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body td {
  padding: 9px 11px !important;
  border: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  line-height: 1.42 !important;
  vertical-align: top !important;
}

html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body th {
  background: color-mix(in srgb, #f8fafc 88%, var(--v2-accent) 12%) !important;
  color: color-mix(in srgb, var(--v2-text) 86%, var(--v2-muted)) !important;
  font-weight: 600 !important;
}

html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body td {
  background: #fff !important;
  color: color-mix(in srgb, var(--v2-text) 90%, var(--v2-muted)) !important;
  font-weight: 400 !important;
}

html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body tbody tr:nth-child(even) td {
  background: #f8fafc !important;
}

html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body thead th {
  border-bottom: 1px solid color-mix(in srgb, var(--v2-border) 62%, white) !important;
}

html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body th:not(:last-child),
html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body td:not(:last-child) {
  border-right: 1px solid color-mix(in srgb, var(--v2-border) 62%, white) !important;
}

html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body tbody tr:not(:last-child) td {
  border-bottom: 1px solid color-mix(in srgb, var(--v2-border) 62%, white) !important;
}

html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body .table-scroll {
  margin: .82em 0 .12em !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body .table-scroll + .shell-v2-block-copy-bar {
  min-height: 24px !important;
  margin: 0 0 .72em !important;
  padding: 0 2px !important;
  border: 0 !important;
  outline: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html.shell-v2 body.shell-v2 article.message .bubble pre,
html.shell-v2 body.shell-v2 article.message .bubble code,
html.shell-v2 body.shell-v2 article.message .bubble table {
  max-width: 100% !important;
}

html.shell-v2 body.shell-v2 article.message .bubble pre,
html.shell-v2 body.shell-v2 article.message .bubble .table-scroll {
  overflow-x: auto !important;
}

@media (max-width: 900px) {
  html.shell-v2-mobile body.shell-v2 .message.assistant .bubble.markdown-body table {
    margin-block: .72em .78em !important;
    border-radius: 9px !important;
  }

  html.shell-v2-mobile body.shell-v2 .message.assistant .bubble.markdown-body .table-scroll {
    margin-block: .72em .1em !important;
  }

  html.shell-v2-mobile body.shell-v2 .message.assistant .bubble.markdown-body th,
  html.shell-v2-mobile body.shell-v2 .message.assistant .bubble.markdown-body td {
    padding: 8px 9px !important;
    line-height: 1.38 !important;
  }
}

/* Product polish 2026-07-13: one quiet interaction language across desktop
   and mobile. This layer deliberately avoids geometry changes while a thread
   is rendering, so visual feedback cannot pull the reader away from content. */
html.shell-v2 body.shell-v2 .thread,
html.shell-v2 body.shell-v2 .thread-menu .thread-option,
html.shell-v2 body.shell-v2 .thread-menu .pinned-thread-option,
html.shell-v2 body.shell-v2 .canonical-dock-card,
html.shell-v2 body.shell-v2 .canonical-dock-card button {
  transition-property: color, background-color, border-color, box-shadow, opacity !important;
  transition-duration: 140ms !important;
  transition-timing-function: ease !important;
}

html.shell-v2 body.shell-v2 .canonical-dock-card {
  border-color: color-mix(in srgb, var(--v2-border-soft) 88%, transparent) !important;
  background: color-mix(in srgb, var(--v2-panel) 96%, var(--v2-bg)) !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .025) !important;
}

html.shell-v2-dark body.shell-v2 .canonical-dock-card {
  box-shadow: 0 1px 2px rgba(0, 0, 0, .16) !important;
}

html.shell-v2 body.shell-v2 .canonical-dock-card:focus-within {
  border-color: color-mix(in srgb, var(--v2-accent) 24%, var(--v2-border-soft)) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--v2-accent) 8%, transparent) !important;
}

@media (min-width: 901px) {
  html.shell-v2-desktop body.shell-v2 {
    --v2-content-max: 812px;
    --v2-desktop-composer-width: min(960px, calc(100vw - var(--v2-sidebar-effective) - 80px));
    --v2-content-left-shadow: -8px 0 20px rgba(15, 23, 42, .022);
  }

  html.shell-v2-desktop.shell-v2-dark body.shell-v2 {
    --v2-content-left-shadow: -8px 0 22px rgba(0, 0, 0, .18);
  }

  html.shell-v2-desktop body.shell-v2 .thread {
    padding-top: 20px !important;
    padding-bottom: 16px !important;
  }

  html.shell-v2-desktop body.shell-v2 .topbar {
    min-height: 46px !important;
    background: color-mix(in srgb, var(--v2-panel) 97%, var(--v2-bg)) !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-menu .thread-option:hover:not([aria-current="true"]),
  html.shell-v2-desktop body.shell-v2 .thread-menu .pinned-thread-option:hover:not([aria-current="true"]) {
    background: color-mix(in srgb, var(--v2-control-bg) 82%, transparent) !important;
  }

  html.shell-v2-desktop body.shell-v2 form.composer#composer,
  html.shell-v2-desktop body.shell-v2 .composer-shell:has(.queued-send-card) form.composer#composer {
    box-shadow: 0 10px 28px rgba(15, 23, 42, .075) !important;
  }

  html.shell-v2-desktop.shell-v2-dark body.shell-v2 form.composer#composer,
  html.shell-v2-desktop.shell-v2-dark body.shell-v2 .composer-shell:has(.queued-send-card) form.composer#composer {
    box-shadow: 0 10px 28px rgba(0, 0, 0, .29) !important;
  }

  html.shell-v2-desktop body.shell-v2 form.composer#composer:focus-within {
    box-shadow: 0 12px 30px rgba(15, 23, 42, .09), 0 0 0 1px color-mix(in srgb, var(--v2-accent) 7%, transparent) !important;
  }
}

@media (max-width: 900px) {
  /* Mobile interaction seal: feedback stays at the chrome layer and never
     changes the thread's measured geometry or the reader's scroll anchor. */
  html.shell-v2 body.shell-v2 {
    --v2-header-shadow: 0 6px 16px rgba(15, 23, 42, .042);
    --v2-composer-shadow: 0 -7px 18px rgba(15, 23, 42, .052);
  }

  html.shell-v2-dark body.shell-v2 {
    --v2-header-shadow: 0 6px 16px rgba(0, 0, 0, .18);
    --v2-composer-shadow: 0 -7px 18px rgba(0, 0, 0, .24);
  }

  html.shell-v2 body.shell-v2.shell-v2-thread-switching .topbar::after {
    display: none !important;
    animation: none !important;
  }

  html.shell-v2 body.shell-v2 .thread {
    transition: opacity 120ms ease-out !important;
  }

  html.shell-v2 body.shell-v2.shell-v2-thread-warmup .thread {
    opacity: .985 !important;
    transform: none !important;
  }

  html.shell-v2 body.shell-v2 .thread-menu {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transition-duration: 160ms !important;
  }

  html.shell-v2 body.shell-v2 .thread-menu-scrim {
    background: rgba(15, 23, 42, .14) !important;
  }

  html.shell-v2-dark body.shell-v2 .thread-menu-scrim {
    background: rgba(0, 0, 0, .32) !important;
  }

  html.shell-v2 body.shell-v2 .shell-v2-recent-threads {
    bottom: calc(100% + var(--queued-send-height, 0px) + 8px) !important;
    scroll-padding-inline: 2px;
  }

  html.shell-v2 body.shell-v2 .shell-v2-recent-thread-chip {
    min-height: 32px !important;
    padding-inline: 12px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .025) !important;
  }

  html.shell-v2-dark body.shell-v2 .shell-v2-recent-thread-chip {
    box-shadow: 0 1px 3px rgba(0, 0, 0, .16) !important;
  }

  html.shell-v2 body.shell-v2 .shell-v2-recent-thread-chip:active,
  html.shell-v2 body.shell-v2 .thread-menu .thread-option:active,
  html.shell-v2 body.shell-v2 .thread-menu .pinned-thread-option:active {
    transform: none !important;
  }

  html.shell-v2 body.shell-v2 .topbar {
    border-bottom-color: transparent !important;
    box-shadow: var(--v2-header-shadow) !important;
  }

  html.shell-v2-dark body.shell-v2 .topbar {
    box-shadow: var(--v2-header-shadow) !important;
  }

  html.shell-v2 body.shell-v2 .thread,
  html.shell-v2 body.shell-v2.shell-v2-thread-warmup .thread {
    transform: none !important;
  }

  html.shell-v2 body.shell-v2.shell-v2-thread-warmup .thread {
    opacity: .985 !important;
  }

  html.shell-v2 body.shell-v2 .shell-v2-recent-thread-chip {
    background: color-mix(in srgb, var(--v2-panel) 94%, var(--v2-bg)) !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .025) !important;
  }

  html.shell-v2-dark body.shell-v2 .shell-v2-recent-thread-chip {
    box-shadow: 0 1px 3px rgba(0, 0, 0, .16) !important;
  }

  html.shell-v2 body.shell-v2 .shell-v2-recent-thread-chip[aria-current="true"],
  html.shell-v2 body.shell-v2 .shell-v2-recent-thread-chip.is-active {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--v2-accent) 10%, transparent), 0 2px 6px rgba(15, 23, 42, .035) !important;
  }

  html.shell-v2 body.shell-v2 .shell-v2-thread-menu-settings {
    box-shadow: 0 1px 3px rgba(15, 23, 42, .04) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.shell-v2 body.shell-v2 .thread,
  html.shell-v2 body.shell-v2 .thread-menu .thread-option,
  html.shell-v2 body.shell-v2 .thread-menu .pinned-thread-option,
  html.shell-v2 body.shell-v2 .canonical-dock-card,
  html.shell-v2 body.shell-v2 .canonical-dock-card button {
    transition: none !important;
  }
}

/* Thread switch stability seal: the conversation surface is handed off
   atomically, so opacity/transform animation only reads as a visible flash. */
html.shell-v2 body.shell-v2 .thread,
html.shell-v2 body.shell-v2.shell-v2-thread-warmup .thread {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

/* Interaction stability: keep async card actions in the same geometry while
   their real queue/goal request is pending. */
html.shell-v2 body.shell-v2 .canonical-dock-card button[aria-busy="true"] {
  opacity: .52 !important;
  cursor: progress !important;
  pointer-events: none !important;
  transform: none !important;
}

@media (max-width: 900px), (pointer: coarse) {
  html.shell-v2 body.shell-v2 .shell-v2-thread-menu-scroll {
    scroll-behavior: auto !important;
    scroll-snap-type: none !important;
    overflow-anchor: none !important;
  }
}

/* Copy hover stability seal: actions float over completed replies and never
   enter the message flow. Running placeholders have no useful copy action. */
@media (hover: hover) and (pointer: fine) {
  html.shell-v2 body.shell-v2 .message.assistant .bubble-wrap {
    position: relative !important;
  }

  html.shell-v2 body.shell-v2 .message.assistant .bubble-actions {
    display: flex !important;
    position: absolute !important;
    z-index: 3 !important;
    top: 0 !important;
    right: 0 !important;
    margin: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(-2px) !important;
    transition: opacity 120ms ease, transform 120ms ease !important;
  }

  html.shell-v2 body.shell-v2 .message.assistant:hover .bubble-actions,
  html.shell-v2 body.shell-v2 .message.assistant:focus-within .bubble-actions {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }

  html.shell-v2 body.shell-v2 .message.assistant.pending .bubble-actions,
  html.shell-v2 body.shell-v2 .message.assistant.thread-view-run .bubble-actions {
    display: none !important;
  }
}

/* Desktop BottomDock clearance seal: cards sit inside the composer's quiet
   top inset, while the scroll range reserves their measured height. The last
   message can therefore move fully above the cards without a dead visual gap. */
@media (min-width: 901px) {
  html.shell-v2-desktop body.shell-v2 #queued-send.canonical-bottom-dock {
    bottom: calc(100% - 8px) !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread {
    padding-bottom: calc(16px + var(--canonical-dock-height, 0px)) !important;
    scroll-padding-bottom: calc(16px + var(--canonical-dock-height, 0px)) !important;
  }
}

/* Desktop Codex typographic fidelity seal 2026-07-13.
   This final layer only refines hierarchy, color and feedback. Thread, dock,
   scroll and textarea geometry remain owned by their existing runtimes. */
@media (min-width: 901px) {
  html.shell-v2-desktop body.shell-v2 {
    --v2-bg: #ffffff;
    --v2-panel: #ffffff;
    --v2-panel-muted: #f6f6f7;
    --v2-panel-strong: #e9e9eb;
    --v2-control-bg: #f1f1f2;
    --v2-control-bg-hover: #e9e9eb;
    --v2-card-flat: #fafafa;
    --v2-border: #e5e5e7;
    --v2-border-soft: #ededee;
    --v2-line: rgba(31, 31, 34, .11);
    --v2-line-soft: rgba(31, 31, 34, .07);
    --v2-text: #242426;
    --v2-muted: #707074;
    --v2-faint: #95959a;
    --v2-accent: #765d91;
    --v2-accent-soft: #efedf2;
    --v2-accent-tint: #f5f3f7;
    --v2-focus-ring: 0 0 0 2px color-mix(in srgb, var(--v2-accent) 72%, transparent);
    --v2-header: 50px;
    --v2-desktop-content-rail: min(920px, calc(100vw - var(--v2-sidebar-effective) - 220px));
    --v2-content-max: var(--v2-desktop-content-rail);
    --v2-desktop-composer-width: var(--v2-desktop-content-rail);
    --v2-content-left-line: color-mix(in srgb, var(--v2-border) 82%, transparent);
    --v2-content-left-shadow: none;
    --v2-sidebar-panel: #f6f6f7;
    --v2-sidebar-current-bg: #e7e7e9;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, "PingFang SC", sans-serif !important;
    -webkit-font-smoothing: antialiased !important;
    text-rendering: optimizeLegibility !important;
  }

  html.shell-v2-desktop.shell-v2-dark body.shell-v2 {
    --v2-bg: #111113;
    --v2-panel: #171719;
    --v2-panel-muted: #1d1d20;
    --v2-panel-strong: #2a2a2e;
    --v2-control-bg: #242428;
    --v2-control-bg-hover: #2d2d32;
    --v2-card-flat: #1a1a1d;
    --v2-border: #343439;
    --v2-border-soft: #29292e;
    --v2-text: #f2f2f3;
    --v2-muted: #aaaab0;
    --v2-faint: #7f7f86;
    --v2-accent: #b9a4d0;
    --v2-accent-soft: #2a2630;
    --v2-accent-tint: #211e26;
    --v2-sidebar-panel: #19191c;
    --v2-sidebar-current-bg: #2a2a2f;
    --v2-content-left-line: color-mix(in srgb, var(--v2-border) 88%, transparent);
  }

  html.shell-v2-desktop body.shell-v2 .app::before {
    display: none !important;
  }

  html.shell-v2-desktop body.shell-v2 .app::after {
    background: var(--v2-content-left-line) !important;
  }

  html.shell-v2-desktop body.shell-v2 .topbar {
    height: var(--v2-header) !important;
    min-height: var(--v2-header) !important;
    padding-inline: 20px !important;
    border-left: 0 !important;
    border-bottom: 1px solid var(--v2-content-left-line) !important;
    background: var(--v2-panel) !important;
    box-shadow: none !important;
  }

  html.shell-v2-desktop body.shell-v2 .topbar::before {
    display: none !important;
  }

  html.shell-v2-desktop body.shell-v2 .topbar .thread-name,
  html.shell-v2-desktop body.shell-v2 .topbar .title,
  html.shell-v2-desktop body.shell-v2 .topbar h1 {
    color: var(--v2-text) !important;
    font-size: 14.5px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
  }

  html.shell-v2-desktop body.shell-v2 .topbar .thread-button {
    min-height: 32px !important;
    gap: 8px !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-menu,
  html.shell-v2-desktop body.shell-v2 .thread-menu.shell-v2-thread-menu-framed {
    padding-inline: 12px !important;
    background: var(--v2-sidebar-panel) !important;
    border-right: 0 !important;
    box-shadow: none !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-section-label {
    padding: 6px 10px 7px !important;
    color: color-mix(in srgb, var(--v2-muted) 88%, var(--v2-text)) !important;
    font-size: 10.5px !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
  }

  html.shell-v2-desktop body.shell-v2 .project-header {
    min-height: 32px !important;
    padding: 6px 9px !important;
    gap: 8px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: var(--v2-text) !important;
    box-shadow: none !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    transition: color var(--v2-motion-fast), background-color var(--v2-motion-fast) !important;
  }

  html.shell-v2-desktop body.shell-v2 .project-header .project-name {
    color: var(--v2-text) !important;
    font-weight: 600 !important;
  }

  html.shell-v2-desktop body.shell-v2 .project-header small {
    color: var(--v2-muted) !important;
    font-size: 11.5px !important;
    font-weight: 450 !important;
    line-height: 1.3 !important;
  }

  html.shell-v2-desktop body.shell-v2 .project-header .project-folder,
  html.shell-v2-desktop body.shell-v2 .project-header .project-folder svg {
    width: 15px !important;
    height: 15px !important;
    color: var(--v2-muted) !important;
    stroke: currentColor !important;
    stroke-width: 1.65 !important;
  }

  @media (hover: hover) and (pointer: fine) {
    html.shell-v2-desktop body.shell-v2 .project-header:hover {
      background: color-mix(in srgb, var(--v2-control-bg) 72%, transparent) !important;
    }
  }

  html.shell-v2-desktop body.shell-v2 .project-header:focus-visible {
    outline: none !important;
    box-shadow: var(--v2-focus-ring) !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-menu .thread-option,
  html.shell-v2-desktop body.shell-v2 .thread-menu .pinned-thread-option {
    min-height: 32px !important;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
    border-radius: 8px !important;
    color: color-mix(in srgb, var(--v2-text) 88%, var(--v2-muted)) !important;
    font-size: 13.5px !important;
    font-weight: 430 !important;
    line-height: 1.32 !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-menu .thread-option-title,
  html.shell-v2-desktop body.shell-v2 .thread-menu .pinned-thread-name {
    color: inherit !important;
    font-size: 13.5px !important;
    font-weight: 430 !important;
    line-height: 1.32 !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-menu .thread-option-state,
  html.shell-v2-desktop body.shell-v2 .thread-menu .pinned-thread-meta,
  html.shell-v2-desktop body.shell-v2 .thread-menu [class*="time"],
  html.shell-v2-desktop body.shell-v2 .thread-menu [class*="meta"] {
    color: var(--v2-muted) !important;
    font-size: 11.5px !important;
    font-weight: 400 !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-menu .thread-option[aria-current="true"],
  html.shell-v2-desktop body.shell-v2 .thread-menu .pinned-thread-option[aria-current="true"] {
    background: var(--v2-sidebar-current-bg) !important;
    color: var(--v2-text) !important;
    box-shadow: none !important;
  }

  @media (hover: hover) and (pointer: fine) {
    html.shell-v2-desktop body.shell-v2 .thread-menu .thread-option:hover:not([aria-current="true"]),
    html.shell-v2-desktop body.shell-v2 .thread-menu .pinned-thread-option:hover:not([aria-current="true"]) {
      background: color-mix(in srgb, var(--v2-control-bg) 74%, transparent) !important;
      color: var(--v2-text) !important;
    }
  }

  html.shell-v2-desktop body.shell-v2 .thread-menu .thread-option:focus-visible,
  html.shell-v2-desktop body.shell-v2 .thread-menu .pinned-thread-option:focus-visible {
    outline: none !important;
    box-shadow: var(--v2-focus-ring) !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread,
  html.shell-v2-desktop body.shell-v2 .composer-shell {
    border-left: 0 !important;
    box-shadow: none !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread {
    padding-top: 28px !important;
    background: var(--v2-bg) !important;
  }

  html.shell-v2-desktop body.shell-v2 .message {
    margin-bottom: 14px !important;
  }

  html.shell-v2-desktop body.shell-v2 #thread > article.message,
  html.shell-v2-desktop body.shell-v2 #queued-send.canonical-bottom-dock,
  html.shell-v2-desktop body.shell-v2 form.composer#composer,
  html.shell-v2-desktop body.shell-v2 .composer-shell:has(.queued-send-card) form.composer#composer {
    width: var(--v2-desktop-content-rail) !important;
    max-width: var(--v2-desktop-content-rail) !important;
  }

  html.shell-v2-desktop body.shell-v2 #thread > article.message {
    margin-inline: auto !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-view-run {
    margin-bottom: 10px !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-view-run .bubble-wrap {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    column-gap: 8px !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-view-run .meta {
    grid-column: 1 !important;
    margin: 0 !important;
    color: var(--v2-muted) !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    font-variant-numeric: tabular-nums !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-view-run .meta::after,
  html.shell-v2-desktop body.shell-v2 .thread-view-result.has-turn-timing .meta::after,
  html.shell-v2-desktop body.shell-v2 .thread-view-error.has-turn-timing .meta::after {
    content: "›" !important;
    display: inline-block !important;
    margin-left: 6px !important;
    color: var(--v2-faint) !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-view-run .bubble.markdown-body {
    grid-column: 2 !important;
    margin: 0 !important;
    color: var(--v2-muted) !important;
    font-size: 12.5px !important;
    line-height: 1.35 !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-view-run .bubble.markdown-body p {
    margin: 0 !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-view-result.has-turn-timing .meta,
  html.shell-v2-desktop body.shell-v2 .thread-view-error.has-turn-timing .meta {
    margin-bottom: 12px !important;
    color: var(--v2-muted) !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    font-variant-numeric: tabular-nums !important;
  }

  html.shell-v2-desktop body.shell-v2 .message.assistant.thread-view-result .bubble-actions,
  html.shell-v2-desktop body.shell-v2 .message.assistant.thread-view-error .bubble-actions {
    position: static !important;
    min-height: 26px !important;
    height: 26px !important;
    margin: 3px 0 0 !important;
    opacity: .62 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
  }

  @media (hover: hover) and (pointer: fine) {
    html.shell-v2-desktop body.shell-v2 .message.assistant.thread-view-result:hover .bubble-actions,
    html.shell-v2-desktop body.shell-v2 .message.assistant.thread-view-error:hover .bubble-actions {
      opacity: 1 !important;
    }
  }

  html.shell-v2-desktop body.shell-v2 .meta,
  html.shell-v2-desktop body.shell-v2 .day-note,
  html.shell-v2-desktop body.shell-v2 .attachment-note,
  html.shell-v2-desktop body.shell-v2 .memory-citation-note {
    color: var(--v2-muted) !important;
    font-size: 12px !important;
    font-weight: 450 !important;
    line-height: 1.35 !important;
  }

  html.shell-v2-desktop body.shell-v2 .message.assistant .bubble.markdown-body {
    color: var(--v2-text) !important;
    font-size: 15.5px !important;
    font-weight: 400 !important;
    line-height: 1.64 !important;
  }

  html.shell-v2-desktop body.shell-v2 .message.assistant .bubble.markdown-body p {
    margin-block: .56em !important;
    line-height: 1.64 !important;
  }

  html.shell-v2-desktop body.shell-v2 .message.assistant .bubble.markdown-body ol,
  html.shell-v2-desktop body.shell-v2 .message.assistant .bubble.markdown-body ul {
    margin-block: .58em .7em !important;
    padding-inline-start: 1.68em !important;
  }

  html.shell-v2-desktop body.shell-v2 .message.assistant .bubble.markdown-body li {
    margin-block: .38em !important;
    padding-inline-start: .24em !important;
    line-height: 1.64 !important;
  }

  html.shell-v2-desktop body.shell-v2 .message.assistant .bubble.markdown-body strong,
  html.shell-v2-desktop body.shell-v2 .message.assistant .bubble.markdown-body b {
    font-weight: 600 !important;
  }

  html.shell-v2-desktop body.shell-v2 .message.assistant .bubble.markdown-body h1,
  html.shell-v2-desktop body.shell-v2 .message.assistant .bubble.markdown-body h2,
  html.shell-v2-desktop body.shell-v2 .message.assistant .bubble.markdown-body h3,
  html.shell-v2-desktop body.shell-v2 .message.assistant .bubble.markdown-body h4 {
    color: var(--v2-text) !important;
    font-weight: 600 !important;
    letter-spacing: -.005em !important;
  }

  html.shell-v2-desktop body.shell-v2 .message.assistant .bubble.markdown-body :not(pre) > code {
    padding: .08em .34em !important;
    border: 0 !important;
    border-radius: 5px !important;
    background: var(--v2-control-bg) !important;
    color: color-mix(in srgb, var(--v2-text) 92%, var(--v2-muted)) !important;
    font-size: .92em !important;
  }

  html.shell-v2-desktop body.shell-v2 .message.user .bubble.markdown-body {
    max-width: min(72%, 680px) !important;
    padding: 10px 13px !important;
    border-color: var(--v2-border) !important;
    border-radius: 11px !important;
    background: #f7f7f8 !important;
    color: var(--v2-text) !important;
    font-size: 14.5px !important;
    font-weight: 400 !important;
    line-height: 1.55 !important;
  }

  html.shell-v2-desktop.shell-v2-dark body.shell-v2 .message.user .bubble.markdown-body {
    background: #202023 !important;
  }

  html.shell-v2.shell-v2-desktop body.shell-v2 .memory-citation-card {
    margin: 11px 0 2px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
  }

  html.shell-v2-desktop body.shell-v2 .memory-citation-card > summary {
    min-height: 34px !important;
    padding: 6px 3px !important;
    gap: 7px !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: transparent !important;
    color: var(--v2-muted) !important;
    transition: color var(--v2-motion-fast), background-color var(--v2-motion-fast) !important;
  }

  @media (hover: hover) and (pointer: fine) {
    html.shell-v2-desktop body.shell-v2 .memory-citation-card > summary:hover {
      background: color-mix(in srgb, var(--v2-control-bg) 54%, transparent) !important;
      color: var(--v2-text) !important;
    }
  }

  html.shell-v2-desktop body.shell-v2 .memory-citation-card > summary:focus-visible {
    outline: none !important;
    box-shadow: var(--v2-focus-ring) !important;
  }

  html.shell-v2-desktop body.shell-v2 .memory-citation-icon {
    width: 17px !important;
    height: 17px !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--v2-muted) !important;
    box-shadow: none !important;
    font-size: 12px !important;
    line-height: 17px !important;
  }

  html.shell-v2-desktop body.shell-v2 .memory-citation-title {
    color: inherit !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    line-height: 1.35 !important;
  }

  html.shell-v2-desktop body.shell-v2 .memory-citation-count {
    color: var(--v2-muted) !important;
    font-size: 11.5px !important;
    font-weight: 450 !important;
    line-height: 1.3 !important;
  }

  html.shell-v2-desktop body.shell-v2 .memory-citation-list {
    padding: 2px 3px 8px 27px !important;
  }

  html.shell-v2-desktop body.shell-v2 .memory-citation-item {
    padding: 8px 10px !important;
    border: 1px solid var(--v2-border-soft) !important;
    border-radius: 8px !important;
    background: var(--v2-panel-muted) !important;
    color: var(--v2-text) !important;
  }

  html.shell-v2-desktop body.shell-v2 .bubble .file-attachment-preview,
  html.shell-v2-desktop body.shell-v2 .bubble a.file-attachment-preview,
  html.shell-v2-desktop body.shell-v2 .file-attachment-preview.shell-v2-readable-file {
    min-height: 38px !important;
    padding: 9px 11px !important;
    border-color: var(--v2-border-soft) !important;
    border-radius: 8px !important;
    background: var(--v2-panel) !important;
    color: var(--v2-text) !important;
    box-shadow: none !important;
    font-size: 12.5px !important;
    line-height: 1.35 !important;
  }

  html.shell-v2-desktop body.shell-v2 .file-attachment-ext,
  html.shell-v2-desktop body.shell-v2 .attachment-ext,
  html.shell-v2-desktop body.shell-v2 .attachment-type {
    color: var(--v2-muted) !important;
    font-size: 10.5px !important;
    font-weight: 600 !important;
  }

  html.shell-v2-desktop body.shell-v2 .process-tool,
  html.shell-v2-desktop body.shell-v2 .process-tool-row {
    color: var(--v2-muted) !important;
    font-size: 11px !important;
    font-weight: 400 !important;
  }

  html.shell-v2-desktop body.shell-v2 .tool-call,
  html.shell-v2-desktop body.shell-v2 .process-tool-pill {
    border-color: var(--v2-border-soft) !important;
    background: var(--v2-panel-muted) !important;
    color: var(--v2-muted) !important;
    box-shadow: none !important;
  }

  html.shell-v2-desktop body.shell-v2 .composer-shell {
    padding: 10px 24px 14px !important;
    background: linear-gradient(
      to top,
      var(--v2-bg) 74%,
      color-mix(in srgb, var(--v2-bg) 84%, transparent) 90%,
      transparent 100%
    ) !important;
  }

  html.shell-v2-desktop body.shell-v2 .composer-shell::before {
    background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--v2-bg) 82%, transparent), var(--v2-bg)) !important;
    box-shadow: none !important;
  }

  html.shell-v2-desktop body.shell-v2 form.composer#composer,
  html.shell-v2-desktop body.shell-v2 .composer-shell:has(.queued-send-card) form.composer#composer {
    width: var(--v2-desktop-composer-width) !important;
    max-width: var(--v2-desktop-composer-width) !important;
    min-height: 86px !important;
    padding: 11px 13px 9px !important;
    border-color: var(--v2-border) !important;
    border-radius: 19px !important;
    background: var(--v2-panel) !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .065), 0 1px 0 rgba(255, 255, 255, .9) inset !important;
    contain: layout paint !important;
  }

  html.shell-v2-desktop.shell-v2-dark body.shell-v2 form.composer#composer,
  html.shell-v2-desktop.shell-v2-dark body.shell-v2 .composer-shell:has(.queued-send-card) form.composer#composer {
    box-shadow: 0 10px 28px rgba(0, 0, 0, .26), 0 1px 0 rgba(255, 255, 255, .035) inset !important;
  }

  html.shell-v2-desktop body.shell-v2 form.composer#composer:focus-within {
    border-color: color-mix(in srgb, var(--v2-accent) 54%, var(--v2-border)) !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .07), var(--v2-focus-ring) !important;
  }

  html.shell-v2-desktop body.shell-v2 textarea#text {
    color: var(--v2-text) !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
  }

  html.shell-v2-desktop body.shell-v2 textarea#text::placeholder {
    color: var(--v2-muted) !important;
    opacity: .68 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
  }

  html.shell-v2-desktop body.shell-v2 form.composer#composer .context-status,
  html.shell-v2-desktop body.shell-v2 form.composer#composer .model-badge,
  html.shell-v2-desktop body.shell-v2 form.composer#composer .reasoning-badge,
  html.shell-v2-desktop body.shell-v2 form.composer#composer .permission-badge,
  html.shell-v2-desktop body.shell-v2 form.composer#composer .route-badge {
    color: var(--v2-muted) !important;
    font-size: 11.5px !important;
    font-weight: 450 !important;
  }

  html.shell-v2-desktop body.shell-v2 form.composer#composer .send-btn:focus-visible,
  html.shell-v2-desktop body.shell-v2 .shell-v2-sidebar-toggle:focus-visible,
  html.shell-v2-desktop body.shell-v2 .shell-v2-thread-menu-settings:focus-visible,
  html.shell-v2-desktop body.shell-v2 .bubble-copy-btn:focus-visible {
    outline: none !important;
    box-shadow: var(--v2-focus-ring) !important;
  }
}

/* Codex optical elevation activation 2026-07-13.
   Keep this activation last so legacy desktop seals cannot flatten the optical layer. */
@media (min-width: 901px) {
  html.shell-v2-desktop body.shell-v2 {
    --v2-focus-ring: 0 0 0 2px color-mix(in srgb, var(--v2-accent) 42%, transparent);
    --v2-content-edge-cast: linear-gradient(
      to left,
      rgba(30, 30, 33, .052) 0,
      rgba(30, 30, 33, .021) 42%,
      rgba(30, 30, 33, 0) 100%
    );
    --v2-composer-elevation:
      0 0 0 .5px rgba(28, 28, 30, .045),
      0 1px 2px rgba(28, 28, 30, .045),
      0 7px 22px rgba(28, 28, 30, .055),
      0 24px 58px rgba(28, 28, 30, .042),
      inset 0 1px 0 rgba(255, 255, 255, .94);
    --v2-card-elevation:
      0 0 0 .5px rgba(28, 28, 30, .025),
      0 1px 2px rgba(28, 28, 30, .035),
      0 5px 16px rgba(28, 28, 30, .038),
      inset 0 1px 0 rgba(255, 255, 255, .82);
    -moz-osx-font-smoothing: grayscale !important;
    font-kerning: normal !important;
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1 !important;
  }

  html.shell-v2-desktop.shell-v2-dark body.shell-v2 {
    --v2-content-edge-cast: linear-gradient(
      to left,
      rgba(0, 0, 0, .28) 0,
      rgba(0, 0, 0, .10) 48%,
      rgba(0, 0, 0, 0) 100%
    );
    --v2-composer-elevation:
      0 0 0 .5px rgba(255, 255, 255, .045),
      0 1px 2px rgba(0, 0, 0, .28),
      0 8px 24px rgba(0, 0, 0, .30),
      0 26px 64px rgba(0, 0, 0, .24),
      inset 0 1px 0 rgba(255, 255, 255, .055);
    --v2-card-elevation:
      0 0 0 .5px rgba(255, 255, 255, .035),
      0 1px 2px rgba(0, 0, 0, .24),
      0 6px 18px rgba(0, 0, 0, .22),
      inset 0 1px 0 rgba(255, 255, 255, .045);
  }

  html.shell-v2-desktop body.shell-v2 .app::before {
    content: "" !important;
    position: fixed !important;
    left: calc(var(--v2-sidebar-effective) - 24px) !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 24px !important;
    display: block !important;
    background: var(--v2-content-edge-cast) !important;
    pointer-events: none !important;
    z-index: 22 !important;
  }

  html.shell-v2-desktop body.shell-v2 .app::after {
    background: color-mix(in srgb, var(--v2-border) 68%, transparent) !important;
    box-shadow: 1px 0 0 rgba(255, 255, 255, .62) !important;
  }

  html.shell-v2-desktop body.shell-v2 .topbar {
    border-bottom-color: color-mix(in srgb, var(--v2-border) 66%, transparent) !important;
    box-shadow:
      0 1px 1px rgba(28, 28, 30, .022),
      0 5px 18px rgba(28, 28, 30, .018) !important;
  }

  html.shell-v2-desktop body.shell-v2 .topbar .thread-name,
  html.shell-v2-desktop body.shell-v2 .topbar .title,
  html.shell-v2-desktop body.shell-v2 .topbar h1 {
    font-size: 14.75px !important;
    font-weight: 600 !important;
    letter-spacing: -.008em !important;
  }

  html.shell-v2-desktop body.shell-v2 .project-header,
  html.shell-v2-desktop body.shell-v2 .project-header .project-name {
    font-size: 13.75px !important;
    letter-spacing: -.004em !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-menu .thread-option,
  html.shell-v2-desktop body.shell-v2 .thread-menu .pinned-thread-option,
  html.shell-v2-desktop body.shell-v2 .thread-menu .thread-option-title,
  html.shell-v2-desktop body.shell-v2 .thread-menu .pinned-thread-name {
    font-size: 13.5px !important;
    font-weight: 450 !important;
    line-height: 1.34 !important;
    letter-spacing: -.002em !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-menu .thread-option[aria-current="true"],
  html.shell-v2-desktop body.shell-v2 .thread-menu .pinned-thread-option[aria-current="true"] {
    box-shadow:
      0 1px 2px rgba(28, 28, 30, .026),
      inset 0 1px 0 rgba(255, 255, 255, .48),
      inset 0 0 0 .5px rgba(28, 28, 30, .026) !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-menu .thread-option[aria-current="true"] .thread-option-title,
  html.shell-v2-desktop body.shell-v2 .thread-menu .pinned-thread-option[aria-current="true"] .pinned-thread-name {
    font-weight: 500 !important;
  }

  html.shell-v2-desktop body.shell-v2 .thread-menu .thread-option-state,
  html.shell-v2-desktop body.shell-v2 .thread-menu .pinned-thread-meta,
  html.shell-v2-desktop body.shell-v2 .thread-menu [class*="time"],
  html.shell-v2-desktop body.shell-v2 .thread-menu [class*="meta"] {
    font-size: 11.5px !important;
    font-weight: 420 !important;
    letter-spacing: .002em !important;
  }

  html.shell-v2-desktop body.shell-v2 .meta,
  html.shell-v2-desktop body.shell-v2 .day-note,
  html.shell-v2-desktop body.shell-v2 .attachment-note,
  html.shell-v2-desktop body.shell-v2 .memory-citation-note {
    font-size: 11.75px !important;
    letter-spacing: .003em !important;
  }

  html.shell-v2-desktop body.shell-v2 .message.assistant .bubble.markdown-body {
    font-size: 15.25px !important;
    line-height: 1.62 !important;
    letter-spacing: -.003em !important;
  }

  html.shell-v2-desktop body.shell-v2 .message.assistant .bubble.markdown-body p,
  html.shell-v2-desktop body.shell-v2 .message.assistant .bubble.markdown-body li {
    line-height: 1.62 !important;
  }

  html.shell-v2-desktop body.shell-v2 .message.assistant .bubble.markdown-body p {
    margin-block: .52em !important;
  }

  html.shell-v2-desktop body.shell-v2 .message.assistant .bubble.markdown-body li {
    margin-block: .34em !important;
  }

  html.shell-v2-desktop body.shell-v2 .message.assistant .bubble.markdown-body :not(pre) > code {
    font-size: .91em !important;
    font-weight: 450 !important;
    letter-spacing: -.006em !important;
    box-shadow: inset 0 0 0 .5px rgba(28, 28, 30, .035) !important;
  }

  html.shell-v2-desktop body.shell-v2 .message.user .bubble.markdown-body {
    box-shadow:
      0 0 0 .5px rgba(28, 28, 30, .018),
      0 1px 2px rgba(28, 28, 30, .025),
      inset 0 1px 0 rgba(255, 255, 255, .72) !important;
  }

  html.shell-v2-desktop body.shell-v2 form.composer#composer,
  html.shell-v2-desktop body.shell-v2 .composer-shell:has(.queued-send-card) form.composer#composer {
    box-shadow: var(--v2-composer-elevation) !important;
  }

  html.shell-v2-desktop body.shell-v2 form.composer#composer:focus-within,
  html.shell-v2-desktop body.shell-v2 .composer-shell:has(.queued-send-card) form.composer#composer:focus-within {
    box-shadow: var(--v2-focus-ring), var(--v2-composer-elevation) !important;
  }

  html.shell-v2-desktop body.shell-v2 #queued-send .canonical-dock-card,
  html.shell-v2-desktop body.shell-v2 #queued-send.queued-send-bar:has(.queued-send-card) .queued-send-card,
  html.shell-v2-desktop body.shell-v2 .queued-send-bar.is-visible:has(.queued-send-card) .queued-send-card {
    box-shadow: var(--v2-card-elevation) !important;
  }

  html.shell-v2-desktop body.shell-v2 .bubble .file-attachment-preview,
  html.shell-v2-desktop body.shell-v2 .bubble a.file-attachment-preview,
  html.shell-v2-desktop body.shell-v2 .file-attachment-preview.shell-v2-readable-file,
  html.shell-v2-desktop body.shell-v2 .memory-citation-item {
    box-shadow:
      0 0 0 .5px rgba(28, 28, 30, .018),
      0 1px 2px rgba(28, 28, 30, .028),
      inset 0 1px 0 rgba(255, 255, 255, .74) !important;
  }

  html.shell-v2-desktop body.shell-v2 .topbar button svg,
  html.shell-v2-desktop body.shell-v2 .project-header svg,
  html.shell-v2-desktop body.shell-v2 .shell-v2-sidebar-toggle svg,
  html.shell-v2-desktop body.shell-v2 .shell-v2-thread-menu-settings svg,
  html.shell-v2-desktop body.shell-v2 form.composer#composer .icon-btn svg,
  html.shell-v2-desktop body.shell-v2 form.composer#composer #attach svg,
  html.shell-v2-desktop body.shell-v2 form.composer#composer .send-btn svg,
  html.shell-v2-desktop body.shell-v2 .bubble-copy-btn svg,
  html.shell-v2-desktop body.shell-v2 .canonical-dock-card button svg,
  html.shell-v2-desktop body.shell-v2 .queued-send-card button svg {
    overflow: visible !important;
    shape-rendering: geometricPrecision !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    stroke-width: 1.65 !important;
  }

  html.shell-v2-desktop body.shell-v2 .topbar button svg *,
  html.shell-v2-desktop body.shell-v2 .project-header svg *,
  html.shell-v2-desktop body.shell-v2 .shell-v2-sidebar-toggle svg *,
  html.shell-v2-desktop body.shell-v2 .shell-v2-thread-menu-settings svg *,
  html.shell-v2-desktop body.shell-v2 form.composer#composer .icon-btn svg *,
  html.shell-v2-desktop body.shell-v2 form.composer#composer #attach svg *,
  html.shell-v2-desktop body.shell-v2 form.composer#composer .send-btn svg *,
  html.shell-v2-desktop body.shell-v2 .bubble-copy-btn svg *,
  html.shell-v2-desktop body.shell-v2 .canonical-dock-card button svg *,
  html.shell-v2-desktop body.shell-v2 .queued-send-card button svg * {
    vector-effect: non-scaling-stroke !important;
  }

  html.shell-v2-desktop body.shell-v2 .project-header .project-folder svg {
    width: 15.5px !important;
    height: 15.5px !important;
    stroke-width: 1.55 !important;
  }

  html.shell-v2-desktop body.shell-v2 form.composer#composer .send-btn svg,
  html.shell-v2-desktop body.shell-v2 form.composer#composer .send-btn .shell-v2-send-icon {
    width: 16.5px !important;
    height: 16.5px !important;
    stroke-width: 1.75 !important;
    transform: translate(.25px, -.15px) !important;
  }

  html.shell-v2-desktop body.shell-v2 form.composer#composer .send-btn {
    box-shadow:
      0 0 0 .5px rgba(0, 0, 0, .12),
      0 1px 2px rgba(0, 0, 0, .16),
      0 4px 10px rgba(0, 0, 0, .09),
      inset 0 1px 0 rgba(255, 255, 255, .12) !important;
  }

  html.shell-v2-desktop.shell-v2-dark body.shell-v2 .app::after {
    box-shadow: 1px 0 0 rgba(255, 255, 255, .018) !important;
  }

  html.shell-v2-desktop.shell-v2-dark body.shell-v2 .topbar {
    box-shadow:
      0 1px 1px rgba(0, 0, 0, .22),
      0 5px 18px rgba(0, 0, 0, .12) !important;
  }

  html.shell-v2-desktop.shell-v2-dark body.shell-v2 .thread-menu .thread-option[aria-current="true"],
  html.shell-v2-desktop.shell-v2-dark body.shell-v2 .thread-menu .pinned-thread-option[aria-current="true"] {
    box-shadow:
      0 1px 2px rgba(0, 0, 0, .20),
      inset 0 1px 0 rgba(255, 255, 255, .035),
      inset 0 0 0 .5px rgba(255, 255, 255, .025) !important;
  }

  html.shell-v2-desktop.shell-v2-dark body.shell-v2 .message.user .bubble.markdown-body {
    box-shadow:
      0 0 0 .5px rgba(255, 255, 255, .022),
      0 1px 2px rgba(0, 0, 0, .22),
      inset 0 1px 0 rgba(255, 255, 255, .025) !important;
  }

  html.shell-v2-desktop.shell-v2-dark body.shell-v2 form.composer#composer,
  html.shell-v2-desktop.shell-v2-dark body.shell-v2 .composer-shell:has(.queued-send-card) form.composer#composer {
    box-shadow: var(--v2-composer-elevation) !important;
  }

  html.shell-v2-desktop.shell-v2-dark body.shell-v2 form.composer#composer:focus-within,
  html.shell-v2-desktop.shell-v2-dark body.shell-v2 .composer-shell:has(.queued-send-card) form.composer#composer:focus-within {
    box-shadow: var(--v2-focus-ring), var(--v2-composer-elevation) !important;
  }

  html.shell-v2-desktop.shell-v2-dark body.shell-v2 #queued-send .canonical-dock-card,
  html.shell-v2-desktop.shell-v2-dark body.shell-v2 #queued-send.queued-send-bar:has(.queued-send-card) .queued-send-card,
  html.shell-v2-desktop.shell-v2-dark body.shell-v2 .queued-send-bar.is-visible:has(.queued-send-card) .queued-send-card {
    box-shadow: var(--v2-card-elevation) !important;
  }

  html.shell-v2-desktop.shell-v2-dark body.shell-v2 .bubble .file-attachment-preview,
  html.shell-v2-desktop.shell-v2-dark body.shell-v2 .bubble a.file-attachment-preview,
  html.shell-v2-desktop.shell-v2-dark body.shell-v2 .file-attachment-preview.shell-v2-readable-file,
  html.shell-v2-desktop.shell-v2-dark body.shell-v2 .memory-citation-item {
    box-shadow:
      0 0 0 .5px rgba(255, 255, 255, .02),
      0 1px 2px rgba(0, 0, 0, .18),
      inset 0 1px 0 rgba(255, 255, 255, .025) !important;
  }

  html.shell-v2-desktop.shell-v2-dark body.shell-v2 form.composer#composer .send-btn {
    box-shadow:
      0 0 0 .5px rgba(255, 255, 255, .035),
      0 1px 2px rgba(0, 0, 0, .28),
      0 4px 12px rgba(0, 0, 0, .22),
      inset 0 1px 0 rgba(255, 255, 255, .055) !important;
  }

  html.shell-v2-desktop body.shell-v2 form.composer#composer .send-btn:focus-visible {
    box-shadow:
      var(--v2-focus-ring),
      0 0 0 .5px rgba(0, 0, 0, .12),
      0 1px 2px rgba(0, 0, 0, .16),
      0 4px 10px rgba(0, 0, 0, .09),
      inset 0 1px 0 rgba(255, 255, 255, .12) !important;
  }

  @media (hover: hover) and (pointer: fine) {
    html.shell-v2-desktop body.shell-v2 form.composer#composer .send-btn:hover:not(:disabled) {
      box-shadow:
        0 0 0 .5px rgba(0, 0, 0, .14),
        0 2px 4px rgba(0, 0, 0, .18),
        0 6px 14px rgba(0, 0, 0, .11),
        inset 0 1px 0 rgba(255, 255, 255, .14) !important;
    }

    html.shell-v2-desktop body.shell-v2 .shell-v2-sidebar-toggle:hover,
    html.shell-v2-desktop body.shell-v2 .shell-v2-thread-menu-settings:hover,
    html.shell-v2-desktop body.shell-v2 .bubble-copy-btn:hover,
    html.shell-v2-desktop body.shell-v2 form.composer#composer #attach:hover {
      background: color-mix(in srgb, var(--v2-control-bg) 72%, transparent) !important;
      box-shadow:
        0 1px 2px rgba(28, 28, 30, .025),
        inset 0 0 0 .5px rgba(28, 28, 30, .025) !important;
    }
  }
}

/* 2026-07-14 mobile Codex parity pass. Mobile keeps one thread-switching
   surface, one content rail and one composer rail. Feedback states keep the
   same measured geometry so scrolling and the keyboard remain stable. */
@media (max-width: 900px) {
  html.shell-v2-mobile body.shell-v2 {
    --v2-mobile-header: calc(48px + env(safe-area-inset-top, 0px));
    --v2-mobile-content-edge: 14px;
    --v2-mobile-composer-edge: 10px;
    --v2-composer: 66px;
    --mobile-composer-height: 66px !important;
    --recent-thread-strip-height: 0px !important;
    --v2-mobile-composer-elevation:
      0 0 0 .5px rgba(28, 28, 30, .055),
      0 1px 2px rgba(28, 28, 30, .045),
      0 7px 22px rgba(28, 28, 30, .075),
      inset 0 1px 0 rgba(255, 255, 255, .82);
  }

  html.shell-v2-mobile.shell-v2-dark body.shell-v2 {
    --v2-mobile-composer-elevation:
      0 0 0 .5px rgba(255, 255, 255, .04),
      0 2px 4px rgba(0, 0, 0, .22),
      0 9px 26px rgba(0, 0, 0, .28),
      inset 0 1px 0 rgba(255, 255, 255, .045);
  }

  html.shell-v2-mobile body.shell-v2 .topbar {
    min-height: var(--v2-mobile-header) !important;
    height: var(--v2-mobile-header) !important;
    padding: env(safe-area-inset-top, 0px) 10px 0 !important;
    gap: 8px !important;
    border-bottom-color: color-mix(in srgb, var(--v2-border) 54%, transparent) !important;
    box-shadow: 0 1px 2px rgba(28, 28, 30, .028), 0 5px 16px rgba(28, 28, 30, .025) !important;
  }

  html.shell-v2-mobile body.shell-v2 .thread-button,
  html.shell-v2-mobile body.shell-v2 .shell-v2-quota-pill {
    height: 44px !important;
    min-height: 44px !important;
  }

  html.shell-v2-mobile body.shell-v2 .topbar .title,
  html.shell-v2-mobile body.shell-v2 .topbar .top-actions {
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    align-self: center !important;
    align-items: center !important;
    transform: none !important;
    top: auto !important;
  }

  html.shell-v2-mobile body.shell-v2 .topbar .title {
    display: flex !important;
  }

  html.shell-v2-mobile body.shell-v2 .thread-button {
    padding: 0 4px 0 2px !important;
    border-radius: 10px !important;
  }

  html.shell-v2-mobile body.shell-v2 .thread-name {
    font-size: 15px !important;
    font-weight: 640 !important;
    line-height: 1.2 !important;
    letter-spacing: -.008em !important;
  }

  html.shell-v2-mobile body.shell-v2 .shell-v2-quota-pill {
    padding: 0 3px !important;
    font-size: 11.25px !important;
    font-weight: 570 !important;
  }

  html.shell-v2-mobile body.shell-v2 .thread {
    padding: 14px var(--v2-mobile-content-edge) calc(25px + var(--canonical-dock-height, 0px)) !important;
    scroll-padding: 14px 0 calc(25px + var(--canonical-dock-height, 0px)) !important;
    overscroll-behavior-y: contain !important;
  }

  html.shell-v2-mobile body.shell-v2.keyboard-open .thread,
  html.shell-v2-mobile body.shell-v2 .thread.keyboard-open {
    padding-bottom: calc(25px + var(--canonical-dock-height, 0px)) !important;
    scroll-padding-bottom: calc(25px + var(--canonical-dock-height, 0px)) !important;
  }

  html.shell-v2-mobile body.shell-v2 .message {
    margin-bottom: 14px !important;
  }

  html.shell-v2-mobile body.shell-v2 .message .meta,
  html.shell-v2-mobile body.shell-v2 .day-note,
  html.shell-v2-mobile body.shell-v2 .attachment-note,
  html.shell-v2-mobile body.shell-v2 .memory-citation-note {
    font-size: 11.75px !important;
    font-weight: 470 !important;
    line-height: 1.3 !important;
  }

  html.shell-v2-mobile body.shell-v2 .message.assistant .bubble.markdown-body,
  html.shell-v2-mobile body.shell-v2 .message.assistant .bubble.markdown-body p,
  html.shell-v2-mobile body.shell-v2 .message.assistant .bubble.markdown-body li {
    font-size: 15px !important;
    line-height: 1.56 !important;
    letter-spacing: -.002em !important;
  }

  html.shell-v2-mobile body.shell-v2 .message.assistant .bubble.markdown-body p {
    margin-block: .48em !important;
  }

  html.shell-v2-mobile body.shell-v2 .message.user .bubble-wrap {
    max-width: min(88%, 344px) !important;
  }

  html.shell-v2-mobile body.shell-v2 .message.user .bubble.markdown-body {
    padding: 11px 13px !important;
    border: 1px solid color-mix(in srgb, var(--v2-border) 64%, transparent) !important;
    border-radius: 15px !important;
    background: color-mix(in srgb, var(--v2-panel-muted) 82%, var(--v2-panel)) !important;
    box-shadow: 0 0 0 .5px rgba(28, 28, 30, .018), 0 1px 2px rgba(28, 28, 30, .026), inset 0 1px 0 rgba(255, 255, 255, .66) !important;
    font-size: 14.75px !important;
    line-height: 1.5 !important;
  }

  html.shell-v2-mobile body.shell-v2 .thread-view-run {
    margin-top: 2px !important;
    margin-bottom: 16px !important;
  }

  html.shell-v2-mobile body.shell-v2 .thread-view-run .meta,
  html.shell-v2-mobile body.shell-v2 .thread-view-result.has-turn-timing .meta {
    color: color-mix(in srgb, var(--v2-muted) 82%, var(--v2-text)) !important;
    font-size: 11.75px !important;
    font-weight: 540 !important;
  }

  html.shell-v2-mobile body.shell-v2 .thread-view-run .bubble.markdown-body {
    color: color-mix(in srgb, var(--v2-text) 90%, var(--v2-muted)) !important;
    font-size: 14.5px !important;
    line-height: 1.45 !important;
  }

  html.shell-v2-mobile body.shell-v2 .canonical-process-details {
    margin-top: 6px !important;
    border-color: color-mix(in srgb, var(--v2-border) 58%, transparent) !important;
    border-radius: 9px !important;
    background: color-mix(in srgb, var(--v2-panel-muted) 62%, transparent) !important;
  }

  html.shell-v2-mobile body.shell-v2 .canonical-process-details > summary {
    min-height: 30px !important;
    padding: 5px 9px !important;
    gap: 7px !important;
    font-size: 11.75px !important;
    line-height: 1.25 !important;
  }

  html.shell-v2-mobile body.shell-v2 .memory-citation-card,
  html.shell-v2-mobile body.shell-v2 .bubble .file-attachment-preview,
  html.shell-v2-mobile body.shell-v2 .bubble a.file-attachment-preview,
  html.shell-v2-mobile body.shell-v2 .file-attachment-preview.shell-v2-readable-file {
    border-radius: 10px !important;
    border-color: color-mix(in srgb, var(--v2-border) 62%, transparent) !important;
    background: color-mix(in srgb, var(--v2-panel) 94%, var(--v2-panel-muted)) !important;
    box-shadow: 0 0 0 .5px rgba(28, 28, 30, .016), 0 1px 2px rgba(28, 28, 30, .022), inset 0 1px 0 rgba(255, 255, 255, .66) !important;
  }

  html.shell-v2-mobile body.shell-v2 .shell-v2-recent-threads.shell-v2-content-recent-switcher {
    position: fixed !important;
    top: calc(var(--v2-mobile-header) + 8px) !important;
    right: 10px !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 68 !important;
    width: auto !important;
    max-width: 58px !important;
    min-height: 36px !important;
    max-height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 4px !important;
    padding: 2px !important;
    overflow: hidden !important;
    overscroll-behavior-x: contain !important;
    border: 1px solid transparent !important;
    border-radius: 12px !important;
    background: transparent !important;
    box-shadow: none !important;
    touch-action: manipulation !important;
    transition: max-width 150ms ease, background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease !important;
  }

  html.shell-v2-mobile body.shell-v2 .shell-v2-recent-threads.shell-v2-content-recent-switcher.is-open {
    width: calc(100vw - 28px) !important;
    max-width: min(362px, calc(100vw - 28px)) !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    border-color: color-mix(in srgb, var(--v2-border) 68%, transparent) !important;
    background: color-mix(in srgb, var(--v2-panel) 96%, transparent) !important;
    box-shadow: 0 0 0 .5px rgba(28, 28, 30, .035), 0 4px 12px rgba(28, 28, 30, .055), 0 14px 32px rgba(28, 28, 30, .045), inset 0 1px 0 rgba(255, 255, 255, .72) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.08) !important;
    backdrop-filter: blur(18px) saturate(1.08) !important;
    touch-action: pan-x !important;
  }

  html.shell-v2-mobile body.shell-v2 .shell-v2-recent-toggle {
    appearance: none !important;
    -webkit-appearance: none !important;
    position: sticky !important;
    left: 0 !important;
    z-index: 2 !important;
    flex: 0 0 auto !important;
    min-width: 52px !important;
    height: 32px !important;
    padding: 0 10px !important;
    border: 1px solid color-mix(in srgb, var(--v2-border) 66%, transparent) !important;
    border-radius: 10px !important;
    background: color-mix(in srgb, var(--v2-panel) 97%, var(--v2-bg)) !important;
    color: color-mix(in srgb, var(--v2-text) 88%, var(--v2-muted)) !important;
    box-shadow: 0 0 0 .5px rgba(28, 28, 30, .025), 0 2px 7px rgba(28, 28, 30, .045), inset 0 1px 0 rgba(255, 255, 255, .68) !important;
    font-family: inherit !important;
    font-size: 11.75px !important;
    font-weight: 580 !important;
    line-height: 1 !important;
    letter-spacing: .005em !important;
    outline: none !important;
  }

  html.shell-v2-mobile body.shell-v2 .shell-v2-recent-toggle:focus-visible {
    border-color: color-mix(in srgb, var(--v2-accent) 24%, var(--v2-border)) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--v2-accent) 12%, transparent), 0 2px 7px rgba(28, 28, 30, .045), inset 0 1px 0 rgba(255, 255, 255, .68) !important;
  }

  html.shell-v2-mobile body.shell-v2 .shell-v2-content-recent-switcher .shell-v2-recent-thread-chip {
    display: none !important;
    flex: 0 0 auto !important;
    max-width: 152px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 10px !important;
    border-radius: 10px !important;
    font-size: 11.75px !important;
    font-weight: 520 !important;
    box-shadow: none !important;
  }

  html.shell-v2-mobile body.shell-v2 .shell-v2-content-recent-switcher.is-open .shell-v2-recent-thread-chip {
    display: inline-flex !important;
  }

  html.shell-v2-dark body.shell-v2 .shell-v2-recent-threads.shell-v2-content-recent-switcher.is-open {
    background: color-mix(in srgb, var(--v2-panel) 94%, transparent) !important;
    box-shadow: 0 0 0 .5px rgba(255, 255, 255, .07), 0 5px 16px rgba(0, 0, 0, .26), 0 16px 36px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .055) !important;
  }

  html.shell-v2-mobile body.shell-v2.shell-thread-menu-open .shell-v2-content-recent-switcher,
  html.shell-v2-mobile body.shell-v2.keyboard-open .shell-v2-content-recent-switcher {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  html.shell-v2-mobile body.shell-v2 .composer-shell {
    min-height: var(--v2-composer) !important;
    padding: 7px var(--v2-mobile-composer-edge) max(7px, env(safe-area-inset-bottom, 0px)) !important;
    border-top: 0 !important;
    background: color-mix(in srgb, var(--v2-bg) 96%, var(--v2-panel)) !important;
    box-shadow: none !important;
  }

  html.shell-v2-mobile body.shell-v2:not(.keyboard-open) .composer-shell {
    transform: translate3d(0, 0, 0) !important;
  }

  html.shell-v2-mobile body.shell-v2 form.composer#composer,
  html.shell-v2-mobile body.shell-v2 .composer-shell:has(.queued-send-card) form.composer#composer {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 52px !important;
    max-height: 148px !important;
    margin: 0 !important;
    grid-template-columns: 44px minmax(0, 1fr) 48px !important;
    align-items: end !important;
    border: 1px solid color-mix(in srgb, var(--v2-border) 72%, transparent) !important;
    border-radius: 22px !important;
    background: color-mix(in srgb, var(--v2-panel) 98%, var(--v2-bg)) !important;
    box-shadow: var(--v2-mobile-composer-elevation) !important;
    contain: paint !important;
  }

  html.shell-v2-mobile body.shell-v2 form.composer#composer:focus-within {
    border-color: color-mix(in srgb, var(--v2-accent) 22%, var(--v2-border)) !important;
    box-shadow: var(--v2-focus-ring), var(--v2-mobile-composer-elevation) !important;
  }

  html.shell-v2-mobile body.shell-v2 textarea#text {
    min-height: 50px !important;
    max-height: 126px !important;
    padding: 14px 4px 11px !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 24px !important;
  }

  html.shell-v2-mobile body.shell-v2 textarea#text::placeholder {
    font-size: 14px !important;
    font-weight: 400 !important;
    opacity: .62 !important;
  }

  html.shell-v2-mobile body.shell-v2 form.composer#composer .icon-btn,
  html.shell-v2-mobile body.shell-v2 form.composer#composer #attach {
    width: 44px !important;
    min-width: 44px !important;
    height: 50px !important;
    min-height: 50px !important;
    border-radius: 20px !important;
    color: color-mix(in srgb, var(--v2-text) 86%, var(--v2-muted)) !important;
  }

  html.shell-v2-mobile body.shell-v2 form.composer#composer .send-btn {
    align-self: center !important;
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    margin: 7px 6px 7px 4px !important;
    border-radius: 999px !important;
    background: color-mix(in srgb, var(--v2-text) 88%, var(--v2-muted)) !important;
    color: var(--v2-panel) !important;
    box-shadow: 0 0 0 .5px rgba(0, 0, 0, .12), 0 1px 2px rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .12) !important;
  }

  html.shell-v2-mobile body.shell-v2 form.composer#composer .send-btn:disabled {
    opacity: .42 !important;
    background: color-mix(in srgb, var(--v2-muted) 58%, var(--v2-panel-muted)) !important;
  }

  html.shell-v2-mobile body.shell-v2 #queued-send.canonical-bottom-dock {
    left: var(--v2-mobile-composer-edge) !important;
    right: var(--v2-mobile-composer-edge) !important;
    bottom: calc(100% + 7px) !important;
    max-height: 76px !important;
    gap: 3px !important;
    scroll-snap-type: y proximity !important;
    overscroll-behavior: contain !important;
  }

  html.shell-v2-mobile body.shell-v2 #queued-send .canonical-dock-card {
    min-height: 36px !important;
    grid-template-columns: 26px minmax(0, 1fr) 38px 32px !important;
    gap: 4px !important;
    padding: 2px 4px 2px 7px !important;
    border-radius: 12px !important;
    background: color-mix(in srgb, var(--v2-panel) 98%, var(--v2-bg)) !important;
    box-shadow: 0 0 0 .5px rgba(28, 28, 30, .045), 0 2px 8px rgba(28, 28, 30, .055), inset 0 1px 0 rgba(255, 255, 255, .7) !important;
    scroll-snap-align: start !important;
  }

  html.shell-v2-mobile body.shell-v2 #queued-send .canonical-goal-card {
    order: -1 !important;
  }

  html.shell-v2-mobile body.shell-v2 #queued-send .canonical-dock-title {
    font-size: 12px !important;
    font-weight: 550 !important;
  }

  html.shell-v2-mobile body.shell-v2 #queued-send .canonical-dock-text-action,
  html.shell-v2-mobile body.shell-v2 #queued-send .canonical-dock-icon-action,
  html.shell-v2-mobile body.shell-v2 #queued-send button.canonical-dock-promote {
    min-height: 32px !important;
    height: 32px !important;
    border-radius: 9px !important;
  }

  html.shell-v2-mobile body.shell-v2 .thread-menu {
    width: min(74vw, 288px) !important;
    padding: max(12px, env(safe-area-inset-top, 0px)) 12px max(72px, calc(env(safe-area-inset-bottom, 0px) + 62px)) !important;
    border-right-color: color-mix(in srgb, var(--v2-border) 62%, transparent) !important;
    box-shadow: 12px 0 34px rgba(15, 23, 42, .12) !important;
    transition-duration: 170ms !important;
  }

  html.shell-v2-mobile body.shell-v2 .thread-menu-scrim {
    background: rgba(15, 23, 42, .20) !important;
  }

  html.shell-v2-mobile body.shell-v2 .thread-menu .thread-option,
  html.shell-v2-mobile body.shell-v2 .thread-menu .pinned-thread-option {
    min-height: 40px !important;
    padding-block: 5px !important;
    border-radius: 9px !important;
    font-size: 13.5px !important;
  }

  html.shell-v2-mobile body.shell-v2 .thread-menu .project-header {
    min-height: 40px !important;
  }

  html.shell-v2-mobile body.shell-v2 .shell-v2-thread-menu-settings {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 11px !important;
  }
}

/* Unified task-surface activation. Keep last so earlier compatibility layers
   cannot separate the user bubble from its right-aligned message rail. */
html.shell-v2 body.shell-v2 .message.user .bubble-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  width: fit-content !important;
  margin-left: auto !important;
  margin-right: 0 !important;
}

html.shell-v2 body.shell-v2 .message.user .bubble-wrap > .meta {
  width: 100% !important;
  text-align: right !important;
}

html.shell-v2 body.shell-v2 .message.user .bubble.markdown-body {
  align-self: flex-end !important;
  width: fit-content !important;
  max-width: 100% !important;
  margin-left: auto !important;
  margin-right: 0 !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-details {
  width: min(100%, 680px) !important;
  max-width: min(100%, 680px) !important;
  border: 0 !important;
  background: transparent !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-details > summary {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 30px !important;
  padding: 4px 9px 4px 7px !important;
  gap: 7px !important;
  border-color: color-mix(in srgb, var(--v2-border) 58%, transparent) !important;
  border-radius: 9px !important;
  background: color-mix(in srgb, var(--v2-panel-muted) 58%, transparent) !important;
  box-shadow: 0 0 0 .5px rgba(28, 28, 30, .018), 0 1px 2px rgba(28, 28, 30, .022), inset 0 1px 0 rgba(255, 255, 255, .62) !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-details > summary::before {
  display: none !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-summary-kind {
  display: inline-flex !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-summary-label {
  align-self: center !important;
  min-width: 0 !important;
  color: color-mix(in srgb, var(--v2-text) 78%, var(--v2-muted)) !important;
  font-size: 11.75px !important;
  font-weight: 450 !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-list {
  display: grid !important;
  gap: 3px !important;
  margin-top: 5px !important;
  padding: 4px 7px 3px !important;
  border-left: 1px solid color-mix(in srgb, var(--v2-border) 62%, transparent) !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-details:not([open]) .canonical-process-list {
  display: none !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-line {
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) !important;
  gap: 7px !important;
}

html.shell-v2 body.shell-v2 #queued-send .canonical-goal-card {
  order: -1 !important;
}

html.shell-v2 body.shell-v2 #queued-send .canonical-dock-title {
  display: flex !important;
  align-items: baseline !important;
  min-width: 0 !important;
  gap: 7px !important;
}

html.shell-v2 body.shell-v2 #queued-send .canonical-dock-title::before {
  content: "排队" !important;
}

html.shell-v2 body.shell-v2 #queued-send .canonical-goal-card .canonical-dock-title::before {
  content: "目标" !important;
}

@media (min-width: 901px) {
  html.shell-v2-desktop body.shell-v2 .message.user .bubble-wrap {
    max-width: min(72%, 680px) !important;
  }
}

@media (max-width: 900px) {
  html.shell-v2-mobile body.shell-v2 .message.user .bubble-wrap {
    max-width: min(88%, 344px) !important;
  }

  html.shell-v2-mobile body.shell-v2 #thread .canonical-process-details {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Mobile dark surface flattening 2026-07-14. Dark cards use their own solid
   surfaces and quiet borders; no light-mode top highlight may leak through. */
@media (max-width: 900px) {
  html.shell-v2-mobile.shell-v2-dark body.shell-v2 {
    --v2-mobile-composer-elevation: 0 1px 2px rgba(0, 0, 0, .2);
  }

  html.shell-v2-mobile.shell-v2-dark body.shell-v2 .message.assistant .bubble.markdown-body table {
    border: 1px solid rgba(255, 255, 255, .09) !important;
    background: var(--v2-panel) !important;
    color: var(--v2-text) !important;
    box-shadow: none !important;
  }

  html.shell-v2-mobile.shell-v2-dark body.shell-v2 .message.assistant .bubble.markdown-body th {
    background: var(--v2-panel-muted) !important;
    color: color-mix(in srgb, var(--v2-text) 94%, var(--v2-muted)) !important;
  }

  html.shell-v2-mobile.shell-v2-dark body.shell-v2 .message.assistant .bubble.markdown-body td {
    background: var(--v2-panel) !important;
    color: color-mix(in srgb, var(--v2-text) 88%, var(--v2-muted)) !important;
  }

  html.shell-v2-mobile.shell-v2-dark body.shell-v2 .message.assistant .bubble.markdown-body tbody tr:nth-child(even) td {
    background: color-mix(in srgb, var(--v2-panel) 86%, var(--v2-panel-muted)) !important;
  }

  html.shell-v2-mobile.shell-v2-dark body.shell-v2 .message.assistant .bubble.markdown-body thead th,
  html.shell-v2-mobile.shell-v2-dark body.shell-v2 .message.assistant .bubble.markdown-body th:not(:last-child),
  html.shell-v2-mobile.shell-v2-dark body.shell-v2 .message.assistant .bubble.markdown-body td:not(:last-child),
  html.shell-v2-mobile.shell-v2-dark body.shell-v2 .message.assistant .bubble.markdown-body tbody tr:not(:last-child) td {
    border-color: rgba(255, 255, 255, .085) !important;
  }

  html.shell-v2-mobile.shell-v2-dark body.shell-v2 .message.user .bubble.markdown-body,
  html.shell-v2-mobile.shell-v2-dark body.shell-v2 #thread .canonical-process-details > summary,
  html.shell-v2-mobile.shell-v2-dark body.shell-v2 .memory-citation-card,
  html.shell-v2-mobile.shell-v2-dark body.shell-v2 .bubble .file-attachment-preview,
  html.shell-v2-mobile.shell-v2-dark body.shell-v2 .file-attachment-preview.shell-v2-readable-file,
  html.shell-v2-mobile.shell-v2-dark body.shell-v2 .shell-v2-recent-toggle,
  html.shell-v2-mobile.shell-v2-dark body.shell-v2 .shell-v2-content-recent-switcher .shell-v2-recent-thread-chip,
  html.shell-v2-mobile.shell-v2-dark body.shell-v2 form.composer#composer,
  html.shell-v2-mobile.shell-v2-dark body.shell-v2 #queued-send .canonical-dock-card,
  html.shell-v2-mobile.shell-v2-dark body.shell-v2 #queued-send .queued-send-card {
    background-image: none !important;
    box-shadow: none !important;
  }

  html.shell-v2-mobile.shell-v2-dark body.shell-v2 .message.user .bubble.markdown-body {
    border-color: rgba(255, 255, 255, .105) !important;
    background: color-mix(in srgb, var(--v2-panel-muted) 72%, var(--v2-panel)) !important;
  }

  html.shell-v2-mobile.shell-v2-dark body.shell-v2 #thread .canonical-process-details > summary {
    border-color: rgba(255, 255, 255, .085) !important;
    background: color-mix(in srgb, var(--v2-panel-muted) 64%, transparent) !important;
  }

  html.shell-v2-mobile.shell-v2-dark body.shell-v2 .memory-citation-card,
  html.shell-v2-mobile.shell-v2-dark body.shell-v2 .bubble .file-attachment-preview,
  html.shell-v2-mobile.shell-v2-dark body.shell-v2 .file-attachment-preview.shell-v2-readable-file {
    border-color: rgba(255, 255, 255, .085) !important;
    background: var(--v2-panel) !important;
  }

  html.shell-v2-mobile.shell-v2-dark body.shell-v2 .shell-v2-recent-threads.shell-v2-content-recent-switcher.is-open,
  html.shell-v2-mobile.shell-v2-dark body.shell-v2 .shell-v2-recent-toggle,
  html.shell-v2-mobile.shell-v2-dark body.shell-v2 .shell-v2-content-recent-switcher .shell-v2-recent-thread-chip {
    border-color: rgba(255, 255, 255, .09) !important;
    background: var(--v2-panel) !important;
    box-shadow: none !important;
  }

  html.shell-v2-mobile.shell-v2-dark body.shell-v2 form.composer#composer,
  html.shell-v2-mobile.shell-v2-dark body.shell-v2 .composer-shell:has(.queued-send-card) form.composer#composer {
    border-color: rgba(255, 255, 255, .1) !important;
    background: var(--v2-panel) !important;
  }

  html.shell-v2-mobile.shell-v2-dark body.shell-v2 #queued-send .canonical-dock-card,
  html.shell-v2-mobile.shell-v2-dark body.shell-v2 #queued-send .queued-send-card {
    border-color: rgba(255, 255, 255, .1) !important;
    background: color-mix(in srgb, var(--v2-panel) 92%, var(--v2-panel-muted)) !important;
  }
}

/* Restrained semantic type hierarchy 2026-07-14.
   Keep the contrast steps small and semantic: group > item > metadata > hint.
   This block stays last so the readability guard cannot flatten the hierarchy. */
html.shell-v2 body.shell-v2 {
  --v2-ink-strong: var(--v2-text);
  --v2-ink-content: color-mix(in srgb, var(--v2-text) 94%, var(--v2-muted));
  --v2-ink-project: color-mix(in srgb, var(--v2-text) 86%, var(--v2-muted));
  --v2-ink-primary: color-mix(in srgb, var(--v2-text) 76%, var(--v2-muted));
  --v2-ink-secondary: color-mix(in srgb, var(--v2-text) 34%, var(--v2-muted));
  --v2-ink-tertiary: color-mix(in srgb, var(--v2-muted) 78%, var(--v2-bg));
}

html.shell-v2.shell-v2-dark body.shell-v2 {
  --v2-ink-tertiary: color-mix(in srgb, var(--v2-muted) 88%, var(--v2-bg));
}

html.shell-v2 body.shell-v2 .topbar .thread-name,
html.shell-v2 body.shell-v2 .topbar .title,
html.shell-v2 body.shell-v2 .topbar h1,
html.shell-v2 body.shell-v2 .settings-title,
html.shell-v2 body.shell-v2 #settings-title-text {
  color: var(--v2-ink-strong) !important;
  font-weight: 600 !important;
}

html.shell-v2 body.shell-v2 .shell-v2-quota-pill,
html.shell-v2 body.shell-v2 .topbar .top-actions,
html.shell-v2 body.shell-v2 .topbar .top-actions button,
html.shell-v2 body.shell-v2 .settings-subtitle {
  color: var(--v2-ink-secondary) !important;
}

html.shell-v2 body.shell-v2 .thread-section-label {
  color: var(--v2-ink-tertiary) !important;
  font-weight: 560 !important;
}

html.shell-v2 body.shell-v2 .thread-menu .project-header,
html.shell-v2 body.shell-v2 .thread-menu .project-header .project-name {
  color: var(--v2-ink-strong) !important;
  font-weight: 600 !important;
}

html.shell-v2 body.shell-v2 .thread-menu .project-header .project-folder,
html.shell-v2 body.shell-v2 .thread-menu .project-header .project-folder svg,
html.shell-v2 body.shell-v2 .thread-menu .project-header .project-folder svg *,
html.shell-v2 body.shell-v2 .thread-menu .project-header > svg,
html.shell-v2 body.shell-v2 .thread-menu .project-header > svg * {
  color: var(--v2-ink-project) !important;
  stroke: currentColor !important;
  opacity: 1 !important;
}

html.shell-v2 body.shell-v2 .thread-menu .project-header small,
html.shell-v2 body.shell-v2 .thread-menu .project-header [class*="count"] {
  color: var(--v2-ink-tertiary) !important;
  font-weight: 430 !important;
}

html.shell-v2 body.shell-v2 .thread-menu .thread-option,
html.shell-v2 body.shell-v2 .thread-menu .pinned-thread-option,
html.shell-v2 body.shell-v2 .thread-menu .thread-option-title,
html.shell-v2 body.shell-v2 .thread-menu .pinned-thread-name {
  color: var(--v2-ink-primary) !important;
  font-weight: 440 !important;
}

html.shell-v2 body.shell-v2 .thread-menu .thread-option[aria-current="true"],
html.shell-v2 body.shell-v2 .thread-menu .pinned-thread-option[aria-current="true"],
html.shell-v2 body.shell-v2 .thread-menu .thread-option[aria-current="true"] .thread-option-title,
html.shell-v2 body.shell-v2 .thread-menu .pinned-thread-option[aria-current="true"] .pinned-thread-name {
  color: var(--v2-ink-strong) !important;
  font-weight: 520 !important;
}

html.shell-v2 body.shell-v2 .thread-menu .thread-option-state,
html.shell-v2 body.shell-v2 .thread-menu .pinned-thread-meta,
html.shell-v2 body.shell-v2 .thread-menu [class*="time"],
html.shell-v2 body.shell-v2 .thread-menu [class*="meta"] {
  color: var(--v2-ink-tertiary) !important;
  font-weight: 420 !important;
}

@media (hover: hover) and (pointer: fine) {
  html.shell-v2 body.shell-v2 .thread-menu .thread-option:hover:not([aria-current="true"]),
  html.shell-v2 body.shell-v2 .thread-menu .pinned-thread-option:hover:not([aria-current="true"]) {
    color: var(--v2-ink-strong) !important;
  }
}

html.shell-v2 body.shell-v2 .message .meta,
html.shell-v2 body.shell-v2 .day-note,
html.shell-v2 body.shell-v2 .attachment-note,
html.shell-v2 body.shell-v2 .memory-citation-note {
  color: var(--v2-ink-tertiary) !important;
  font-weight: 450 !important;
}

html.shell-v2 body.shell-v2 .thread-view-run .meta,
html.shell-v2 body.shell-v2 .thread-view-result.has-turn-timing .meta {
  color: var(--v2-ink-secondary) !important;
  font-weight: 520 !important;
}

html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body,
html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body p,
html.shell-v2 body.shell-v2 .message.assistant .bubble.markdown-body li,
html.shell-v2 body.shell-v2 .message.user .bubble.markdown-body,
html.shell-v2 body.shell-v2 .memory-citation-item,
html.shell-v2 body.shell-v2 .file-attachment-name {
  color: var(--v2-ink-content) !important;
}

html.shell-v2 body.shell-v2 .message.assistant.thread-view-process .bubble.markdown-body,
html.shell-v2 body.shell-v2 .message.assistant.thread-view-process .bubble.markdown-body p,
html.shell-v2 body.shell-v2 .message.assistant.thread-view-process .bubble.markdown-body li {
  color: var(--v2-ink-primary) !important;
}

html.shell-v2 body.shell-v2 .markdown-body h1,
html.shell-v2 body.shell-v2 .markdown-body h2,
html.shell-v2 body.shell-v2 .markdown-body h3,
html.shell-v2 body.shell-v2 .markdown-body h4,
html.shell-v2 body.shell-v2 .markdown-body strong,
html.shell-v2 body.shell-v2 .thread-view-run .bubble.markdown-body {
  color: var(--v2-ink-strong) !important;
}

html.shell-v2 body.shell-v2 .markdown-body h1,
html.shell-v2 body.shell-v2 .markdown-body h2,
html.shell-v2 body.shell-v2 .markdown-body h3 {
  font-weight: 620 !important;
}

html.shell-v2 body.shell-v2 .markdown-body strong {
  font-weight: 590 !important;
}

html.shell-v2 body.shell-v2 .canonical-process-summary-kind,
html.shell-v2 body.shell-v2 .canonical-process-summary-label,
html.shell-v2 body.shell-v2 .process-tool,
html.shell-v2 body.shell-v2 .process-tool-row,
html.shell-v2 body.shell-v2 .tool-call,
html.shell-v2 body.shell-v2 .process-tool-pill {
  color: var(--v2-ink-secondary) !important;
}

html.shell-v2 body.shell-v2 .canonical-process-summary-count,
html.shell-v2 body.shell-v2 .memory-citation-count,
html.shell-v2 body.shell-v2 .file-attachment-ext,
html.shell-v2 body.shell-v2 .attachment-ext,
html.shell-v2 body.shell-v2 .attachment-type {
  color: var(--v2-ink-tertiary) !important;
}

html.shell-v2 body.shell-v2 .memory-citation-title,
html.shell-v2 body.shell-v2 #queued-send .canonical-dock-title {
  color: var(--v2-ink-primary) !important;
}

html.shell-v2 body.shell-v2 #queued-send .canonical-dock-title::before {
  color: var(--v2-ink-tertiary) !important;
  font-weight: 520 !important;
}

html.shell-v2 body.shell-v2 #queued-send .canonical-dock-text-action,
html.shell-v2 body.shell-v2 #queued-send .canonical-dock-icon-action,
html.shell-v2 body.shell-v2 #queued-send button.canonical-dock-promote {
  color: var(--v2-ink-secondary) !important;
  font-weight: 500 !important;
}

html.shell-v2 body.shell-v2 textarea#text {
  color: var(--v2-ink-content) !important;
}

html.shell-v2 body.shell-v2 textarea#text::placeholder,
html.shell-v2 body.shell-v2 form.composer#composer .context-status,
html.shell-v2 body.shell-v2 form.composer#composer .model-badge,
html.shell-v2 body.shell-v2 form.composer#composer .reasoning-badge,
html.shell-v2 body.shell-v2 form.composer#composer .permission-badge,
html.shell-v2 body.shell-v2 form.composer#composer .route-badge {
  color: var(--v2-ink-tertiary) !important;
  opacity: 1 !important;
}

html.shell-v2 body.shell-v2 .settings-label,
html.shell-v2 body.shell-v2 .settings-row,
html.shell-v2 body.shell-v2 .settings-nav-row {
  color: var(--v2-ink-primary) !important;
}

html.shell-v2 body.shell-v2 #thread .message.assistant.thread-view-process .bubble.process-step,
html.shell-v2 body.shell-v2 #thread .message.assistant.thread-view-process .process-text-line {
  color: var(--v2-ink-primary) !important;
}

/* Inline process images: Codex-like reserved thumbnails with full-screen viewing. */
html.shell-v2 body.shell-v2 #thread .message.assistant.thread-view-image {
  margin-top: 2px !important;
  margin-bottom: 10px !important;
}

html.shell-v2 body.shell-v2 #thread .message.assistant.thread-view-image .meta,
html.shell-v2 body.shell-v2 #thread .message.assistant.thread-view-image .bubble-actions {
  display: none !important;
}

html.shell-v2 body.shell-v2 #thread .message.assistant.thread-view-image .bubble-wrap,
html.shell-v2 body.shell-v2 #thread .message.assistant.thread-view-image .bubble.markdown-body {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html.shell-v2 body.shell-v2 #thread .message.assistant .shell-v2-inline-image-strip {
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px !important;
  margin: 12px 0 4px !important;
  padding: 0 0 2px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none !important;
  overscroll-behavior-x: contain !important;
  -webkit-overflow-scrolling: touch !important;
}

html.shell-v2 body.shell-v2 #thread .message.assistant.thread-view-image .shell-v2-inline-image-strip {
  margin: 0 !important;
}

html.shell-v2 body.shell-v2 #thread .message.assistant .shell-v2-inline-image-strip::-webkit-scrollbar {
  display: none !important;
}

html.shell-v2 body.shell-v2 #thread .message.assistant .shell-v2-inline-image-strip .shell-v2-image-thumb {
  flex: 0 0 auto !important;
  width: fit-content !important;
  max-width: min(220px, 46vw) !important;
  display: block !important;
  overflow: hidden !important;
  border: 1px solid color-mix(in srgb, var(--v2-border) 76%, transparent) !important;
  border-radius: 9px !important;
  background: var(--v2-panel-muted) !important;
  box-shadow: 0 1px 2px rgba(28, 28, 30, .035), 0 5px 16px rgba(28, 28, 30, .035) !important;
  line-height: 0 !important;
}

html.shell-v2 body.shell-v2 #thread .message.assistant .shell-v2-inline-image-strip img.attachment-preview {
  width: auto !important;
  height: auto !important;
  max-width: min(220px, 46vw) !important;
  max-height: 250px !important;
  display: block !important;
  object-fit: contain !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--v2-panel-muted) !important;
  box-shadow: none !important;
}

html.shell-v2 body.shell-v2 #thread .message.assistant .bubble.shell-v2-image-only > :not(.shell-v2-inline-image-strip) {
  display: none !important;
}

html.shell-v2-mobile body.shell-v2 #thread .message.assistant .shell-v2-inline-image-strip {
  gap: 7px !important;
  margin-top: 9px !important;
}

html.shell-v2-mobile body.shell-v2 #thread .message.assistant .shell-v2-inline-image-strip .shell-v2-image-thumb,
html.shell-v2-mobile body.shell-v2 #thread .message.assistant .shell-v2-inline-image-strip img.attachment-preview {
  max-width: min(164px, 44vw) !important;
  max-height: 218px !important;
}

html.shell-v2-dark body.shell-v2 #thread .message.assistant .shell-v2-inline-image-strip .shell-v2-image-thumb {
  border-color: color-mix(in srgb, var(--v2-border) 86%, transparent) !important;
  background: var(--v2-panel) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .14), 0 6px 18px rgba(0, 0, 0, .12) !important;
}

/* Image layout stability: the server supplies intrinsic dimensions. Reserve
   the final thumbnail rectangle before async decode so thread switching never
   reflows the current reading rail when image bytes arrive. */
html.shell-v2 body.shell-v2 #thread .message.assistant .shell-v2-inline-image-strip .shell-v2-image-thumb[data-shell-v2-image-size="locked"] {
  width: var(--shell-v2-image-width) !important;
  min-width: var(--shell-v2-image-width) !important;
  max-width: var(--shell-v2-image-width) !important;
  height: var(--shell-v2-image-height) !important;
  min-height: var(--shell-v2-image-height) !important;
  max-height: var(--shell-v2-image-height) !important;
  flex: 0 0 var(--shell-v2-image-width) !important;
  contain: layout paint !important;
}

html.shell-v2 body.shell-v2 #thread .message.assistant .shell-v2-inline-image-strip .shell-v2-image-thumb[data-shell-v2-image-size="locked"] > a,
html.shell-v2 body.shell-v2 #thread .message.assistant .shell-v2-inline-image-strip .shell-v2-image-thumb[data-shell-v2-image-size="locked"] > img.attachment-preview {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}

html.shell-v2 body.shell-v2 #thread .message.assistant .shell-v2-inline-image-strip .shell-v2-image-thumb[data-shell-v2-image-size="locked"] img.attachment-preview {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-summary-label {
  color: var(--v2-ink-secondary) !important;
}

html.shell-v2 body.shell-v2 #thread .canonical-process-summary-count,
html.shell-v2 body.shell-v2 #thread .canonical-process-line {
  color: var(--v2-ink-tertiary) !important;
  opacity: 1 !important;
}

html.shell-v2 body.shell-v2 .memory-citation-path {
  color: var(--v2-ink-secondary) !important;
}

/* Mobile drawer recovery: the native list may repaint after opening. Keep a
   usable scroll fallback until the framed header/list/dock structure restores. */
@media (max-width: 900px) {
  html.shell-v2 body.shell-v2 .thread-menu:not(.shell-v2-thread-menu-framed) {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain !important;
    touch-action: pan-y !important;
  }

  html.shell-v2 body.shell-v2 .thread-menu.shell-v2-thread-menu-framed {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  html.shell-v2 body.shell-v2 .thread-menu .shell-v2-thread-menu-head {
    flex: 0 0 auto !important;
    min-height: 62px !important;
    padding: max(12px, env(safe-area-inset-top)) 16px 10px !important;
    display: flex !important;
    align-items: flex-end !important;
    box-sizing: border-box !important;
    border-bottom: 1px solid color-mix(in srgb, var(--v2-border) 72%, transparent) !important;
    background: var(--v2-panel) !important;
    pointer-events: none !important;
  }

  html.shell-v2 body.shell-v2 .thread-menu .shell-v2-thread-menu-head-copy {
    display: grid !important;
    gap: 3px !important;
    min-width: 0 !important;
  }

  html.shell-v2 body.shell-v2 .thread-menu .shell-v2-thread-menu-kicker {
    color: var(--v2-ink-tertiary) !important;
    font-size: 11px !important;
    font-weight: 560 !important;
    line-height: 1.1 !important;
  }

  html.shell-v2 body.shell-v2 .thread-menu .shell-v2-thread-menu-current-title {
    overflow: hidden !important;
    color: var(--v2-ink-strong) !important;
    font-size: 15px !important;
    font-weight: 620 !important;
    line-height: 1.25 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  html.shell-v2 body.shell-v2 .thread-menu .shell-v2-thread-menu-scroll {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    padding: 10px 12px 8px !important;
    scrollbar-width: none !important;
  }

  html.shell-v2 body.shell-v2 .thread-menu .shell-v2-thread-menu-scroll::-webkit-scrollbar {
    display: none !important;
  }

  html.shell-v2 body.shell-v2 .thread-menu .shell-v2-thread-menu-dock {
    flex: 0 0 max(58px, calc(env(safe-area-inset-bottom) + 48px)) !important;
    min-height: max(58px, calc(env(safe-area-inset-bottom) + 48px)) !important;
    padding: 8px 16px max(10px, env(safe-area-inset-bottom)) !important;
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    border-top: 1px solid color-mix(in srgb, var(--v2-border) 64%, transparent) !important;
    background: var(--v2-panel) !important;
  }
}
