/* 説明会動画ページ
   現行ページ（tn-ir.com）のデザインを再現する。ブレークポイントは 768px。 */

:root {
  --color-main: #073d8c;
  --color-active: #d5e6ff;
  --color-copy: #88b8ff;
  --color-sub: #808080;
  --color-text: #000;
  --color-border-light: #aaa;
  --content-max: 1280px;
  --gutter: 20px;
  --font: "Noto Sans JP", system-ui, sans-serif;
}

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, video, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

body {
  font-family: var(--font);
  color: var(--color-text);
  background: #fff;
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; }
a:hover { opacity: 0.8; }

:focus-visible {
  outline: 2px solid var(--color-main);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

/* 読み込み中は中身が空なので、レイアウトのちらつきを避けて隠す */
.is-loading .briefing { visibility: hidden; }

/* ---- header ---- */
.site-header {
  padding: 20px var(--gutter);
  border-bottom: 1px solid var(--color-main);
}
.site-header__inner {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-inline: 72px; /* 中央のロゴが右端の言語切り替えに重ならないようにする */
}
.site-header__logo {
  display: block;
  max-width: 200px;
}
.site-header__logo img { width: 100%; height: auto; }

.lang-switch {
  position: absolute;
  right: 0;
  font-size: 12px;
}
.lang-switch a {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--color-main);
  border-radius: 4px;
  color: var(--color-main);
  text-decoration: none;
}

/* ---- 背景・レイアウト ---- */
.page-bg {
  /* 装飾画像。コーポレートサイトの素材に差し替える（要件定義 4-7） */
  background: url("./bg-footer.jpg") no-repeat left bottom / contain;
}

.briefing {
  padding: 0 var(--gutter);
  margin-bottom: 40px;
}
.briefing__side { margin-bottom: 30px; }

/* ---- 見出し（左の青い縦線） ---- */
.heading-bar {
  padding-left: 5px;
  border-left: 5px solid var(--color-main);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
}
.heading-bar--title {
  margin: 30px 0;
  padding-left: 10px;
}

/* ---- 動画 ---- */
.player { margin-bottom: 10px; }
.player video {
  width: 100%;
  aspect-ratio: 16 / 9;
}

/* ---- 登壇者 ---- */
.presenter {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--color-main);
}
.presenter__role {
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-main);
}
.presenter__name {
  font-size: 18px;
  font-weight: 700;
}
.presenter__name-sub {
  font-size: 14px;
  color: var(--color-sub);
}

/* ---- 「＞」の枠（Profile、前へ・次へ） ---- */
.arrow-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  border: 1px solid var(--color-main);
  border-radius: 4px;
  background: #fff;
  color: var(--color-main);
}
.arrow-box svg {
  width: 60%;
  height: 60%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.arrow-box--button {
  width: 30px;
  height: 30px;
  padding: 0;
  cursor: pointer;
}
.arrow-box--button[aria-disabled="true"] {
  opacity: 0.35;
  cursor: default;
}

/* ---- Profile ---- */
.profile { margin-bottom: 10px; }
.profile__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--color-main);
  text-decoration: none;
}

/* ---- チャプター一覧（PC のみ表示。スマホでの扱いは要件定義 4-4 で確認中） ---- */
.chapters { display: none; }
.chapters__list {
  position: relative; /* 項目の offsetTop を一覧の枠基準にする */
  height: 228px;
  overflow-y: auto;
  border: 1px solid var(--color-border-light);
  background: #fff;
  font-size: 12px;
  line-height: 1.8;
}
.chapters__item {
  display: block;
  width: 100%;
  padding: 0 10px;
  border: 0;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.chapters__item:hover { background: #eef4ff; }
.chapters__item[aria-current="true"] { background: var(--color-active); }
.chapters__item:focus-visible { outline-offset: -2px; }

/* ---- スライド ---- */
.slide { margin-bottom: 10px; }
.slide img {
  width: 100%;
  height: auto;
  aspect-ratio: 1800 / 1013;
  object-fit: contain;
  background: #f2f2f2;
}

.slide-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--color-main);
}
.slide-nav__step {
  display: flex;
  gap: 5px;
}

/* ---- 同期トグル ---- */
.sync-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px;
  border: 0;
  background: none;
  font-size: 14px;
  cursor: pointer;
}
.sync-toggle__switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 54px;
  height: 26px;
  padding: 0 7px;
  border-radius: 13px;
  background: #000;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  transition: background-color 0.15s;
}
.sync-toggle__switch::before {
  content: "ON";
}
.sync-toggle__switch::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: right 0.15s;
}
.sync-toggle[aria-pressed="false"] .sync-toggle__switch {
  justify-content: flex-end;
  background: var(--color-sub);
}
.sync-toggle[aria-pressed="false"] .sync-toggle__switch::before { content: "OFF"; font-size: 11px; }
.sync-toggle[aria-pressed="false"] .sync-toggle__switch::after { right: calc(100% - 23px); }

