.sg360-ai-widget {
  --sg360-orange: #ed5807;
  --sg360-ink: #111827;
  --sg360-muted: #667085;
  --sg360-line: #e6e8ec;
  max-width: 980px;
  margin: 44px auto 12px;
  padding: 28px;
  border: 1px solid var(--sg360-line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(17, 24, 39, .10);
  font-family: inherit;
}
.sg360-ai-header { display: flex; gap: 18px; align-items: center; padding-bottom: 22px; border-bottom: 1px solid var(--sg360-line); }
.sg360-ai-mascot { width: 144px; height: 144px; flex: 0 0 144px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: #f3f5f7; color: var(--sg360-ink); font-size: 52px; border: 5px solid var(--sg360-orange); box-shadow: 0 8px 20px rgba(17, 24, 39, .10); }
.sg360-ai-mascot img { width: 100%; height: 100%; padding: 6px; box-sizing: border-box; object-fit: contain; background: #f3f5f7; }
.sg360-ai-eyebrow { margin: 0 0 4px; color: var(--sg360-orange); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.sg360-ai-widget h2 { margin: 0; color: var(--sg360-ink); font-size: clamp(22px, 3vw, 30px); line-height: 1.1; }
.sg360-ai-subtitle { margin: 6px 0 0; color: var(--sg360-muted); font-size: 14px; }
.sg360-ai-messages { display: grid; gap: 12px; max-height: 460px; overflow-y: auto; padding: 22px 2px 12px; }
.sg360-ai-message { max-width: 88%; padding: 14px 16px; border-radius: 16px; }
.sg360-ai-message strong { display: block; margin-bottom: 5px; color: var(--sg360-ink); font-size: 12px; }
.sg360-ai-message p { margin: 0; color: var(--sg360-ink); font-size: 15px; line-height: 1.6; white-space: pre-wrap; }
.sg360-ai-message.assistant { justify-self: start; background: #f4f5f7; border-left: 4px solid var(--sg360-orange); }
.sg360-ai-message.user { justify-self: end; background: var(--sg360-ink); }
.sg360-ai-message.user strong, .sg360-ai-message.user p { color: #fff; }
.sg360-ai-sources { display: block; margin-top: 9px; color: var(--sg360-muted); font-size: 11px; }
.sg360-ai-generated-image { margin: 14px 0 0; max-width: 620px; }
.sg360-ai-generated-image a { display: block; border-radius: 14px; overflow: hidden; background: #f4f5f7; }
.sg360-ai-generated-image img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; }
.sg360-ai-generated-image figcaption { margin-top: 8px; color: var(--sg360-muted); font-size: 11px; line-height: 1.45; }
.sg360-ai-image-error { display: block; margin-top: 10px; color: #a33a12; font-size: 12px; line-height: 1.45; }
.sg360-ai-form { margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--sg360-line); }
.sg360-ai-form textarea { display: block; width: 100%; min-height: 92px; resize: vertical; padding: 13px 14px; border: 1px solid #cfd4dc; border-radius: 12px; color: var(--sg360-ink); background: #fff; font: inherit; box-sizing: border-box; }
.sg360-ai-form textarea:focus { outline: 3px solid rgba(237, 88, 7, .20); border-color: var(--sg360-orange); }
.sg360-ai-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; }
.sg360-ai-form-footer small { color: var(--sg360-muted); font-size: 11px; }
.sg360-ai-form button { border: 0; border-radius: 10px; padding: 12px 18px; background: var(--sg360-orange); color: #fff; font-weight: 800; cursor: pointer; }
.sg360-ai-form button:hover { background: #c94700; }
.sg360-ai-form button:disabled { opacity: .65; cursor: wait; }
.sg360-ai-locked { display: grid; gap: 6px; margin-top: 22px; padding: 16px; border-radius: 12px; background: #fff7f2; border-left: 4px solid var(--sg360-orange); color: var(--sg360-ink); }
.sg360-ai-locked strong { font-size: 15px; }
.sg360-ai-locked span { font-size: 13px; line-height: 1.55; }
.sg360-ai-locked a { justify-self: start; margin-top: 4px; color: var(--sg360-orange); font-weight: 800; text-decoration: underline; }
.sg360-course-enrollment-notice { display: grid; gap: 5px; margin: 14px 0 0; padding: 14px 16px; border-radius: 12px; background: #fff7f2; border-left: 4px solid var(--sg360-orange); color: var(--sg360-ink); }
.sg360-course-enrollment-notice strong { font-size: 15px; }
.sg360-course-enrollment-notice span { font-size: 13px; line-height: 1.55; }
.sg360-course-enrollment-notice a { color: var(--sg360-orange); font-weight: 800; text-decoration: underline; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
@media (max-width: 600px) {
  .sg360-ai-widget { margin-top: 28px; padding: 18px; border-radius: 18px; }
  .sg360-ai-header { align-items: flex-start; gap: 12px; }
  .sg360-ai-mascot { width: 110px; height: 110px; flex-basis: 110px; font-size: 38px; }
  .sg360-ai-message { max-width: 96%; }
  .sg360-ai-form-footer { align-items: stretch; flex-direction: column; }
  .sg360-ai-form button { width: 100%; }
}
