/* ================================
   KAI-JIN LMS スタイル
   紺×橙のブランドで統一
   ================================ */

:root {
  --navy: #1E2761;
  --navy-deep: #131A45;
  --orange: #F39C12;
  --orange-light: #FCE4B5;
  --bg: #FFFFFF;
  --surface: #F8FAFC;
  --border: #E5E7EB;
  --text: #1F2937;
  --muted: #6B7280;
  --success-bg: #E1F5EE;
  --success-text: #085041;
  --error-bg: #FCEBEB;
  --error-text: #791F1F;
  --warning-bg: #FAEEDA;
  --warning-text: #854F0B;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

/* ============== ヘッダー ============== */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.admin-header {
  background: var(--surface);
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.brand-mark {
  color: var(--orange);
  font-weight: 700;
  letter-spacing: 4px;
  font-size: 14px;
}

.brand-name {
  color: var(--navy);
  font-size: 14px;
  font-weight: 500;
}

.user-info {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 16px;
}

.link-muted {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}

.link-muted:hover {
  color: var(--navy);
}

.admin-nav {
  display: flex;
  gap: 4px;
}

.admin-nav a {
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.admin-nav a:hover {
  background: var(--bg);
  color: var(--navy);
}

.admin-nav a.active {
  background: var(--navy);
  color: white;
}

/* ============== メインレイアウト ============== */
.page-main {
  max-width: 980px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

.back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.back-link:hover { color: var(--navy); }

.page-header { margin-bottom: 2.5rem; }

.eyebrow {
  color: var(--orange);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 4px;
  margin: 0 0 8px;
}

h1 {
  font-size: 32px;
  color: var(--navy);
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.accent-bar {
  width: 48px;
  height: 4px;
  background: var(--orange);
  margin: 1rem 0 0;
}

.lead {
  color: var(--muted);
  margin: 1.25rem 0 0;
  font-size: 15px;
}

.section-heading {
  font-size: 16px;
  color: var(--navy);
  margin: 2rem 0 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-heading::before {
  content: "";
  width: 4px;
  height: 18px;
  background: var(--orange);
}

/* ============== ログイン画面 ============== */
.login-page {
  background: var(--surface);
  min-height: 100vh;
}

.login-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 4rem 1.5rem 2rem;
}

.login-card {
  background: var(--bg);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  border: 1px solid var(--border);
}

.login-brand {
  text-align: center;
  margin-bottom: 1rem;
}

.login-brand .brand-mark {
  display: block;
  font-size: 14px;
  margin-bottom: 8px;
}

.brand-sub {
  color: var(--navy);
  font-size: 18px;
  font-weight: 700;
  margin: 0;
}

.brand-sub-en {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 1.5px;
  margin: 4px 0 0;
}

.accent-bar-center {
  width: 48px;
  height: 4px;
  background: var(--orange);
  margin: 1.25rem auto;
}

.login-title {
  font-size: 20px;
  color: var(--navy);
  margin: 0 0 1rem;
  text-align: center;
}

.login-lead {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 2rem;
}

.login-form { margin-top: 1.5rem; }

.login-help {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 1.5rem;
}

.login-help a { color: var(--navy); }

.footer-text {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2rem;
}

/* ============== フォーム ============== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 15px;
  font-family: inherit;
  background: var(--bg);
}

.form-group input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(30, 39, 97, 0.1);
}

.form-hint {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 0;
}

.required { color: var(--orange); }

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  font-weight: 400 !important;
  font-size: 14px !important;
  color: var(--text) !important;
}

.btn {
  display: inline-block;
  padding: 10px 24px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--navy);
  color: white;
}

.btn-primary:hover { background: var(--navy-deep); }

.btn-secondary {
  background: var(--bg);
  color: var(--navy);
  border: 1px solid var(--border);
}

.btn-secondary:hover { border-color: var(--navy); }

.btn-danger {
  background: #DC2626;
  color: white;
}

.btn-danger:hover { background: #791F1F; }

.btn-full {
  width: 100%;
  padding: 12px 24px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 2rem;
}

.form-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.standard-form { max-width: 540px; }

.danger-card {
  border-color: #FEE2E2;
}

/* ============== アラート ============== */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  font-size: 14px;
}

.alert-error {
  background: var(--error-bg);
  color: var(--error-text);
  border-left: 4px solid #DC2626;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success-text);
  border-left: 4px solid #1D9E75;
}

/* ============== 進捗表示 ============== */
.progress-section {
  background: var(--surface);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.progress-info p { margin: 0; }

.progress-info .label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 2px;
}

.progress-info .stat {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  margin-top: 4px;
}

.progress-info .stat .accent { color: var(--orange); }

.progress-bar-wrap { flex: 1; max-width: 320px; }

.progress-bar {
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--orange);
  transition: width 0.4s;
}

/* ============== モジュールカード ============== */
.module-list {
  display: grid;
  gap: 12px;
}

.module-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.module-card:not(.locked):hover {
  border-color: var(--navy);
  transform: translateY(-1px);
}

.module-card.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.module-info { flex: 1; }

.module-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.module-id {
  background: var(--navy);
  color: white;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.module-id.locked {
  background: var(--surface);
  color: var(--muted);
}

.module-category {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 700;
}

.module-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 4px;
}

.module-desc {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.module-status {
  padding: 6px 16px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-ready {
  background: var(--orange);
  color: white;
}

.status-locked {
  background: var(--surface);
  color: var(--muted);
}

/* ============== バッジ ============== */
.badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.badge-done {
  background: var(--success-bg);
  color: var(--success-text);
}

.badge-active {
  background: var(--success-bg);
  color: var(--success-text);
}

.badge-inactive {
  background: var(--surface);
  color: var(--muted);
}

/* ============== 動画セクション ============== */
.video-section { margin: 2.5rem 0; }

.video-wrap {
  position: relative;
  background: var(--navy-deep);
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
}

.video-meta {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  gap: 1.5rem;
}

/* ============== 教材リソース ============== */
.resources-section { margin: 2.5rem 0; }

.resource-list {
  display: grid;
  gap: 12px;
}

.resource-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  border-left: 4px solid var(--orange);
}

.resource-info { flex: 1; }

.resource-title {
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 4px;
}

.resource-desc {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.resource-action {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--navy);
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.resource-action:hover {
  border-color: var(--navy);
  background: var(--surface);
}

/* ============== 情報カード ============== */
.info-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin: 1.5rem 0;
}

.info-card .info-label {
  font-size: 12px;
  color: var(--orange);
  font-weight: 700;
  letter-spacing: 2px;
  margin: 0 0 8px;
}

.info-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
}

.credential-box {
  background: var(--surface);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

/* ============== メトリクス ============== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 2.5rem;
}

.metric-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
}

.metric-label {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 6px;
  letter-spacing: 1px;
}

.metric-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}

/* ============== テーブル ============== */
.table-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table thead {
  background: var(--surface);
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 700;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.data-table td {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tr:hover { background: var(--surface); }

.t-center { text-align: center; }
.t-right { text-align: right; }

.user-name {
  font-weight: 700;
  color: var(--navy);
}

.user-company {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.text-muted { color: var(--muted); }
.text-mono { font-family: "Consolas", "Monaco", monospace; font-size: 13px; }
.text-mono.large { font-size: 18px; font-weight: 700; }
.small { font-size: 12px; }

.link-action {
  color: var(--navy);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.link-action:hover { text-decoration: underline; }

.empty-state {
  background: var(--surface);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
}

/* ============== フッター ============== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4rem;
}

/* ============== レスポンシブ ============== */
@media (max-width: 768px) {
  .site-header {
    padding: 1rem;
    flex-direction: column;
    align-items: flex-start;
  }
  .admin-nav {
    width: 100%;
    overflow-x: auto;
  }
  .page-main { padding: 1.5rem 1rem 3rem; }
  h1 { font-size: 24px; }
  .progress-section { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .progress-bar-wrap { width: 100%; max-width: none; }
  .module-card { flex-direction: column; align-items: flex-start; }
  .resource-card { flex-direction: column; align-items: flex-start; }
  .data-table { font-size: 12px; }
  .data-table th, .data-table td { padding: 8px 10px; }
}

/* ==============================
   v2 拡張 (テスト・資料一覧)
   ============================== */

/* ナビカード(ダッシュボードからの導線) */
.nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 2rem;
}

.nav-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s;
}

.nav-card:hover {
  border-color: var(--navy);
  transform: translateY(-1px);
}

.nav-card-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.nav-card-body { flex: 1; }

.nav-card-title {
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 4px;
  font-size: 16px;
}

.nav-card-desc {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

/* バッジ */
.badge-watched {
  background: #FEF3C7;
  color: #92400E;
}

/* テストフォーム */
.test-form { margin: 1.5rem 0; }

.question-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1rem;
}

.question-card.review {
  background: var(--surface);
}

.question-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
}

.question-num {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  background: white;
  padding: 4px 10px;
  border-radius: 4px;
}

.question-of {
  font-size: 12px;
  color: var(--muted);
}

.question-text {
  font-size: 15px;
  color: var(--text);
  line-height: 1.8;
  margin: 0 0 1.25rem;
}

.choice-list {
  display: grid;
  gap: 8px;
}

.choice-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.choice-list:not(.review) .choice-label:hover {
  border-color: var(--navy);
  background: var(--bg);
}

.choice-list .choice-label input[type="radio"]:checked + .choice-letter {
  background: var(--navy);
  color: white;
}

.choice-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: white;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.choice-text {
  flex: 1;
  font-size: 14px;
}

.choice-mark {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: white;
}

.choice-list.review .choice-correct {
  background: #E1F5EE;
  border-color: #1D9E75;
}

.choice-list.review .choice-correct .choice-letter {
  background: #1D9E75;
  color: white;
}

.choice-list.review .choice-correct .choice-mark {
  background: #1D9E75;
  color: white;
}

.choice-list.review .choice-user-wrong {
  background: #FCEBEB;
  border-color: #DC2626;
}

.choice-list.review .choice-user-wrong .choice-letter {
  background: #DC2626;
  color: white;
}

.choice-list.review .choice-user-wrong .choice-mark {
  background: #DC2626;
  color: white;
}

/* 結果バナー */
.result-banner {
  border-radius: 12px;
  padding: 2rem 2.5rem;
  margin: 1.5rem 0 2rem;
  text-align: center;
}

.result-pass {
  background: linear-gradient(135deg, #E1F5EE 0%, #C7EBDB 100%);
  border-left: 6px solid #1D9E75;
}

.result-fail {
  background: linear-gradient(135deg, #FEF3C7 0%, #FCE5B5 100%);
  border-left: 6px solid #F39C12;
}

.result-status {
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}

.result-pass .result-status { color: #085041; }
.result-fail .result-status { color: #854F0B; }

.result-score {
  font-size: 24px;
  margin-bottom: 12px;
}

.score-num {
  font-size: 48px;
  font-weight: 700;
  color: var(--navy);
}

.score-divider, .score-total {
  font-size: 32px;
  color: var(--muted);
}

.score-unit {
  font-size: 16px;
  color: var(--muted);
  margin-left: 8px;
}

.result-message {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.result-badge {
  margin-left: auto;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.badge-correct { background: #E1F5EE; color: #085041; }
.badge-wrong { background: #FCEBEB; color: #791F1F; }

.explanation-box {
  background: var(--bg);
  border-left: 4px solid var(--orange);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin-top: 1rem;
}

.explanation-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 2px;
  margin: 0 0 6px;
}

.explanation-box p:not(.explanation-label) {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
}

.btn-large {
  padding: 14px 36px;
  font-size: 16px;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}

.test-submit {
  justify-content: center;
  margin-top: 2rem;
}

.resource-test {
  border-left: 4px solid var(--navy);
}

/* カテゴリタブ */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.cat-tab {
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
}

.cat-tab:hover {
  background: var(--surface);
  color: var(--navy);
}

.cat-tab.active {
  background: var(--navy);
  color: white;
}

/* 資料グリッド */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 2.5rem;
}

.resource-tile {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s;
}

.resource-tile:hover {
  border-color: var(--navy);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 39, 97, 0.08);
}

.resource-thumb {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--surface);
}

.resource-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--surface) 0%, var(--orange-light) 100%);
}

.file-type-badge {
  background: var(--navy);
  color: white;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 6px;
  letter-spacing: 1px;
}

.resource-body {
  padding: 1rem 1.25rem;
  flex: 1;
}

.resource-tile .resource-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 6px;
  line-height: 1.5;
}

.resource-tile .resource-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 8px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.resource-meta {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 1px;
}

.resource-tile .resource-actions {
  padding: 0 1.25rem 1.25rem;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.resource-tile .btn-sm {
  flex: 1;
  text-align: center;
}

/* PDFプレビュー */
.pdf-wrap {
  background: var(--surface);
  border-radius: 12px;
  padding: 8px;
  margin: 1.5rem 0;
}

.pdf-wrap iframe {
  border-radius: 8px;
  background: white;
}

/* テキストエリア・selectのスタイル統一 */
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 15px;
  font-family: inherit;
  background: var(--bg);
}

.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(30, 39, 97, 0.1);
}

.form-group input[type="file"] {
  width: 100%;
  padding: 8px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
}

/* ==============================
   v3 コースカード(縦長グリッド)
   ============================== */

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 2rem;
}

.course-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  position: relative;
}

.course-card:not(.locked):hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(30, 39, 97, 0.12);
  border-color: var(--navy);
}

.course-card.locked {
  opacity: 0.6;
}

.course-thumb {
  aspect-ratio: 16 / 9;
  background: var(--surface);
  position: relative;
  overflow: hidden;
}

.course-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.course-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.course-thumb-placeholder::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -20%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(243, 156, 18, 0.3) 0%, transparent 70%);
}

