.ecm{ --blue:#2457ff; --text:#111827; --muted:#6b7280; --line:#e5e7eb; --bg:#fff; }
.ecm *{ box-sizing:border-box; }

.ecm__switch{ position:sticky; top:0; padding:8px 0 12px; display:flex; gap:8px; flex-wrap:wrap; background:transparent; z-index:1; }
.ecm__chip{ padding:6px 12px; border-radius:999px; border:1px solid var(--line); background:#f7f8fb; color:var(--text); font-size:14px; text-decoration:none; }
.ecm__chip.is-active{ background:var(--blue); color:#fff; border-color:var(--blue); }

.ecm__grid{ display:grid; grid-template-columns:320px 1fr 300px; gap:16px; }
@media (max-width:1200px){ .ecm__grid{ grid-template-columns:300px 1fr; } .ecm__rail{ display:none; } }
@media (max-width:768px){ .ecm__grid{ grid-template-columns:1fr; } }

.ecm__tree{ background:var(--bg); border:1px solid var(--line); border-radius:12px; padding:10px; max-height:calc(100vh - 220px); overflow:auto; }
.ecm__mod{ border:1px solid var(--line); border-radius:10px; background:#fff; margin-bottom:10px; }
.ecm__modH{ display:flex; align-items:center; gap:8px; padding:10px 12px; }
.ecm__modT{ font-weight:600; color:var(--text); flex:1; }
.ecm__count{ font-size:12px; color:var(--muted); }
.ecm__tgl{ width:22px; height:22px; border:1px solid var(--line); border-radius:50%; background:#fff; position:relative; }
.ecm__tgl::after{ content:""; position:absolute; inset:0; margin:auto; width:8px; height:8px; border-right:2px solid var(--muted); border-bottom:2px solid var(--muted); transform:rotate(45deg); }
.ecm__zero{ padding:10px 12px; font-size:12px; color:var(--muted); }

.ecm__list{ list-style:none; margin:0; padding:6px; border-top:1px solid var(--line); }
.ecm__it + .ecm__it{ margin-top:6px; }
.ecm__lnk{ display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid var(--line); border-radius:8px; background:#fafafa; color:var(--text); text-decoration:none; }
.ecm__lnk:hover{ background:#f3f4f6; }
.ecm__it.is-locked .ecm__lnk{ opacity:.55; cursor:not-allowed; }
.ecm__badge{ margin-left:auto; font-size:11px; color:#92400e; background:#fff7ed; border:1px solid #fed7aa; padding:2px 6px; border-radius:999px; }
.ecm__icon{ width:16px; height:16px; display:inline-block; background:#e5e7eb; border-radius:3px; }
.ecm-i-pdf{ background:#fee2e2; } .ecm-i-video{ background:#e0e7ff; } .ecm-i-quiz{ background:#dcfce7; }

.ecm__viewer{ background:#fff; border:1px solid var(--line); border-radius:12px; display:flex; flex-direction:column; min-height:520px; }
.ecm__bar{ display:flex; align-items:center; justify-content:space-between; padding:12px 14px; border-bottom:1px solid var(--line); }
.ecm__title{ margin:0; font-size:16px; font-weight:600; color:var(--text); }
.ecm__actions{ display:flex; gap:8px; }
.ecm-btn{ padding:6px 10px; font-size:12px; border:1px solid var(--line); background:#fff; border-radius:6px; }
.ecm-hide{ display:none; }

.ecm__stage{ position:relative; flex:1; min-height:420px; }
.ecm__stage iframe, .ecm__stage video{ width:100%; height:100%; border:0; border-radius:0 0 12px 12px; }
.ecm__ph{ display:flex; height:100%; align-items:center; justify-content:center; color:var(--muted); font-size:14px; }

.ecm__rail{ display:flex; flex-direction:column; gap:12px; }
.ecm-card{ background:#fff; border:1px solid var(--line); border-radius:12px; }
.ecm-cardH{ padding:10px 12px; font-weight:600; border-bottom:1px solid var(--line); }
.ecm-cardB{ padding:12px; }
.ecm-empty{ color:var(--muted); font-size:13px; }
.ecm-prog{ height:8px; background:#eef2ff; border-radius:6px; overflow:hidden; }
.ecm-progBar{ height:8px; width:0%; background:var(--blue); }
.ecm-progTxt{ margin-top:8px; font-size:12px; color:var(--muted); }
