.course-study-dialog { width: min(1100px, calc(100vw - 36px)); max-height: calc(100dvh - 36px); box-sizing: border-box; border: 1px solid #d8e3ed; border-radius: 18px; padding: 24px; color: #243e56; background: #fff; box-shadow: 0 24px 100px #14344d40; }
.course-study-dialog::backdrop { background: #102e48a8; }
.course-study-header, .course-study-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.course-study-header h2 { margin: 0; font-size: 24px; overflow-wrap: anywhere; }
.course-study-header button { min-height: 44px; }
.course-study-summary { color: #526e85; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.course-study-progress { width: 100%; height: 12px; accent-color: #246ca7; }
.course-study-toolbar { margin-top: 12px; justify-content: flex-start; }
.course-study-toolbar button, .course-study-download { min-height: 44px; }
.course-study-progress-label { margin-right: auto; font-size: 14px; }
.course-study-download { display: inline-flex; align-items: center; color: #1f659a; }
.course-study-status { min-height: 24px; font-size: 14px; color: #396b55; line-height: 1.6; }
.course-study-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; min-height: 360px; }
.course-study-list { display: flex; flex-direction: column; gap: 8px; border-right: 1px solid #e0e8ef; padding-right: 16px; }
.course-study-material { text-align: left; background: #f6f8fb; border: 1px solid #dce6ef; padding: 12px; border-radius: 10px; color: #34566e; cursor: pointer; min-height: 44px; overflow-wrap: anywhere; }
.course-study-material.is-active { background: #e9f3fc; border-color: #6a9fcb; color: #164d79; }
.course-study-main { min-width: 0; }
.course-study-material-title { margin: 4px 0 16px; font-size: 18px; overflow-wrap: anywhere; }
.course-study-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 17px; line-height: 1.9; padding: 20px; background: #fafbf9; border-radius: 12px; min-height: 240px; }
.course-study-placeholder { padding: 24px; border: 1px dashed #c7d8e4; border-radius: 12px; line-height: 1.8; color: #64788a; }
.course-study-media, .course-study-image { display: block; max-width: 100%; width: 100%; max-height: 60dvh; object-fit: contain; }
video.course-study-media { background: #102132; border-radius: 10px; }
.course-study-document { width: 100%; height: 58dvh; border: 1px solid #dce6ef; border-radius: 10px; }
.learning-task-row .learning-task-start { flex-shrink: 0; min-height: 40px; margin-left: 8px; }
@media (max-width: 640px) {
  .course-study-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 16px; border-radius: 12px; }
  .course-study-header h2 { font-size: 20px; flex: 1; }
  .course-study-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .course-study-list { flex-direction: row; overflow-x: auto; max-width: 100%; border-right: 0; border-bottom: 1px solid #e0e8ef; padding: 0 0 12px; }
  .course-study-material { min-width: 150px; max-width: 230px; flex-shrink: 0; }
  .course-study-text { padding: 16px; font-size: 16px; }
  .learning-task-row { flex-wrap: wrap; }
}

.course-study-credits { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 14px 0 18px; padding: 14px; border: 1px solid #c8dcdf; border-radius: 12px; background: #f6fbfb; font-size: 14px; line-height: 1.65; }
.course-study-credits > span { color: #226766; overflow-wrap: anywhere; }
.course-study-credit-status { flex-basis: 100%; margin: 0; color: #425a75; overflow-wrap: anywhere; }

.course-study-viewer .document-preview-viewport { max-height: 56dvh; }
.course-study-viewer .document-preview-controls { gap: 8px; }
@media (max-width: 640px) { .course-study-viewer .document-preview-viewport { max-height: 54dvh; } }
/* Optional configured sections retain the same reader and timing lifecycle. */
.course-study-section-title{font-size:14px;padding:12px 8px 4px;margin:0;color:#456477}.course-study-section-item{display:grid;gap:6px;margin-bottom:8px}.course-study-extras{border-top:1px solid #dce6ec;padding:16px;display:flex;gap:14px;flex-wrap:wrap;align-items:flex-start}.course-study-extras p{flex-basis:100%;margin:0;color:#617588}.course-study-cover{width:160px;height:100px;object-fit:cover;border-radius:8px}.course-study-group-code{display:block;width:180px;max-width:100%;margin-top:12px}.course-study-material:disabled{opacity:.55;cursor:default}
@media (max-width:640px){
  .course-study-list.has-sections{flex-direction:column;max-height:240px;overflow-y:auto;overflow-x:hidden;scrollbar-gutter:stable;}
  .course-study-list.has-sections .course-study-section-title{flex-shrink:0;}
  .course-study-list.has-sections .course-study-material{width:100%;min-width:0;max-width:none;}
  .course-study-list.has-sections .course-study-section-item{flex-shrink:0;}
}
