/* Chinese courseware only: one activity entrance per lesson. */
body[data-subject="yuwen"] .catalog-shell .catalog-top,
body[data-subject="yuwen"] .catalog-shell .catalog-filters button,
body[data-subject="yuwen"] .catalog-shell .lesson-directory-toolbar,
body[data-subject="yuwen"] .catalog-shell .lesson-directory-toolbar button {
  font-size:18px;
  line-height:1.5;
}
body[data-subject="yuwen"] .catalog-shell .catalog-top { flex-wrap:wrap; }
body[data-subject="yuwen"] .catalog-shell .catalog-top nav { flex-wrap:wrap; gap:12px 24px; }
body[data-subject="yuwen"] .catalog-shell .catalog-top a,
body[data-subject="yuwen"] .catalog-shell .catalog-filters button,
body[data-subject="yuwen"] .catalog-shell .lesson-directory-toolbar button {
  display:inline-flex;
  align-items:center;
  min-height:46px;
}
body[data-subject="yuwen"] .catalog-shell .course-open h2 { font-size:28px; line-height:1.5; }
body[data-subject="yuwen"] .catalog-shell .course-genre,
body[data-subject="yuwen"] .catalog-shell .course-number,
body[data-subject="yuwen"] .catalog-shell .catalog-total,
body[data-subject="yuwen"] .catalog-shell .catalog-hero p { font-size:16px; line-height:1.5; }
body[data-subject="yuwen"] .catalog-shell .course-caption { padding-right:0; }
body[data-subject="yuwen"] .catalog-shell .course-teacher-activity { margin-top:18px; }
body[data-subject="yuwen"] .catalog-shell .course-entry[hidden] { display:none!important; }
@media(min-width:701px) {
  body[data-subject="yuwen"].teacher-mode .catalog-shell .course-entry { display:flex; flex-direction:column; }
  body[data-subject="yuwen"].teacher-mode .catalog-shell .course-card { display:flex; flex:1; flex-direction:column; }
  body[data-subject="yuwen"].teacher-mode .catalog-shell .course-teacher-activity { margin-top:auto; padding-top:18px; }
}
@media(min-width:701px) and (max-width:1000px) {
  body[data-subject="yuwen"].teacher-mode .catalog-shell .course-teacher-activity { margin-left:32px; }
}
body[data-subject="yuwen"] .catalog-shell .course-activity-toggle {
  min-height:46px;
  padding:9px 20px;
  border-radius:4px;
  background:#fff;
  color:var(--accent,#8d4b3a);
  font-size:18px;
  line-height:1.5;
  letter-spacing:.02em;
}
body[data-subject="yuwen"] .catalog-shell .course-activity-toggle:hover,
body[data-subject="yuwen"] .catalog-shell .course-activity-toggle[aria-expanded="true"] {
  background:#faf5f2;
  border-color:var(--accent,#8d4b3a);
  color:var(--accent,#8d4b3a);
}

body[data-subject="yuwen"] #teacherResources.teacher-resource-dialog {
  width:min(1040px,calc(100% - 40px));
  max-width:none;
  max-height:calc(100vh - 40px);
  max-height:calc(100dvh - 40px);
  padding:0 32px 32px;
  border:1px solid #d8dfda;
  border-radius:8px;
  margin:auto;
  overflow:auto;
  overscroll-behavior:contain;
  background:#fff;
  color:#283b36;
  box-shadow:0 12px 48px rgba(40,59,54,.14);
  font-size:18px;
  line-height:1.5;
}
body[data-subject="yuwen"] #teacherResources::backdrop { background:rgba(40,59,54,.16); }
body[data-subject="yuwen"] #teacherResources [hidden] { display:none!important; }
body[data-subject="yuwen"] #teacherResources .teacher-resource-dialog-head {
  position:sticky;
  top:0;
  z-index:4;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin:0;
  padding:28px 0 20px;
  border-bottom:1px solid #dde3dc;
  background:#fff;
}
body[data-subject="yuwen"] #teacherResources .teacher-resource-dialog-head>div { min-width:0; }
body[data-subject="yuwen"] #teacherResources #teacherResourceDialogTitle {
  margin:4px 0 0;
  font-size:28px;
  font-weight:600;
  line-height:1.5;
  overflow-wrap:anywhere;
}
body[data-subject="yuwen"] #teacherResources button,
body[data-subject="yuwen"] #teacherResources .button,
body[data-subject="yuwen"] #teacherResources input,
body[data-subject="yuwen"] #teacherResources select,
body[data-subject="yuwen"] #teacherResources textarea {
  max-width:100%;
  min-width:0;
  min-height:46px;
  padding:9px 14px;
  border:1px solid #c9d3cc;
  border-radius:4px;
  background:#fff;
  color:#283b36;
  font-family:inherit;
  font-size:18px;
  line-height:1.5;
}
body[data-subject="yuwen"] #teacherResources button,
body[data-subject="yuwen"] #teacherResources .button { cursor:pointer; }
body[data-subject="yuwen"] #teacherResources button:hover,
body[data-subject="yuwen"] #teacherResources .button:hover { background:#f6f8f5; border-color:#798e80; }
body[data-subject="yuwen"] #teacherResources button.primary,
body[data-subject="yuwen"] #teacherResources #upload { background:#315f4e; border-color:#315f4e; color:#fff; }
body[data-subject="yuwen"] #teacherResources button.primary:hover,
body[data-subject="yuwen"] #teacherResources #upload:hover { background:#274d3f; }
body[data-subject="yuwen"] #teacherResources button:disabled { opacity:.5; cursor:default; }
body[data-subject="yuwen"] #teacherResources .teacher-resource-dialog-close { flex:0 0 auto; }
body[data-subject="yuwen"] #teacherResources :is(button,a,input,select,textarea):focus-visible {
  outline:2px solid #315f4e;
  outline-offset:3px;
}
body[data-subject="yuwen"] #teacherResources .lesson-resource-toolbar {
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  padding:20px 0;
}
body[data-subject="yuwen"] #teacherResources #teacherTools { padding-top:0; }
body[data-subject="yuwen"] #teacherResources #resourceComposer { margin:0 0 24px; padding:0 0 24px; border-bottom:1px solid #dde3dc; }
body[data-subject="yuwen"] #teacherResources #resourceComposer .tools {
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  gap:18px 16px;
  margin:0 0 16px;
}
body[data-subject="yuwen"] #teacherResources #resourceComposer label {
  display:flex;
  flex:1 1 280px;
  flex-direction:column;
  gap:8px;
  min-width:0;
  color:#43574c;
  font-size:18px;
  line-height:1.5;
}
body[data-subject="yuwen"] #teacherResources #resourceComposer .link-source { flex-basis:100%; }
body[data-subject="yuwen"] #teacherResources #resourceComposer input,
body[data-subject="yuwen"] #teacherResources #resourceComposer textarea { width:100%; }
body[data-subject="yuwen"] #teacherResources #resourceComposer input[type="file"] { padding:6px 0; border:0; }
body[data-subject="yuwen"] #teacherResources #resourceComposer input::file-selector-button {
  min-height:44px;
  margin-right:12px;
  padding:8px 12px;
  border:1px solid #c9d3cc;
  border-radius:4px;
  background:#fff;
  color:#283b36;
  font:inherit;
  cursor:pointer;
}
body[data-subject="yuwen"] #teacherResources #resourceComposer textarea { min-height:112px; resize:vertical; }
body[data-subject="yuwen"] #teacherResources .muted,
body[data-subject="yuwen"] #teacherResources .lesson-resource-meta,
body[data-subject="yuwen"] #teacherResources .resource-push-hint,
body[data-subject="yuwen"] #teacherResources #count { font-size:16px; line-height:1.5; color:#596b60; overflow-wrap:anywhere; }
body[data-subject="yuwen"] #teacherResources #status { min-height:0; margin:0 0 18px; font-size:18px; line-height:1.5; overflow-wrap:anywhere; }
body[data-subject="yuwen"] #teacherResources #status:empty { margin:0; }
body[data-subject="yuwen"] #teacherResources .lesson-resource-heading { display:flex; align-items:baseline; justify-content:space-between; gap:16px; margin:4px 0 20px; }
body[data-subject="yuwen"] #teacherResources .lesson-resource-heading h3 { margin:0; font-size:24px; font-weight:600; line-height:1.5; }
body[data-subject="yuwen"] .catalog-shell .lesson-resource-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:28px 26px;
  margin:0;
}
body[data-subject="yuwen"] .catalog-shell .lesson-resource-card { min-width:0; padding:0 0 24px; border:0; border-bottom:1px solid #dde3dc; border-radius:0; background:#fff; box-shadow:none; }
body[data-subject="yuwen"] .catalog-shell .lesson-resource-preview {
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-width:0;
  aspect-ratio:16/9;
  overflow:hidden;
  border:0;
  border-radius:0;
  background:#fff;
  color:#596b60;
  font-size:20px;
  line-height:1.5;
  overflow-wrap:anywhere;
  text-decoration:none;
}
body[data-subject="yuwen"] .catalog-shell .lesson-resource-preview img,
body[data-subject="yuwen"] .catalog-shell .lesson-resource-preview video { display:block; width:100%; height:100%; max-width:100%; object-fit:contain; background:#fff; }
body[data-subject="yuwen"] .catalog-shell .lesson-resource-preview img { position:absolute; inset:0; opacity:0; }
body[data-subject="yuwen"] .catalog-shell .lesson-resource-preview.has-thumbnail img { opacity:1; }
body[data-subject="yuwen"] .catalog-shell .lesson-resource-placeholder { display:grid; justify-items:center; gap:12px; }
body[data-subject="yuwen"] .catalog-shell .has-thumbnail .lesson-resource-placeholder { visibility:hidden; }
body[data-subject="yuwen"] #teacherResources .lesson-resource-save,
body[data-subject="yuwen"] #teacherResources .lesson-resource-push-actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
body[data-subject="yuwen"] #teacherResources .lesson-resource-push-fields label { display:grid; width:100%; gap:8px; font-size:18px; color:#43574c; }
body[data-subject="yuwen"] .catalog-shell .lesson-resource-preview audio { display:block; width:100%; max-width:100%; }
body[data-subject="yuwen"] .catalog-shell .lesson-resource-preview>span { max-width:100%; padding:20px; text-align:center; }
body[data-subject="yuwen"] .catalog-shell .lesson-resource-copy { min-width:0; padding-top:14px; }
body[data-subject="yuwen"] .catalog-shell .lesson-resource-copy h3 { margin:0 0 7px; font-size:20px; font-weight:600; line-height:1.5; overflow-wrap:anywhere; }
body[data-subject="yuwen"] .catalog-shell .lesson-resource-meta { margin:0; color:#596b60; font-size:16px; line-height:1.5; overflow-wrap:anywhere; }
body[data-subject="yuwen"] .catalog-shell .lesson-resource-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:16px; }
body[data-subject="yuwen"] .catalog-shell .lesson-resource-actions>a { display:inline-flex; align-items:center; min-height:46px; padding:9px 14px; border:1px solid #c9d3cc; border-radius:4px; color:#315f4e; background:#fff; font-size:18px; line-height:1.5; text-decoration:none; }
body[data-subject="yuwen"] #teacherResources .lesson-resource-actions .danger { color:#a03628; border-color:#ddbeb7; }
body[data-subject="yuwen"] #teacherResources .lesson-resource-push-fields,
body[data-subject="yuwen"] #teacherResources .lesson-resource-revoke-fields { display:flex; flex-wrap:wrap; align-items:center; gap:10px; width:100%; min-width:0; margin-top:12px; }
body[data-subject="yuwen"] #teacherResources .resource-class-select { flex:1 1 100%; width:100%; max-width:100%; }

@media(max-width:700px) {
  body[data-subject="yuwen"] .catalog-shell .catalog-top nav { gap:8px 18px; }
  body[data-subject="yuwen"] .catalog-shell .catalog-filters { gap:8px 24px; }
  body[data-subject="yuwen"] .catalog-shell .course-open h2 { font-size:28px; }
  body[data-subject="yuwen"] #teacherResources.teacher-resource-dialog {
    width:calc(100% - 20px);
    max-height:calc(100vh - 20px);
    max-height:calc(100dvh - 20px);
    padding:0 18px 24px;
  }
  body[data-subject="yuwen"] #teacherResources #teacherResourceDialogTitle { font-size:24px; }
  body[data-subject="yuwen"] #teacherResources .teacher-resource-dialog-head { gap:12px; padding-top:20px; padding-bottom:16px; }
  body[data-subject="yuwen"] #teacherResources .teacher-resource-dialog-close { padding-inline:12px; }
  body[data-subject="yuwen"] #teacherResources #resourceComposer label { flex-basis:100%; }
  body[data-subject="yuwen"] .catalog-shell .lesson-resource-grid { grid-template-columns:minmax(0,1fr); gap:26px; }
}
