:root {
  color-scheme: dark;
}

html[data-theme="light"] {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  transition: background 0.25s ease, color 0.25s ease;
}

a,
button,
select {
  font: inherit;
}

.site-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0 0.5rem;
}

.brand-link {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  background: var(--control-bg);
  border: 1px solid var(--control-border);
  border-radius: 16px;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.brand-link:hover,
.brand-link:focus {
  transform: translateY(-2px);
  border-color: rgba(30, 144, 255, 0.45);
}

.brand-link svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.topbar-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.9rem;
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

.control-group {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--control-bg);
  border: 1px solid var(--control-border);
}

.control-label {
  color: var(--fg-muted);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.language-select {
  min-width: 120px;
  background: transparent;
  color: var(--fg);
  border: none;
  outline: none;
  cursor: pointer;
}

.language-select option {
  color: #0f172a;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.68rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  color: var(--fg);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus {
  transform: translateY(-1px);
  border-color: rgba(30, 144, 255, 0.45);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1.1rem;
}

.nav-links a {
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--fg);
}

.feedback-page-section {
  padding: 1rem 0 4.5rem;
}

.feedback-page-shell {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 1.5rem;
}

.feedback-page-panel {
  padding: 1.6rem;
  border-radius: 24px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  background: var(--card-bg, rgba(17, 23, 34, 0.85));
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.16);
  backdrop-filter: blur(18px);
}

.feedback-page-status {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.feedback-page-status-copy {
  display: grid;
  gap: 0.75rem;
}

.feedback-page-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  background: rgba(17, 119, 238, 0.1);
  color: var(--accent, #1177ee);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feedback-page-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.2;
}

.feedback-page-copy,
.feedback-page-note,
.feedback-page-success p {
  margin: 0;
  color: var(--fg-muted, #94a3b8);
}

.feedback-page-note {
  font-size: 0.92rem;
}

.feedback-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.feedback-page-success {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding: 1rem 1.05rem;
  border-radius: 18px;
  border: 1px solid rgba(17, 119, 238, 0.18);
  background: rgba(17, 119, 238, 0.08);
}

.feedback-page-success strong {
  color: var(--fg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .site-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .feedback-page-shell {
    grid-template-columns: 1fr;
  }

  .topbar-right {
    width: 100%;
    align-items: flex-start;
  }

  .control-row,
  .nav-links {
    justify-content: flex-start;
  }
}

.chat-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.88rem 1.12rem;
  border: 1px solid rgba(30, 144, 255, 0.24);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(17, 119, 238, 0.96), rgba(32, 168, 216, 0.94));
  color: #f8fbff;
  box-shadow: 0 18px 44px rgba(17, 119, 238, 0.22);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.chat-launcher.is-ready {
  box-shadow: 0 22px 48px rgba(17, 119, 238, 0.28);
}

.chat-launcher:hover,
.chat-launcher:focus {
  transform: translateY(-2px);
  box-shadow: 0 26px 50px rgba(17, 119, 238, 0.3);
}

.chat-launcher svg,
.chat-icon-button svg,
.chat-send-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.chat-overlay {
  position: fixed;
  inset: 0;
  z-index: 79;
  background: rgba(6, 10, 18, 0.56);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.chat-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.chat-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 80;
  width: min(100vw, 460px);
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  background: rgba(9, 14, 22, 0.97);
  border-left: 1px solid rgba(108, 133, 164, 0.18);
  backdrop-filter: blur(22px);
  transform: translateX(100%);
  transition: transform 0.22s ease;
  overflow: hidden;
}

.chat-drawer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 180px;
  background:
    radial-gradient(circle at top right, rgba(17, 119, 238, 0.18), transparent 56%),
    radial-gradient(circle at top left, rgba(32, 168, 216, 0.16), transparent 48%);
  pointer-events: none;
}

html[data-theme="light"] .chat-drawer {
  background: rgba(245, 249, 255, 0.96);
  border-left-color: rgba(15, 23, 42, 0.08);
}

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

.chat-header,
.chat-toolbar,
.chat-footer {
  position: relative;
  z-index: 1;
}

.chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.35rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}

.chat-header-copy strong,
.chat-settings-copy strong {
  display: block;
  font-size: 1rem;
}

