.coach-dialog{width:min(640px,calc(100vw - 24px));max-height:calc(100dvh - var(--safe-top,0px) - var(--safe-bottom,0px) - 16px);overflow:auto;border:1px solid #77718f;border-radius:16px;padding:1rem;background:#64458c;color:#fff;font:inherit}
.coach-dialog::backdrop{background:#080615b8}.coach-dialog-head{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:.6rem}.coach-dialog-head h2{font-size:1.2rem;margin:.2rem 0;margin-right:auto;color:#fff}.coach-dialog button,.coach-dialog input,.coach-dialog textarea{font:inherit}.coach-dialog button{border:1px solid #77718f;border-radius:8px;padding:.55rem .75rem;background:#e8dcfa;color:inherit}.coach-dialog-head [data-new],.coach-dialog-head [data-close]{box-sizing:border-box;width:44px;height:44px;padding:0;display:grid;place-items:center;flex:none}.coach-dialog-head [data-close]{font-size:1.4rem;line-height:1;background:#fde7e5;color:#8a1c18}.coach-dialog-head [data-new]{font-size:1.36rem;background:#e4f6e9;color:#17643a}.coach-transcript{max-height:min(48dvh,480px);overflow:auto;display:grid;gap:.6rem;padding:.25rem}.coach-message-row{color:#173e8b}.coach-message-row>strong{display:block;margin:0 0 .15rem;color:#fff;font-size:.9em}.coach-message{padding:.65rem .8rem;border:1px solid #7aa2d6;border-radius:12px;background:#eaf3ff;overflow-wrap:anywhere;white-space:pre-wrap;margin:0;font-weight:700}.coach-student{margin-left:12%;color:#17643a}.coach-student .coach-message{background:#e4f6e9;border-color:#80a68f}.coach-status{min-height:1.5em;margin:.3rem 0}.coach-status-error{color:#ffb4ad}.coach-form{display:grid;grid-template-columns:minmax(0,1fr);gap:.45rem}.coach-form label{font-weight:600}.coach-form textarea,.coach-form input[type=file]{box-sizing:border-box;width:100%;border:1px solid #77718f;border-radius:8px;padding:.55rem;background:#fffaff;color:#442475}.coach-form textarea{min-height:4rem;max-height:20dvh;resize:vertical}
.coach-resource-button{position:fixed;left:max(12px,env(safe-area-inset-left,0px));bottom:max(12px,env(safe-area-inset-bottom,0px));z-index:10;min-height:44px;padding:.55rem .75rem;border:1px solid #77718f;border-radius:10px;background:#211d48;color:#fff;font:inherit;cursor:pointer}

.coach-form button[type=submit]{background:#237b46;border-color:#1a6337;color:#fff}

.coach-message-row>strong{font-style:italic}
.coach-status-pending{animation:coach-status-blink .5s step-end infinite}
@keyframes coach-status-blink{0%{color:#fff}50%{color:#ffb347}}
@media(prefers-reduced-motion:reduce){.coach-status-pending{animation:none}}
