:root {
  --bg: #faf7f4;
  --surface: #ffffff;
  --ink: #2b2226;
  --muted: #8a7d82;
  --rose: #c2607d;
  --rose-dark: #a94b67;
  --rose-soft: #f4e3e8;
  --gold: #b99668;
  --line: #ece4e0;
  --radius: 14px;
  --shadow: 0 8px 30px rgba(80, 40, 55, .08);
}

* { box-sizing: border-box; margin: 0; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
h1, h2, h3, .logo { font-family: 'Playfair Display', Georgia, serif; line-height: 1.25; }
a { color: var(--rose-dark); text-decoration: none; }
img { max-width: 100%; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { font-size: 24px; font-weight: 700; color: var(--ink); letter-spacing: .5px; }
.logo span { color: var(--rose); font-style: italic; }
.logo-sm { font-size: 19px; }
.site-header nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.site-header nav a { color: var(--ink); font-weight: 500; }
.site-header nav a:hover { color: var(--rose-dark); }

/* buttons */
.btn { display: inline-block; padding: 10px 22px; border-radius: 999px; font-weight: 600; font-size: 15px; border: 1.5px solid transparent; cursor: pointer; transition: .15s; font-family: inherit; }
.btn-primary { background: var(--rose); color: #fff !important; }
.btn-primary:hover { background: var(--rose-dark); }
.btn-ghost { border-color: var(--line); color: var(--ink) !important; background: transparent; }
.btn-ghost:hover { border-color: var(--rose); color: var(--rose-dark) !important; }
.btn-lg { padding: 14px 34px; font-size: 17px; }
.btn[disabled] { opacity: .5; cursor: default; }

/* hero */
.hero { background: linear-gradient(135deg, #fdf3f0 0%, var(--rose-soft) 55%, #f1e6f2 100%); padding: 84px 0 90px; text-align: center; }
.hero h1 { font-size: clamp(34px, 5.5vw, 58px); max-width: 780px; margin: 0 auto 18px; }
.hero h1 em { color: var(--rose); font-style: italic; }
.hero p { font-size: 19px; color: var(--muted); max-width: 560px; margin: 0 auto 34px; }

/* catalog */
.section { padding: 56px 0; }
.section-title { font-size: 30px; margin-bottom: 6px; }
.section-sub { color: var(--muted); margin-bottom: 28px; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s; }
.card:hover { transform: translateY(-3px); }
.card-cover { aspect-ratio: 16/9; background: linear-gradient(135deg, var(--rose-soft), #ead9ef); display: flex; align-items: center; justify-content: center; font-family: 'Playfair Display', serif; font-size: 42px; color: var(--rose); position: relative; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.card-body h3 { font-size: 20px; }
.card-body h3 a { color: var(--ink); }
.card-meta { color: var(--muted); font-size: 14px; }
.card-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 10px; }
.price { font-weight: 700; font-size: 19px; }
.price-soon { color: var(--muted); font-weight: 500; font-size: 15px; }
.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; background: var(--rose-soft); color: var(--rose-dark); }
.badge-owned { background: #e2f2e6; color: #2e7d44; }

/* course page */
.course-head { background: linear-gradient(135deg, #fdf3f0, var(--rose-soft)); padding: 56px 0; }
.course-head h1 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 10px; }
.course-head .card-meta { font-size: 15px; }
.buy-row { margin-top: 24px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.curriculum { max-width: 760px; }
.curriculum-section { margin: 26px 0 10px; font-size: 20px; }
.lesson-row { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 13px 18px; margin-bottom: 8px; }
.lesson-row .num { color: var(--muted); font-size: 14px; min-width: 24px; }
.lesson-row a { color: var(--ink); font-weight: 500; }
.lesson-row .lock { margin-left: auto; color: var(--muted); font-size: 14px; }
.lesson-row.done .num { color: #2e7d44; }

/* auth */
.auth-wrap { display: flex; justify-content: center; padding: 70px 20px; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 38px 36px; width: 100%; max-width: 420px; text-align: center; }
.auth-card h1 { font-size: 26px; margin-bottom: 8px; }
.auth-card p { color: var(--muted); font-size: 15px; margin-bottom: 22px; }
.field { width: 100%; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 16px; font-family: inherit; margin-bottom: 14px; background: #fff; color: var(--ink); }
.field:focus { outline: none; border-color: var(--rose); }
.code-field { text-align: center; letter-spacing: 10px; font-size: 24px; font-weight: 600; }

/* dashboard */
.progress-bar { height: 8px; background: var(--rose-soft); border-radius: 999px; overflow: hidden; }
.progress-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--rose), var(--gold)); border-radius: 999px; }

/* lesson player */
.lesson-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; padding: 34px 0; align-items: start; }
.player-box video { width: 100%; border-radius: var(--radius); background: #000; box-shadow: var(--shadow); aspect-ratio: 16/9; }
.lesson-title { font-size: 26px; margin: 18px 0 6px; }
.lesson-nav { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.sidebar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; max-height: 80vh; overflow-y: auto; }
.sidebar h3 { font-size: 17px; margin-bottom: 12px; }
.sidebar .lesson-row { padding: 9px 12px; font-size: 14px; }
.sidebar .lesson-row.active { border-color: var(--rose); background: var(--rose-soft); }
@media (max-width: 860px) { .lesson-layout { grid-template-columns: 1fr; } }

/* flash */
.flash { padding: 12px 18px; border-radius: 10px; margin: 14px 0; font-size: 15px; }
.flash-error { background: #fbe4e4; color: #9c2b2b; }
.flash-success { background: #e2f2e6; color: #2e7d44; }
.flash-info, .flash-debug, .flash-warning { background: var(--rose-soft); color: var(--rose-dark); }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 28px 0; margin-top: 60px; text-align: center; color: var(--muted); font-size: 14px; }
.site-footer .logo { margin-bottom: 4px; }

/* legal + footer + cookie */
.legal h3 { margin: 22px 0 8px; font-size: 19px; }
.legal p { margin-bottom: 10px; color: #4d4348; }
.footer-links { margin-top: 8px; }
.footer-req { font-size: 12.5px; color: #a89ba0; margin-top: 6px; max-width: 640px; margin-left: auto; margin-right: auto; }
#cookie-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 18px; display: flex; align-items: center; gap: 16px; font-size: 14px; max-width: 720px; margin: 0 auto; }
#cookie-bar .btn { padding: 8px 18px; font-size: 14px; white-space: nowrap; }
.agree-row { display: flex; gap: 10px; align-items: flex-start; text-align: left; font-size: 13.5px;
  color: var(--muted); margin-bottom: 14px; }
.agree-row input { margin-top: 3px; accent-color: var(--rose); }

/* seo */
.seo-block { border-top: 1px solid var(--line); }
.seo-block p { margin-bottom: 14px; color: #5c5156; }
.seo-block ul { margin: 0 0 14px 22px; color: #5c5156; }
.seo-block li { margin-bottom: 10px; }
.seo-block b { color: var(--ink); }

/* checkout */
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 20px; text-align: left; }
.summary .row { display: flex; justify-content: space-between; padding: 6px 0; }
.summary .row + .row { border-top: 1px dashed var(--line); }
.hint { font-size: 13px; color: var(--muted); }