.chat-header-copy span,
.chat-settings-copy span {
  display: block;
  margin-top: 0.35rem;
  color: var(--fg-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.chat-icon-button,
.chat-subtle-button,
.chat-primary-button,
.chat-send-button,
.chat-connection-chip,
.chat-saved-chip,
.chat-starter-button {
  appearance: none;
  border: 1px solid transparent;
  font: inherit;
}

.chat-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border-color: var(--control-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--fg);
  cursor: pointer;
}

html[data-theme="light"] .chat-icon-button {
  background: rgba(17, 119, 238, 0.06);
}

.chat-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 0.8rem;
  padding: 0 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
}

.chat-toolbar-group {
  flex: 1;
  display: grid;
  gap: 0.45rem;
}

.chat-toolbar-label,
.chat-field label,
.chat-saved-title {
  color: var(--fg-muted);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chat-select,
.chat-input {
  width: 100%;
  padding: 0.82rem 0.92rem;
  border-radius: 14px;
  border: 1px solid var(--control-border);
  background: var(--control-bg);
  color: var(--fg);
  outline: none;
}

.chat-select:focus,
.chat-input:focus {
  border-color: rgba(17, 119, 238, 0.45);
}

.chat-select option {
  color: #0f172a;
}

.chat-connection-chip {
  min-width: 138px;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.82rem 0.95rem;
  border-radius: 16px;
  border-color: rgba(108, 133, 164, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
  cursor: pointer;
}

.chat-connection-chip.is-ready {
  background: rgba(28, 207, 133, 0.08);
  border-color: rgba(28, 207, 133, 0.18);
}

.chat-connection-chip.is-missing {
  background: rgba(248, 113, 113, 0.08);
  border-color: rgba(248, 113, 113, 0.16);
}

.chat-connection-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #f97373;
  flex: 0 0 auto;
}

.chat-connection-chip.is-ready .chat-connection-dot {
  background: #36c98d;
}

.chat-connection-copy {
  display: grid;
  gap: 0.15rem;
  text-align: left;
}

.chat-connection-copy strong {
  font-size: 0.92rem;
}

.chat-connection-copy span {
  color: var(--fg-muted);
  font-size: 0.78rem;
}

.github-auth-slot {
  display: inline-flex;
  align-items: center;
}

.github-auth-slot-chat {
  margin-right: 0.75rem;
}

.github-auth-actions-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.github-auth-button,
.github-auth-profile,
.github-auth-icon-button {
  appearance: none;
  font: inherit;
}

.github-auth-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--control-border, rgba(148, 163, 184, 0.22));
  background: var(--control-bg, rgba(255, 255, 255, 0.08));
  color: var(--fg);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.github-auth-button:hover,
.github-auth-button:focus,
.github-auth-profile:hover,
.github-auth-profile:focus {
  transform: translateY(-1px);
  border-color: rgba(30, 144, 255, 0.34);
}

.github-auth-button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
}

.github-auth-button-primary {
  background: linear-gradient(135deg, rgba(17, 119, 238, 0.96), rgba(36, 95, 221, 0.96));
  border-color: rgba(17, 119, 238, 0.32);
  color: #f8fbff;
  box-shadow: 0 12px 24px rgba(17, 119, 238, 0.18);
}

.github-auth-button-secondary {
  background: var(--control-bg, rgba(255, 255, 255, 0.08));
}

.github-auth-button-ghost {
  background: transparent;
}

.github-auth-profile {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.38rem 0.85rem 0.38rem 0.4rem;
  border-radius: 999px;
  border: 1px solid var(--control-border, rgba(148, 163, 184, 0.22));
  background: var(--control-bg, rgba(255, 255, 255, 0.08));
  color: var(--fg);
  text-decoration: none;
}

.github-auth-profile img,
.github-auth-avatar-fallback {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.github-auth-profile img {
  object-fit: cover;
}

.github-auth-avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(17, 119, 238, 0.14);
  color: var(--accent, #1177ee);
  font-weight: 700;
}

.github-auth-profile-name {
  font-size: 0.92rem;
}

.github-auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 88;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(6px);
}

.github-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 89;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.github-auth-overlay[hidden],
.github-auth-modal[hidden] {
  display: none !important;
}

.github-auth-card {
  width: min(100%, 560px);
  max-height: min(86vh, 760px);
  overflow: auto;
  border: 1px solid var(--control-border, rgba(148, 163, 184, 0.22));
  border-radius: 28px;
  background: var(--card-bg, rgba(15, 22, 33, 0.96));
  color: var(--fg);
  box-shadow: 0 32px 72px rgba(2, 6, 23, 0.3);
  backdrop-filter: blur(20px);
}

