/* Crear AI Academy 会員サイト — 白×紺（ロゴ準拠） */
:root {
  --navy: #1e3a5f;
  --navy-deep: #16293f;
  --navy-soft: #2c4d75;
  --blue-pale: #c9d8e8;
  --blue-mist: #edf2f8;
  --ink: #26313d;
  --line: #dfe7f0;
  --white: #ffffff;
  --warn: #b7791f;
  --ok: #2f7d4f;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.85;
  font-size: 15.5px;
}
a { color: var(--navy-soft); }

/* ---- ナビ ---- */
.topnav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 20px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand img { height: 46px; display: block; }
.topnav-right { display: flex; gap: 18px; align-items: center; }
.topnav-right a { color: var(--navy); text-decoration: none; font-size: 14px; font-weight: 500; }
.topnav-right a:hover { text-decoration: underline; }

.container { max-width: 880px; margin: 0 auto; padding: 28px 18px 80px; }
.foot { text-align: center; color: #8fa3b8; font-size: 12px; padding: 26px 0 34px; border-top: 1px solid var(--line); }

/* ---- ホーム ---- */
.hero { text-align: center; padding: 30px 0 10px; }
.hero-logo { width: 210px; max-width: 60%; }
.hero-lead { color: var(--navy-soft); margin-top: 6px; font-size: 15px; }
.course-grid { display: grid; gap: 18px; margin-top: 28px; }
@media (min-width: 640px) { .course-grid { grid-template-columns: 1fr 1fr; } }
.course-card {
  display: flex; flex-direction: column; justify-content: space-between;
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  text-decoration: none; color: var(--ink);
  background: var(--white);
  box-shadow: 0 1px 4px rgba(30, 58, 95, .06);
  transition: box-shadow .15s, transform .15s;
}
.course-card:hover { box-shadow: 0 6px 18px rgba(30, 58, 95, .14); transform: translateY(-2px); }
.course-card-body { padding: 22px 22px 14px; }
.course-card h2 { color: var(--navy); font-size: 18px; margin-bottom: 12px; }
.course-card-cta {
  background: var(--navy); color: #fff; text-align: center;
  padding: 11px; font-size: 14px; font-weight: 600; letter-spacing: .06em;
}

/* ---- 進捗 ---- */
.progress-line { display: flex; align-items: center; gap: 10px; }
.progress-bar {
  flex: 1; height: 8px; background: var(--blue-mist);
  border-radius: 99px; overflow: hidden;
}
.progress-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--navy-soft), var(--navy)); border-radius: 99px; }
.progress-num { font-size: 12.5px; color: var(--navy-soft); white-space: nowrap; }