@media (prefers-reduced-motion: reduce) {
  .sync-toggle__switch, .sync-toggle__switch::after { transition: none; }
}

/* ---- 参考資料・注意事項 ---- */
.info-block + .info-block { margin-top: 30px; }
.info-block .heading-bar { margin-bottom: 20px; }

.materials li {
  position: relative;
  margin-bottom: 15px;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.3;
}
.materials li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 18px;
  /* PDF アイコン（自作の簡易アイコン。コーポレートサイトの素材が決まれば差し替える） */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 18'%3E%3Cpath d='M1 .5h8l4.5 4.5v12.5H1z' fill='%23fff' stroke='%23d9363e'/%3E%3Cpath d='M9 .5V5h4.5' fill='none' stroke='%23d9363e'/%3E%3Crect x='0' y='9' width='11' height='5' fill='%23d9363e'/%3E%3Ctext x='5.5' y='13.1' font-family='Arial,sans-serif' font-size='4.2' font-weight='700' fill='%23fff' text-anchor='middle'%3EPDF%3C/text%3E%3C/svg%3E") no-repeat center / contain;
}

.disclaimer p {
  font-size: 16px;
  line-height: 1.5;
}

.load-error {
  padding: 60px 0;
  text-align: center;
}

/* ---- footer ---- */
.site-footer {
  padding: 10px var(--gutter);
  background: var(--color-main);
}
.site-footer__links li + li { margin-top: 10px; }
.site-footer__links a {
  font-size: 14px;
  color: #fff;
  text-decoration: none;
}
.site-footer__links a:focus-visible { outline-color: #fff; }

/* ---- PC ---- */
@media (min-width: 768px) {
  .site-header__inner,
  .briefing,
  .site-footer__inner {
    max-width: var(--content-max);
    margin-inline: auto;
  }
  .site-header__inner { justify-content: flex-start; padding-inline: 0; }
  .site-header__logo { max-width: 240px; }

  .briefing {
    display: flex;
    gap: 10px;
    margin-bottom: 80px;
    padding: 0;
  }
  .briefing__side {
    flex: 0 0 calc(40% - 10px);
    min-width: 0;
    margin-bottom: 0;
  }
  .briefing__content {
    flex: 1 1 0;
    min-width: 0;
    margin-top: 80px;
  }

  .heading-bar { font-size: 20px; }
  .player { margin-bottom: 20px; }
  .presenter__role { font-size: 16px; }
  .presenter__name { font-size: 20px; }
  .profile__link { font-size: 16px; }

  .chapters { display: block; }

  .site-footer { padding: 20px 0; }
  .site-footer__links { display: flex; gap: 10px; }
  .site-footer__links li + li { margin-top: 0; }
}

/* 768〜1280px では左右に余白がなくなるので、余白を残す */
@media (min-width: 768px) and (max-width: 1319px) {
  .site-header__inner,
  .briefing,
  .site-footer__inner {
    margin-inline: var(--gutter);
  }
  .site-header { padding-inline: 0; }
  .site-footer { padding-inline: 0; }
}

.version-notes { margin-top: 22px; color: #666; font-size: 12px; line-height: 1.6; }
.version-notes p + p { margin-top: 8px; }
@media (max-width: 767px) {
  .sync-toggle { max-width: calc(100% - 82px); font-size: 12px; text-align: left; }
  .sync-toggle__switch { flex: 0 0 54px; }
  .heading-bar--title { overflow-wrap: anywhere; }
}

/* Static release additions: retain working chapter access on mobile and errors. */
@font-face{font-family:"Noto Sans JP";font-style:normal;font-weight:400;font-display:swap;src:url("./fonts/noto-sans-jp-all-400-normal.woff") format("woff")}
@font-face{font-family:"Noto Sans JP";font-style:normal;font-weight:700;font-display:swap;src:url("./fonts/noto-sans-jp-all-700-normal.woff") format("woff")}
.chapters{display:block}.chapters summary{cursor:pointer;color:var(--color-main);font-size:14px;margin-bottom:8px}
.chapters__list{height:auto;max-height:228px}.chapters__item{line-height:1.8;text-decoration:none;font-size:12px;color:inherit}
.status{margin:12px 0;padding:12px;border:1px solid #b34141;background:#fff4f4;color:#832828;font-size:14px}
.direct-video,.enhancement-notice{font-size:12px;margin:8px 0;color:#666}.direct-video a{color:var(--color-main)}
.slide-nav__counter{font-size:12px;color:#666}.site-footer__copy{margin-top:16px;color:var(--color-copy);font-size:12px}
.briefing__side{min-width:0}.heading-bar--title{overflow-wrap:anywhere}
@media(max-width:767px){.chapters{margin:16px 0}.chapters__list{max-height:190px}.slide-nav{gap:8px}.slide-nav__step{flex-shrink:0}.briefing__content{min-width:0}}
