.social-actions--tutor { --social-height: 236px; }
.social-actions__tutor { min-height: 44px; }
.social-actions__tutor .social-actions__count { font-size: 10px; letter-spacing: .02em; }
.tutor-sheet { height: min(84dvh, 780px); }
.tutor-sheet .sheet__header { padding-bottom: 14px; }
.tutor-context { padding: 13px 20px 12px; background: var(--comments-input); flex: none; }
.tutor-context__meta { margin: 0 0 5px; color: var(--comments-accent); font-size: 10px; line-height: 1.45; font-weight: 650; }
.tutor-context__title { font-size: 14px; font-weight: 650; line-height: 1.4; letter-spacing: -.02em; margin: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tutor-connection { font-size: 10px; color: var(--comments-muted); margin: 0; padding: 9px 20px; border-bottom: 1px solid var(--comments-border); flex: none; }
.tutor-connection[data-offline="true"] { color: #80523c; }
.tutor-body { padding: 20px; }
.tutor-welcome { margin: 8px 0 10px; }
.tutor-welcome__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 15px; background: var(--comments-soft); color: var(--comments-accent); margin-bottom: 14px; }
.tutor-welcome h3 { margin: 0; font-size: clamp(22px, 4vw, 26px); font-weight: 600; line-height: 1.1; letter-spacing: -.04em; }
.tutor-welcome p { margin: 10px 0 18px; color: var(--comments-body); font-size: 13px; line-height: 1.55; }
.tutor-suggestions { display: grid; gap: 8px; }
.tutor-sheet .tutor-suggestion { text-align: left; padding: 12px; border-radius: 12px; border: 1px solid var(--comments-border); background: #fff8; color: var(--comments-ink); font-size: 12px; line-height: 1.4; min-height: 44px; }
.tutor-suggestion:hover { background: var(--comments-soft); }
.tutor-messages { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
.tutor-message { min-width: 0; }
.tutor-message--user { background: var(--comments-soft); border-radius: 16px 16px 4px 16px; padding: 12px 14px; margin-left: 32px; }
.tutor-message__author { font-size: 10px; color: var(--comments-accent); font-weight: 700; letter-spacing: .025em; }
.tutor-message__text { margin: 6px 0 0; font-size: 14px; line-height: 1.6; color: var(--comments-ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.tutor-message--pending { opacity: .65; animation: tutor-thinking 1.4s ease-in-out infinite alternate; }
.tutor-sheet .tutor-resource { width: 100%; text-align: left; display: grid; gap: 7px; padding: 14px; margin-top: 14px; border: 1px solid var(--comments-border); border-radius: 14px; background: #fff9; color: var(--comments-ink); }
.tutor-resource__eyebrow { font-size: 10px; color: var(--comments-muted); line-height: 1.4; }
.tutor-resource strong { font-size: 14px; line-height: 1.4; }
.tutor-resource__reason { font-size: 12px; line-height: 1.5; color: var(--comments-body); }
.tutor-resource__action { color: var(--comments-accent); font-weight: 700; font-size: 12px; margin-top: 3px; }
.tutor-sheet .tutor-listen { min-height: 44px; background: transparent; color: var(--comments-accent); font-size: 11px; padding: 8px 0; }
.tutor-status { flex: none; margin: 0; padding: 10px 20px; font-size: 12px; line-height: 1.5; color: var(--comments-accent); max-height: 100px; overflow-y: auto; }
.tutor-status:empty { display: none; }
.tutor-status[data-error="true"] { color: #934431; background: #fff0e8; }
.tutor-composer { flex: none; padding: 12px 20px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--comments-border); background: var(--comments-surface); }
.tutor-sheet .tutor-input { display: block; width: 100%; height: 66px; min-height: 56px; border-radius: 14px; border: 1px solid var(--comments-border); font-size: 16px; padding: 10px 12px; }
.tutor-composer__actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.tutor-sheet .tutor-mic, .tutor-sheet .tutor-send { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--comments-soft); color: var(--comments-accent); }
.tutor-sheet .tutor-send { margin-left: auto; background: var(--comments-accent); color: white; }
.tutor-mic svg, .tutor-send svg { width: 21px; height: 21px; }
.tutor-sheet .tutor-mic[aria-pressed="true"] { background: #b73646; color: white; animation: tutor-thinking 1s ease-in-out infinite alternate; }
.tutor-sheet button:disabled { opacity: .45; cursor: default; }
.tutor-voice-label { font-size: 10px; line-height: 1.4; color: var(--comments-muted); }
.tutor-note { margin: 8px 0 0; font-size: 9px; line-height: 1.45; color: var(--comments-muted); text-align: center; }
@keyframes tutor-thinking { to { opacity: .5; } }
@media (min-width: 700px) { .tutor-sheet { height: auto; width: 440px; } }
@media (max-width: 699px) {
  .tutor-context, .tutor-connection, .tutor-body, .tutor-status, .tutor-composer { padding-left: max(var(--edge), env(safe-area-inset-left)); padding-right: max(var(--edge), env(safe-area-inset-right)); }
}
@media (max-height: 650px) {
  .tutor-sheet { height: 91dvh; max-height: 94dvh; }
  .tutor-sheet .sheet__header { padding-top: 12px; padding-bottom: 10px; }
  .tutor-context { padding-top: 8px; padding-bottom: 8px; }
  .tutor-body { padding-top: 12px; padding-bottom: 12px; }
  .tutor-welcome__icon { display: none; }
  .tutor-welcome h3 { font-size: 21px; }
}
@media (max-height: 480px) { .social-actions--tutor { --social-height: 200px; } .tutor-context { display: none; } }
@media (prefers-reduced-motion: reduce) { .tutor-message--pending, .tutor-sheet .tutor-mic[aria-pressed="true"] { animation: none; } }