/* ---- パンくず ---- */
.crumb { font-size: 13px; color: #7d92a8; margin-bottom: 18px; }
.crumb a { color: #7d92a8; text-decoration: none; }
.crumb a:hover { color: var(--navy); }

/* ---- コースページ ---- */
.course-head h1 { color: var(--navy); font-size: 24px; margin-bottom: 12px; }
.course-head { margin-bottom: 30px; }
.chapter { margin-bottom: 26px; }
.chapter h2 {
  font-size: 15px; color: var(--navy); background: var(--blue-mist);
  border-left: 4px solid var(--navy);
  padding: 9px 14px; border-radius: 0 8px 8px 0; margin-bottom: 8px;
}
.lesson-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; text-decoration: none; color: var(--ink);
  border-bottom: 1px solid var(--blue-mist); font-size: 14.5px;
}
.lesson-row:hover { background: var(--blue-mist); }
.lesson-row .check {
  width: 22px; height: 22px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--blue-pale);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: #fff;
}
.lesson-row.done .check { background: var(--navy); border-color: var(--navy); }
.lesson-row.done .lesson-title { color: #8fa3b8; }

/* ---- レッスンページ ---- */
.lesson h1 { color: var(--navy); font-size: 22px; margin-bottom: 18px; }
.player { border-radius: 12px; overflow: hidden; background: #000; margin-bottom: 24px; }
.player video { width: 100%; display: block; aspect-ratio: 16 / 9; }
.lesson-body { font-size: 15.5px; }
.lesson-body img { max-width: 100%; height: auto; }
.lesson-body iframe { max-width: 100%; }
.lesson-body p { margin: 0 0 1em; }
.lesson-body h1, .lesson-body h2, .lesson-body h3 { color: var(--navy); margin: 1.6em 0 .6em; }
.lesson-body a { color: var(--navy-soft); }
.lesson-body ul, .lesson-body ol { padding-left: 1.5em; margin-bottom: 1em; }
.lesson-nav {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line);
}

/* ---- ボタン ---- */
.btn {
  display: inline-block; padding: 10px 20px; border-radius: 99px;
  font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer;
  border: 1.5px solid var(--navy); background: var(--white); color: var(--navy);
  font-family: inherit;
}
.btn.primary { background: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-deep); }
.btn.ghost { border-color: var(--blue-pale); color: var(--navy-soft); }
.btn.ghost:hover { background: var(--blue-mist); }
.btn.done-btn { background: var(--blue-mist); border-color: var(--blue-mist); color: var(--navy); }
.btn.wide { width: 100%; text-align: center; }
.btn.small { padding: 5px 12px; font-size: 12.5px; }

/* ---- 認証カード ---- */
.auth-card {
  max-width: 400px; margin: 40px auto; padding: 34px 30px;
  border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 4px 24px rgba(30, 58, 95, .08);
  text-align: center;
}
.auth-logo { width: 160px; margin-bottom: 10px; }
.auth-card h1 { color: var(--navy); font-size: 19px; margin-bottom: 16px; }
.auth-note { font-size: 13.5px; color: #5d7288; text-align: left; margin-bottom: 14px; }
.auth-card form { text-align: left; }
.auth-card label { display: block; font-size: 13px; color: var(--navy); font-weight: 600; margin-bottom: 14px; }
.auth-card input {
  width: 100%; padding: 11px 12px; margin-top: 5px;
  border: 1.5px solid var(--line); border-radius: 8px; font-size: 15px;
  font-family: inherit;
}
.auth-card input:focus { outline: none; border-color: var(--navy-soft); }
.auth-links { margin-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.auth-links a { font-size: 13px; }
.notice {
  background: var(--blue-mist); border-left: 4px solid var(--navy);
  color: var(--navy); font-size: 13.5px; text-align: left;
  padding: 10px 14px; border-radius: 0 8px 8px 0; margin-bottom: 16px;
}

/* ---- 管理 ---- */
.admin-stats { display: flex; gap: 14px; margin: 18px 0; flex-wrap: wrap; }
.stat {
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 22px;
  display: flex; flex-direction: column; align-items: center; min-width: 120px;
}
.stat b { color: var(--navy); font-size: 22px; }
.stat span { font-size: 12px; color: #7d92a8; }
.admin-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.admin-tools input[type=search] { padding: 7px 10px; border: 1.5px solid var(--line); border-radius: 8px; font-family: inherit; }
.table-wrap { overflow-x: auto; }
.admin-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.admin-table th, .admin-table td { padding: 8px 10px; border-bottom: 1px solid var(--blue-mist); text-align: left; white-space: nowrap; }
.admin-table th { color: var(--navy); background: var(--blue-mist); }
.tag { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 11.5px; background: #eef1f5; color: #7d92a8; }
.tag.ok { background: #e5f2ea; color: var(--ok); }
.tag.warn { background: #faf0dd; color: var(--warn); }
.actions form { margin-right: 4px; }
.row-inactive td { opacity: .5; text-decoration: line-through; }
.row-inactive td:first-child, .row-inactive .actions { text-decoration: none; }
.linkbox {
  background: var(--blue-mist); border-radius: 10px; padding: 14px 16px;
  margin: 16px 0; word-break: break-all; font-size: 13px;
}
