/* ClassRec Learning — student site. Everything is scoped to .lx / .lx-body so the teacher and admin
   screens (style.css) are untouched. --lx-primary is set per academy by learning/branding.js. */
:root {
  --lx-bg: #F6F8FC;
  --lx-surface: #FFFFFF;
  --lx-text: #17243C;
  --lx-muted: #5F6B80; /* #7B8599 from the brief fails 4.5:1 on white for body text; kept for hints only */
  --lx-hint: #7B8599;
  --lx-primary: #4468F6;
  --lx-primary-soft: color-mix(in srgb, var(--lx-primary) 10%, white);
  --lx-border: #E8EDF5;
  --lx-success: #16A97E;
  --lx-success-text: #0B7A5A;
  --lx-success-soft: #E3F6EF;
  --lx-warn-text: #8A5A00;
  --lx-warn-soft: #FFF3D6;
  --lx-navy: #14224A;
  --lx-navy-2: #1E3373;
  --lx-stage: #0B1220;
  --lx-r-sm: 12px;
  --lx-r: 16px;
  --lx-r-lg: 22px;
  --lx-shadow: 0 1px 2px rgba(23, 36, 60, .04), 0 4px 16px rgba(23, 36, 60, .05);
  --lx-side: 256px;
}

body.lx-body { background: var(--lx-bg); }
.lx { word-break: keep-all; overflow-wrap: anywhere; color: var(--lx-text); font-family: Pretendard, "Pretendard Variable", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif; line-height: 1.5; }
.lx *, .lx-sheet * { box-sizing: border-box; }
.lx h1, .lx h2, .lx h3 { color: var(--lx-text); letter-spacing: -.025em; margin: 0; }
.lx p { margin: 0; }
.lx a { color: var(--lx-primary); }
.lx-muted { color: var(--lx-muted); }
.lx .small { font-size: 13px; }
.lx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lx-icon { flex: none; }
.lx :focus-visible, .lx-sheet :focus-visible { outline: 3px solid color-mix(in srgb, var(--lx-primary) 55%, transparent); outline-offset: 2px; border-radius: 8px; }

