:root {
  color-scheme: dark;
  --font-ui: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --bg: #000;
  --ink-900: #0c0c0c;
  --ink-800: #121212;
  --ink-700: #151515;
  --ink-650: #181818;
  --ink-600: #1f1f1f;
  --text: #fff;
  --text-90: rgba(255, 255, 255, 0.9);
  --text-80: rgba(255, 255, 255, 0.8);
  --text-72: rgba(255, 255, 255, 0.72);
  --text-62: rgba(255, 255, 255, 0.62);
  --text-52: rgba(255, 255, 255, 0.52);
  --text-42: rgba(255, 255, 255, 0.42);
  --text-32: rgba(255, 255, 255, 0.32);
  --text-24: rgba(255, 255, 255, 0.24);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.16);
  --wash: rgba(255, 255, 255, 0.055);
  --wash-strong: rgba(255, 255, 255, 0.09);
  --accent: #fff;
  --accent-contrast: #000;
  --accent-soft: rgba(255, 255, 255, 0.12);
  --success: #00e676;
  --danger: #ff8a8a;
  --dev-accent: #ff4f00;
  --dev-accent-soft: rgba(255, 79, 0, 0.12);
  --focus: rgba(139, 212, 255, 0.18);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-popover: 0 14px 30px rgba(0, 0, 0, 0.55);
  --shadow-drawer: 18px 0 40px rgba(0, 0, 0, 0.42);
  --composer-overlay-height: 113px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.25;
  font-synthesis: none;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

button,
.prompt-input {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  font-style: normal;
  font-variant: normal;
  text-transform: none;
}

button {
  line-height: 20px;
}

.sp-gradient-border {
  position: relative;
}

.sp-gradient-border::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.36),
    rgba(255, 255, 255, 0.02) 30%,
    rgba(255, 255, 255, 0.02) 70%,
    rgba(255, 255, 255, 0.28)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.sp-gradient-border > * {
  position: relative;
  z-index: 1;
}

.palette-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: 100vw;
  height: 100vh;
  min-width: 320px;
  min-height: 440px;
  background: var(--bg);
}

.drawer-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
}

.chat-drawer {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: min(324px, calc(100vw - 44px));
  min-width: 276px;
  padding-top: 52px;
  border-right: 0;
  background: var(--ink-900);
  box-shadow: var(--shadow-drawer);
  transform: translateX(-100%);
  transition: transform 160ms var(--ease);
}

.chat-drawer.open {
  transform: translateX(0);
}

.account-panel,
.provider-panel {
  display: grid;
  gap: 2px;
  padding: 8px 16px;
  border-bottom: 0;
}

.provider-panel {
  padding-top: 10px;
}

.drawer-identity-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.account-panel h2,
.provider-panel h2 {
  margin: 0;
}

.account-panel p,
.provider-panel p {
  margin: 0;
}

.account-actions {
  display: flex;
  align-items: center;
}

.drawer-identity-row > .drawer-body {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.provider-usage {
  display: grid;
  gap: 2px;
  padding: 6px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.provider-usage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
}

.provider-usage-value {
  text-align: right;
}

.provider-usage-reset {
  grid-column: 1 / -1;
}

.drawer-chats {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  padding: 12px 10px 10px;
}

.drawer-section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 4px 8px;
}

