:root {
  --bg: #fbf5f3;
  --card: #ffffff;
  --ink: #3a2530;
  --muted: #8a7480;
  --line: #f0dfe4;
  --pink: #e8327f;
  --pink-dark: #b81a5c;
  --gold: #d4a85a;
  --soft: #fde8ef;
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(900px 500px at 100% -10%, #fbd3e3 0, transparent 60%),
    radial-gradient(700px 500px at -10% 30%, #fde4d6 0, transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font: 16px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; line-height: 1.15; margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* header */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 24px; background: rgba(255, 255, 255, .88); backdrop-filter: blur(8px);
  border-bottom: 3px solid transparent;
  border-image: linear-gradient(90deg, var(--gold), var(--pink), #9b3fd1) 1;
}
.top img { height: 44px; display: block; }
.top nav { display: flex; gap: 8px; align-items: center; }
.btn-ghost {
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: 8px 14px; border-radius: 999px; font-size: 14px;
}
.btn-ghost:hover { border-color: var(--pink); color: var(--pink); }
.btn {
  border: 0; border-radius: 999px; padding: 12px 22px; color: #fff; font-weight: 600;
  background: linear-gradient(90deg, var(--pink), var(--pink-dark));
  box-shadow: 0 6px 18px rgba(232, 50, 127, .25);
}
.btn:hover { filter: brightness(1.05); }
.btn:disabled { opacity: .45; box-shadow: none; cursor: default; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 32px 24px 64px; }

/* home */
.hero {
  position: relative; overflow: hidden; border-radius: 28px; margin-bottom: 36px;
  padding: clamp(36px, 7vw, 72px) clamp(24px, 5vw, 56px); color: #fff;
  background:
    linear-gradient(100deg, rgba(122, 16, 66, .9) 0%, rgba(232, 50, 127, .78) 50%, rgba(232, 50, 127, .1) 85%),
    url("https://images.unsplash.com/photo-1679307658813-da95b901ecd9?auto=format&fit=crop&w=1800&q=75") center / cover,
    linear-gradient(120deg, var(--pink-dark), var(--pink) 55%, var(--gold));
  box-shadow: 0 24px 50px rgba(184, 26, 92, .22);
}
.hero .kicker { color: #ffe3b0; letter-spacing: .18em; font-size: 12px; text-transform: uppercase; font-weight: 600; }
.hero h1 { font-size: clamp(36px, 5.5vw, 60px); margin: 10px 0 12px; max-width: 560px; }
.hero p { color: #ffe6f0; max-width: 480px; margin: 0; }
.hero .spark { color: #ffe3b0; }
.section-title { font-size: 30px; margin: 0 0 18px; display: flex; align-items: center; gap: 10px; }
.section-title::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, var(--line), transparent); }
.spark { color: var(--gold); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.course {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s;
}
.course:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(184, 26, 92, .12); }
.course .cover {
  aspect-ratio: 16/9; display: grid; place-items: center; position: relative;
  background: radial-gradient(circle at 30% 20%, #fff 0, var(--soft) 55%, #f8d3e1 100%);
}
.course .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.course:hover .cover img { transform: scale(1.04); }
.course .cover span { font-family: "Cormorant Garamond", serif; font-size: 30px; color: var(--pink-dark); padding: 0 16px; text-align: center; }
.course .cover .badge {
  position: absolute; top: 14px; left: 14px; background: rgba(255, 255, 255, .92); color: var(--pink-dark);
  font: 600 12px/1.4 "Inter", system-ui, sans-serif; font-weight: 600; padding: 6px 12px; border-radius: 999px; box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 4px; }
.chips span { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--soft); color: var(--pink-dark); }
.chips span:nth-child(3n+2) { background: #fff1dc; color: #9a6a1c; }
.chips span:nth-child(3n) { background: #f1e6fb; color: #7a3aa8; }
.course .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.course h3 { font-size: 26px; }
.course p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.meta { font-size: 13px; color: var(--muted); display: flex; gap: 14px; }
.bar { height: 6px; border-radius: 6px; background: var(--soft); overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--pink)); width: 0; transition: width .4s; }
.course .btn { align-self: flex-start; margin-top: 6px; padding: 10px 18px; font-size: 14px; }

/* course page */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.player {
  aspect-ratio: 16/9; background: #1e1418; border-radius: var(--radius); overflow: hidden;
  display: grid; place-items: center; color: #f6dbe5; text-align: center;
}
.player iframe, .player video { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.player .soon { padding: 24px; }
.player .soon h3 { font-size: 30px; margin-bottom: 6px; color: #fff; }
.lesson-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin: 20px 0 6px; flex-wrap: wrap; }
.lesson-head h2 { font-size: 32px; }
.lesson-head small { color: var(--muted); display: block; margin-bottom: 4px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.done-toggle.on { background: var(--soft); color: var(--pink-dark); border-color: var(--pink); }

.side {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  position: sticky; top: 84px; max-height: calc(100vh - 110px); display: flex; flex-direction: column;
}
.side header { padding: 18px 18px 12px; border-bottom: 1px solid var(--line); }
.side header h3 { font-size: 24px; }
.side header .meta { margin: 6px 0 10px; }
.side ol { list-style: none; margin: 0; padding: 8px; overflow: auto; }
.side .mod {
  font-size: 12px; text-transform: uppercase; letter-spacing: .12em; font-weight: 600;
  margin: 12px 4px 6px; padding: 8px 12px; border-radius: 10px; color: #fff;
  background: linear-gradient(90deg, var(--pink), #f08ab4);
}
.side .mod:nth-of-type(3n+2) { background: linear-gradient(90deg, #c8913a, #e7c27e); }
.side .mod:nth-of-type(3n) { background: linear-gradient(90deg, #8e3cc4, #c48ae6); }
.course-band {
  grid-column: 1 / -1;
  border-radius: 22px; padding: 22px 26px; margin-bottom: 22px; color: #fff;
  background:
    linear-gradient(100deg, rgba(122, 16, 66, .9), rgba(232, 50, 127, .65) 60%, rgba(232, 50, 127, .15)),
    var(--band-img, none) center / cover,
    linear-gradient(120deg, var(--pink-dark), var(--pink));
}
.course-band { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.btn-pdf {
  background: #fff; color: var(--pink-dark); font-weight: 600; font-size: 14px;
  padding: 10px 18px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0, 0, 0, .15);
}
.btn-pdf:hover { background: #ffe3b0; }
.course-band small { color: #ffe3b0; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; font-weight: 600; }
.course-band h1 { font-size: clamp(28px, 4vw, 40px); margin-top: 4px; }
.side li a {
  display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: center;
  padding: 10px; border-radius: 12px; font-size: 14px;
}
.side li a:hover { background: var(--bg); }
.side li a.active { background: var(--soft); color: var(--pink-dark); font-weight: 600; }
.side .dot {
  width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line);
  display: grid; place-items: center; font-size: 12px; color: transparent;
}
.side .done .dot { background: var(--pink); border-color: var(--pink); color: #fff; }
.side .dur { color: var(--muted); font-size: 12px; font-weight: 400; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    linear-gradient(135deg, rgba(122, 16, 66, .55), rgba(232, 50, 127, .35)),
    url("https://images.unsplash.com/photo-1679307658813-da95b901ecd9?auto=format&fit=crop&w=1800&q=75") center / cover,
    radial-gradient(circle at 20% 10%, #fff 0, var(--bg) 40%, #f8dde7 100%); }
.login form {
  width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line);
  border-radius: 24px; padding: 36px 30px; text-align: center; box-shadow: 0 20px 50px rgba(184, 26, 92, .1);
}
.login img { width: 190px; margin: 0 auto 10px; display: block; }
.login h1 { font-size: 32px; margin-bottom: 6px; }
.login p { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.login input {
  width: 100%; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line);
  font: inherit; background: var(--bg); margin-bottom: 14px; text-align: center;
}
.login input:focus { outline: 2px solid var(--soft); border-color: var(--pink); }
.login .btn { width: 100%; }
.login .err { color: var(--pink-dark); background: var(--soft); border-radius: 10px; padding: 8px; font-size: 14px; margin-bottom: 14px; }
.login .help { margin: 18px 0 0; font-size: 13px; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; }
  .player { border-radius: 0; margin: 0 -24px; }
}
@media (max-width: 520px) {
  .top { padding: 10px 16px; }
  .top img { height: 36px; }
  .wrap { padding: 20px 16px 48px; }
  .player { margin: 0 -16px; }
  .lesson-head h2 { font-size: 26px; }
}