html[data-theme="light"] .github-auth-card {
  background: rgba(255, 255, 255, 0.96);
}

.github-auth-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 1.4rem 0;
}

.github-auth-card-title {
  margin: 0;
  font-size: 1.35rem;
}

.github-auth-card-subtitle {
  margin: 0.4rem 0 0;
  color: var(--fg-muted);
}

.github-auth-card-body {
  padding: 1.35rem 1.4rem 1.4rem;
}

.github-auth-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--fg-muted);
  display: grid;
  gap: 0.5rem;
}

.github-auth-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.github-auth-form {
  display: grid;
  gap: 1rem;
}

.github-auth-field {
  display: grid;
  gap: 0.5rem;
}

.github-auth-field-label {
  color: var(--fg-muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.github-auth-input,
.github-auth-select,
.github-auth-textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  border: 1px solid var(--control-border, rgba(148, 163, 184, 0.22));
  background: var(--control-bg, rgba(255, 255, 255, 0.08));
  color: var(--fg);
  outline: none;
}

.github-auth-textarea {
  resize: vertical;
  min-height: 168px;
}

.github-auth-input:focus,
.github-auth-select:focus,
.github-auth-textarea:focus {
  border-color: rgba(17, 119, 238, 0.42);
}

.github-auth-select option {
  color: #0f172a;
}

.github-auth-error {
  margin: 0;
  color: #d94b6a;
}

.github-auth-icon-button {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid var(--control-border, rgba(148, 163, 184, 0.22));
  background: var(--control-bg, rgba(255, 255, 255, 0.08));
  color: var(--fg);
  cursor: pointer;
}

.github-auth-icon-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

body.github-auth-modal-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .github-auth-slot,
  .github-auth-actions-inline {
    width: 100%;
  }

  .github-auth-actions-inline {
    justify-content: flex-start;
  }

  .github-auth-slot-chat {
    margin-right: 0;
  }

  .github-auth-profile {
    max-width: 100%;
  }

  .github-auth-profile-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .github-auth-card-head,
  .github-auth-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .github-auth-icon-button {
    align-self: flex-end;
  }
}

.chat-body {
  position: relative;
  z-index: 1;
  overflow-y: auto;
  padding: 1.15rem 1.25rem 1.45rem;
}

.chat-welcome,
.chat-setup-card {
  padding: 1.12rem 1.08rem;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.chat-welcome {
  background:
    linear-gradient(180deg, rgba(17, 119, 238, 0.16), rgba(17, 119, 238, 0.04)),
    rgba(255, 255, 255, 0.03);
}

html[data-theme="light"] .chat-welcome,
html[data-theme="light"] .chat-setup-card,
html[data-theme="light"] .chat-composer,
html[data-theme="light"] .chat-settings-panel,
html[data-theme="light"] .chat-icon-button,
html[data-theme="light"] .chat-starter-button,
html[data-theme="light"] .chat-subtle-button,
html[data-theme="light"] .chat-saved-chip {
  background: rgba(17, 119, 238, 0.05);
}

.chat-welcome-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  padding: 0.36rem 0.7rem;
  border-radius: 999px;
  background: rgba(17, 119, 238, 0.12);
  color: var(--fg);
  font-size: 0.78rem;
}

.chat-welcome h3,
.chat-setup-card strong {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.35;
}

.chat-welcome p,
.chat-setup-card p,
.chat-config-note,
.chat-saved-empty,
.chat-status {
  color: var(--fg-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.chat-welcome-model {
  margin-top: 0.9rem;
  color: var(--fg);
  font-size: 0.88rem;
}

.chat-welcome-actions,
.chat-settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.95rem;
}

.chat-setup-card {
  margin-top: 0.95rem;
}

.chat-starters {
  margin-top: 1rem;
}

.chat-starters h4 {
  margin: 0 0 0.8rem;
  font-size: 0.92rem;
}

.chat-starter-list,
.chat-saved-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.chat-starter-button,
.chat-saved-chip,
.chat-subtle-button,
.chat-primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  padding: 0.78rem 0.92rem;
  border-radius: 14px;
  cursor: pointer;
}

.chat-starter-button,
.chat-subtle-button,
.chat-saved-chip {
  border-color: var(--control-border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
}

.chat-primary-button,
.chat-send-button {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #f8fbff;
}

.chat-message-list {
  display: grid;
  gap: 1rem;
}

.chat-message {
  display: grid;
  gap: 0.42rem;
}

.chat-message[data-role="user"] {
  justify-items: end;
}

.chat-message-head {
  width: min(100%, 84%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--fg-muted);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chat-message-bubble {
  width: fit-content;
  max-width: min(84%, 32rem);
  padding: 0.98rem 1.02rem;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--fg);
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.08);
}