.chat-list {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.chat-item {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 52px;
  padding: 8px 9px;
  border: 0;
  border-radius: 16px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.chat-item[aria-current="true"] {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.chat-item:hover,
.chat-item:focus-visible {
  background: var(--wash-strong);
  outline: none;
}

.chat-item-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-list-empty {
  padding: 10px 8px;
  color: var(--text-42);
  font-size: 12px;
  line-height: 1.35;
}

.chat-row {
  position: relative;
  min-width: 0;
}

.chat-row .chat-item {
  padding-right: 42px;
}

.chat-menu-button {
  position: absolute;
  top: 10px;
  right: 7px;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--text-42);
  cursor: pointer;
}

.chat-menu-button:hover,
.chat-menu-button:focus-visible,
.chat-menu-button[aria-expanded="true"] {
  outline: none;
  background: var(--wash-strong);
  color: var(--text-90);
}

.chat-menu-button svg {
  width: 18px;
  height: 18px;
  stroke-width: 3.2;
}

.chat-action-menu {
  position: absolute;
  z-index: 4;
  top: 42px;
  right: 7px;
  display: grid;
  width: 124px;
  padding: 6px;
  border: 0;
  border-radius: 16px;
  background: var(--ink-700);
  box-shadow: var(--shadow-popover);
}

.chat-action-menu button {
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--text-72);
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
}

.chat-action-menu button:hover,
.chat-action-menu button:focus-visible {
  outline: none;
  background: var(--wash-strong);
  color: var(--text);
}

.chat-action-menu .chat-delete-action {
  color: var(--danger);
}

.chat-rename-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  min-height: 52px;
  padding: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--wash);
}

.chat-rename-input {
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  outline: none;
  background: var(--ink-800);
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
}

.chat-rename-input:focus {
  border-color: rgba(139, 212, 255, 0.48);
  box-shadow: 0 0 0 2px var(--focus);
}

.chat-rename-save,
.chat-rename-cancel {
  min-height: 30px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-62);
  font-size: 11.5px;
  cursor: pointer;
}

.chat-rename-save {
  background: var(--accent);
  color: var(--accent-contrast);
}

.topbar {
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  grid-row: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 16px;
  border-bottom: 0;
  background: transparent;
}

.topbar::before {
  position: absolute;
  z-index: 10;
  inset: 0 0 -40px;
  content: "";
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 1) 36%,
    rgba(0, 0, 0, 0.82) 52%,
    rgba(0, 0, 0, 0.48) 72%,
    rgba(0, 0, 0, 0) 100%
  );
}

.topbar::after {
  position: absolute;
  z-index: 9;
  inset: 0 0 -40px;
  content: "";
  pointer-events: none;
  background: transparent;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(
    180deg,
    #000 0%,
    rgba(0, 0, 0, 0.92) 35%,
    rgba(0, 0, 0, 0.62) 58%,
    transparent 100%
  );
  mask-image: linear-gradient(
    180deg,
    #000 0%,
    rgba(0, 0, 0, 0.92) 35%,
    rgba(0, 0, 0, 0.62) 58%,
    transparent 100%
  );
}

.topbar > * {
  position: relative;
  z-index: 11;
}

.title-block {
  min-width: 0;
}

.topbar p {
  margin: 0;
  overflow: hidden;
  color: var(--text-42);
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deployment-widget {
  position: relative;
  min-width: 0;
}

.deployment-pill {
  display: inline-grid;
  grid-auto-flow: column;
  place-items: center;
  gap: 6px;
  min-width: 58px;
  height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(76, 163, 255, 0.12);
  color: #4ca3ff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  line-height: 18px;
}

.deployment-pill.restart-ready {
  background: rgba(83, 209, 138, 0.12);
  color: #53d18a;
}

.deployment-pill.has-error {
  background: rgba(255, 138, 138, 0.12);
  color: #ff8a8a;
}

.deployment-pill.is-dev {
  background: var(--dev-accent-soft);
  color: var(--dev-accent);
}

.deployment-pill.is-update::before,
.deployment-panel .deployment-action.is-update::before {
  content: "";
  width: 14px;
  height: 14px;
  background: url("/palette/assets/Download.svg") center / contain no-repeat;
}

.deployment-pill:focus-visible,
.deployment-primary:focus-visible,
#deployment-retry:focus-visible {
  outline: 2px solid #9dccff;
  outline-offset: 2px;
}

.deployment-panel {
  position: fixed;
  z-index: 16;
  top: 68px;
  right: 16px;
  left: 16px;
  display: grid;
  gap: 14px;
  width: auto;
  max-width: 400px;
  max-height: min(520px, calc(100vh - 84px));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px;
  border: 0;
  border-radius: 24px;
  background: var(--ink-900);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.64);
}

@media (min-width: 520px) {
  .deployment-panel {
    left: auto;
    width: 400px;
  }
}

.deployment-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.deployment-panel-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
}

