.ai-coach-shell { box-sizing: border-box; font-family: var(--body, Manrope, sans-serif); color: #1c1913; }
.ai-coach-shell .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; }
.ai-coach-shell *, .ai-coach-shell *::before, .ai-coach-shell *::after { box-sizing: border-box; }
.ai-coach-shell[hidden] { display: none !important; }
.ai-coach-embedded { margin: 0 5vw 42px; padding: clamp(20px, 3vw, 34px); background: #0b0a08; color: #f8f3e8; border: 1px solid rgba(205, 165, 91, .42); border-radius: 16px; box-shadow: 0 20px 55px rgba(38, 28, 13, .15); }
.ai-coach-heading { display: flex; align-items: flex-start; gap: 16px; }
.ai-coach-heading > div { flex: 1; min-width: 0; }
.ai-coach-mark { width: 48px; height: 48px; flex: 0 0 48px; display: grid; place-items: center; border-radius: 50%; color: #17120a; background: linear-gradient(140deg, #f0d893, #b8863e); font: 800 14px/1 var(--display, Manrope, sans-serif); letter-spacing: .05em; }
.ai-coach-kicker { display: block; color: #d6b36f; font-size: 10px; font-weight: 800; letter-spacing: .19em; }
.ai-coach-heading h2 { margin: 7px 0 6px; color: inherit; font: 700 clamp(23px, 3vw, 32px)/1.15 var(--display, Manrope, sans-serif); letter-spacing: -.035em; }
.ai-coach-heading p { margin: 0; color: #b8b0a4; font-size: 14px; line-height: 1.55; }
.ai-coach-topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 15px; }
.ai-coach-topics button { min-height: 38px; padding: 8px 12px; border: 1px solid #55452b; border-radius: 999px; color: #e9e0cf; background: #15120e; font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1.2; cursor: pointer; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.ai-coach-topics button:hover, .ai-coach-topics button[aria-pressed="true"] { border-color: #d3ad66; color: #17120a; background: #e3c47e; }
.ai-coach-log { max-height: 340px; min-height: 130px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; padding: 14px; border: 1px solid #352d21; border-radius: 12px; background: #11100e; scroll-behavior: smooth; }
.ai-coach-message { max-width: 92%; padding: 11px 13px; border: 1px solid #393329; border-radius: 12px 12px 12px 4px; color: #f4eee1; background: #1a1814; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-coach-message.is-user { align-self: flex-end; border-color: #d8b76f; border-radius: 12px 12px 4px 12px; color: #1b160d; background: #e5c783; }
.ai-coach-message.is-error { border-color: #774c3a; }
.ai-coach-message-label { display: block; margin-bottom: 5px; color: #d4b16c; font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.ai-coach-message.is-user .ai-coach-message-label { color: #735323; }
.ai-coach-message p { margin: 0; font-size: 13px; line-height: 1.6; }
.ai-coach-copy { margin-top: 8px; padding: 4px 0; border: 0; color: #d6b36f; background: transparent; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.ai-coach-human { display: inline-block; margin-top: 2px; color: #dfc17e; font-size: 11px; font-weight: 700; text-decoration: none; }
.ai-coach-human:hover { text-decoration: underline; }
.ai-coach-privacy { margin: 11px 2px; color: #aaa195; font-size: 11px; line-height: 1.5; }
.ai-coach-form { display: flex; align-items: flex-end; gap: 9px; }
.ai-coach-form textarea { width: 100%; min-height: 49px; max-height: 120px; resize: vertical; padding: 12px 13px; border: 1px solid #5a4a30; border-radius: 10px; color: #f8f3e8; background: #15130f; font-family: inherit; font-size: 14px; line-height: 1.5; }
.ai-coach-form textarea::placeholder { color: #928a7d; }
.ai-coach-send { min-height: 47px; flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 0 16px; border: 0; border-radius: 9px; color: #161109; background: linear-gradient(135deg, #f0d893, #bf8d45); font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.ai-coach-send:disabled { opacity: .6; cursor: progress; }
.ai-coach-footnote { margin: 9px 2px 0; color: #978d7d; font-size: 10px; line-height: 1.45; }
.ai-coach-launcher { position: fixed; z-index: 79; right: 22px; bottom: max(22px, env(safe-area-inset-bottom)); min-height: 56px; display: flex; align-items: center; gap: 10px; padding: 7px 17px 7px 8px; border: 1px solid #c49c58; border-radius: 999px; color: #17120a; background: linear-gradient(140deg, #f0d893, #b8863e); box-shadow: 0 12px 32px rgba(0,0,0,.28); font-family: inherit; font-size: 13px; font-weight: 700; line-height: 1.1; cursor: pointer; }
.ai-coach-launcher .ai-coach-mark { width: 39px; height: 39px; flex-basis: 39px; color: #f0d893; background: #090807; border: 1px solid #d2b36e; font-size: 12px; }
.ai-coach-floating { position: fixed; z-index: 78; right: 22px; bottom: 92px; width: min(440px, calc(100vw - 32px)); max-height: min(78vh, 700px); overflow: auto; padding: 20px; border: 1px solid #a47b3d; border-radius: 16px; color: #f8f3e8; background: #0b0a08; box-shadow: 0 24px 70px rgba(0,0,0,.55); }
.ai-coach-floating .ai-coach-heading h2 { font-size: 22px; }
.ai-coach-close { width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid #4c402d; border-radius: 50%; color: #f4eee1; background: #17140f; font-family: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.course-player-body .ai-coach-floating .ai-coach-log { min-height: 150px; max-height: min(42vh, 360px); }
.course-player-body .ai-coach-floating .ai-coach-topics { gap: 6px; margin: 15px 0 12px; }
.course-player-body .ai-coach-floating .ai-coach-topics button { padding: 7px 9px; font-size: 11px; }
@media (max-width: 700px) {
  .ai-coach-embedded { margin: 0 20px 30px; padding: 20px 16px; }
  .ai-coach-heading { gap: 12px; }
  .ai-coach-heading .ai-coach-mark { width: 42px; height: 42px; flex-basis: 42px; }
  .ai-coach-heading p { font-size: 13px; }
  .ai-coach-topics { gap: 7px; margin-top: 17px; }
  .ai-coach-topics button { min-height: 40px; font-size: 12px; }
  .ai-coach-log { max-height: 300px; padding: 11px; }
  .ai-coach-form { align-items: stretch; }
  .ai-coach-send { gap: 6px; padding: 0 12px; }
  .ai-coach-launcher { right: 14px; bottom: max(16px, env(safe-area-inset-bottom)); min-height: 52px; }
  .ai-coach-floating { right: 10px; bottom: max(78px, calc(env(safe-area-inset-bottom) + 72px)); width: calc(100vw - 20px); max-height: min(78vh, 690px); padding: 16px 13px; }
}
