.hw-ai-coach-shell {
  border: 1px solid #d9dfd6;
  border-radius: 22px;
  background: linear-gradient(180deg, #fbfcf8 0%, #f3f1e8 100%);
  padding: 24px;
  box-shadow: 0 18px 40px rgba(48, 58, 40, 0.08);
}

.hw-ai-coach-shell.is-locked {
  padding: 18px;
  border-style: dashed;
  background: #f7f7f5;
}

.hw-ai-coach-shell__header h2 {
  margin: 6px 0 8px;
  font-size: 28px;
  line-height: 1.15;
}

.hw-ai-coach-shell__header p,
.hw-ai-coach-shell__message,
.hw-ai-coach-flyout__body p,
.hw-ai-coach-shell__hint {
  color: #4f5b4b;
}

.hw-ai-coach-shell__kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6f7e68;
}

.hw-ai-coach-panel {
  display: grid;
}

.hw-ai-coach-shell__body {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.hw-ai-coach-shell__messages {
  min-height: 180px;
  max-height: 420px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #e1e5d9;
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.hw-ai-coach-shell__message {
  max-width: min(88%, 720px);
  padding: 12px 14px;
  border-radius: 16px;
  line-height: 1.5;
  font-size: 14px;
  background: #f2f5ec;
  border: 1px solid #e0e7d5;
}

.hw-ai-coach-shell__message.is-user {
  margin-left: auto;
  background: #233326;
  color: #fff;
  border-color: #233326;
}

.hw-ai-coach-shell__message.is-assistant {
  background: #ffffff;
}

.hw-ai-coach-shell__message.is-system {
  max-width: 100%;
  background: #f7f7f3;
  border-style: dashed;
}

.hw-ai-coach-shell__message-body {
  white-space: pre-line;
}

.hw-ai-coach-shell__message-meta {
  margin-top: 6px;
  font-size: 11px;
  opacity: 0.65;
}

.hw-ai-coach-shell__composer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.hw-ai-coach-shell__composer input,
.hw-ai-coach-shell__composer button {
  border-radius: 14px;
  border: 1px solid #d7dccf;
  padding: 12px 14px;
}

.hw-ai-coach-shell__composer button {
  background: #243324;
  color: #fff;
  min-width: 88px;
  cursor: pointer;
}

.hw-ai-coach-shell__composer button:disabled,
.hw-ai-coach-shell__composer input:disabled {
  opacity: 0.7;
  cursor: wait;
}

.hw-ai-coach-shell__hint {
  margin: 0;
  font-size: 12px;
}

.hw-ai-coach-launcher {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 9999;
  border: 0;
  border-radius: 999px;
  background: #203228;
  color: #fff;
  padding: 14px 18px;
  box-shadow: 0 14px 30px rgba(27, 41, 33, 0.22);
  cursor: pointer;
}

.hw-ai-coach-flyout {
  position: fixed;
  right: 22px;
  bottom: 78px;
  width: min(390px, calc(100vw - 32px));
  z-index: 9999;
  background: #fffef9;
  border: 1px solid #dce2d2;
  border-radius: 20px;
  box-shadow: 0 24px 48px rgba(33, 43, 35, 0.18);
  overflow: hidden;
}

.hw-ai-coach-flyout__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #ecefe5;
}

.hw-ai-coach-flyout__body {
  padding: 16px;
}

.hw-ai-coach-flyout__close {
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.hw-ai-coach-panel.is-compact .hw-ai-coach-shell__body {
  margin-top: 0;
}

.hw-ai-coach-panel.is-compact .hw-ai-coach-shell__messages {
  min-height: 140px;
  max-height: 280px;
}

@media (max-width: 640px) {
  .hw-ai-coach-shell {
    padding: 18px;
  }

  .hw-ai-coach-shell__header h2 {
    font-size: 24px;
  }

  .hw-ai-coach-shell__composer {
    grid-template-columns: 1fr;
  }

  .hw-ai-coach-shell__message {
    max-width: 100%;
  }
}