.deployment-panel-head .icon-button {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: transparent;
  color: var(--text-52);
}

.deployment-panel-head .icon-button:hover,
.deployment-panel-head .icon-button:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.deployment-panel p {
  margin: 0;
  color: var(--text-62);
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.deployment-panel.has-error #deployment-message {
  color: var(--danger);
}

.deployment-restart-note {
  padding: 10px 12px;
  border: 0;
  border-radius: 16px;
  background: rgba(76, 163, 255, 0.12);
  color: var(--text-80) !important;
}

.deployment-branch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  color: var(--text-52);
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 400;
}

.deployment-branch-picker {
  position: relative;
  min-width: 0;
}

.deployment-branch-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 14px;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-80);
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 400;
  text-align: left;
}

.deployment-branch-button:hover,
.deployment-branch-button:focus-visible,
.deployment-branch-button[aria-expanded="true"] {
  outline: none;
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
}

.deployment-branch-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deployment-branch-button svg {
  width: 16px;
  height: 16px;
}

.deployment-branch-menu {
  position: absolute;
  z-index: 18;
  inset: calc(100% + 6px) 0 auto 0;
  max-height: 180px;
  overflow-y: auto;
  padding: 6px;
  border: 0;
  border-radius: 16px;
  background: var(--ink-700);
  box-shadow: var(--shadow-popover);
}

.deployment-branch-option {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--text-80);
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 400;
  text-align: left;
}

.deployment-branch-option[aria-selected="true"],
.deployment-branch-option:hover,
.deployment-branch-option:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  outline: none;
}

.deployment-facts {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 7px 12px;
  padding: 0;
  border: 0;
  font-family: var(--font-ui);
  font-size: 12.5px;
  line-height: 1.4;
}

.deployment-facts span {
  color: var(--text-52);
}

.deployment-facts strong {
  min-width: 0;
  color: var(--text-80);
  overflow: hidden;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deployment-diagnostics {
  padding: 9px 10px;
  border: 1px solid rgba(201, 64, 64, 0.56);
  border-radius: 7px;
  background: rgba(94, 20, 20, 0.22);
  color: #ffdede;
  font-size: 12px;
  line-height: 1.4;
}

.deployment-diagnostics summary {
  cursor: pointer;
  font-weight: 650;
}

.deployment-diagnostics ul {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding-left: 18px;
}

.deployment-diagnostics li {
  overflow-wrap: anywhere;
}

.deployment-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 0;
}

.deployment-panel .deployment-action {
  grid-auto-flow: column;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(76, 163, 255, 0.12);
  color: #4ca3ff;
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: none;
}

.deployment-pill:hover,
.deployment-pill:focus-visible,
.deployment-panel .deployment-action:hover,
.deployment-panel .deployment-action:focus-visible {
  background: rgba(76, 163, 255, 0.18);
  color: #4ca3ff;
}

.deployment-pill.restart-ready:hover,
.deployment-pill.restart-ready:focus-visible {
  background: rgba(83, 209, 138, 0.18);
  color: #53d18a;
}

.deployment-pill.has-error:hover,
.deployment-pill.has-error:focus-visible {
  background: rgba(255, 138, 138, 0.18);
  color: #ff8a8a;
}

.deployment-pill.is-dev:hover,
.deployment-pill.is-dev:focus-visible {
  background: rgba(255, 79, 0, 0.18);
  color: var(--dev-accent);
}

.connection-panel {
  grid-row: 2;
  display: grid;
  place-items: center;
  min-height: min(45vh, 360px);
  padding: 20px 16px 10px;
}

.state-card {
  display: grid;
  justify-items: center;
  width: min(100%, 320px);
  gap: 12px;
  padding: 26px 22px 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  text-align: center;
}

body[data-provider-state="needed"] .state-card {
  justify-items: stretch;
  background: rgba(255, 255, 255, 0.07);
  text-align: left;
}

.state-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--text);
}

body[data-provider-state="needed"] .state-mark {
  width: auto;
  height: auto;
  justify-self: start;
  color: var(--accent);
}

body[data-provider-state="needed"] .state-mark svg {
  display: none;
}

