/* _thinkific_grid.html から切り出したスタイル。
   元は <style> タグ 1 個。中身は変更していない。 */

.course-page-header {
  margin-bottom: 1.5rem;
}
.course-page-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: #1f2937;
}
.course-page-header p {
  color: #6b7280;
  font-size: 0.92rem;
  margin: 0;
}

/* Thinkific購入コンテンツグリッド */
.th-course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.th-course-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}
.th-course-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.th-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.th-course-thumb {
  height: 160px;
  background: linear-gradient(135deg, #1a0000 0%, #4a0e0e 40%, #7f1d1d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
/* カード下部のアクション（受講する／学びのメモ）— 同形・等幅で固定位置 */
.th-card-actions {
  display: flex;
  gap: 0.5rem;
  padding: 0 1rem 1rem;
}
.th-btn {
  flex: 1 1 0;
  min-width: 0;
  box-sizing: border-box;
  height: 2.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0 0.4rem;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--primary);
  transition: background 0.15s, color 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.th-btn-primary { background: var(--primary); color: white; }
.th-btn-primary:hover { opacity: 0.88; }
.th-btn-outline { background: white; color: var(--primary); }
.th-btn-outline:hover { background: var(--primary); color: white; }
.th-course-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.th-course-thumb .placeholder-icon {
  font-size: 2rem;
  opacity: 0.5;
  color: white;
}
.th-course-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.th-course-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.4;
  margin: 0 0 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* 2行ぶんの高さを固定して、タイトル長でボタン位置がずれないようにする */
  min-height: 2.52em;
}
.th-course-progress {
  margin-top: auto;
}
.th-progress-bar {
  background: #e5e7eb;
  border-radius: 9999px;
  height: 6px;
  width: 100%;
  margin-bottom: 0.4rem;
}
.th-progress-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.3s;
  background: var(--primary);
}
.th-progress-fill.completed { background: #16a34a; }
.th-course-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
}
.th-course-meta .pct { color: #6b7280; }
.th-course-badge {
  display: inline-block;
  padding: 0.15em 0.55em;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
}
.th-course-badge.completed { background: #dcfce7; color: #166534; }
.th-course-badge.in_progress { background: #dbeafe; color: #1e40af; }
.th-course-badge.not_started { background: #f3f4f6; color: #6b7280; }
.th-external-hint {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: #9ca3af;
  margin-top: 0.5rem;
}

.section-divider {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 2rem 0;
}

.empty-msg {
  text-align: center;
  color: #9ca3af;
  padding: 2rem 0;
  font-size: 0.95rem;
}
