/* 動画研修システム — モダンライトテーマ（2026 refresh） */
:root {
  --bg: #f5f6f8;          /* ページ背景 */
  --surface: #ffffff;     /* カード */
  --surface-2: #f7f8fa;   /* 補助パネル */
  --border: #ecedf1;      /* ヘアライン境界 */
  --text: #15171c;        /* メイン文字 */
  --text2: #6e7480;       /* 補助文字 */
  --primary: #3b6ef6;     /* 主要アクション（青） */
  --primary-d: #2a56d8;
  --primary-soft: #eef3ff;
  --primary-grad: linear-gradient(120deg, #3b6ef6, #6a5cff);
  --green: #17a35c;
  --green-soft: #e7f7ee;
  --amber: #c07f14;
  --amber-soft: #fdf3dd;
  --red: #e0453d;
  --red-soft: #fdecea;
  --gold: #b8902f;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 16px rgba(16,24,40,.05);
  --shadow-lg: 0 2px 4px rgba(16,24,40,.04), 0 18px 44px rgba(16,24,40,.13);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  line-height: 1.7;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
small { color: var(--text2); }
code { background: var(--surface-2); padding: 2px 7px; border-radius: 6px; color: #b4530a; border: 1px solid var(--border); font-size: .9em; }
h1, h2, h3 { color: var(--text); letter-spacing: -0.01em; }
::selection { background: #ffd9cb; }

/* ───── ヘッダ（フロストガラス） ───── */
.top-bar {
  display: flex; align-items: center; gap: 22px;
  background: rgba(255,255,255,.78);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid rgba(20,22,40,.06);
  padding: 12px 28px; position: sticky; top: 0; z-index: 50; flex-wrap: wrap;
}
.brand a { color: var(--primary); font-weight: 800; font-size: 19px; letter-spacing: -0.01em; display: inline-flex; flex-direction: column; line-height: 1.1; }
.brand a:hover { text-decoration: none; }
.brand-tag { font-size: 10px; font-weight: 600; color: var(--text2) !important; letter-spacing: .06em; margin-top: 3px; }
.nav { display: flex; gap: 2px; flex: 1; flex-wrap: wrap; }
.nav a { color: #4b515c; font-size: 13.5px; font-weight: 600; padding: 8px 13px; border-radius: 99px; transition: background .15s, color .15s; }
.nav a:hover { color: var(--primary); background: var(--primary-soft); text-decoration: none; }
.user-box { display: flex; align-items: center; gap: 14px; }
.user-name { font-size: 13.5px; font-weight: 600; }
.badge { background: var(--amber-soft); color: var(--amber); border-radius: 99px; padding: 3px 11px; font-size: 11px; margin-left: 6px; font-weight: 700; }

/* ───── レイアウト ───── */
.container { max-width: 1120px; margin: 0 auto; padding: 36px 26px 90px; }
.page-title { font-size: 27px; margin: 0 0 22px; font-weight: 800; letter-spacing: -0.02em; }
.section-title { font-size: 17.5px; margin: 38px 0 16px; font-weight: 800; letter-spacing: -0.01em; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.lead { color: var(--text2); margin-top: -12px; margin-bottom: 24px; }
.breadcrumb { color: var(--text2); font-size: 13px; margin-bottom: 12px; }
.breadcrumb a { color: var(--text2); }
.breadcrumb a:hover { color: var(--primary); }
.empty { color: var(--text2); padding: 52px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.hint { color: var(--text2); font-size: 13.5px; }
.hint.locked { color: #9a6410; background: var(--amber-soft); padding: 10px 16px; border-radius: 12px; display: inline-block; border: none; }
.muted { color: var(--text2); }

/* ───── ボタン ───── */
.btn {
  display: inline-flex; align-items: center; gap: 6px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 12px; padding: 10px 18px;
  cursor: pointer; font-size: 14px; font-weight: 700;
  transition: transform .15s, box-shadow .15s, background .15s;
  box-shadow: 0 1px 2px rgba(16,24,40,.05);
}
.btn:hover { background: #fafafc; text-decoration: none; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(16,24,40,.10); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary-grad); border: none; color: #fff; padding: 11px 19px; box-shadow: 0 6px 16px rgba(59,110,246,.32); }
.btn-primary:hover { background: var(--primary-grad); filter: brightness(1.06); box-shadow: 0 10px 22px rgba(59,110,246,.38); }
.btn-danger { background: #fff; border-color: #f5c4c0; color: var(--red); }
.btn-danger:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }
.btn-link { background: none; border: none; color: var(--primary); cursor: pointer; padding: 0; font-size: 14px; font-weight: 600; }
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--red); }
.inline { display: inline; }

/* ───── フラッシュ ───── */
.flash-area { margin-bottom: 20px; }
.flash { padding: 13px 18px; border-radius: 14px; margin-bottom: 10px; font-size: 14px; font-weight: 600; }
.flash-success { background: var(--green-soft); color: #0e7a42; }
.flash-error { background: var(--red-soft); color: #b3322b; }

/* ───── ログイン ───── */
.login-wrap { min-height: 82vh; display: flex; align-items: center; justify-content: center; }
.login-card { background: var(--surface); border: 1px solid rgba(20,22,40,.05); border-radius: 24px; padding: 44px 40px; width: 388px; box-shadow: var(--shadow-lg); }
.login-card h1 { margin: 0 0 4px; font-size: 24px; text-align: center; color: var(--primary); font-weight: 800; }
.login-card .sub { text-align: center; color: var(--text2); margin-top: 2px; margin-bottom: 8px; font-size: 13px; }
.login-card label { display: block; margin: 16px 0 0; font-size: 13px; color: var(--text2); font-weight: 600; }
.login-card input { width: 100%; margin-top: 6px; }
.login-card .btn { margin-top: 28px; }

/* ───── フォーム ───── */
input[type=text], input[type=password], input[type=email], input[type=number],
input[type=date], input[type=file], select, textarea {
  background: #fff; border: 1.5px solid #e3e5ea; color: var(--text);
  border-radius: 12px; padding: 10px 14px; font-size: 15px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(59,110,246,.13); }
textarea { width: 100%; resize: vertical; }
.form-stack { display: flex; flex-direction: column; gap: 12px; max-width: 540px; }
.form-stack label { display: flex; flex-direction: column; gap: 5px; color: var(--text2); font-size: 13px; font-weight: 600; }
.form-inline-grid { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.form-inline-grid label { display: flex; flex-direction: column; gap: 5px; color: var(--text2); font-size: 13px; font-weight: 600; }
.check { flex-direction: row !important; align-items: center; gap: 8px; font-weight: 600; }
fieldset { border: 1px solid var(--border); border-radius: 14px; padding: 16px; background: var(--surface-2); }
legend { color: var(--primary); font-size: 13px; padding: 0 8px; font-weight: 700; }

/* ───── パネル / details ───── */
.panel { background: var(--surface); border: 1px solid rgba(20,22,40,.05); border-radius: var(--radius); padding: 20px 24px; margin: 16px 0; box-shadow: var(--shadow); }
.panel.sub { background: var(--surface-2); box-shadow: none; border-color: var(--border); }
.panel.highlight { border-color: var(--primary); border-width: 1.5px; }
.panel > summary { cursor: pointer; font-weight: 700; color: var(--primary); font-size: 14.5px; }
.panel > summary + * { margin-top: 16px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* ───── 受講者: コースカード ───── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.course-card {
  background: var(--surface); border: 1px solid rgba(20,22,40,.05); border-radius: var(--radius);
  padding: 18px; color: var(--text); display: block; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}
.course-card:hover { text-decoration: none; transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.course-thumb { margin: -18px -18px 16px; border-radius: 17px 17px 0 0; overflow: hidden; aspect-ratio: 16/9; background: #eef0f3; display: flex; align-items: center; justify-content: center; position: relative; }
.course-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.course-card:hover .course-thumb img { transform: scale(1.04); }
.course-thumb .ph-icon { width: 52px; height: 52px; color: #fff; opacity: .95; }
/* コースごとのアクセント（モダングラデーション） */
.ph-0 { background: linear-gradient(135deg, #ff6a35, #ff4757); }
.ph-1 { background: linear-gradient(135deg, #ff8a3d, #ff5e62); }
.ph-2 { background: linear-gradient(135deg, #f256a2, #b465da); }
.ph-3 { background: linear-gradient(135deg, #ff7e5f, #feb47b); }
.ph-4 { background: linear-gradient(135deg, #f2603a, #d64f7c); }
.ph-5 { background: linear-gradient(135deg, #7f7fd5, #91a7ff); }
.course-card h2 { margin: 0 0 10px; font-size: 16px; font-weight: 800; line-height: 1.5; letter-spacing: -0.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3em; }

/* 未契約コース（網掛け表示で「見たい」を引き出す） */
.course-card.locked { cursor: default; }
.course-card.locked .course-thumb img { filter: grayscale(.85) brightness(.72); }
.course-card.locked .course-thumb.ph { filter: grayscale(.55) brightness(.85); }
.course-card.locked .course-thumb::after { content: ""; position: absolute; inset: 0; z-index: 1;
  background: repeating-linear-gradient(-45deg, rgba(28,24,20,.08) 0 10px, rgba(28,24,20,.20) 10px 20px); }
.course-card.locked:hover .course-thumb img { transform: none; }
.lock-badge { position: absolute; top: 10px; right: 10px; z-index: 2;
  background: rgba(30,26,22,.86); color: #fff; border-radius: 99px; padding: 5px 13px;
  font-size: 11px; font-weight: 800; backdrop-filter: blur(4px); }
.locked-cta { font-size: 12px; color: #9a6410; background: var(--amber-soft);
  border-radius: 10px; padding: 9px 13px; font-weight: 700; margin-top: 10px; line-height: 1.55; }

/* ───── 横並びコース列 ───── */
.course-row { display: flex; gap: 20px; overflow-x: auto; padding: 8px 4px 22px; scroll-snap-type: x proximity; }
.course-row .course-card { flex: 0 0 280px; width: 280px; scroll-snap-align: start; transform: none; }
.course-row .course-card:hover { transform: translateY(-4px); }
.course-row::-webkit-scrollbar { height: 8px; }
.course-row::-webkit-scrollbar-thumb { background: rgba(120,120,140,.28); border-radius: 5px; }
.course-row::-webkit-scrollbar-track { background: transparent; }
.done-pill { background: var(--green-soft); color: #0e7a42; border-radius: 99px; padding: 2px 11px; font-size: 11.5px; font-weight: 700; }
.learn-pill { background: rgba(255,110,60,.13); color: #d14a1d; border-radius: 99px; padding: 2px 11px; font-size: 11.5px; font-weight: 700; }
.course-meta { color: var(--text2); font-size: 12.5px; font-weight: 600; margin-bottom: 10px; }
body.theme-glass.page-courses .container { max-width: 1180px; }
body.theme-glass.page-learn .container { max-width: 1140px; }
.course-desc { font-size: 16px; line-height: 1.9; font-weight: 600; color: #33291f;
  background: #fff7f2; border: 1px solid #ffe3d5; border-radius: 16px; padding: 18px 22px; margin: 4px 0 26px; }
body.theme-glass.page-portal .container,
body.theme-admin.page-portal .container { max-width: 1600px; padding: 22px 14px 60px; }
.portal-frame { width: 100%; height: 86vh; min-height: 600px; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }

/* 未契約ロック表示 */
.locked-stage { position: relative; max-width: 760px; aspect-ratio: 16/9; border-radius: 20px; overflow: hidden; background: #20242e; margin-bottom: 18px; }
.locked-stage img { width: 100%; height: 100%; object-fit: cover; filter: blur(3px) brightness(.55); }
.locked-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(15,18,26,.45); }
.locked-box { text-align: center; color: #fff; padding: 20px; }
.locked-icon { font-size: 40px; }
.locked-title { font-size: 22px; font-weight: 800; margin: 8px 0 10px; }
.locked-desc { font-size: 14px; line-height: 1.8; color: #e7e9ee; }

/* コース説明のホバーポップアップ */
.course-popup { position: fixed; z-index: 300; width: 320px; display: none; pointer-events: none;
  background: #fff; border: 1px solid rgba(20,22,40,.06); border-radius: 20px; box-shadow: var(--shadow-lg);
  padding: 20px 22px; color: var(--text); }
.course-popup .cp-title { font-size: 15px; font-weight: 800; margin-bottom: 6px; line-height: 1.4; }
.course-popup .cp-meta { font-size: 12px; color: var(--text2); font-weight: 600; margin-bottom: 10px; }
.course-popup .cp-desc { font-size: 13px; line-height: 1.7; }
.course-popup .cp-status { font-size: 12px; color: var(--text2); margin-top: 10px; }
.course-popup .cp-cta { margin-top: 12px; color: #e0662a; font-weight: 800; font-size: 13px; }

/* おかえりメッセージ・統計 */
.welcome { font-size: 14.5px; font-weight: 700; color: #d14a1d; margin: 0 0 2px; }
body.theme-admin .welcome { color: var(--primary-d); }
.stat-row { display: flex; gap: 16px; flex-wrap: wrap; margin: 6px 0 28px; }
.stat-card { background: #fff; border: 1px solid rgba(20,22,40,.05); box-shadow: var(--shadow);
  border-radius: 16px; padding: 18px 26px; min-width: 190px; }
.stat-label { font-size: 12px; color: var(--text2); font-weight: 700; letter-spacing: .03em; }
.stat-value { font-size: 27px; font-weight: 800; margin-top: 4px; letter-spacing: -0.02em; }
.course-card .desc { color: var(--text2); font-size: 13.5px; }
.progress-bar { background: #edeef2; height: 10px; border-radius: 99px; overflow: hidden; margin: 14px 0 8px; }
.progress-bar span { display: block; height: 100%; background: var(--primary-grad); border-radius: 99px; transition: width .5s cubic-bezier(.22,1,.36,1); }
.progress-label { font-size: 12px; color: var(--text2); font-weight: 600; }

/* ───── カリキュラム一覧 ───── */
.curriculum-list { list-style: none; padding: 0; }
.curriculum-row { background: var(--surface); border: 1px solid rgba(20,22,40,.05); border-radius: 16px; margin-bottom: 10px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s; }
.curriculum-row:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.curriculum-row a { display: flex; align-items: center; gap: 14px; padding: 16px 18px; color: var(--text); }
.curriculum-row a:hover { text-decoration: none; }
.curriculum-row.done { background: linear-gradient(0deg, rgba(23,163,92,.04), rgba(23,163,92,.04)), #fff; }
.status-dot { width: 26px; height: 26px; border-radius: 50%; background: #edeef2; color: var(--green); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
/* 章カードのグリッド */
.chapter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.chapter-card { display: block; background: #fff; border: 1px solid rgba(20,22,40,.05); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: var(--text); transition: transform .2s, box-shadow .2s; }
.chapter-card:hover { box-shadow: var(--shadow-lg); text-decoration: none; transform: translateY(-3px); }
.chapter-card.done { border-color: rgba(23,163,92,.35); }
.chapter-thumb { position: relative; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.chapter-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.chapter-card:hover .chapter-thumb img { transform: scale(1.04); }
.chapter-thumb-ic { width: 42px; height: 42px; color: #fff; opacity: .95; }
.chapter-done { position: absolute; top: 10px; right: 10px; background: rgba(23,163,92,.92); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 11px; border-radius: 99px; backdrop-filter: blur(4px); }
.chapter-body { padding: 14px 16px 16px; }
.chapter-title { font-weight: 800; font-size: 14.5px; line-height: 1.5; margin-bottom: 6px; letter-spacing: -0.01em; }
.chapter-meta { font-size: 12px; color: var(--text2); }

/* 動画カードのグリッド */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.video-card { background: #fff; border: 1px solid rgba(20,22,40,.05); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video-card .vc-media { width: 100%; aspect-ratio: 16/9; display: block; border-radius: 0; margin: 0; }
.video-card video.vc-media { background: #000; }
.video-card .video-poster.vc-media { border-radius: 0; }
.video-card .video-placeholder.vc-media { border: none; border-radius: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.video-card .vc-title { padding: 12px 15px 4px; font-weight: 700; font-size: 13.5px; line-height: 1.5; }
.rating { display: flex; align-items: center; gap: 8px; padding: 0 15px 14px; flex-wrap: wrap; }
.rating .stars { display: inline-flex; }
.rating .star { background: none; border: none; cursor: pointer; padding: 0 1px; font-size: 21px; line-height: 1; color: #e2e4e9; transition: color .12s, transform .12s; }
.rating .star:hover { transform: scale(1.15); }
.rating .star.on, .rating .star.hover { color: #ffb020; }
.rating .rate-label { font-size: 11.5px; color: var(--text2); font-weight: 700; }
.rating .rate-info { font-size: 11.5px; color: var(--text2); }
.rating.need { margin: 6px 12px 14px; padding: 8px 12px; background: #fff4ee; border-radius: 12px; }
.rating.need .rate-info { color: #c2451f; font-weight: 700; }
.video-card .resume-note { margin: 8px 14px 0; }

.row-thumb { position: relative; width: 104px; height: 60px; border-radius: 12px; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-thumb-ic { width: 30px; height: 30px; color: #fff; opacity: .95; }
.row-thumb-done { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--green, #16a34a); color: #fff; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.curriculum-row.done .status-dot { background: var(--green); color: #fff; }
.c-title { font-weight: 700; flex: 1; }
.c-meta { color: var(--text2); font-size: 13px; }
.cert-tag { color: var(--gold); font-weight: 700; }

/* ───── ステップ（動画→感想文→修了証）───── */
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 132px; }
.steps {
  display: flex; gap: 8px; margin: 14px -8px 26px; flex-wrap: wrap;
  position: sticky; top: 58px; z-index: 20;
  padding: 10px 8px; border-radius: 16px;
  background: rgba(248,247,245,.82);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.step { background: #fff; border: 1px solid var(--border); border-radius: 99px; padding: 8px 18px; font-size: 13px; color: var(--text2); font-weight: 700; transition: transform .15s, box-shadow .15s; }
a.step:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(16,24,40,.10); }
.step.active { border-color: transparent; color: #fff; background: var(--primary-grad); box-shadow: 0 4px 12px rgba(59,110,246,.3); }
.step.done { background: var(--green-soft); border-color: transparent; color: #0e7a42; }

/* 未開放セクションの網掛け（全動画視聴まで感想文をロック表示） */
.locked-block { position: relative; overflow: hidden; }
.locked-block > *:not(.lock-overlay) { filter: grayscale(.65); opacity: .38; pointer-events: none; user-select: none; }
.lock-overlay { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(-45deg, rgba(120,112,105,.05) 0 10px, rgba(120,112,105,.10) 10px 20px); }
.lock-overlay-box { background: rgba(35,30,26,.85); color: #fff; border-radius: 99px; padding: 13px 26px;
  font-size: 13.5px; font-weight: 700; box-shadow: 0 10px 28px rgba(0,0,0,.22); backdrop-filter: blur(4px); }

/* ───── ブロック / 動画 ───── */
.block { background: var(--surface); border: 1px solid rgba(20,22,40,.05); border-radius: 20px; padding: 26px 28px; margin-bottom: 22px; box-shadow: var(--shadow); }
.block h2 { margin-top: 0; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.video-item { margin-bottom: 22px; }
.video-item h3 { font-size: 15px; margin: 0 0 10px; font-weight: 700; }
.lesson-video { width: 100%; max-height: 540px; background: #000; border-radius: 12px; }
.resume-note { display: inline-block; background: var(--primary-soft); color: var(--primary-d); border-radius: 10px; padding: 7px 14px; font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.video-placeholder { background: var(--surface-2); border: 2px dashed #dfe2e8; border-radius: 12px; padding: 34px; text-align: center; color: var(--text2); font-weight: 600; }
.video-poster { position: relative; border-radius: 12px; overflow: hidden; background: #000; aspect-ratio: 16/9; }
.video-poster img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .85; }
.poster-badge { position: absolute; left: 12px; bottom: 12px; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); color: #fff; font-size: 12px; font-weight: 700; padding: 5px 13px; border-radius: 99px; }
.thumb-preview { margin-bottom: 12px; }
.thumb-preview img { max-width: 280px; width: 100%; border-radius: 12px; border: 1px solid var(--border); display: block; }
.v-thumb { width: 56px; height: 32px; object-fit: cover; border-radius: 6px; vertical-align: middle; margin-right: 8px; border: 1px solid var(--border); }
.video-placeholder .dur { display: block; margin-top: 8px; font-size: 12.5px; }
.embed-wrap { position: relative; padding-top: 56.25%; }
.embed-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 12px; }
.prompt { background: var(--primary-soft); padding: 14px 18px; border-radius: 12px; color: #234; }
.prompt-note { font-size: 13px; color: #6b7280; margin: 8px 0 0; }
.guard-note { font-size: 12px; color: #b42318; background: #fdecea; border-radius: 10px; padding: 7px 12px; margin: 6px 0 0; opacity: 0; transition: opacity .2s; pointer-events: none; }
.guard-note.show { opacity: 1; }

/* 就業時間内チェックのモーダル */
.wt-backdrop { position: fixed; inset: 0; z-index: 400; display: none; align-items: center; justify-content: center;
  background: rgba(22,17,12,.45); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); padding: 20px; }
.wt-backdrop.show { display: flex; }
.wt-modal { background: #fff; border-radius: 22px; padding: 28px 30px 22px; max-width: 470px; width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,.28); }
.wt-title { font-size: 18px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.01em; }
.wt-desc { font-size: 14px; color: #4b5563; margin: 0 0 14px; line-height: 1.7; }
.wt-check { display: flex; align-items: center; gap: 10px; background: #fff7f2; border: 1.5px solid #ffe0d0;
  border-radius: 12px; padding: 13px 15px; font-size: 14px; font-weight: 700; cursor: pointer; }
.wt-check input { width: 18px; height: 18px; accent-color: #ff5a2c; flex-shrink: 0; }
.wt-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.wt-note { font-size: 11.5px; color: #9aa0ad; margin: 12px 0 0; }
.wt-choice { display: flex; gap: 10px; flex-wrap: wrap; }
.wt-choice .btn { flex: 1; justify-content: center; min-width: 150px; }
.wt-off-note { margin-top: 4px; }
.wt-off-warn { background: #fdecea; border: 1.5px solid #f5c6c0; border-radius: 12px;
  padding: 13px 15px; font-size: 13.5px; color: #8a2019; line-height: 1.7; margin: 0; }
.wt-main-actions { margin-top: 12px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ───── マスコット ───── */
#rc-mascot { position: fixed; right: 18px; bottom: 14px; z-index: 350;
  opacity: 0; transform: translateY(30px) scale(.7); transition: opacity .5s, transform .5s cubic-bezier(.34,1.56,.64,1); }
#rc-mascot.in { opacity: 1; transform: translateY(0) scale(1); }
#rc-mascot .rc-img { height: 190px; width: auto; display: block; margin-left: auto;
  cursor: pointer; user-select: none; -webkit-user-drag: none;
  filter: drop-shadow(0 6px 14px rgba(60,40,20,.25));
  animation: rcFloat 3.4s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes rcFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
#rc-mascot .rc-img.jump { animation: rcJump 0.9s cubic-bezier(.36,.07,.19,.97) 2; }
@keyframes rcJump {
  0%   { transform: translateY(0) scale(1,1); }
  15%  { transform: translateY(2px) scale(1.08,.86); }
  45%  { transform: translateY(-26px) scale(.96,1.06); }
  75%  { transform: translateY(0) scale(1.06,.9); }
  100% { transform: translateY(0) scale(1,1); }
}
#rc-mascot .rc-img.wiggle { animation: rcWiggle 0.7s ease-in-out 2; }
@keyframes rcWiggle {
  0%,100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); }
}
#rc-mascot .rc-bubble { position: absolute; right: calc(100% - 26px); bottom: 130px; width: max-content; max-width: 250px;
  background: #fff; border-radius: 16px 16px 4px 16px; padding: 11px 15px;
  font-size: 12.5px; font-weight: 700; color: #33291f; line-height: 1.6;
  box-shadow: 0 2px 4px rgba(60,40,30,.06), 0 12px 30px rgba(60,40,30,.16);
  opacity: 0; transform: translateY(8px) scale(.92); transform-origin: 100% 100%;
  transition: opacity .25s, transform .25s cubic-bezier(.34,1.56,.64,1); pointer-events: none; }
#rc-mascot .rc-bubble.show { opacity: 1; transform: translateY(0) scale(1); }
.rc-confetti { position: absolute; bottom: 70px; z-index: -1; pointer-events: none; opacity: 0;
  animation: rcConfetti 1.9s ease-out forwards; }
@keyframes rcConfetti {
  0%   { opacity: 0; transform: translateY(10px) rotate(0); }
  15%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-90px) translateX(-14px) rotate(220deg); }
}
/* 全画面の紙吹雪（修了証ページ） */
.rc-confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 500; overflow: hidden; }
.rc-drop { position: absolute; top: -7vh; opacity: 0; animation: rcDrop linear forwards; }
@keyframes rcDrop {
  0%   { opacity: 0; transform: translateY(0) translateX(0) rotate(0); }
  6%   { opacity: 1; }
  82%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(114vh) translateX(var(--sway, 0px)) rotate(var(--spin, 360deg)); }
}
@media print { #rc-mascot { display: none !important; } }
@media (max-width: 720px) { #rc-mascot .rc-img { height: 130px; } #rc-mascot .rc-bubble { bottom: 96px; max-width: 200px; } }
.char-rule { font-size: 12.5px; color: var(--text2); margin: 8px 0; }
.cert-done { color: var(--gold); font-weight: 700; font-size: 15px; }

/* ───── テーブル ───── */
.table-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid rgba(20,22,40,.05); box-shadow: var(--shadow); background: var(--surface); }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { border-bottom: 1px solid var(--border); padding: 12px 14px; text-align: left; vertical-align: top; }
.data-table th { background: #fff; color: var(--text2); font-weight: 700; font-size: 12.5px; letter-spacing: .02em; position: sticky; top: 0; }
.data-table.compact th, .data-table.compact td { padding: 8px 10px; font-size: 13px; }
.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover td { background: #f8f9fc; }
.ua { max-width: 280px; font-size: 11.5px; color: var(--text2); word-break: break-all; }

.grid-table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--surface); }
.grid-table th, .grid-table td { border: 1px solid var(--border); padding: 8px 10px; text-align: center; }
.grid-table th { background: var(--surface-2); font-weight: 700; }
.sticky-col { position: sticky; left: 0; background: var(--surface) !important; text-align: left !important; z-index: 2; }
.mini-bar { background: #edeef2; height: 7px; border-radius: 99px; overflow: hidden; }
.mini-bar span { display: block; height: 100%; background: var(--primary-grad); border-radius: 99px; }
.cell-label { font-size: 11.5px; font-weight: 600; }
.cell { min-width: 92px; }

/* ───── ステータス・タグ ───── */
.status-pill { padding: 3px 12px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.status-active { background: var(--green-soft); color: #0e7a42; }
.status-suspended { background: var(--amber-soft); color: var(--amber); }
.status-disabled { background: #eef1f5; color: var(--text2); }
.tag { background: var(--surface-2); border-radius: 99px; padding: 3px 11px; font-size: 11.5px; color: var(--text2); margin-left: 5px; font-weight: 600; }
.tag.muted { opacity: .65; }
.code-pill { background: var(--primary-soft); border-radius: 99px; padding: 2px 10px; font-size: 12px; color: var(--primary-d); font-weight: 700; }

/* ───── コース管理 ───── */
.course-block { background: var(--surface); border: 1px solid rgba(20,22,40,.05); border-radius: var(--radius); padding: 20px 24px; margin: 18px 0; box-shadow: var(--shadow); }
.course-block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.course-block-head h2 { font-size: 17.5px; font-weight: 800; }
.curriculum-block { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 15px 17px; margin: 14px 0; }
.curriculum-block-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14.5px; }
.video-admin-list { list-style: none; padding: 0; margin: 10px 0; }
.video-admin-list li { padding: 9px 0; border-bottom: 1px dashed var(--border); display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.video-admin-list .v-main { flex: 1; min-width: 200px; }
.video-admin-list .v-actions { display: flex; gap: 14px; align-items: center; }
.attach-form { margin-top: 10px; background: #fff; padding: 12px; border-radius: 12px; border: 1px solid var(--border); }
.badge-todo { background: var(--amber-soft); color: var(--amber); border-radius: 99px; padding: 2px 10px; font-size: 12px; font-weight: 700; }
.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: 8px; max-height: 260px; overflow-y: auto; padding: 4px; }
.assign-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* ───── 感想文・ログ ───── */
.filter-bar { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; background: var(--surface); padding: 16px 20px; border-radius: 16px; margin-bottom: 20px; border: 1px solid rgba(20,22,40,.05); box-shadow: var(--shadow); }
.filter-bar label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--text2); font-weight: 600; }
.reflection-card { background: var(--surface); border: 1px solid rgba(20,22,40,.05); border-radius: 16px; padding: 18px 20px; margin-bottom: 14px; box-shadow: var(--shadow); }
.reflection-card header { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.r-meta { color: var(--text2); font-size: 12.5px; }
.reflection-body { white-space: pre-wrap; }
.log-detail { font-size: 12.5px; color: var(--text2); background: var(--surface-2); padding: 10px; border-radius: 10px; border: 1px solid var(--border); }
.log-detail div { word-break: break-all; }
.achiever-summary { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 18px; }
.achiever-summary .tag { margin-left: 0; padding: 5px 13px; font-size: 12.5px; background: #fff; box-shadow: var(--shadow); }
.sub-table { margin-top: 8px; }

.tabs { display: flex; gap: 4px; background: #eceef2; border-radius: 99px; padding: 4px; margin-bottom: 20px; width: fit-content; }
.tab { padding: 8px 18px; color: var(--text2); border-radius: 99px; font-weight: 700; font-size: 13.5px; transition: background .15s, color .15s; }
.tab:hover { color: var(--primary); text-decoration: none; }
.tab.active { color: var(--text); background: #fff; box-shadow: 0 1px 4px rgba(16,24,40,.12); }

.inline-edit summary { list-style: none; }
.inline-edit[open] { background: var(--surface-2); padding: 12px; border-radius: 12px; border: 1px solid var(--border); }

/* 並べ替え（ドラッグ＆ドロップ） */
.drag-handle { cursor: grab; color: #b6bac2; font-size: 15px; margin-right: 6px; user-select: none; }
.drag-handle:active { cursor: grabbing; }
[data-sortable] .dragging { opacity: .45; }
[data-sortable].sort-saved { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 12px; transition: outline .2s; }
[data-sortable].sort-error { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 12px; }
.measure-note { margin: 4px 0 0; }
.measure-note:empty { display: none; }

/* ───── エラー ───── */
.error-box { text-align: center; padding: 70px 20px; }
.error-box h1 { font-size: 70px; color: var(--primary); margin: 0; font-weight: 800; }

/* ───── 修了証（クラシックな証書デザインを維持） ───── */
.cert-toolbar { display: flex; gap: 12px; margin-bottom: 18px; }
.certificate {
  background: #fffdf6; color: #2a2a2a; max-width: 780px; margin: 0 auto;
  border: 10px double var(--gold); border-radius: 8px; padding: 54px 64px; text-align: center;
  box-shadow: var(--shadow-lg);
}
.cert-default .cert-head { font-size: 36px; letter-spacing: .35em; color: #8a6d2b; margin-bottom: 8px; font-weight: 800; }
.cert-no { font-size: 12px; color: #999; margin-bottom: 32px; }
.cert-name { font-size: 25px; border-bottom: 1px solid #ccc; display: inline-block; padding: 0 34px 6px; margin-bottom: 28px; }
.cert-body { font-size: 15px; }
.cert-course { font-size: 21px; font-weight: 800; margin: 24px 0 10px; }
.cert-hours { font-size: 15px; color: #5a4a23; margin: 6px 0; }
.cert-reflection { text-align: left; background: #f7f3e8; border: 1px solid #e3dcc4; border-radius: 8px; padding: 16px 20px; margin: 24px 0; }
.cert-reflection-label { font-size: 12px; color: #8a6d2b; margin-bottom: 6px; font-weight: 700; }
.cert-reflection p { white-space: pre-wrap; margin: 0; font-size: 14px; }
.cert-date { margin-top: 36px; font-size: 15px; }
.cert-issuer { font-weight: 800; font-size: 17px; margin-top: 14px; color: #4a3c1a; }

.print-page { background: #fff; color: #222; padding: 30px; }
.print-page h1 { color: #222; }

/* ───── 印刷 ───── */
@media print {
  .top-bar, .no-print, .nav, .user-box, .flash-area { display: none !important; }
  body { background: #fff; color: #000; }
  .container { padding: 0; max-width: none; }
  .certificate { border-color: #b8932f; box-shadow: none; }
  .data-table th { background: #eee !important; color: #000; }
  .table-scroll { box-shadow: none; }
  a { color: #000; }
}

@media (max-width: 720px) {
  .two-col { grid-template-columns: 1fr; }
  .container { padding: 20px 16px 60px; }
  body { font-size: 15px; }
}

/* ═══════════════════════════════════════════════════════════
   受講者テーマ（モダン・ウォーム／アクセント=オレンジ→コーラル）
   ═══════════════════════════════════════════════════════════ */
body.theme-glass {
  --o: #ff5a2c;        /* ブランドオレンジ */
  --o-d: #e84d20;
  --o-soft: #fff0ea;
  --o-line: #ffd6c6;
  --o-grad: linear-gradient(120deg, #ff6a35, #ff4757);  /* メインアクセント */
  --gg: #16a34a;
  --line: #eeeae6;
  --gtext: #201c19;
  background:
    radial-gradient(1100px 480px at 85% -140px, rgba(255,120,70,.10), transparent 60%),
    radial-gradient(900px 420px at -10% -160px, rgba(255,70,120,.07), transparent 55%),
    #f8f7f5;
  background-attachment: fixed;
  color: var(--gtext);
  min-height: 100vh;
}
body.theme-glass .container { max-width: 900px; padding: 34px 22px 100px; }
body.theme-glass .card-grid { grid-template-columns: 1fr; gap: 18px; }
body.theme-glass .curriculum-list { display: flex; flex-direction: column; gap: 12px; }
body.theme-glass .curriculum-row { margin-bottom: 0; }
body.theme-glass .block { margin-bottom: 22px; }

/* ヘッダ（フロストガラス） */
body.theme-glass .top-bar { background: rgba(255,253,251,.75); border-bottom: 1px solid rgba(60,40,30,.07); }
body.theme-glass .brand a { background: var(--o-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
body.theme-glass .brand-tag { background: none; -webkit-background-clip: unset; color: var(--text2) !important; }
body.theme-glass .nav a:hover { color: var(--o-d); background: var(--o-soft); }
body.theme-glass .badge { background: var(--o-soft); color: #c2451f; }

/* カード類 */
body.theme-glass .block,
body.theme-glass .course-card,
body.theme-glass .curriculum-row,
body.theme-glass .login-card,
body.theme-glass .reflection-card,
body.theme-glass .empty {
  background: #fff !important;
  border: 1px solid rgba(60,40,30,.06);
  box-shadow: 0 1px 2px rgba(60,40,30,.04), 0 6px 22px rgba(60,40,30,.06);
  border-radius: 20px;
}
body.theme-glass .block { padding: 28px 30px; }
body.theme-glass .course-card { padding: 18px; }
body.theme-glass .course-card:hover { box-shadow: 0 2px 4px rgba(60,40,30,.05), 0 20px 44px rgba(60,40,30,.14); }
body.theme-glass .course-thumb { border-radius: 19px 19px 0 0; }
body.theme-glass .login-card { border-radius: 26px; }

/* ステップ */
@keyframes stepPulse { 0%,100% { box-shadow: 0 5px 14px rgba(255,90,44,.30); } 50% { box-shadow: 0 5px 24px rgba(255,90,44,.58); } }
body.theme-glass .step { background: #fff; border: 1px solid var(--line); color: #8a8078; box-shadow: none; }
body.theme-glass .step.active { background: var(--o-grad); color: #fff; border-color: transparent; animation: stepPulse 2.4s ease-in-out infinite; }
body.theme-glass .step.done { background: var(--green-soft); color: #0e7a42; border-color: transparent; }
body.theme-glass .steps { background: rgba(248,247,245,.82); }

/* ボタン */
body.theme-glass .btn { border-radius: 12px; }
body.theme-glass .btn-primary { background: var(--o-grad); border: none; color: #fff; box-shadow: 0 6px 16px rgba(255,90,44,.32); }
body.theme-glass .btn-primary:hover { filter: brightness(1.06); box-shadow: 0 10px 24px rgba(255,90,44,.4); transform: translateY(-1px); }

/* 進捗バー */
body.theme-glass .progress-bar { background: #f0ebe6; }
body.theme-glass .progress-bar span { background: var(--o-grad); }
body.theme-glass .mini-bar span { background: var(--o-grad); }

/* カリキュラム行 */
body.theme-glass .status-dot { background: var(--o-soft); color: var(--o); }
body.theme-glass .curriculum-row.done .status-dot { background: var(--gg); color: #fff; }
body.theme-glass .cert-tag, body.theme-glass .cert-done { color: var(--o); }

/* 感想文・入力 */
body.theme-glass .prompt { background: var(--o-soft); color: #5a3b2c; }
body.theme-glass .resume-note { background: var(--o-soft); color: #c2451f; }
body.theme-glass .video-placeholder { background: #faf9f7; border: 2px dashed #e5e0da; color: #9a938c; }
body.theme-glass input[type=text],
body.theme-glass input[type=password],
body.theme-glass input[type=email],
body.theme-glass textarea,
body.theme-glass select {
  background: #fff; border: 1.5px solid #e5e0da; border-radius: 12px;
}
body.theme-glass input:focus, body.theme-glass textarea:focus, body.theme-glass select:focus {
  border-color: var(--o); box-shadow: 0 0 0 4px rgba(255,90,44,.13);
}
body.theme-glass .hint.locked { background: var(--o-soft); color: #9a5a1a; }

/* ログイン */
body.theme-glass .login-card h1 { background: var(--o-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ピル */
body.theme-glass .learn-pill { background: var(--o-soft); color: #c2451f; }
body.theme-glass .welcome { color: #d14a1d; }
body.theme-glass ::selection { background: #ffd9cb; }

/* 割り当ての一括選択（全視聴） */
.checklist-tools { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; flex-wrap: wrap; }