body[data-provider-state="needed"] .state-mark::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.48);
}

.state-mark svg {
  width: 42px;
  height: 42px;
}

.state-mark path {
  fill: currentColor;
  stroke: none;
}

.state-kicker {
  justify-self: inherit;
  margin: 0;
  color: var(--text-32);
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.state-copy a {
  color: inherit;
  overflow-wrap: anywhere;
  text-underline-offset: 2px;
}

.device-code {
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.96em;
  letter-spacing: 0.05em;
}

body[data-provider-state="needed"] .state-kicker {
  color: var(--text-72);
}

.state-card h2 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0;
}

.state-copy {
  margin: 0;
  color: var(--text-52);
  font-size: 13px;
  line-height: 1.55;
}

.state-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  width: 100%;
  margin-top: 2px;
}

.messages {
  grid-row: 3;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  padding: 82px 16px calc(var(--composer-overlay-height) + 18px);
  overflow-y: auto;
  overflow-x: clip;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.queued-turns {
  grid-row: 4;
  display: grid;
  gap: 7px;
  max-height: min(178px, 28vh);
  overflow-y: auto;
  padding: 0 16px 8px;
  margin-bottom: var(--composer-overlay-height);
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.queued-turn-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 8px 8px 8px 7px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.queued-turn-card.is-dragging {
  opacity: 0.56;
}

.queued-turn-card.is-drop-target {
  border-color: rgba(139, 212, 255, 0.44);
  background: rgba(139, 212, 255, 0.08);
}

.queued-turn-drag {
  width: 15px;
  color: var(--text-32);
  font-size: 14px;
  line-height: 1;
  cursor: grab;
}

.queued-turn-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.queued-turn-title {
  min-width: 0;
  overflow: hidden;
  color: var(--text-90);
  font-size: 12.5px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queued-turn-meta {
  min-width: 0;
  overflow: hidden;
  color: var(--text-42);
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queued-turn-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.queued-turn-steer,
.queued-turn-remove {
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  color: var(--text);
  cursor: pointer;
}

.queued-turn-steer {
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 7px;
  background: rgba(35, 107, 206, 0.7);
  font-size: 12px;
  line-height: 18px;
}

.queued-turn-steer:hover,
.queued-turn-steer:focus-visible {
  background: rgba(47, 129, 247, 0.78);
}

.queued-turn-remove {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-52);
  font-size: 17px;
  line-height: 1;
}

.queued-turn-remove:hover,
.queued-turn-remove:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
}

.bubble {
  max-width: min(100%, calc(100vw - 48px));
  color: var(--text-90);
  font-size: 13.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.bubble.user {
  align-self: flex-end;
  max-width: 80%;
  padding: 9px 13px;
  border: 0;
  border-radius: 16px;
  background: #1f1f1f;
  color: var(--text);
  line-height: 1.5;
}

.bubble.user.has-attachments {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  width: min(92%, 560px);
  max-width: min(92%, 560px);
  padding: 0;
  background: transparent;
}

.bubble.user.has-attachments .bubble-text {
  max-width: 80%;
  padding: 9px 13px;
  border-radius: 16px;
  background: #1f1f1f;
}

.bubble.user.attachment-only {
  width: auto;
  max-width: min(92%, 560px);
}

.bubble.assistant,
.bubble.system {
  align-self: flex-start;
  margin-right: 28px;
}

.bubble.system {
  color: var(--text-62);
}

.bubble.error {
  color: #ffd4d4;
}

.message-attachments {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 0;
  white-space: normal;
}

.message-attachment {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 7px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  text-decoration: none;
}

.message-attachment.has-image {
  width: clamp(96px, 26vw, 124px);
  height: clamp(96px, 26vw, 124px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: zoom-in;
  transition: opacity 140ms ease, transform 140ms ease;
}

.message-attachment.has-image:hover,
.message-attachment.has-image:focus-visible {
  background: transparent;
  opacity: 0.9;
  transform: scale(0.985);
  outline: none;
}

.message-attachment-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.05);
}

.message-attachment-label {
  overflow: hidden;
  color: var(--text-72);
  font-size: 11.5px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-viewer {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 56px 24px 24px;
  background: rgba(0, 0, 0, 0.88);
}

.image-viewer[hidden] {
  display: none;
}

.image-viewer-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  border-radius: 18px;
  object-fit: contain;
  box-shadow: 0 18px 64px rgba(0, 0, 0, 0.46);
}

.image-viewer-close {
  position: fixed;
  z-index: 1;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #111;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.42);
}

.image-viewer-close:hover,
.image-viewer-close:focus-visible {
  background: rgba(255, 255, 255, 0.88);
  outline: none;
}

.image-viewer-close svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.learning-summary {
  display: grid;
  gap: 6px;
  max-width: min(520px, calc(100vw - 52px));
  margin-top: 10px;
  padding: 9px 0 9px 12px;
  border-left: 2px solid rgba(105, 214, 179, 0.72);
  color: var(--text-72);
  white-space: normal;
}

.learning-summary-label {
  color: rgba(105, 214, 179, 0.92);
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.25;
  text-transform: uppercase;
}

.learning-summary-headline {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.learning-summary-copy {
  color: var(--text-62);
  font-size: 12.5px;
  line-height: 1.45;
}

.learning-summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.learning-summary-chip {
  max-width: 100%;
  padding: 2px 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: var(--text-62);
  font-size: 11.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.learning-evidence-card {
  display: grid;
  gap: 12px;
  max-width: min(560px, calc(100vw - 52px));
  margin-top: 10px;
  padding: 16px;
  border: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-80);
  font-family: var(--font-ui);
  white-space: normal;
}

.learning-evidence-label {
  width: max-content;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-80);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1;
}

.learning-evidence-headline {
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.learning-evidence-prompts {
  display: grid;
  gap: 8px;
}

.learning-evidence-prompt {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px 11px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-62);
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.45;
}

.learning-evidence-meta {
  width: max-content;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-80);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1;
}

.learning-evidence-chips,
.learning-evidence-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.learning-evidence-chip {
  max-width: 100%;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-62);
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.learning-evidence-action {
  min-height: 32px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-80);
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.learning-evidence-action:hover,
.learning-evidence-action:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
  outline: none;
}

