/* ================================================================
   JPAC 動画ライブラリー — スタイルシート
   movie.jpac.co.jp
   ================================================================ */

/* ── デザイントークン ─────────────────────── */
:root {
  --ground:   #F3F6FA;
  --navy:     #0B2D5C;
  --navy-mid: #1A4A82;
  --text:     #1B2B3E;
  --muted:    #627083;
  --accent:   #B8902A;
  --surface:  #FFFFFF;
  --border:   #D4DCE8;
  --r:        3px;
  --shadow:   0 2px 12px rgba(0,0,0,.08);
  --shadow-h: 0 6px 24px rgba(0,0,0,.12);
}

/* ── リセット ────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo,
               -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--ground);
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a   { color: inherit; }
button { cursor: pointer; font-family: inherit; }

/* ── ユーティリティ ───────────────────────── */
.hidden { display: none !important; }

.ey {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.ey::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.loading-msg {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  font-size: 13px;
}

/* ── サイトヘッダー ───────────────────────── */
.sh {
  background: var(--navy);
  height: 54px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 12px rgba(0,0,0,.28);
}

.sh-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: white;
}

.sh-logo-img {
  height: 36px;
  width: auto;
  display: block;
}

.sh-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
}

.sh-nav a {
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: 12px;
  transition: color .12s;
  white-space: nowrap;
}

.sh-nav a:hover { color: white; }

.sh-nav .btn-login {
  background: var(--accent);
  color: var(--navy);
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 2px;
  font-size: 11px;
  letter-spacing: .5px;
  transition: background .12s;
}

.sh-nav .btn-login:hover {
  background: #CFA040;
  color: var(--navy);
}

/* ── マストヘッド ─────────────────────────── */
.mh {
  background: var(--navy);
  color: white;
  padding: 26px 28px 34px;
  border-bottom: 3px solid var(--accent);
}

.mh-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.mh h1 {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "MS Mincho",
               Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 3px;
  margin-bottom: 6px;
}

.mh h1 em {
  color: white;
  font-style: normal;
}

.mh-sub {
  font-size: 11px;
  opacity: .5;
  letter-spacing: 1.5px;
}

.mh-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 2px;
  padding: 8px 14px;
  min-width: 210px;
  transition: border-color .12s;
}

.mh-search:focus-within {
  border-color: rgba(255,255,255,.45);
}

.mh-search input {
  background: none;
  border: none;
  outline: none;
  color: white;
  font-size: 13px;
  width: 100%;
  font-family: inherit;
}

.mh-search input::placeholder { color: rgba(255,255,255,.3); }

.mh-search-icon {
  color: rgba(255,255,255,.35);
  font-size: 14px;
  flex-shrink: 0;
}

/* ── カテゴリーバー ───────────────────────── */
.cb {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 54px;
  z-index: 100;
}

.cb-scroll {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}

.cb-scroll::-webkit-scrollbar { display: none; }

.ct {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border: none;
  background: none;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color .12s, background .12s;
  text-decoration: none;
}

.ct:hover { color: var(--text); background: var(--ground); }

.ct.on  {
  color: var(--navy);
  font-weight: 700;
  border-bottom-color: var(--navy);
}

.ct-pip {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ct-n {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--ground);
  color: var(--muted);
  transition: background .12s, color .12s;
}

.ct.on .ct-n {
  background: var(--navy);
  color: white;
}

/* ── メインコンテンツ ─────────────────────── */
.main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 32px 28px 80px;
}

/* ── 最新動画（フィーチャード） ──────────── */
.feat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  display: grid;
  grid-template-columns: 55% 45%;
  margin-bottom: 40px;
  min-height: 260px;
}

.feat-embed {
  background: #071828;
  position: relative;
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.feat-embed canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.feat-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.feat-play {
  position: relative;
  z-index: 10;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 2px solid rgba(255,255,255,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, border-color .15s;
}

.feat-play:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.feat-play svg {
  fill: white;
  width: 22px;
  height: 22px;
  margin-left: 3px;
}

.feat-vimeo-tag {
  position: absolute;
  bottom: 12px;
  right: 14px;
  z-index: 10;
  background: rgba(0,0,0,.55);
  color: rgba(255,255,255,.65);
  font-size: 10px;
  letter-spacing: 1px;
  padding: 3px 9px;
  border-radius: 2px;
}

.feat-body {
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
}

.feat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 2px;
  margin-bottom: 14px;
  width: fit-content;
}

.feat-badge .pip {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.feat-title {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "MS Mincho",
               Georgia, serif;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 14px;
}

.feat-desc {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.8;
  flex: 1;
  margin-bottom: 18px;
}

.feat-meta {
  display: flex;
  gap: 18px;
  font-size: 11px;
  color: var(--muted);
  padding-top: 14px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* ── 動画グリッド ─────────────────────────── */
.gc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.gc-count { font-size: 12px; color: var(--muted); }

.vg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}

.vc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid transparent;
  border-radius: var(--r);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .14s, transform .14s;
}

.vc:hover {
  box-shadow: var(--shadow-h);
  transform: translateY(-2px);
}

.vc:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.vc-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.vc-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 3px 8px;
  border-radius: 2px;
}