.course-thumb-placeholder::after {
  content: "";
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, rgba(243, 156, 18, 0.15) 0%, transparent 70%);
}

.course-thumb-placeholder .thumb-mark {
  color: var(--orange);
  font-weight: 700;
  letter-spacing: 6px;
  font-size: 14px;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.course-thumb-placeholder .thumb-id {
  color: white;
  font-size: 56px;
  font-weight: 700;
  letter-spacing: -2px;
  font-family: Georgia, serif;
  position: relative;
  z-index: 1;
}

.course-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  z-index: 2;
}

.badge-pass {
  background: #1D9E75;
  color: white;
}

.badge-watched-corner {
  background: rgba(255, 255, 255, 0.95);
  color: var(--navy);
}

.course-body {
  padding: 1.25rem 1.5rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.course-id {
  background: var(--navy);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.course-category {
  color: var(--orange);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
}

.course-title {
  font-size: 17px;
  color: var(--navy);
  margin: 0 0 10px;
  line-height: 1.5;
  font-weight: 700;
  font-family: Georgia, "Yu Gothic", serif;
}

.course-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  margin: 0;
  flex: 1;
}

.course-action {
  padding: 0 1.5rem 1.5rem;
}

.btn-disabled {
  background: var(--surface);
  color: var(--muted);
  cursor: not-allowed;
  border: 1px solid var(--border);
}

/* 資料グリッドの強化 */
.resource-tile {
  border-radius: 16px;
}

.resource-thumb {
  aspect-ratio: 16 / 9;
}

.thumb-placeholder {
  position: relative;
}

.thumb-placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 100%);
}