.result-feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: min(560px, calc(100vw - 52px));
  margin-top: 8px;
  white-space: normal;
}

.result-feedback-action {
  min-height: 32px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-80);
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.result-feedback-action:hover,
.result-feedback-action:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
  outline: none;
}

.thinking-item .result-feedback-actions {
  max-width: calc(100% - 22px);
  margin: 6px 0 0 22px;
}

.capability-run-bubble {
  position: relative;
  max-width: min(560px, calc(100vw - 48px));
  padding: 14px 15px;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.capability-run-bubble::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.36),
    rgba(255, 255, 255, 0.02) 30%,
    rgba(255, 255, 255, 0.02) 70%,
    rgba(255, 255, 255, 0.28)
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.capability-run-bubble > * {
  position: relative;
  z-index: 1;
}

.capability-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.capability-action {
  height: 32px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 16px;
}

.capability-action:first-child {
  background: var(--accent-soft);
  color: var(--text-90);
}

.empty-state {
  display: grid;
  place-items: center;
  width: min(100%, 360px);
  margin: auto;
  text-align: center;
}

.empty-state-intro {
  display: grid;
  justify-items: center;
  width: 100%;
}

.empty-state h2 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.25;
  font-weight: 400;
}

.quick-skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.quick-skill-pill {
  min-height: 32px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-80);
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
}

.quick-skill-pill:hover,
.quick-skill-pill:focus-visible {
  outline: none;
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
}

.thinking-bubble {
  --thinking-type-size: 12.5px;
  display: grid;
  grid-template-rows: auto auto;
  width: min(434px, calc(100% - 16px));
  max-width: 100%;
  min-width: 0;
  padding: 0;
  overflow: visible;
  white-space: normal;
}

.thinking-toggle,
.thinking-title,
.thinking-time,
.thinking-item,
.thinking-item-row,
.thinking-item-caret,
.thinking-item-title,
.thinking-item-status,
.thinking-item-detail {
  font-size: var(--thinking-type-size);
}

