@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --cream:       #fdf7f4;
  --cream-dark:  #f6e7e0;
  --caramel:     #c8577a;
  --caramel-lt:  #e58aa3;
  --brown:       #33202b;
  --brown-mid:   #6b3a52;
  --rose:        #3f9e8d;
  --rose-lt:     #b7e4d9;
  --gold:        #dba33c;
  --gold-lt:     #f0cf8a;
  --white:       #ffffff;
  --gray-50:     #fafafa;
  --gray-100:    #f3f4f6;
  --gray-300:    #d1d5db;
  --gray-500:    #6b7280;
  --gray-700:    #374151;

  --sidebar-w:   260px;
  --header-h:    64px;
  --radius:      14px;
  --radius-sm:   8px;
  --shadow:      0 2px 16px rgba(51,32,43,.10);
  --shadow-card: 0 4px 24px rgba(51,32,43,.12);

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;

  --trans: .22s cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--brown);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* ---------- Layout ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  background: var(--brown);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-brand .heart { color: var(--gold); font-size: 20px; }
.sidebar-brand h1 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  color: var(--gold-lt);
  line-height: 1.1;
}
.sidebar-brand small {
  display: block;
  font-size: 9.5px;
  letter-spacing: .12em;
  color: rgba(253,248,242,.5);
  margin-top: 2px;
}

.sidebar-nav { flex: 1; padding: 14px 12px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: rgba(253,248,242,.75);
  font-size: 14px;
  font-weight: 500;
  transition: background var(--trans), color var(--trans);
  margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: var(--cream); }
.nav-item.active {
  background: linear-gradient(90deg, var(--caramel), var(--caramel-lt));
  color: var(--white);
}
.nav-item .ic { width: 18px; text-align: center; opacity: .9; }
.nav-item.download { color: var(--caramel-lt); margin-top: 6px; }

.sidebar-progress {
  padding: 18px 24px 22px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-progress .label {
  font-size: 10px;
  letter-spacing: .1em;
  color: rgba(253,248,242,.5);
  margin-bottom: 8px;
}
.sidebar-progress .bar {
  height: 6px;
  border-radius: 4px;
  background: rgba(255,255,255,.1);
  overflow: hidden;
  position: relative;
}
.sidebar-progress .bar > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--caramel-lt));
  border-radius: 4px;
}
.sidebar-progress .pct {
  text-align: right;
  font-size: 11px;
  color: var(--gold-lt);
  margin-top: 6px;
}

/* ---------- Header ---------- */
.header {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.header .crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--gray-500); }
.header .crumbs a:hover { color: var(--caramel); }
.header .crumbs .current { color: var(--brown); font-weight: 600; }
.header .crumbs .sep { color: var(--gray-300); }

.btn-install {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--caramel), var(--caramel-lt));
  color: var(--white);
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow);
}

/* ---------- Main ---------- */
main { padding: 32px 40px 64px; max-width: 1280px; }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(circle at 90% 10%, rgba(219,163,60,.14), transparent 60%), var(--brown);
  border-radius: 20px;
  padding: 34px 40px;
  color: var(--cream);
  margin-bottom: 34px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.05) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  opacity: .5;
}
.hero > * { position: relative; }
.hero .eyebrow {
  font-size: 11px;
  letter-spacing: .14em;
  font-weight: 600;
  color: var(--gold-lt);
  margin-bottom: 8px;
}
.hero h2 {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 34px;
  font-weight: 600;
  color: var(--gold-lt);
  margin-bottom: 12px;
}
.hero p { color: rgba(253,248,242,.8); font-size: 14.5px; max-width: 640px; line-height: 1.55; }