/* ファイルタイプ別カラー */
.thumb-placeholder.type-pdf {
  background: linear-gradient(135deg, #DC2626 0%, #991B1B 100%);
}
.thumb-placeholder.type-pdf .file-type-badge {
  background: rgba(255,255,255,0.95);
  color: #991B1B;
}

.thumb-placeholder.type-word {
  background: linear-gradient(135deg, #2563EB 0%, #1E40AF 100%);
}
.thumb-placeholder.type-word .file-type-badge {
  background: rgba(255,255,255,0.95);
  color: #1E40AF;
}

.thumb-placeholder.type-excel {
  background: linear-gradient(135deg, #059669 0%, #064E3B 100%);
}
.thumb-placeholder.type-excel .file-type-badge {
  background: rgba(255,255,255,0.95);
  color: #064E3B;
}

.thumb-placeholder.type-powerpoint {
  background: linear-gradient(135deg, #EA580C 0%, #9A3412 100%);
}
.thumb-placeholder.type-powerpoint .file-type-badge {
  background: rgba(255,255,255,0.95);
  color: #9A3412;
}

.thumb-placeholder.type-video {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
}
.thumb-placeholder.type-video .file-type-badge {
  background: var(--orange);
  color: white;
}

.thumb-placeholder.type-default {
  background: linear-gradient(135deg, #6B7280 0%, #374151 100%);
}
.thumb-placeholder.type-default .file-type-badge {
  background: rgba(255,255,255,0.95);
  color: #374151;
}

/* レスポンシブ調整 */
@media (max-width: 640px) {
  .course-grid {
    grid-template-columns: 1fr;
  }
  .course-thumb-placeholder .thumb-id {
    font-size: 42px;
  }
}
