:root {
  --bg: #f4f2ee; --card: #fff; --ink: #121826; --sub: #626a7a; --line: #e6e2da;
  --navy: #0e1730; --navy-2: #1a2750;
  --brand: #1b2b5c; --brand-soft: #fbf3e2; --gold: #e2a73b; --gold-2: #f3cf86;
  --ok: #157a4a; --ok-soft: #e4f3ea; --warn: #a8640a; --warn-soft: #fbf0db;
  --bad: #c23a3a; --radius: 16px;
  --shadow: 0 1px 2px rgba(14, 23, 48, .04), 0 6px 20px rgba(14, 23, 48, .06);
  --shadow-hi: 0 2px 4px rgba(14, 23, 48, .06), 0 14px 34px rgba(14, 23, 48, .12);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; letter-spacing: -.01em;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; letter-spacing: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* header */
header.top { background: rgba(255, 255, 255, .82); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid rgba(14, 23, 48, .07); position: sticky; top: 0; z-index: 10; }
header.top .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.03em; font-size: 17px; white-space: nowrap; }
.logo b { color: var(--gold); font-weight: 800; }
.logo img { width: 32px; height: 32px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1.5px var(--navy), 0 0 0 3.5px var(--gold-2); }
.who { margin-left: auto; color: var(--sub); font-size: 14px; display: flex; align-items: center; gap: 12px; min-width: 0; }
.who .wn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