/* Buttons */
.lx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: var(--lx-r-sm); border: 1px solid transparent; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; transition: background .15s, box-shadow .15s; }
.lx-btn-primary { background: var(--lx-primary); color: #fff !important; }
.lx-btn-primary:hover { background: color-mix(in srgb, var(--lx-primary) 88%, black); }
.lx-btn-light { background: #fff; color: var(--lx-navy) !important; }
.lx-btn-light:hover { background: #EEF2FF; }
.lx-btn-ghost { background: transparent; color: var(--lx-text) !important; border-color: var(--lx-border); }
.lx-btn-ghost:hover { background: #F0F3F9; }
.lx-btn-block { width: 100%; }
.lx-link { font-weight: 700; font-size: 14px; text-decoration: none; }

/* Badges */
.lx-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.lx-badge-not_watched { background: #EEF1F6; color: #4A5568; }
.lx-badge-watching { background: var(--lx-primary-soft); color: color-mix(in srgb, var(--lx-primary) 80%, black); }
.lx-badge-completed { background: var(--lx-success-soft); color: var(--lx-success-text); }
.lx-badge-new { background: #FFE9E3; color: #B4341A; }
.lx-badge-soft { background: #F0F3F9; color: #4A5568; }

/* Progress */
.lx-progress { display: block; flex: 1; height: 6px; border-radius: 999px; background: #E9EDF4; overflow: hidden; }
.lx-progress > span { display: block; height: 100%; border-radius: inherit; background: var(--lx-primary); transition: width .4s; }

/* App shell */
.lx-app { min-height: 100vh; }
.lx-skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--lx-primary); color: #fff !important; padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.lx-skip:focus { top: 12px; }
.lx-main { padding: 36px 40px 64px calc(var(--lx-side) + 40px); max-width: calc(var(--lx-side) + 1240px); outline: none; }
.lx-main > * + * { margin-top: 24px; }
.lx-booting .lx-main { padding-left: 40px; margin: 0 auto; max-width: 1240px; }

.lx-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--lx-side); background: var(--lx-surface); border-right: 1px solid var(--lx-border); display: flex; flex-direction: column; padding: 24px 16px; gap: 28px; z-index: 10; }
.lx-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--lx-text) !important; padding: 0 8px; min-width: 0; }
.lx-brand strong { display: block; font-size: 17px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lx-brand small { display: block; font-size: 11px; color: var(--lx-hint); font-weight: 600; letter-spacing: .02em; }
.lx-brand-logo { width: 32px; height: 32px; border-radius: 9px; flex: none; }
.lx-brand-initial { display: grid; place-items: center; background: var(--lx-primary); color: #fff; font-weight: 800; }
.lx-sidebar nav ul, .lx-mnav ul, .lx-spaces ul, .lx-history ul { list-style: none; margin: 0; padding: 0; }
.lx-sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--lx-r-sm); color: var(--lx-muted) !important; font-weight: 650; font-size: 15px; text-decoration: none; }
.lx-sidebar nav li + li { margin-top: 4px; }
.lx-sidebar nav a:hover { background: #F3F5FA; color: var(--lx-text) !important; }
.lx-sidebar nav a[aria-current="page"] { background: var(--lx-primary-soft); color: var(--lx-primary) !important; }
.lx-sidebar-foot { margin-top: auto; border-top: 1px solid var(--lx-border); padding-top: 16px; display: grid; gap: 2px; }
.lx-me { display: flex; align-items: center; gap: 10px; padding: 6px 8px 12px; min-width: 0; }
.lx-me strong { display: block; font-size: 15px; }
.lx-me small { display: block; color: var(--lx-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--lx-primary-soft); color: var(--lx-primary); font-weight: 800; flex: none; }
.lx-side-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 8px 10px; border: 0; background: transparent; border-radius: 10px; color: var(--lx-muted) !important; font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; text-align: left; }
.lx-side-btn:hover { background: #F3F5FA; color: var(--lx-text) !important; }

.lx-mtop, .lx-mnav { display: none; }
.lx-offline { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: var(--lx-r-sm); background: var(--lx-warn-soft); color: var(--lx-warn-text); font-weight: 650; font-size: 14px; }

/* Page head and sections */
.lx-page-head h1 { font-size: 28px; line-height: 1.25; }
.lx-page-head p { margin-top: 6px; font-size: 15px; }
.lx-eyebrow { font-size: 13px; font-weight: 700; color: var(--lx-primary); letter-spacing: .01em; margin-bottom: 6px !important; }
.lx-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.lx-section-head h2, .lx-card-head h2 { font-size: 18px; }
.lx-card { background: var(--lx-surface); border: 1px solid var(--lx-border); border-radius: var(--lx-r-lg); padding: 22px; box-shadow: var(--lx-shadow); }
.lx-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.lx-card-head .lx-muted { font-size: 13px; }

/* New lesson notice */
.lx-alert { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: var(--lx-r); background: var(--lx-surface); border: 1px solid var(--lx-border); color: var(--lx-text) !important; text-decoration: none; font-weight: 500; box-shadow: var(--lx-shadow); }
.lx-alert .lx-icon { color: var(--lx-primary); }
.lx-alert > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-alert-go { font-weight: 700; color: var(--lx-primary); font-size: 14px; }

/* Hero (이어서 보기) */
.lx-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: center; padding: 30px; border-radius: var(--lx-r-lg); background: linear-gradient(135deg, var(--lx-navy) 0%, var(--lx-navy-2) 100%); color: #fff; box-shadow: 0 12px 32px rgba(20, 34, 74, .18); }
.lx-hero .lx-eyebrow { color: #A9BDFF; }
.lx-hero h2 { color: #fff; font-size: 24px; line-height: 1.3; }
.lx-hero-meta { color: #C7D2F0; margin-top: 6px !important; font-size: 14px; }
.lx-hero-note { color: #E3E9FA; margin-top: 10px !important; font-size: 15px; }
.lx-hero-progress { display: flex; align-items: center; gap: 12px; margin: 18px 0 20px; font-size: 13px; color: #C7D2F0; font-weight: 600; }
.lx-hero-progress .lx-progress { background: rgba(255, 255, 255, .18); max-width: 260px; }
.lx-hero-progress .lx-progress > span { background: #fff; }
.lx-hero-copy > .lx-btn { margin-top: 18px; }
.lx-hero-progress + .lx-btn { margin-top: 0; }
.lx-hero-thumb { border: 0; padding: 0; background: none; cursor: pointer; border-radius: var(--lx-r); }

/* Thumbnails (fallback cover; no recording has its own picture yet) */
.lx-thumb { position: relative; display: block; aspect-ratio: 16 / 9; width: 100%; border-radius: var(--lx-r); overflow: hidden; color: #fff;
  background: radial-gradient(120% 90% at 85% 10%, color-mix(in srgb, var(--tone) 55%, #6E8BFF) 0%, transparent 60%), linear-gradient(140deg, var(--tone) 0%, #0F1A3A 100%); }
.lx-thumb::after { content: ""; position: absolute; inset: auto -20% -60% 40%; height: 120%; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .08); }
.lx-thumb-label { position: absolute; left: 12px; top: 10px; right: 12px; font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, .82); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lx-thumb-title { position: absolute; left: 12px; right: 12px; top: 32px; font-size: 17px; font-weight: 800; line-height: 1.3; letter-spacing: -.01em; word-break: keep-all; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
.lx-thumb-lg .lx-thumb-label { left: 18px; top: 16px; font-size: 13px; }
.lx-thumb-lg .lx-thumb-title { left: 18px; right: 18px; top: 40px; font-size: 24px; }
.lx-thumb-play { position: absolute; left: 12px; bottom: 10px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .18); backdrop-filter: blur(2px); padding-left: 2px; }
.lx-thumb-lg .lx-thumb-play { left: 18px; bottom: 16px; width: 48px; height: 48px; }
.lx-badge-closing { background: #FFF1D6; color: #8A4B00; }
.lx-hero-meta .lx-badge-closing { margin-left: 8px; }
.lx-watch-until { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 0; color: var(--lx-muted); font-size: 14px; }
.lx-thumb-time { position: absolute; right: 10px; bottom: 10px; padding: 2px 7px; border-radius: 6px; background: rgba(5, 10, 25, .62); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lx-thumb-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .2); }
.lx-thumb-progress > span { display: block; height: 100%; background: #8FA8FF; }

/* Course cards */
.lx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.lx-course { display: flex; flex-direction: column; gap: 12px; padding: 12px 12px 16px; background: var(--lx-surface); border: 1px solid var(--lx-border); border-radius: var(--lx-r-lg); text-decoration: none; color: var(--lx-text) !important; box-shadow: var(--lx-shadow); transition: transform .15s, box-shadow .15s; min-width: 0; }
.lx-course:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(23, 36, 60, .1); }
.lx-course-body { display: flex; flex-direction: column; gap: 6px; padding: 0 4px; min-width: 0; }
.lx-course-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lx-course-title { font-size: 16px; line-height: 1.35; font-weight: 750; overflow-wrap: anywhere; }
.lx-course-note { color: var(--lx-muted); font-size: 14px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lx-course-meta { color: var(--lx-muted); font-size: 13px; font-weight: 500; }
.lx-course-progress { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.lx-course-percent { font-size: 12px; font-weight: 700; color: var(--lx-muted); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.lx-course-resume { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--lx-primary); }

/* Home: stats + spaces */
.lx-home-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; }
.lx-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.lx-stat { background: var(--lx-bg); border-radius: var(--lx-r); padding: 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lx-stat strong { font-size: 26px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.lx-stat span { font-size: 13px; color: var(--lx-muted); font-weight: 600; }
.lx-stat small { font-size: 12px; color: var(--lx-hint); }
.lx-spaces li + li { margin-top: 6px; }
.lx-spaces a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--lx-r-sm); text-decoration: none; color: var(--lx-text) !important; min-height: 56px; }
.lx-spaces a:hover { background: var(--lx-bg); }
.lx-space-mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--lx-primary-soft); color: var(--lx-primary); font-weight: 800; font-size: 13px; flex: none; }
.lx-space-copy { flex: 1; min-width: 0; }
.lx-space-copy strong { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lx-space-copy small { color: var(--lx-muted); font-size: 13px; }
.lx-count { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--lx-primary); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }

/* 내 수업: filters */
.lx-filters { display: grid; gap: 16px; }
.lx-search { position: relative; display: flex; align-items: center; color: var(--lx-hint); }
.lx-search .lx-icon { position: absolute; left: 14px; }
.lx-search input { width: 100%; min-height: 48px; padding: 10px 14px 10px 42px; border: 1px solid var(--lx-border); border-radius: var(--lx-r-sm); background: var(--lx-bg); font-size: 15px; color: var(--lx-text); }
.lx-search input:focus { background: #fff; border-color: var(--lx-primary); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--lx-primary) 20%, transparent); }
.lx-status-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.lx-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--lx-border); background: #fff; font-weight: 650; font-size: 14px; color: var(--lx-muted); cursor: pointer; }
.lx-chip span { font-size: 12px; color: var(--lx-hint); font-variant-numeric: tabular-nums; }
.lx-chip[aria-pressed="true"] { background: var(--lx-text); border-color: var(--lx-text); color: #fff; }
.lx-chip[aria-pressed="true"] span { color: #C9D2E3; }
.lx-filter-row { display: flex; gap: 12px; flex-wrap: wrap; }
.lx-field { display: grid; gap: 4px; font-size: 12px; font-weight: 700; color: var(--lx-muted); min-width: 160px; flex: 1 1 160px; max-width: 260px; }
.lx-field select { min-height: 44px; border: 1px solid var(--lx-border); border-radius: var(--lx-r-sm); padding: 8px 12px; background: #fff; color: var(--lx-text); font-size: 14px; font-weight: 600; }
.lx-result { font-size: 14px; font-weight: 700; color: var(--lx-muted); margin-top: 18px !important; }
.lx-result + .lx-grid, .lx-result + .lx-card { margin-top: 12px; }

/* 시청 기록 */
.lx-history { padding: 8px; }
.lx-history li + li { border-top: 1px solid var(--lx-border); }
.lx-history-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; align-items: center; padding: 14px; border-radius: var(--lx-r); text-decoration: none; color: var(--lx-text) !important; cursor: pointer; }
.lx-history-row:hover { background: var(--lx-bg); }
.lx-history-row .lx-thumb-title { top: 28px; font-size: 14px; }
.lx-history-row .lx-thumb-play { display: none; }
.lx-history-copy { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lx-history-copy strong { font-size: 16px; overflow-wrap: anywhere; }
.lx-history-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--lx-muted); font-weight: 500; }

/* Empty / error / loading */
.lx-empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 36px 16px; }
.lx-empty-icon { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 18px; background: var(--lx-primary-soft); color: var(--lx-primary); margin-bottom: 6px; }
.lx-error .lx-empty-icon { background: #FFECE8; color: #C2410C; }
.lx-empty strong { font-size: 17px; }
.lx-empty p { color: var(--lx-muted); max-width: 420px; font-size: 14px; }
.lx-empty .lx-btn { margin-top: 10px; }
.lx-skeleton { display: grid; gap: 22px; }
.lx-skel { display: block; border-radius: 12px; background: linear-gradient(90deg, #ECEFF5 0%, #F5F7FB 50%, #ECEFF5 100%); background-size: 200% 100%; animation: lx-shimmer 1.4s infinite; }
.lx-skel-title { height: 34px; width: 280px; max-width: 70%; }
.lx-skel-hero { height: 220px; border-radius: var(--lx-r-lg); }
.lx-skel-card { display: grid; gap: 10px; padding: 12px; background: #fff; border: 1px solid var(--lx-border); border-radius: var(--lx-r-lg); }
.lx-skel-thumb { aspect-ratio: 16 / 9; border-radius: var(--lx-r); }
.lx-skel-line { height: 14px; }
.lx-skel-line.short { width: 60%; }
@keyframes lx-shimmer { to { background-position: -200% 0; } }

/* Player */
.lx-watch > * + * { margin-top: 18px; }
.lx-watch-head { display: flex; }
.lx-stage { background: var(--lx-stage); border-radius: var(--lx-r-lg); padding: 14px; box-shadow: 0 16px 40px rgba(5, 10, 25, .28); color: #E6EAF5; }
.lx-stage-video { position: relative; aspect-ratio: 16 / 9; width: 100%; background: #000; border-radius: var(--lx-r); overflow: hidden; }
.lx-stage-video > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.lx-stage-video:fullscreen { border-radius: 0; aspect-ratio: auto; }
.lx-loading { display: grid; place-items: center; }
.lx-spinner { width: 42px; height: 42px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .2); border-top-color: #fff; animation: lx-spin .9s linear infinite; }
@keyframes lx-spin { to { transform: rotate(360deg); } }
.lx-stage-overlay { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: rgba(5, 10, 25, .82); padding: 20px; }
.lx-overlay-box { display: grid; justify-items: center; gap: 8px; text-align: center; max-width: 380px; color: #fff; }
.lx-overlay-box p { color: #C7D2F0; font-size: 14px; }
.lx-overlay-box .lx-btn { margin-top: 8px; }
.lx-controls { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 4px 2px; }
.lx-controls-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lx-ctl { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 8px 14px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06); color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; justify-content: center; }
.lx-ctl:hover { background: rgba(255, 255, 255, .14); }
.lx-time { font-variant-numeric: tabular-nums; font-size: 14px; color: #C7D2F0; padding: 0 6px; font-weight: 600; }
.lx-speed { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #C7D2F0; font-weight: 700; }
.lx-speed select { min-height: 44px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .14); background: #18223A; color: #fff; padding: 6px 12px; font-weight: 700; }
.lx-parts { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 4px 2px; }
.lx-part { min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .16); background: transparent; color: #DCE3F5; font-weight: 700; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.lx-part.active { background: #fff; color: var(--lx-stage); }
.lx-stage .intro-layer { border-radius: var(--lx-r); }
.lx-stage .intro-start { border: 0; background: #fff; color: var(--lx-navy); font-weight: 800; min-height: 48px; }
.lx-stage .intro-skip { min-height: 40px; padding: 6px 14px; border-radius: 10px; font-weight: 700; }
.lx-watch-body { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 18px; align-items: start; }
.lx-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--lx-border); margin: -6px -6px 18px; padding: 0 2px; overflow-x: auto; }
.lx-tabs button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; background: none; font-weight: 700; font-size: 14px; color: var(--lx-muted); cursor: pointer; white-space: nowrap; }
.lx-tabs button[aria-selected="true"] { color: var(--lx-primary); border-bottom-color: var(--lx-primary); }
.lx-tabs button:disabled { cursor: not-allowed; color: #9AA3B5; }
.lx-soon { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: #F0F3F9; color: #6B7487; }
.lx-watch-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.lx-watch-title h1 { font-size: 22px; line-height: 1.3; overflow-wrap: anywhere; }
.lx-watch-note { margin-top: 14px !important; padding: 12px 14px; background: var(--lx-bg); border-radius: var(--lx-r-sm); font-size: 15px; }
.lx-watch-note span { display: inline-block; margin-right: 8px; font-size: 12px; font-weight: 800; color: var(--lx-primary); }
.lx-watch-progress h2 { font-size: 16px; margin-bottom: 12px; }
.lx-watch-percent { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.lx-watch-percent strong { font-size: 30px; font-variant-numeric: tabular-nums; }
.lx-watch-progress .lx-progress { height: 8px; }
.lx-watch-progress p { margin-top: 14px !important; line-height: 1.6; }

/* Login */
.lx-auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(80% 60% at 50% 0%, #E7ECFF 0%, var(--lx-bg) 60%); }
.lx-auth-card { width: min(420px, 100%); background: var(--lx-surface); border: 1px solid var(--lx-border); border-radius: var(--lx-r-lg); padding: 32px 28px; box-shadow: 0 20px 48px rgba(23, 36, 60, .08); text-align: center; }
.lx-auth-logo { width: 88px; height: 88px; border-radius: 22px; margin-bottom: 14px; }
.lx-auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.lx-auth-card form { display: grid; gap: 14px; margin: 22px 0 18px; text-align: left; }
.lx-auth-card label { display: grid; gap: 6px; font-size: 14px; font-weight: 650; color: var(--lx-text); }
.lx-auth-card input:not([type="checkbox"]) { width: 100%; min-height: 48px; border: 1px solid #D5DCE8; border-radius: var(--lx-r-sm); padding: 10px 14px; font-size: 16px; background: #fff; color: var(--lx-text); }
.lx-auth-card input:focus { border-color: var(--lx-primary); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--lx-primary) 20%, transparent); }
.lx-auth-card .password-field { position: relative; display: block; }
.lx-auth-card .password-field input { padding-right: 82px; }
.lx-auth-card .password-field .lx-btn { position: absolute; right: 4px; top: 4px; bottom: 4px; min-height: 0; padding: 0 12px; border: 0; font-size: 13px; }
.lx-auth-card label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--lx-muted); }
.lx-auth-card .lx-btn-block { min-height: 50px; font-size: 16px; }
.lx-auth-card .form-error { text-align: center; }
.lx-auth-card p.small { line-height: 1.7; }

/* Account sheet (mobile 내 정보) */
dialog.lx-sheet { width: min(420px, calc(100% - 24px)); padding: 18px; border-radius: var(--lx-r-lg); display: grid; gap: 4px; font-family: inherit; color: var(--lx-text); }
dialog.lx-sheet:not([open]) { display: none; }
dialog.lx-sheet .lx-btn-block { margin-top: 8px; }

/* Tablet and phone */
@media (max-width: 1023px) {
  .lx-sidebar { display: none; }
  .lx-main, .lx-booting .lx-main { padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); max-width: 820px; margin: 0 auto; }
  .lx-main > * + * { margin-top: 20px; }
  .lx-mtop { display: flex; align-items: center; position: sticky; top: 0; z-index: 10; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: color-mix(in srgb, var(--lx-bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--lx-border); }
  .lx-mtop .lx-brand { padding: 0; }
  .lx-mtop .lx-brand strong { font-size: 16px; }
  .lx-mnav { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--lx-border); padding-bottom: env(safe-area-inset-bottom); }
  .lx-mnav ul { display: grid; grid-template-columns: repeat(4, 1fr); }
  .lx-mnav a, .lx-mnav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 60px; width: 100%; border: 0; background: none; font-size: 11px; font-weight: 700; color: var(--lx-hint) !important; text-decoration: none; cursor: pointer; }
  .lx-mnav a[aria-current="page"] { color: var(--lx-primary) !important; }
  .lx-home-grid, .lx-watch-body { grid-template-columns: minmax(0, 1fr); }
  .lx-page-head h1 { font-size: 24px; }
  body.lx-body .toast-holder { bottom: calc(84px + env(safe-area-inset-bottom)); }
}
@media (max-width: 720px) {
  .lx-hero { grid-template-columns: minmax(0, 1fr); padding: 22px; gap: 18px; }
  .lx-hero-thumb { order: -1; }
  .lx-hero h2 { font-size: 20px; }
  .lx-hero .lx-btn { width: 100%; }
  .lx-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lx-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .lx-course { display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: start; gap: 12px; padding: 10px; border-radius: var(--lx-r); }
  .lx-course .lx-thumb { border-radius: 12px; }
  .lx-course .lx-thumb-label, .lx-course .lx-thumb-play { display: none; }
  .lx-course .lx-thumb-title, .lx-history-row .lx-thumb-title { left: 8px; right: 8px; top: 7px; font-size: 12px; line-height: 1.25; }
  .lx-course-body { padding: 0; gap: 4px; }
  .lx-course-title { font-size: 15px; }
  .lx-course-note { font-size: 13px; -webkit-line-clamp: 1; }
  .lx-history-row { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding: 10px; }
  .lx-history-row .lx-thumb-label, .lx-history-row .lx-thumb-play { display: none; }
  .lx-card { padding: 18px; border-radius: var(--lx-r); }
  .lx-field { max-width: none; min-width: 0; flex: 1 1 120px; }
  .lx-stage { margin: 0 -16px; border-radius: 0; padding: 0 0 10px; }
  .lx-stage-video { border-radius: 0; }
  .lx-controls { padding: 10px 12px 0; }
  .lx-parts { padding: 8px 12px 0; }
  .lx-ctl { padding: 8px 10px; }
  .lx-hide-sm { display: none; }
  .lx-watch-title h1 { font-size: 19px; }
}
@media (max-width: 380px) {
  .lx-course { grid-template-columns: 112px minmax(0, 1fr); }
  .lx-speed span { display: none; }
}
/* A phone turned sideways while watching: the picture fills the screen height. */
@media (max-width: 1023px) and (orientation: landscape) and (max-height: 500px) {
  .lx-mtop, .lx-mnav { display: none; }
  .lx-main { padding-bottom: 24px; }
  .lx-stage-video { max-height: calc(100vh - 80px); aspect-ratio: auto; height: calc(100vh - 80px); }
}
@media (prefers-reduced-motion: reduce) {
  .lx *, .lx *::before, .lx *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .lx-course:hover { transform: none; }
}