.thinking-toggle {
  display: inline-grid;
  grid-template-columns: minmax(0, auto) auto 13px;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: min(260px, calc(100vw - 48px));
  min-height: 24px;
  padding: 0;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--text-32);
  text-align: left;
}

.thinking-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--focus);
}

.thinking-caret {
  display: inline-grid;
  place-items: center;
  width: 13px;
  height: 16px;
  color: var(--text-42);
  font-size: 15px;
  line-height: 1;
  text-align: center;
  transform-origin: center;
  transition: transform 140ms var(--ease);
}

.thinking-toggle[aria-expanded="true"] .thinking-caret {
  transform: rotate(90deg);
}

.thinking-title,
.thinking-time {
  min-width: 0;
  color: var(--text-42);
  font-weight: 500;
  line-height: 16px;
}

.thinking-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.thinking-time {
  white-space: nowrap;
}

.thinking-details {
  display: grid;
  gap: 6px;
  width: calc(100% - 4px);
  max-width: 430px;
  min-width: 0;
  margin: 9px 0 0 4px;
  padding: 0 0 2px;
}

.thinking-details[hidden] {
  display: none;
}

.thinking-list {
  position: relative;
  display: grid;
  gap: 9px;
  padding: 0 0 4px 19px;
}

.thinking-list::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 9px;
  left: 7.5px;
  width: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.thinking-item {
  position: relative;
  min-width: 0;
  color: var(--text-52);
  line-height: 1.45;
}

.thinking-item::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: -15px;
  top: 3px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 0 3px var(--bg);
}

.thinking-item.is-running::before {
  background: var(--bg);
  box-shadow: 0 0 0 1.5px var(--accent);
  animation: sppulse 1.4s var(--ease) infinite;
}

.thinking-item-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: start;
  gap: 5px;
  width: 100%;
  min-height: 20px;
  padding: 0;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border-radius: 5px;
  color: inherit;
  text-align: left;
}

.thinking-item-row:not(:disabled) {
  cursor: pointer;
}

.thinking-item-row:not(:disabled):hover .thinking-item-title {
  color: var(--text-72);
}

.thinking-item-row:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--focus);
}

.thinking-item-caret {
  display: inline-block;
  color: var(--text-32);
  line-height: 17px;
  opacity: 0;
  transform-origin: center;
  transition: transform 140ms var(--ease), opacity 140ms var(--ease);
}

.thinking-item.has-detail .thinking-item-caret {
  opacity: 1;
}

.thinking-item-row[aria-expanded="true"] .thinking-item-caret {
  transform: rotate(90deg);
}

.thinking-item-title {
  min-width: 0;
  color: var(--text-52);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.thinking-item-status {
  color: var(--text-32);
  font-weight: 400;
  line-height: 17px;
  white-space: nowrap;
}

.thinking-item.is-running .thinking-item-title {
  color: var(--text-72);
}

.thinking-item.is-error .thinking-item-status,
.thinking-item.is-error .thinking-item-title {
  color: var(--danger);
}

.thinking-item-detail {
  margin: 5px 0 1px 17px;
  padding: 8px 10px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-42);
  font-weight: 400;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.composer {
  display: contents;
  background: transparent;
  box-shadow: none;
}

.composer-card {
  position: absolute;
  z-index: 8;
  right: 16px;
  bottom: 16px;
  left: 16px;
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 87px;
  padding: 14px 14px 13px;
  border-radius: 24px;
  background: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05)), #000;
}

.composer.is-drop-target .composer-card {
  background: linear-gradient(rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.07)), #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
}

.composer.is-disabled .composer-card {
  background: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05)), #000;
  opacity: 0.5;
}

.prompt-input {
  min-height: 20px;
  max-height: 132px;
  padding: 0 0 42px;
  border: 0;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.45;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.prompt-input:empty::before {
  content: attr(data-placeholder);
  color: var(--text-32);
}

.prompt-input[aria-disabled="true"] {
  cursor: default;
}

.attachment-list {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 0 3px;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.attachment-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  gap: 6px;
  flex: 1 1 156px;
  min-width: 0;
  min-height: 48px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-72);
}

