:root {
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #c89a3c;
  --line: #e5e5e5;
  --bg-soft: #fafafa;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif;
  color: var(--ink);
}

.muted { color: var(--muted); }
a { color: inherit; }

.study-header {
  padding: 2rem 0 1rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}
.study-header h1 { margin: .25rem 0 .35rem; font-size: 1.75rem; }

.kind-block { margin: 2.5rem 0; }
.kind-block h2 { font-size: 1.4rem; margin-bottom: 1rem; display: flex; align-items: baseline; gap: .5rem; }

.lec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.lec-card { padding: 0; margin: 0; }
.lec-card .lec-link {
  display: block;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.lec-card .lec-link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
}
.lec-card h3 { font-size: 1rem; margin: .35rem 0; line-height: 1.4; }
.lec-card .lec-meta { display: flex; justify-content: space-between; align-items: center; }

.badge {
  background: var(--accent);
  color: #fff;
  padding: .1rem .55rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
}

.tracks { margin-top: .75rem; display: flex; gap: .35rem; flex-wrap: wrap; }
.tracks .t {
  font-size: .7rem;
  background: #f3f3f3;
  padding: .15rem .5rem;
  border-radius: 4px;
  color: var(--muted);
}

.lecture-page { padding: 1.5rem 1rem; max-width: 1100px; margin: 0 auto; }
.lec-head { margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.lec-head nav { margin-bottom: .5rem; }
.lec-head h1 { font-size: 1.5rem; margin: .35rem 0; line-height: 1.35; }
.lec-head details { margin-top: .75rem; }
.lec-head details ul { margin-top: .5rem; padding-left: 1.25rem; }

.track-tabs {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin: 1rem 0 1.25rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--line);
}
.track-tabs button {
  padding: .5rem 1rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 6px;
  cursor: pointer;
  font-size: .9rem;
  font-family: inherit;
}
.track-tabs button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.dl-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}
.dl-btn {
  padding: .4rem .85rem;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
}
.dl-btn:hover { opacity: .9; }

.full-img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: block;
}

.card-gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.card-gallery img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.summary-text {
  white-space: pre-wrap;
  word-break: keep-all;
  font-family: 'Pretendard', -apple-system, sans-serif;
  line-height: 1.75;
  font-size: 1rem;
  background: var(--bg-soft);
  padding: 1.5rem;
  border-radius: 6px;
  border: 1px solid var(--line);
}

footer { margin: 3rem 0 1.5rem; text-align: center; }

@media (max-width: 600px) {
  .lec-grid { grid-template-columns: 1fr; }
  .lecture-page { padding: 1rem .75rem; }
  .card-gallery { grid-template-columns: 1fr; }
  .study-header h1 { font-size: 1.4rem; }
  .lec-head h1 { font-size: 1.25rem; }
}