/* ---------- Section heading ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-head h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
}
.section-head h3 em { font-style: italic; color: var(--caramel); }
.section-head .count { font-size: 13px; color: var(--gray-500); }

/* ---------- Module grid ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 40px; }
.grid.bonus-grid, .grid.tools-grid { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform var(--trans), box-shadow var(--trans);
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(51,32,43,.18); }

.card .thumb {
  height: 130px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: radial-gradient(rgba(255,255,255,.5) 1.5px, transparent 1.5px);
  background-size: 16px 16px;
}
.card .thumb .emoji { font-size: 46px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.12)); }
.card .badge {
  position: absolute; top: 10px; left: 10px;
  background: var(--brown);
  color: var(--gold-lt);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 4px 10px;
  border-radius: 999px;
}
.card .body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.card .body h4 { font-size: 15.5px; font-weight: 700; margin-bottom: 4px; }
.card .body p { font-size: 12.5px; color: var(--gray-500); line-height: 1.4; flex: 1; }
.card .body .meta { font-size: 12px; color: var(--caramel); font-weight: 600; margin-top: 10px; }
.card .body .open { font-size: 12.5px; color: var(--caramel); font-weight: 600; margin-top: 10px; }

/* module thumb color themes */
.thumb.t-m1 { background-color: #f8dbe6; }
.thumb.t-m2 { background-color: #fbe6cf; }
.thumb.t-m3 { background-color: #d3efe8; }
.thumb.t-m4 { background-color: #f6d3c4; }
.thumb.t-m5 { background-color: #e6dcf0; }
.thumb.t-m6 { background-color: #f0e6da; }
.thumb.t-bonus { background-color: #fbe3ea; }
.thumb.t-locked { background-color: var(--cream-dark); }

/* ---------- Lesson list ---------- */
.lesson-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  transition: box-shadow var(--trans);
}
.lesson-row:hover { box-shadow: var(--shadow-card); }
.lesson-row .thumb-sm {
  width: 64px; height: 44px;
  border-radius: 8px;
  background: var(--cream-dark);
  flex-shrink: 0;
}
.lesson-row .info { flex: 1; min-width: 0; }
.lesson-row .info h5 { font-size: 15px; font-weight: 700; }
.lesson-row .info p { font-size: 12.5px; color: var(--gray-500); margin-top: 2px; }
.lesson-row .tag {
  font-size: 11px; font-weight: 700;
  color: var(--rose);
  background: var(--rose-lt);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.lesson-row .tag.doc { color: var(--brown-mid); background: var(--cream-dark); }
.lesson-row .check {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  flex-shrink: 0;
}
.lesson-row .play {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--caramel), var(--brown-mid));
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
}

/* ---------- Lesson detail ---------- */
.lesson-label { font-size: 11px; letter-spacing: .1em; color: var(--caramel); font-weight: 700; margin-bottom: 6px; }
.lesson-title { font-family: var(--font-serif); font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.lesson-sub { color: var(--gray-500); font-size: 14.5px; margin-bottom: 22px; }

.video-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 28px;
  background: #000;
}
.video-card .frame-wrap { position: relative; width: 100%; aspect-ratio: 16/9; }
.video-card iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.content-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 26px;
  margin-bottom: 16px;
}
.content-card h4 { font-size: 15.5px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.content-card p, .content-card .txt { font-size: 14px; line-height: 1.65; color: var(--brown-mid); }
.content-card ul.plain-list { display: flex; flex-direction: column; gap: 10px; }
.content-card ul.plain-list li {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--brown);
  background: var(--cream);
  border-left: 3px solid var(--caramel-lt);
  padding: 9px 12px;
  border-radius: 6px;
}
.content-card ol.steps { display: flex; flex-direction: column; gap: 10px; counter-reset: step; }
.content-card ol.steps li {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--brown);
  padding-left: 30px;
  position: relative;
}
.content-card ol.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; left: 0; top: -1px;
  width: 20px; height: 20px;
  background: var(--caramel);
  color: #fff;
  font-size: 11px; font-weight: 700;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.content-card .tip-red { color: #c0392b; }
.content-card table { width: 100%; border-collapse: collapse; font-size: 13px; }
.content-card table th { text-align: left; font-size: 11px; color: var(--gray-500); padding: 6px 10px; border-bottom: 1px solid var(--gray-100); }
.content-card table td { padding: 9px 10px; border-bottom: 1px solid var(--gray-100); }
.content-card .script-box {
  background: var(--cream);
  border-radius: 10px;
  padding: 12px 14px;
  font-style: italic;
  color: var(--brown-mid);
  font-size: 13.5px;
}

.action-card {
  background: linear-gradient(135deg, var(--gold-lt), var(--caramel-lt));
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 20px 0 24px;
  color: var(--brown);
}
.action-card h4 { font-size: 13px; letter-spacing: .06em; margin-bottom: 6px; }
.action-card p { font-size: 14px; line-height: 1.5; }

.btn-complete {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--caramel);
  color: var(--caramel);
  font-weight: 600;
  font-size: 13.5px;
  padding: 11px 20px;
  border-radius: 10px;
  background: var(--white);
  transition: background var(--trans), color var(--trans);
}
.btn-complete:hover { background: var(--caramel); color: var(--white); }
.complete-hint { font-size: 12px; color: var(--gray-500); margin-top: 8px; }

/* ---------- Tools page ---------- */
.tools-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tool-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 22px;
}
.tool-card .icon-box {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--cream-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}
.tool-card h4 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.tool-card p { font-size: 13px; color: var(--gray-500); margin-bottom: 14px; }
.tool-card .open-link { font-size: 13px; font-weight: 700; color: var(--caramel); }

/* ---------- Breadcrumb page title ---------- */
.page-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.page-heading .icon-badge { font-size: 22px; }
.page-heading h2 { font-family: var(--font-serif); font-size: 24px; }
.page-heading h2 em { font-style: italic; color: var(--caramel); }
.page-heading + p.subtitle { margin-top: -18px; margin-bottom: 26px; color: var(--gray-500); font-size: 14px; }

/* ---------- Back link ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 4px;
}
.back-link:hover { color: var(--caramel); }

/* ---------- Empty / locked note ---------- */
.locked-note {
  font-size: 12.5px;
  color: var(--gray-500);
  background: var(--cream-dark);
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 8px;
}

/* ---------- Utility ---------- */
.mt-40 { margin-top: 40px; }