.attachment-card-image {
  display: block;
  flex: 0 0 clamp(92px, 26vw, 112px);
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 1;
  border: 0;
  border-radius: 18px;
  background: transparent;
}

.attachment-card.has-preview:hover {
  background: rgba(255, 255, 255, 0.095);
}

.attachment-card-image.has-preview:hover {
  background: transparent;
}

.attachment-preview {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.attachment-card.has-preview .attachment-preview {
  cursor: pointer;
}

.attachment-image-preview {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: zoom-in;
}

.attachment-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attachment-preview:focus-visible {
  outline: none;
  border-radius: 7px;
  box-shadow: 0 0 0 2px var(--focus);
}

.attachment-glyph {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-90);
  font-size: 9px;
  font-weight: 650;
  line-height: 1;
}

.attachment-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.attachment-kind,
.attachment-meta {
  min-width: 0;
  overflow: hidden;
  color: var(--text-42);
  font-size: 10.5px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-title {
  min-width: 0;
  overflow: hidden;
  color: var(--text-90);
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-remove {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-62);
  cursor: pointer;
}

.attachment-card-image .attachment-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  background: #fff;
  color: #111;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.36);
}

.attachment-remove:hover,
.attachment-remove:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
  outline: none;
}

.attachment-card-image .attachment-remove:hover,
.attachment-card-image .attachment-remove:focus-visible {
  background: rgba(255, 255, 255, 0.88);
  color: #111;
}

.attachment-remove-icon {
  display: block;
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.composer-actions {
  position: static;
  z-index: 3;
  display: block;
  margin-top: 0;
  padding-right: 0;
}

.composer-pickers {
  position: absolute;
  z-index: 3;
  left: 10px;
  right: 48px;
  bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.picker {
  position: relative;
  min-width: 0;
}

.attachment-button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border: 0;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-62);
}

.attachment-button svg {
  width: 14px;
  height: 14px;
}

.attachment-button:hover,
.attachment-button:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
}

.picker-button {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) 13px;
  align-items: center;
  gap: 5px;
  max-width: 152px;
  height: 28px;
  min-height: 28px;
  padding: 0 10px 0 11px;
  border: 0;
  border-color: var(--text-80);
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-62);
  text-align: left;
}

.picker-button[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
}

.picker-button span {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 12px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker-button svg {
  width: 13px;
  height: 13px;
  color: currentColor;
  opacity: 0.55;
}

.picker-button[aria-expanded="true"] svg {
  transform: rotate(180deg);
  opacity: 0.75;
}

.picker-menu {
  position: absolute;
  z-index: 10;
  bottom: calc(100% + 8px);
  left: 0;
  width: min(236px, calc(100vw - 32px));
  max-height: min(300px, 55vh);
  overflow-y: auto;
  padding: 6px;
  border: 0;
  border-radius: 14px;
  background: var(--ink-700);
  box-shadow: var(--shadow-popover);
}

#effort-picker .picker-menu {
  right: 0;
  left: auto;
  width: min(228px, calc(100vw - 32px));
}

.picker-menu::before {
  content: attr(aria-label);
  display: block;
  padding: 7px 9px 6px;
  color: var(--text-52);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
}

.picker-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--text-90);
  line-height: 1.25;
  text-align: left;
}

