.study-help-widget {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.study-help-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 3rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
  font-weight: 600;
}

.study-help-trigger-icon {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--color-primary);
  color: #ffffff;
  flex-shrink: 0;
}

.study-help-panel {
  width: min(420px, calc(100vw - 1.5rem));
  max-height: min(80vh, 720px);
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

.study-help-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.study-help-title {
  margin: 0;
  font-size: 1.2rem;
}

.study-help-close {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text);
}

.study-help-copy,
.study-help-contact p {
  font-size: 0.98rem;
  line-height: 1.55;
}

.study-help-contact {
  margin-bottom: 1rem;
}

.study-help-contact p {
  margin: 0 0 0.3rem;
}

.study-help-form .form-label {
  font-weight: 600;
}

.study-help-message {
  min-height: 7rem;
  resize: vertical;
}

@media (max-width: 576px) {
  .study-help-widget {
    right: 0.75rem;
    left: 0.75rem;
    bottom: 0.75rem;
    align-items: stretch;
  }

  .study-help-trigger {
    align-self: flex-end;
  }

  .study-help-panel {
    width: 100%;
    max-height: 72vh;
  }
}
