:root {
  --dx-bg: #f6f7f9;
  --dx-card: #ffffff;
  --dx-line: #e2e5ea;
  --dx-text: #1f2430;
  --dx-sub: #6b7280;
  /* 御社イメージカラー */
  --brand-green: #4e9d45;
  --brand-lime: #8cc63f;
  --brand-blue: #a9d8ea;
  --dx-accent: var(--brand-green);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, "Noto Sans JP", sans-serif;
  color: var(--dx-text);
  background: var(--dx-bg);
}

.dx-header {
  position: relative;
  padding: 16px 20px;
  background: var(--dx-card);
  border-bottom: 1px solid var(--dx-line);
  border-top: 4px solid var(--brand-green);
}
.dx-header h1 { color: var(--brand-green); }
.dx-logout { position: absolute; top: 14px; right: 20px; font-size: 13px;
  color: var(--dx-accent); text-decoration: none; }
.dx-logout:hover { text-decoration: underline; }
.dx-header h1 { margin: 4px 0 0; font-size: 20px; }
.dx-sub { margin: 4px 0 0; color: var(--dx-sub); font-size: 13px; }
.dx-back { color: var(--dx-accent); text-decoration: none; font-size: 13px; }

.dx-main { padding: 20px; max-width: 900px; margin: 0 auto; }

/* 一覧 */
.dx-catalog { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.dx-card { background: var(--dx-card); border: 1px solid var(--dx-line); border-radius: 8px; }
.dx-card a { display: flex; justify-content: space-between; align-items: baseline;
  padding: 14px 16px; text-decoration: none; color: var(--dx-text); }
.dx-card-title { font-weight: 600; }
.dx-card-meta { color: var(--dx-sub); font-size: 12px; }
.dx-empty { color: var(--dx-sub); text-align: center; padding: 48px 0; }
.dx-hint { font-size: 13px; }
.dx-hint code { background: #eef1f5; padding: 1px 5px; border-radius: 4px; }

/* 視聴 */
.dx-watch { display: grid; grid-template-columns: 1fr 280px; gap: 16px;
  padding: 16px; max-width: 1200px; margin: 0 auto; }
@media (max-width: 800px) { .dx-watch { grid-template-columns: 1fr; } }
/* 動画プレイヤーを御社カラーで縁取り（緑フレーム＋ライム帯＋淡ブルーの角） */
.dx-player {
  position: relative;
  padding: 14px;
  background: var(--brand-green);
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .14);
}
.dx-player::before {   /* 上辺のライム帯 */
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 7px;
  background: var(--brand-lime);
  border-radius: 12px 12px 0 0;
}
.dx-player::after {    /* 右下の淡ブルーの角 */
  content: "";
  position: absolute; right: 0; bottom: 0; width: 30px; height: 30px;
  background: var(--brand-blue);
  border-radius: 0 0 12px 0;
}
.dx-player video {
  position: relative; z-index: 1;
  background: #000; border-radius: 4px; display: block;
}
/* 全画面表示でも縁取りを残す（動画要素自身に緑フレーム＋上辺ライム）。
   ベンダー別に別ルールで記述（未知セレクタで全体が無効化されるのを防ぐ） */
#dx-video:fullscreen {
  box-sizing: border-box; background: #000;
  border: 16px solid var(--brand-green); border-top: 22px solid var(--brand-green);
  box-shadow: inset 0 0 0 3px var(--brand-lime);
}
#dx-video:-webkit-full-screen {
  box-sizing: border-box; background: #000;
  border: 16px solid var(--brand-green); border-top: 22px solid var(--brand-green);
  box-shadow: inset 0 0 0 3px var(--brand-lime);
}
#dx-video:-moz-full-screen {
  box-sizing: border-box; background: #000;
  border: 16px solid var(--brand-green); border-top: 22px solid var(--brand-green);
  box-shadow: inset 0 0 0 3px var(--brand-lime);
}
.dx-chapters { background: var(--dx-card); border: 1px solid var(--dx-line);
  border-radius: 8px; padding: 12px 14px; align-self: start; }
.dx-chapters h2 { font-size: 14px; margin: 0 0 8px; color: var(--dx-sub); }
.dx-chapter-list { list-style: none; margin: 0; padding: 0; }
.dx-chapter-btn { width: 100%; display: flex; gap: 10px; align-items: baseline;
  background: none; border: none; border-radius: 6px; padding: 8px 8px;
  text-align: left; cursor: pointer; font-size: 14px; color: var(--dx-text); }
.dx-chapter-btn:hover { background: #eef4fb; }
.dx-chapter-time { color: var(--dx-accent); font-variant-numeric: tabular-nums;
  font-size: 12px; min-width: 48px; }
.dx-chapter-none, .dx-chapter-none li { color: var(--dx-sub); font-size: 13px; padding: 8px; }

/* 管理台帳 */
.dx-ingest { margin: 0 0 14px; }
.dx-btn { background: var(--dx-accent); color: #fff; border: none; border-radius: 6px;
  padding: 9px 16px; font-size: 14px; cursor: pointer; }
.dx-btn:hover { filter: brightness(1.08); }
.dx-banner { background: #eaf6ec; border: 1px solid #bfe0c6; color: #24603a;
  border-radius: 6px; padding: 10px 14px; margin: 0 0 14px; font-size: 14px; }
.dx-table { width: 100%; border-collapse: collapse; background: var(--dx-card);
  border: 1px solid var(--dx-line); border-radius: 8px; overflow: hidden; font-size: 13px; }
.dx-table th, .dx-table td { padding: 8px 10px; border-bottom: 1px solid var(--dx-line); text-align: left; }
.dx-table th { background: #f0f2f5; color: var(--dx-sub); font-weight: 600; }
.dx-table tr:last-child td { border-bottom: none; }
.dx-mono { font-family: ui-monospace, monospace; color: var(--dx-sub); }
.dx-stage { background: #eef1f5; border-radius: 10px; padding: 1px 8px; font-size: 12px; }
.dx-h2 { font-size: 15px; margin: 24px 0 10px; color: var(--dx-text); }
.dx-login { max-width: 340px; }
.dx-login-form { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.dx-login-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--dx-sub); }
.dx-login-form input { padding: 9px 11px; border: 1px solid var(--dx-line); border-radius: 6px; font-size: 14px; }
.dx-banner-err { background: #fdecec; border: 1px solid #f5b5b5; color: #8a1f1f;
  border-radius: 6px; padding: 10px 14px; margin: 0 0 14px; font-size: 14px; }
.ch-del { background: none; border: 1px solid var(--dx-line); border-radius: 6px;
  cursor: pointer; color: #a33; padding: 2px 8px; }
#ch-add { background: #eef1f5; border: 1px solid var(--dx-line); border-radius: 6px;
  padding: 8px 14px; cursor: pointer; margin-right: 8px; }
.dx-table select, .dx-table input { padding: 5px 7px; border: 1px solid var(--dx-line); border-radius: 5px; }