.picker-option[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.picker-option:hover,
.picker-option:focus-visible {
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}

.picker-option-label {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker-option-subtitle {
  min-width: 0;
  margin-top: 1px;
  overflow: hidden;
  color: var(--text-42);
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker-option-check {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

.picker-option-text {
  display: grid;
  min-width: 0;
}

.status-announcer {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.icon-button,
.send-button,
.pill-button {
  display: inline-grid;
  place-items: center;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: background 160ms var(--ease), color 160ms var(--ease), opacity 160ms var(--ease), transform 160ms var(--ease);
}

.icon-button {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-62);
}

.icon-button:hover,
.icon-button:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.topbar-icon-control {
  border: 0;
  border-radius: 12px;
  background: transparent;
}

.topbar-icon-control:hover,
.topbar-icon-control:focus-visible {
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.menu-button {
  padding: 0;
  line-height: 0;
}

.menu-button[aria-expanded="true"] {
  position: fixed;
  z-index: 31;
  top: 10px;
  left: 16px;
}

.menu-panel-icon {
  display: block;
  width: 22px;
  height: 22px;
  margin: auto;
  stroke-width: 1.55;
}

.menu-panel-divider {
  transform: translateX(0);
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 220ms var(--ease);
}

.menu-button[aria-expanded="true"] .menu-panel-divider {
  transform: translateX(5.5px);
}

.new-chat-icon {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
}

.pill-button {
  min-width: 58px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-72);
  font-size: 12.5px;
  font-weight: 500;
}

.account-panel .pill-button,
.provider-panel .pill-button {
  min-width: 0;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-62);
  font-size: 11.5px;
}

#spaceport-sign-out,
#provider-sign-out {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
}

#spaceport-sign-out:hover,
#spaceport-sign-out:focus-visible,
#provider-sign-out:hover,
#provider-sign-out:focus-visible {
  outline: none;
  background: var(--text);
  color: var(--accent-contrast);
}

.chat-drawer .icon-button {
  background: transparent;
  color: var(--text-62);
}

.chat-drawer .drawer-title {
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
}

.chat-drawer .drawer-body {
  color: var(--text-62);
  font-family: var(--font-ui);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0;
}

.primary-action {
  width: 100%;
  min-height: 40px;
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.18);
}

.quiet-action {
  background: transparent;
  color: var(--text-52);
}

.link-button {
  width: fit-content;
  min-height: 24px;
  padding: 0;
  border: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 12px;
  line-height: 16px;
  text-align: left;
}

.send-button {
  position: absolute;
  z-index: 2;
  right: 8px;
  bottom: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 2px 12px rgba(255, 255, 255, 0.22);
}

.send-button[data-action="queue"] {
  background: #236bce;
  box-shadow: 0 2px 12px rgba(35, 107, 206, 0.38);
}

.send-button[data-action="stop"] {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 2px 12px rgba(255, 255, 255, 0.22);
}

.send-button[data-action="stop"] .stop-glyph {
  fill: currentColor;
  stroke: none;
}

.composer.is-disabled .send-button {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.4);
  box-shadow: none;
  opacity: 1;
}

.send-button:hover,
.primary-action:hover,
.send-button:focus-visible,
.primary-action:focus-visible {
  background: #e6e6e6;
  color: var(--accent-contrast);
}

.send-button[data-action="queue"]:hover,
.send-button[data-action="queue"]:focus-visible {
  background: #2f81f7;
}

.send-button[data-action="stop"]:hover,
.send-button[data-action="stop"]:focus-visible {
  background: #e6e6e6;
  color: var(--accent-contrast);
}

button:active:not(:disabled) {
  transform: scale(0.97);
}

button:disabled,
.attachment-button:disabled,
.picker[aria-disabled="true"] .picker-button,
.prompt-input[aria-disabled="true"] {
  cursor: default;
}

.picker-button:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--focus);
}

.prompt-input:focus {
  outline: none;
  box-shadow: none;
}

svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes sppulse {
  0%,
  100% {
    box-shadow: 0 0 0 1.5px var(--accent), 0 0 0 0 rgba(255, 255, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 0 1.5px var(--accent), 0 0 0 5px rgba(255, 255, 255, 0);
  }
}

@media (max-width: 390px) {
  .topbar,
  .messages,
  .queued-turns {
    padding-left: 12px;
    padding-right: 12px;
  }

  .connection-panel {
    padding-left: 12px;
    padding-right: 12px;
  }

  .composer-card {
    right: 12px;
    left: 12px;
    border-radius: 22px;
    padding: 12px 12px 9px;
  }

  .menu-button[aria-expanded="true"] {
    left: 12px;
  }

  .picker-button {
    max-width: 132px;
  }

  .bubble,
  .thinking-bubble,
  .capability-run-bubble {
    max-width: calc(100vw - 32px);
  }
}
