/* Offline classroom (works without network: no external fonts or assets). */
:root{--bg:#0e1013;--surface:#16191e;--raised:#1d2127;--line:#272c33;--text:#eef0f3;--muted:#98a0aa;--accent:#41d29b;--accent-soft:#41d29b1f;--warn:#f0b44a;--danger:#ff7a7a;color-scheme:dark}
[data-theme="light"]{--bg:#f6f4f0;--surface:#ffffff;--raised:#f1ede6;--line:#e6e0d6;--text:#17181c;--muted:#6c6b73;--accent:#11795a;--accent-soft:#11795a14;--warn:#a56b00;--danger:#c0392b;color-scheme:light}
*{box-sizing:border-box}
html,body{margin:0;background:var(--bg);color:var(--text);font:15px/1.55 -apple-system,BlinkMacSystemFont,'Apple SD Gothic Neo','Noto Sans KR',system-ui,sans-serif;-webkit-text-size-adjust:100%}
a{color:inherit}
button{font:inherit;color:inherit;cursor:pointer}
:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
[hidden]{display:none!important}
.dl-top{position:sticky;top:0;z-index:5;display:grid;grid-template-columns:44px 1fr auto;align-items:center;gap:8px;padding:calc(8px + env(safe-area-inset-top)) 16px 8px;background:color-mix(in srgb,var(--bg) 90%,transparent);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-bottom:1px solid var(--line)}
.dl-top h1{margin:0;font-size:17px;font-weight:800;text-align:center;letter-spacing:-.3px}
.dl-back{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;text-decoration:none}
.dl-back:hover{background:var(--raised)}
.dl-back svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.dl-net{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:99px;background:var(--raised);font-size:12px;font-weight:700;color:var(--muted)}
.dl-net i{width:8px;height:8px;border-radius:50%;background:var(--muted)}
.dl-net[data-state="online"] i{background:var(--accent)}
.dl-net[data-state="offline"]{color:var(--warn)}.dl-net[data-state="offline"] i{background:var(--warn)}
.dl-main{max-width:880px;margin:0 auto;padding:16px 16px calc(40px + env(safe-area-inset-bottom))}

.dl-player{margin:0 -16px 18px;position:sticky;top:57px;z-index:4;background:var(--bg)}
.dl-video{background:#000;aspect-ratio:16/9}
.dl-video video{display:block;width:100%;height:100%;background:#000}
.dl-now{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;padding:12px 16px;border-bottom:1px solid var(--line)}
.dl-now-copy{min-width:0;flex:1 1 220px}
.dl-now small{font-size:12px;color:var(--muted)}
.dl-now h2{margin:2px 0 0;font-size:16px;line-height:1.35;font-weight:800;word-break:keep-all}
.dl-controls{display:flex;align-items:center;gap:6px}
.dl-controls>button{display:grid;place-items:center;min-width:40px;height:40px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.dl-controls svg{width:18px;height:18px;fill:currentColor;stroke:currentColor;stroke-width:1.5;stroke-linejoin:round}
.dl-controls>button:disabled{opacity:.35;cursor:default}
.dl-close{padding:0 12px;font-size:13px;font-weight:700}
.dl-speed{display:flex;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface)}
.dl-speed button{min-width:44px;height:38px;border:0;background:transparent;font-size:12.5px;font-weight:700;color:var(--muted)}
.dl-speed button[aria-pressed="true"]{background:var(--accent-soft);color:var(--accent)}

.dl-summary{display:grid;gap:10px;padding:16px;border:1px solid var(--line);border-radius:18px;background:var(--surface)}
.dl-summary-copy{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:wrap}
.dl-summary strong{font-size:16px}
.dl-summary small{font-size:12.5px;color:var(--muted)}
.dl-meter{height:6px;border-radius:99px;background:var(--raised);overflow:hidden}
.dl-meter i{display:block;height:100%;width:0;background:var(--accent);border-radius:inherit}
.dl-license{margin:0;font-size:12.5px;color:var(--muted)}
.dl-notice{margin:14px 2px 0;font-size:13.5px;color:var(--warn)}
.dl-notice:empty{display:none}

.dl-list{display:grid;gap:22px;margin-top:20px}
.dl-course h2{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:0 2px 10px;font-size:17px;font-weight:800;letter-spacing:-.3px}
.dl-course h2 small{font-size:12.5px;font-weight:600;color:var(--muted)}
.dl-lessons{display:grid;gap:8px}
.dl-item{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}
.dl-item.is-playing{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.dl-num{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:var(--raised);font-weight:800;font-size:14px;color:var(--muted)}
.dl-item.is-playing .dl-num{background:var(--accent);color:var(--bg)}
.dl-item-copy{min-width:0}
.dl-item-copy strong{display:block;font-size:14.5px;font-weight:700;line-height:1.4;word-break:keep-all;overflow-wrap:anywhere}
.dl-item-copy small{display:block;margin-top:2px;font-size:12.5px;color:var(--muted)}
.dl-item-copy small.warn{color:var(--warn)}
.dl-progress{height:3px;margin-top:6px;border-radius:99px;background:var(--raised);overflow:hidden}
.dl-progress i{display:block;height:100%;background:var(--accent)}
.dl-actions{display:flex;gap:6px}
.dl-play{display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 14px;border:0;border-radius:12px;background:var(--text);color:var(--bg);font-weight:800;font-size:13.5px}
.dl-play svg{width:14px;height:14px;fill:currentColor}
.dl-play:disabled{background:var(--raised);color:var(--muted);cursor:default}
.dl-del{display:grid;place-items:center;width:40px;height:40px;border:1px solid var(--line);border-radius:12px;background:transparent;color:var(--muted)}
.dl-del svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.dl-del:hover{color:var(--danger);border-color:var(--danger)}

.dl-empty{margin-top:28px;padding:32px 22px;border:1px dashed var(--line);border-radius:20px;text-align:center}
.dl-empty-art svg{width:64px;height:64px;fill:none;stroke:var(--accent);stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.dl-empty h2{margin:10px 0 14px;font-size:19px}
.dl-empty ol{display:inline-grid;gap:8px;margin:0 0 20px;padding:0 0 0 20px;text-align:left;font-size:14px;color:var(--muted)}
.dl-empty b{color:var(--text)}
.dl-cta{display:inline-flex;align-items:center;height:46px;padding:0 20px;border-radius:14px;background:var(--text);color:var(--bg);font-weight:800;text-decoration:none}
.dl-foot{margin:28px 2px 0;font-size:12.5px;line-height:1.6;color:var(--muted)}
.dl-foot a{color:var(--text);font-weight:700}
@media(min-width:900px){.dl-player{margin:0 0 20px;border-radius:18px;overflow:hidden;border:1px solid var(--line);position:static}.dl-main{padding-top:24px}}
@media(max-width:420px){.dl-play span{display:none}.dl-play{padding:0 12px}.dl-speed button{min-width:38px}}
