/* 藤成オンラインスクール 共通スタイル */

:root {
  --bg: #f6f9fc;
  --surface: #ffffff;
  --text: #0b1b2b;
  --muted: #6a7a8a;
  --border: #e4ecf3;
  --accent: #006db8;
  --accent-2: #0c82d6;
  --ok: #16a34a;
  --warn: #d97706;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(3, 27, 78, 0.06);
}

* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto,
    "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, Arial, sans-serif;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button {
  cursor: pointer;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

/* ヘッダー */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
  background: #e8f2fb;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sitename {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.nav {
  display: flex;
  gap: 16px;
  align-items: center;
}
.nav a {
  color: var(--text);
}

/* ページタイトル */
.hero {
  padding: 24px 0;
}
.page-title {
  margin: 0 0 8px;
  font-size: 26px;
  letter-spacing: 0.01em;
}
.breadcrumbs {
  font-size: 12px;
  color: var(--muted);
}

/* レイアウト */
.grid {
  display: grid;
  gap: 16px;
}
.grid-2 {
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .grid-2 {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

/* カード */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad {
  padding: 18px;
}

/* フォーム */
.input {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input label {
  font-weight: 600;
}
.input input,
.input select {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  outline: none;
}
.input input:focus,
.input select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 109, 184, 0.12);
}

/* ボタン */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.btn.ghost {
  background: #fff;
  color: var(--text);
}
.btn.link {
  background: transparent;
  border: none;
  color: var(--accent);
  padding: 0;
}
.btn.light {
  background: #eef5fb;
  color: var(--accent);
  border-color: #d8e8f6;
}
.btn.block {
  display: flex;
  width: 100%;
  justify-content: center;
}
.icon {
  font-style: normal;
}

.badge {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff;
}

/* KPI */
.kpi-wrap {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 760px) {
  .kpi-wrap {
    grid-template-columns: repeat(4, 1fr);
  }
}
.kpi {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.kpi .num {
  font-size: 20px;
  font-weight: 800;
}
.kpi .lbl {
  font-size: 12px;
  color: var(--muted);
}

/* サイドバー */
.layout {
  grid-template-columns: 280px 1fr;
}
.sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.side-nav {
  list-style: none;
  margin: 0;
  padding: 8px;
}
.side-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
}
.side-nav a.active {
  background: #eef5fb;
  color: var(--accent);
  font-weight: 700;
}

/* フッター */
.footer {
  margin-top: 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 14px;
}

/* リスト（ページ一覧） */
.list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.item {
  display: flex;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  align-items: center;
}
.thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: #e8f2fb;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.meta {
  flex: 1;
  min-width: 0;
}
.meta h4 {
  margin: 0 0 6px;
  font-size: 16px;
}
.meta .sub {
  color: var(--muted);
  font-size: 12px;
}
.progress {
  height: 8px;
  background: #eef2f6;
  border-radius: 999px;
  overflow: hidden;
  width: 100%;
}
.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  width: 0;
}

/* スライドショー */
.slide-wrap {
  display: grid;
  gap: 12px;
}
.slide-player {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}
.slide-player .ratio {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}
.slide-player .ratio > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.slide-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.slide-controls .group {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.slide-controls .index {
  font-size: 12px;
  color: var(--muted);
}

.thumbbar {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
}
.thumbbar .t {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  position: relative;
}
.thumbbar .t img,
.thumbbar .t video {
  width: 100%;
  height: 56px;
  object-fit: cover;
  display: block;
}
.thumbbar .t.active {
  outline: 2px solid var(--accent);
}

.mark {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.mark input {
  width: 16px;
  height: 16px;
}

/* モバイル対応 */
@media (max-width: 760px) {
  .header-inner {
    flex-wrap: wrap;
  }
  .nav {
    width: 100%;
    justify-content: flex-start;
    gap: 12px;
    font-size: 14px;
    overflow-x: auto;
  }
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
  .sidebar.open {
    display: block;
  }
}

/* モバイル用メニューバー */
.mobile-menu-bar {
  display: none;
}
@media (max-width: 760px) {
  .mobile-menu-bar {
    position: sticky;
    top: 6px;
    z-index: 9;
    display: flex;
    gap: 8px;
    margin: 6px 0;
  }
  .mobile-menu-bar .btn {
    flex: 1;
  }
}