.crumb { color: var(--sub); font-size: 13px; margin: 24px 0 4px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumb a:hover { color: var(--ink); }
h1 { font-size: 26px; margin: 4px 0 20px; letter-spacing: -.035em; font-weight: 800; }
main > h1:first-child { margin-top: 28px; }
h2 { font-size: 13px; color: var(--sub); margin: 32px 0 12px; font-weight: 700; letter-spacing: .02em; display: flex; align-items: center; gap: 10px; }
h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* buttons & inputs */
.btn { border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; padding: 8px 14px; cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s; }
.btn:hover { border-color: #cfc9bd; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 700; }
.btn.primary:hover { background: var(--navy-2); }
.btn.small { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .5; cursor: default; }
label.f { display: block; font-size: 13px; font-weight: 700; margin: 16px 0 6px; }
input.in, select.in { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s; }
input.in:focus, select.in:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(226, 167, 59, .22); }
.msg { min-height: 22px; font-size: 14px; color: var(--bad); margin-top: 12px; }
.hint { font-size: 12px; color: var(--sub); margin-top: 6px; }
.empty { padding: 48px 16px; text-align: center; color: var(--sub); }
.empty img { width: 110px; display: block; margin: 0 auto 10px; }

/* cards */
.card { background: var(--card); border: 1px solid rgba(14, 23, 48, .06); border-radius: var(--radius); box-shadow: var(--shadow); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.series-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; transition: box-shadow .2s, transform .2s; position: relative; }
.series-card:hover { box-shadow: var(--shadow-hi); transform: translateY(-2px); }
.series-card .k { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--gold); }
.series-card .t { font-weight: 800; font-size: 18px; letter-spacing: -.03em; padding-right: 28px; }
.series-card .go { position: absolute; right: 18px; top: 18px; width: 28px; height: 28px; border-radius: 50%; background: var(--bg); display: grid; place-items: center; font-size: 14px; color: var(--navy); transition: background .2s, color .2s; }
.series-card:hover .go { background: var(--navy); color: #fff; }
.series-card .meta { font-size: 13px; color: var(--sub); display: flex; justify-content: space-between; }
.series-card .meta b { color: var(--ink); }
.bar { height: 6px; background: #ece8e0; border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--navy-2), #3b56a8); border-radius: 99px; transition: width .4s; }
.bar.ok > i { background: linear-gradient(90deg, #128048, #2fa86a); }

.list { overflow: hidden; }
.row { display: flex; align-items: center; gap: 14px; padding: 15px 18px; border-top: 1px solid var(--line); transition: background .15s; }
.row:first-child { border-top: 0; }
a.row:hover { background: #faf8f4; }
.row .t { font-weight: 700; flex: 1; min-width: 0; }
.row .d { color: var(--sub); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.st { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; flex: none; font-weight: 800; }
.st.done { background: var(--ok-soft); color: var(--ok); }
.st.part { background: var(--warn-soft); color: var(--warn); }
.st.none { background: var(--bg); color: #b3ada2; border: 1px solid var(--line); }

/* home hero */
.hero { position: relative; overflow: hidden; border-radius: 22px; color: #fff; margin: 24px 0 8px; padding: 34px 36px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(226, 167, 59, .22) 0%, rgba(226, 167, 59, 0) 45%),
    radial-gradient(90% 120% at 0% 100%, rgba(59, 86, 168, .55) 0%, rgba(59, 86, 168, 0) 60%),
    linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  box-shadow: 0 20px 50px -20px rgba(14, 23, 48, .55); display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 28px 28px; mask-image: linear-gradient(90deg, transparent, #000 60%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); }
.hero > * { position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: .16em; color: var(--gold-2); }
.eyebrow::before { content: ""; width: 18px; height: 1.5px; background: var(--gold); }
.hero .hi { margin-top: 14px; font-size: 15px; color: rgba(255,255,255,.72); font-weight: 600; }
.hero h1 { color: #fff; font-size: 30px; line-height: 1.32; margin: 6px 0 0; letter-spacing: -.045em; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--gold-2); background: linear-gradient(transparent 62%, rgba(226,167,59,.28) 62%); }
.hero p { margin: 12px 0 0; font-size: 16px; color: rgba(255,255,255,.82); font-weight: 500; }
.stats { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.stats > div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 9px 14px; display: flex; align-items: baseline; gap: 8px; }
.stats b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stats span { font-size: 12px; color: rgba(255,255,255,.7); font-weight: 600; }
.ring { position: relative; width: 196px; height: 196px; flex: none; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring .face { position: absolute; inset: 16px; border-radius: 50%; background: #fff; overflow: hidden; display: grid; place-items: end center; box-shadow: inset 0 0 0 4px rgba(14,23,48,.9); }
.ring .face img { width: 92%; display: block; margin-bottom: -2px; }
.ring .pct { position: absolute; right: -4px; bottom: 6px; background: var(--gold); color: var(--navy); font-weight: 800; font-size: 14px; border-radius: 99px; padding: 5px 11px; box-shadow: 0 6px 16px rgba(0,0,0,.25); font-variant-numeric: tabular-nums; }

/* passage */
.lesson { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 40px; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-hi); }
.player > * { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.watch { padding: 14px 18px; margin-top: 12px; display: flex; align-items: center; gap: 14px; }
.watch .bar { flex: 1; }
.watch .lbl { font-size: 13px; color: var(--sub); white-space: nowrap; font-weight: 600; }
.watch.done .lbl { color: var(--ok); font-weight: 800; }
.nav2 { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; }
.nav2 a { flex: 1; max-width: 48%; padding: 12px 16px; font-size: 14px; font-weight: 700; transition: box-shadow .2s; }
.nav2 a:hover { box-shadow: var(--shadow-hi); }
.nav2 a small { display: block; color: var(--sub); font-size: 12px; font-weight: 600; }
.nav2 a.next { text-align: right; margin-left: auto; }
.sents { max-height: calc(100vh - 124px); overflow: auto; position: sticky; top: 76px; }
.sents .hd { padding: 14px 18px; font-size: 12px; color: var(--sub); border-bottom: 1px solid var(--line); font-weight: 600; }
.sent { display: flex; gap: 12px; padding: 13px 18px; cursor: pointer; border-left: 3px solid transparent; font-size: 15px; line-height: 1.65; transition: background .15s; }
.sent:hover { background: #faf8f4; }
.sent .n { color: var(--sub); font-size: 12px; font-weight: 800; min-width: 34px; padding-top: 3px; font-variant-numeric: tabular-nums; }
.sent .n time { display: block; font-weight: 500; }
.sent.on { background: var(--brand-soft); border-left-color: var(--gold); }
.sent.on .n { color: var(--warn); }

/* login */
.center { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(80% 60% at 50% 0%, #fff 0%, rgba(255,255,255,0) 70%), var(--bg); }
.login { width: 100%; max-width: 400px; padding: 32px; }
.login h1 { margin: 0 0 6px; font-size: 24px; }
.login p { color: var(--sub); font-size: 14px; margin: 0 0 18px; }
.login .btn.primary { width: 100%; padding: 13px; margin-top: 8px; border-radius: 12px; font-size: 15px; }
.login-wrap { width: 100%; max-width: 820px; display: grid; grid-template-columns: 1.05fr 1fr; overflow: hidden; border-radius: 22px; box-shadow: 0 30px 70px -30px rgba(14,23,48,.45); }
.login-art { position: relative; overflow: hidden; color: #fff; padding: 34px 32px 0; display: flex; flex-direction: column;
  background: radial-gradient(120% 90% at 100% 0%, rgba(226,167,59,.25), rgba(226,167,59,0) 50%), linear-gradient(150deg, var(--navy), var(--navy-2)); }
.login-art h2 { color: #fff; font-size: 26px; margin: 14px 0 0; letter-spacing: -.04em; line-height: 1.3; font-weight: 800; display: block; }
.login-art h2::after { display: none; }
.login-art h2 em { font-style: normal; color: var(--gold-2); }
.login-art p { margin: 10px 0 0; font-size: 14px; color: rgba(255,255,255,.75); line-height: 1.6; }
.login-art img { width: 82%; margin: 24px auto 0; display: block; filter: drop-shadow(0 18px 30px rgba(0,0,0,.35)); }
.login-wrap .login { max-width: none; border: 0; border-radius: 0; box-shadow: none; align-self: center; }

@media (max-width: 860px) {
  .lesson { grid-template-columns: 1fr; }
  .lesson .main { position: sticky; top: 60px; z-index: 5; background: var(--bg); padding-bottom: 4px; }
  .lesson .player { border-radius: 0; margin: 0 -16px; box-shadow: none; }
  .sents { position: static; max-height: none; }
  .watch, .nav2 { margin-top: 8px; }
  .nav2 { display: none; }
  .nav2.bottom { display: flex; }
}
@media (min-width: 861px) { .nav2.bottom { display: none; } }
@media (max-width: 640px) {
  .who { font-size: 12px; gap: 8px; }
  .hero { grid-template-columns: 1fr; padding: 24px 20px 22px; border-radius: 18px; gap: 0; }
  .hero .ring { position: absolute; top: 16px; right: 14px; width: 92px; height: 92px; }
  .hero .ring .face { inset: 8px; box-shadow: inset 0 0 0 3px rgba(14,23,48,.9); }
  .hero .ring .pct { font-size: 11px; padding: 3px 7px; right: -6px; bottom: -2px; }
  .hero .hi { margin-top: 10px; padding-right: 100px; }
  .hero h1 { font-size: 22px; }
  .hero p { font-size: 14px; }
  .stats b { font-size: 17px; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { padding: 24px 22px 0; flex-direction: row; align-items: flex-end; gap: 10px; }
  .login-art > div { padding-bottom: 22px; }
  .login-art h2 { font-size: 20px; }
  .login-art img { width: 112px; margin: 0 -4px 0 auto; }
  .login { padding: 24px 22px 28px; }
}

/* series list with watch gauge */
.slist { display: flex; flex-direction: column; gap: 12px; }
.slist .series-card { flex-direction: row; align-items: center; gap: 28px; padding: 22px 24px; }
.slist .series-card .info { width: 260px; flex: none; display: flex; flex-direction: column; gap: 4px; }
.slist .series-card .t { padding-right: 0; }
.slist .series-card .meta { display: block; }
.slist .series-card .go { position: static; flex: none; width: 36px; height: 36px; }
.gauge { flex: 1; min-width: 0; }
.gauge .gl { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.gauge .gl span { font-size: 12px; font-weight: 700; color: var(--sub); letter-spacing: .02em; }
.gauge .gl b { font-size: 26px; font-weight: 800; letter-spacing: -.03em; color: var(--navy); font-variant-numeric: tabular-nums; line-height: 1; }
.gauge .gl b small { font-size: 14px; margin-left: 1px; color: var(--sub); }
.bar.big { height: 12px; background: #ece8e0; box-shadow: inset 0 1px 2px rgba(14,23,48,.08); }
.bar.big > i { background: linear-gradient(90deg, var(--navy-2), #3b56a8 70%, var(--gold)); position: relative; }
.bar.big.ok > i { background: linear-gradient(90deg, #128048, #2fa86a); }
.mini-g { display: flex; align-items: center; gap: 8px; width: 150px; flex: none; }
.mini-g .bar { flex: 1; height: 6px; }
.mini-g b { font-size: 12px; color: var(--sub); width: 34px; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .slist .series-card { flex-wrap: wrap; gap: 14px; padding: 18px; }
  .slist .series-card .info { width: auto; flex: 1; }
  .gauge { flex-basis: 100%; order: 3; }
  .gauge .gl b { font-size: 22px; }
  .mini-g { width: 92px; }
  .mini-g b { width: 30px; }
}
