#composer .composer-help {
  flex: 0 0 30px;
  width: 30px;
  height: 34px;
  padding: 0;
  border: 1px solid color-mix(in srgb, currentColor 30%, transparent);
  border-radius: 50%;
  font: italic 600 17px Georgia, serif;
  color: inherit;
  background: transparent;
  align-self: center;
  cursor: pointer;
  touch-action: manipulation;
}

.chat-help {
  box-sizing: border-box;
  width: min(920px, 96vw);
  max-width: 96vw;
  max-height: 92dvh;
  padding: 24px;
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  border-radius: 20px;
  color: CanvasText;
  background: Canvas;
  box-shadow: 0 24px 100px #0008;
  overflow: auto;
}

.chat-help::backdrop {
  background: #111628aa;
  backdrop-filter: blur(6px);
}

.chat-help header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.chat-help-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-help h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.chat-help-tagline {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #7c5cff;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.chat-help h3 {
  margin: 24px 0 10px;
  font-size: 17px;
  font-weight: 600;
}

.chat-help h4 {
  margin: 16px 0 6px;
  font-size: 14px;
  font-weight: 600;
}

.chat-help p,
.chat-help li {
  font-size: 14px;
  line-height: 1.8;
}

.chat-help li + li {
  margin-top: 10px;
}

.chat-help-intro {
  margin: 14px 0 18px;
  font-size: 14px;
  line-height: 1.7;
  opacity: 0.85;
}

.chat-help-note {
  margin-top: 18px;
  padding: 10px 14px;
  border-radius: 8px;
  background: color-mix(in srgb, currentColor 8%, transparent);
  font-size: 13px;
  line-height: 1.6;
}

/* Workspace Mode Selector Bar */
.chat-help-modes {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 0 12px;
  border-bottom: 1px solid color-mix(in srgb, currentColor 12%, transparent);
  margin-bottom: 8px;
}

.chat-help-mode-btn {
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  background: transparent;
  color: inherit;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  min-height: 32px;
  transition: all 0.15s ease;
}

.chat-help-mode-btn:hover {
  background: color-mix(in srgb, currentColor 8%, transparent);
}

.chat-help-mode-btn[aria-pressed=true] {
  background: #7c5cff !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 2px 8px #7c5cff44;
}

/* Section Tabs */
.chat-help-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.chat-help button {
  font: inherit;
  font-size: 13px;
  border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  background: transparent;
  color: inherit;
  padding: 8px 14px;
  border-radius: 9px;
  cursor: pointer;
  min-height: 38px;
}

.chat-help-tabs [aria-pressed=true] {
  background: color-mix(in srgb, currentColor 14%, transparent);
  color: inherit;
  border-color: currentColor;
  font-weight: 600;
}

.chat-help blockquote {
  margin: 12px 0;
  padding: 18px 20px;
  border-left: 3px solid #7c5cff;
  border-radius: 4px 12px 12px 4px;
  background: color-mix(in srgb, #7c5cff 10%, transparent);
  font-size: 15px;
  line-height: 1.65;
  font-style: italic;
}

.chat-help-body > details {
  padding: 14px 0;
  border-bottom: 1px solid color-mix(in srgb, currentColor 10%, transparent);
}

.chat-help summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.5;
}

.chat-help-expert {
  padding: 12px;
  background: color-mix(in srgb, currentColor 6%, transparent);
  border-radius: 10px;
  font-size: 13px;
  margin-top: 8px;
}

.chat-help-expert p {
  margin-bottom: 0;
}

/* Example Cards */
.chat-help-examples {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.chat-help-example-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px;
  border: 1px solid color-mix(in srgb, currentColor 14%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, currentColor 4%, transparent);
}

.chat-help-example-card h4 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #7c5cff;
}

.chat-help-example-card blockquote {
  margin: 0 0 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
  flex: 1;
}

.chat-help-use-btn {
  font-size: 12px !important;
  min-height: 32px !important;
  padding: 6px 12px !important;
  align-self: flex-start;
  border-radius: 6px !important;
  background: color-mix(in srgb, #7c5cff 18%, transparent) !important;
  border: 1px solid #7c5cff !important;
  color: inherit !important;
  font-weight: 600 !important;
}

.chat-help-use-btn:hover {
  background: #7c5cff !important;
  color: #ffffff !important;
}

.chat-help .showcase-grid {
  margin-top: 18px;
}

@media (max-width: 799px) {
  #composer .composer-help {
    flex-basis: 28px;
    width: 28px;
    height: 32px;
    margin: 0;
  }
  .chat-help {
    padding: 16px;
    max-height: 90dvh;
  }
  .chat-help h2 {
    font-size: 19px;
  }
  .chat-help-modes {
    gap: 4px;
    overflow-x: auto;
    white-space: nowrap;
    flex-wrap: nowrap;
    padding-bottom: 8px;
  }
  .chat-help-mode-btn {
    padding: 5px 10px;
    font-size: 11px;
    min-height: 28px;
  }
  .chat-help-tabs {
    gap: 4px;
    overflow-x: auto;
    white-space: nowrap;
    flex-wrap: nowrap;
    padding-bottom: 8px;
  }
  .chat-help-tabs button {
    padding: 6px 10px;
    font-size: 12px;
    min-height: 34px;
  }
  .chat-help-examples {
    grid-template-columns: 1fr;
  }
}

/* Layer rule ensuring the help button displays beautifully across ALL view modes and tool screens */
@layer composer-refinement {
  #shell #composer #composer-help,
  #shell[data-view-mode] #composer #composer-help,
  #shell.tool-screen-open #composer #composer-help {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 28px !important;
    min-width: 28px !important;
    width: 28px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 50% !important;
    font: italic 600 16px Georgia, serif !important;
    color: inherit !important;
    background: transparent !important;
    border: 1px solid color-mix(in srgb, currentColor 30%, transparent) !important;
    cursor: pointer !important;
    touch-action: manipulation;
  }
}
