/* トクヨビ動画視聴 デザイン（CDO仕様v1・案A明快ナビ／年度別）。全色WCAG AA検算済み */
:root {
  --brand: #282e5c;
  --brand-dark: #1e2348;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --header-text: #ffffff;
  --body-text: #2b2f3a;
  --muted: #5b606e;
  --border: #e2e5ee;
  --border-input: #cfd4e2;
  --accent: #2f5fb0;
  --accent-tint: #eaf0fa;
  --success: #2e7d32;
  --success-text: #1f5c22;
  --danger: #c0392b;
  --hover: #eef1f8;
  --line-green: #06c755;
  --radius: 10px;
  --radius-lg: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  margin: 0; background: var(--bg); color: var(--body-text); line-height: 1.7;
}

/* ヘッダー */
header.site {
  background: var(--brand); color: var(--header-text);
  padding: 0 16px; height: 56px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 10; box-shadow: 0 2px 8px rgba(40,46,92,.18);
}
header.site .title { font-weight: 700; font-size: 16px; }
header.site .title a { color: var(--header-text); text-decoration: none; }
header.site a { color: var(--header-text); text-decoration: none; font-size: 13px; opacity: .92; }
header.site a:hover { opacity: 1; }

main { max-width: 760px; margin: 0 auto; padding: 16px; }
h2 { font-size: 20px; color: var(--brand); font-weight: 700; }

/* カード・フォーム */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; margin: 14px 0; }
button, input[type=submit] {
  background: var(--brand); color: #fff; border: 0; border-radius: var(--radius);
  padding: 12px 18px; font-size: 15px; font-weight: 700; cursor: pointer;
}
button:hover, input[type=submit]:hover { background: var(--brand-dark); }
button:active { transform: scale(.99); }
button.secondary { background: #fff; color: var(--brand); border: 1.5px solid var(--border-input); font-weight: 500; }
button.secondary:hover { background: var(--hover); }
input[type=text], input[type=password], input[type=date], select, textarea {
  width: 100%; padding: 12px; border: 1.5px solid var(--border-input); border-radius: var(--radius);
  font-size: 16px; color: var(--body-text); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(40,46,92,.12); }
a { color: var(--accent); }
.error { color: var(--danger); font-weight: 700; }
.note { color: var(--muted); font-size: 13px; }

/* 講座一覧（年度別） */
.group-band {
  background: var(--hover); border-left: 4px solid var(--brand); border-radius: 0;
  padding: 8px 12px; font-size: 14px; font-weight: 700; color: var(--brand); margin: 18px 0 10px;
}
details.year { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); margin: 0 0 10px; overflow: hidden; }
details.year > summary {
  list-style: none; cursor: pointer; padding: 14px; display: flex; align-items: center; gap: 9px;
  font-size: 15px; font-weight: 700; color: var(--body-text); min-height: 52px;
}
details.year > summary::-webkit-details-marker { display: none; }
details.year > summary .chev { color: var(--brand); font-size: 17px; transition: transform .2s; display: inline-flex; }
details.year[open] > summary .chev { transform: rotate(90deg); }
.video-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px 12px 34px; border-top: 0.5px solid #f0f1f6; text-decoration: none; color: var(--body-text);
  min-height: 48px;
}
.video-link:hover { background: var(--hover); }
.video-link .vl-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.video-link .vl-title { font-size: 14px; }
.video-link .st { font-size: 20px; flex-shrink: 0; line-height: 1; }
.video-link .st.done { color: var(--success); }
.video-link .st.todo { color: var(--brand); }
.video-link .dur { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; flex-shrink: 0; }

/* 視聴画面 */
.player-wrap { background: #000; border-radius: var(--radius-lg); overflow: hidden; }
video { width: 100%; display: block; background: #000; }
.watch-title { font-size: 18px; font-weight: 700; color: var(--brand); margin: 14px 0 2px; }
.breadcrumb { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.resume-banner { background: var(--accent-tint); border-radius: var(--radius); padding: 11px 13px; display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 0 0 14px; }
.controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 8px 0; }
.controls label { font-size: 13px; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--border-input); border-radius: var(--radius); overflow: hidden; }
.seg button { background: #fff; color: var(--muted); border: 0; border-left: 1px solid var(--border-input); padding: 8px 12px; font-size: 13px; font-weight: 500; border-radius: 0; }
.seg button:first-child { border-left: 0; }
.seg button.on { background: var(--brand); color: #fff; }

/* 管理画面テーブル */
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { border: 1px solid var(--border); padding: 7px 9px; text-align: left; }
th { background: var(--hover); color: var(--brand); }
tr.inactive td { color: #999; background: #fafafa; }
.controls-admin { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; }

/* LINE導線のみ例外の緑 */
.line-cta { background: var(--line-green); color: #fff; }