.chat-message[data-role="user"] .chat-message-bubble {
  background: linear-gradient(135deg, rgba(17, 119, 238, 0.28), rgba(32, 168, 216, 0.18));
  border-color: rgba(17, 119, 238, 0.16);
}

.chat-message[data-role="assistant"] .chat-message-bubble {
  background: rgba(255, 255, 255, 0.03);
}

.chat-message[data-pending="true"] .chat-message-bubble {
  opacity: 0.86;
}

.chat-footer {
  padding: 0.95rem 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
}

.chat-status {
  min-height: 1.4rem;
  margin-bottom: 0.7rem;
}

.chat-status.is-error {
  color: #f97373;
}

.chat-status.is-success {
  color: #36c98d;
}

.chat-composer {
  padding: 0.9rem 0.92rem 0.8rem;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.1);
}

.chat-textarea {
  width: 100%;
  min-height: 56px;
  max-height: 220px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  resize: none;
  outline: none;
  font: inherit;
  line-height: 1.55;
  overflow-y: auto;
}

.chat-textarea::placeholder {
  color: var(--fg-muted);
}

.chat-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  margin-top: 0.75rem;
}

.chat-footer-hint {
  color: var(--fg-muted);
  font-size: 0.8rem;
}

.chat-footer-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.chat-send-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.78rem 1rem;
  border-radius: 14px;
  cursor: pointer;
}

.chat-settings-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.chat-settings-layer.is-open {
  opacity: 1;
  pointer-events: auto;
}

.chat-settings-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(7, 12, 20, 0.54);
  cursor: pointer;
}

.chat-settings-panel {
  position: absolute;
  right: 14px;
  left: 14px;
  bottom: 14px;
  max-height: min(76vh, 720px);
  overflow-y: auto;
  padding: 1.05rem;
  border-radius: 24px;
  border: 1px solid rgba(108, 133, 164, 0.18);
  background: rgba(10, 16, 24, 0.98);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.28);
}

.chat-settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.chat-settings-body,
.chat-field {
  display: grid;
  gap: 0.8rem;
}

.chat-saved {
  display: grid;
  gap: 0.8rem;
  margin-top: 0.2rem;
}

.chat-saved-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.chat-saved-count {
  color: var(--fg);
  font-size: 0.82rem;
}

.chat-saved-chip {
  flex-direction: column;
  align-items: flex-start;
  min-width: 148px;
}

.chat-saved-chip strong {
  font-size: 0.88rem;
}

.chat-saved-chip span {
  color: var(--fg-muted);
  font-size: 0.76rem;
}

.chat-saved-chip.is-current {
  border-color: rgba(17, 119, 238, 0.28);
  background: rgba(17, 119, 238, 0.1);
}

.chat-icon-button:hover,
.chat-subtle-button:hover,
.chat-primary-button:hover,
.chat-send-button:hover,
.chat-connection-chip:hover,
.chat-saved-chip:hover,
.chat-starter-button:hover {
  transform: translateY(-1px);
}

.chat-icon-button,
.chat-subtle-button,
.chat-primary-button,
.chat-send-button,
.chat-connection-chip,
.chat-saved-chip,
.chat-starter-button,
.chat-launcher {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.chat-icon-button:disabled,
.chat-subtle-button:disabled,
.chat-primary-button:disabled,
.chat-send-button:disabled,
.chat-connection-chip:disabled,
.chat-launcher:disabled,
.chat-select:disabled,
.chat-input:disabled,
.chat-textarea:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
}

@media (max-width: 720px) {
  .chat-launcher {
    right: 16px;
    bottom: 16px;
  }

  .chat-launcher span {
    display: none;
  }

  .chat-drawer {
    width: 100vw;
  }

  .chat-toolbar,
  .chat-footer-row,
  .chat-settings-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .chat-connection-chip,
  .chat-send-button,
  .chat-footer-actions,
  .chat-settings-actions .chat-primary-button,
  .chat-settings-actions .chat-subtle-button {
    width: 100%;
  }

  .chat-footer-actions {
    justify-content: stretch;
  }

  .chat-message-head,
  .chat-message-bubble {
    max-width: 100%;
    width: 100%;
  }
}