.vc-num {
  font-family: "Courier New", Courier, monospace;
  font-size: 10px;
  color: var(--muted);
  flex-shrink: 0;
}

.vc-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--text);
}

.vc-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted);
}

.vc-dur {
  font-family: "Courier New", Courier, monospace;
  font-size: 11.5px;
}

/* ── 動画詳細ページ ───────────────────────── */
.vd-wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 32px 28px 80px;
}

.vd-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 24px;
  transition: color .12s;
}

.vd-back:hover { color: var(--navy); }

.vd-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}

.vd-embed-wrap {
  background: #071828;
  border-radius: var(--r);
  overflow: hidden;
  aspect-ratio: 16/9;
  position: relative;
}

.vd-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.vd-embed-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.5);
  font-size: 13px;
  flex-direction: column;
  gap: 10px;
}

.vd-embed-placeholder svg {
  fill: rgba(255,255,255,.25);
  width: 48px;
  height: 48px;
}

.vd-info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  margin-top: 16px;
}

.vd-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 2px;
  margin-bottom: 14px;
  width: fit-content;
}

.vd-badge .pip {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.vd-title {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "MS Mincho",
               Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.65;
  margin-bottom: 12px;
}

.vd-meta {
  display: flex;
  gap: 16px;
  font-size: 11.5px;
  color: var(--muted);
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.vd-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.85;
}

/* 関連動画サイドバー */
.rel-card {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: opacity .12s;
}

.rel-card:last-child { border-bottom: none; }
.rel-card:hover { opacity: .75; }

.rel-pip {
  width: 3px;
  border-radius: 2px;
  flex-shrink: 0;
  align-self: stretch;
}

.rel-body { flex: 1; min-width: 0; }

.rel-title {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rel-meta { font-size: 11px; color: var(--muted); }

/* ── 認証フォーム ─────────────────────────── */
.auth-wrap {
  max-width: 480px;
  margin: 40px auto 80px;
  padding: 0 20px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 32px;
  box-shadow: var(--shadow);
}

.fld {
  margin-bottom: 16px;
}

.fld label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #3A4A5C;
  margin-bottom: 5px;
}

.fld input[type=email],
.fld input[type=text],
.fld input[type=password] {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color .12s, box-shadow .12s;
}

.fld input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(11,45,92,.1);
}

.fld-check {
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--muted);
}

.btn-submit {
  width: 100%;
  padding: 11px;
  background: var(--navy);
  color: white;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: var(--r);
  cursor: pointer;
  font-family: inherit;
  letter-spacing: .5px;
  transition: background .12s;
}

.btn-submit:hover { background: #0d3570; }

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px !important; }
.pw-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  line-height: 0;
}
.pw-toggle:hover { color: var(--text); }

.auth-links {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.auth-links a {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
}

.auth-links a:hover { color: var(--navy); }

/* アラート */
.alert {
  padding: 10px 14px;
  border-radius: var(--r);
  font-size: 13px;
  margin-bottom: 18px;
  line-height: 1.6;
}

.alert-ok { background: #ECFDF5; color: #065F46; }
.alert-ng { background: #FEF2F2; color: #991B1B; }

/* ── フッター ─────────────────────────────── */
.ft {
  background: var(--navy);
  color: rgba(255,255,255,.5);
  text-align: center;
  padding: 28px 20px;
  font-size: 12px;
  letter-spacing: .4px;
  margin-top: 40px;
}

.ft-links {
  margin-bottom: 10px;
}

.ft-links a {
  color: rgba(255,255,255,.8);
  text-decoration: none;
  display: inline-block;
  padding: 0 12px;
  border-right: 1px solid rgba(255,255,255,.2);
  line-height: 1;
}

.ft-links a:last-child {
  border-right: none;
}

.ft-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.ft-copy {
  color: rgba(255,255,255,.45);
  font-size: 11px;
}

.ft-copy a {
  color: rgba(255,255,255,.55);
  text-decoration: none;
}

.ft-copy a:hover { color: rgba(255,255,255,.85); }

/* ── レスポンシブ ─────────────────────────── */
@media (max-width: 1024px) {
  .vg { grid-template-columns: repeat(2, 1fr); }
  .vd-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sh { padding: 0 16px; }
  .sh-nav li:not(:last-child) { display: none; }
  .mh { padding: 20px 16px 28px; }
  .mh-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .mh h1 { font-size: 22px; }
  .mh-search { min-width: unset; width: 100%; }
  .cb-scroll { padding: 0 16px; }
  .main { padding: 24px 16px 60px; }
  .feat { grid-template-columns: 1fr; }
  .feat-body { padding: 20px; }
  .vg { grid-template-columns: 1fr; }
  .vd-wrap { padding: 20px 16px 60px; }
  .auth-wrap { margin: 24px auto 60px; }
  .auth-card { padding: 24px 20px; }
  .auth-links { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
