/* ===== イントロ：ロゴ＝再生ボタン＋年号カウントアップ（R-16） ===== */
/* R-01対策：イントロは最初から不透明で本体を覆い、チラ見えを防ぐ（消える時だけフェード） */
.intro {
  position: fixed; inset: 0; height: 100vh; height: 100dvh; z-index: 120; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 22px; text-align: center;
  background:
    radial-gradient(58% 78% at 80% 50%, rgba(0, 157, 222, .20), transparent 62%),
    linear-gradient(115deg, #f3f9fe 0%, #e9f3fd 46%, #d3e7f8 100%);
  color: var(--ink); opacity: 1; transition: opacity .8s ease, visibility .8s;
}
.intro.hide { opacity: 0; visibility: hidden; }
.intro .kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .34em; color: var(--brand-2); opacity: 0; transition: opacity .6s ease; }
.intro.started .kicker { opacity: 1; }

/* 上部シークバー（年号と連動） */
.intro-topbar { position: fixed; top: 0; left: 0; right: 0; height: 6px; background: #dfe9f4; z-index: 122; }
.intro-topbar-fill {
  width: 0; height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-2) 55%, var(--accent));
  box-shadow: 0 0 18px rgba(0, 157, 222, .45); transition: width .12s linear;
}

.play-wrap { position: relative; display: flex; align-items: center; justify-content: center; width: 230px; height: 230px; }
.play-rays { position: absolute; top: 50%; left: calc(50% - 6px); transform: translate(-50%, -50%); width: 300px; height: 214px; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .6s ease; }
.intro.started .play-rays { opacity: 1; }
.play-rays .streak { animation: rayTw 2.6s ease-in-out infinite; }
.play-rays .streak:nth-child(2) { animation-delay: .4s; }
.play-rays .streak:nth-child(3) { animation-delay: .8s; }
.play-rays .streak:nth-child(4) { animation-delay: 1.2s; }
.play-rays .streak:nth-child(5) { animation-delay: 1.6s; }
.play-glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 210px; height: 210px; border-radius: 50%;
  z-index: 1; pointer-events: none; opacity: 0; transition: opacity .6s ease;
  background: radial-gradient(closest-side, rgba(51, 180, 232, .55), rgba(0, 157, 222, .12) 60%, transparent 75%);
}
.intro.started .play-glow { opacity: 1; animation: glowPulse 3s ease-in-out infinite; }

/* 面取り三角（▶）＝再生ボタン：ポップで出現、完了後にクリック可(ready) */
.playbtn {
  position: relative; z-index: 3; width: 150px; height: 128px; border: none; cursor: default; background: none; padding: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(.6); transition: transform .3s ease;
}
.playbtn.show { animation: introPop .7s cubic-bezier(.2, .9, .3, 1.25) forwards; }
.playbtn.ready { cursor: pointer; }
.playbtn.ready:hover { transform: scale(1.07); }
.playbtn.ready::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 182px; height: 182px; transform: translate(-50%, -50%);
  border-radius: 50%; border: 2px solid var(--brand-2); opacity: 0; animation: readyPulse 1.8s ease-out infinite;
}
.play-tri { height: 112px; width: auto; filter: drop-shadow(0 10px 24px rgba(4, 22, 55, .35)); }

/* 年号カウント／記念ロゴを同じ枠でクロスフェード */
.intro-stage-slot { position: relative; width: 100%; height: 136px; display: flex; align-items: center; justify-content: center; }
.intro-counter { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; transition: opacity .5s ease; }
.intro-counter.gone { opacity: 0; }
.intro-year {
  font-family: var(--en); font-weight: 800; font-size: clamp(56px, 9vw, 112px); line-height: 1; letter-spacing: .01em;
  background: linear-gradient(120deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.intro-year small { font-size: .42em; vertical-align: super; margin-left: 2px; }
.intro-since { font-family: var(--mono); font-size: 11.5px; letter-spacing: .3em; color: var(--brand-2); }
.intro-logo {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.9); height: 128px; width: auto;
  filter: drop-shadow(0 6px 18px rgba(6, 72, 157, .18)); opacity: 0; transition: opacity .6s ease, transform .6s ease; pointer-events: none;
}
.intro-logo.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* 段階テキスト（フェード切替） */
.intro-title { font-size: clamp(22px, 4vw, 34px); line-height: 1.35; font-weight: 800; color: var(--ink); }
.intro-sub { font-size: 13px; color: var(--brand-2); font-family: var(--mono); letter-spacing: .08em; }
.fade-switch { opacity: 0; transition: opacity .5s ease, transform .5s ease; transform: translateY(10px); }
.fade-switch.in { opacity: 1; transform: none; }
.fade-switch.hide { opacity: 0; transform: translateY(-8px); }

/* ===== 起動演出：再生ボタン(▶)が横に伸びてヘッダーのシークバーへ変化 ===== */
.launch-bar {
  position: fixed; left: 50%; top: 52%; z-index: 118; width: 120px; height: 16px; border-radius: 99px;
  transform: translate(-50%, -50%); pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, var(--brand), var(--brand-2) 55%, var(--accent));
  box-shadow: 0 0 22px 5px rgba(0, 157, 222, .5);
}
.launch-bar.go { animation: stretchToSeek .95s cubic-bezier(.5, 0, .15, 1) forwards; }
/* ▶ボタン自身も横へ伸びて線状に潰れる＝シークバー化の予兆 */
.playbtn.launch { animation: btnFlatten .55s cubic-bezier(.5, 0, .2, 1) forwards !important; }

/* ===== スティッキーヘッダー（動画のシークバー風） ===== */
/* R-07: 背景は白透過をやめ不透過の白＋下罫線。高さ・ロゴ縮尺はコーポレート寄りに控えめ化 */
.player {
  position: fixed; top: 0; left: 0; right: 0; z-index: 70; background: #fff;
  border-bottom: 1px solid var(--line); transform: translateY(-110%); transition: transform .6s ease;
}
.player.on { transform: none; }
.player-in { max-width: 1120px; margin: 0 auto; padding: 11px 24px; display: flex; align-items: center; gap: 16px; }
.player .logo {
  font-family: var(--mono); font-weight: 700; letter-spacing: .04em; font-size: 14px; color: var(--brand);
  white-space: nowrap; display: flex; align-items: center; gap: 8px;
  text-decoration: none; cursor: pointer; /* ロゴクリックでページ上部へ */
}
.player .logo b { color: var(--brand); margin-left: 3px; }
.player .logo .corp-logo { height: 22px; width: auto; display: block; }
/* R-11: シークバーをクリック／ドラッグで任意位置へスクロールできるようにする */
.seek { flex: 1; position: relative; height: 26px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.seek .track { position: relative; width: 100%; height: 6px; border-radius: 99px; background: #dfe6ef; }
.seek .fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2) 55%, var(--accent)); transition: width .08s linear;
}
.seek .knob {
  position: absolute; top: 50%; width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 2px solid var(--brand);
  transform: translate(-50%, -50%); transition: left .08s linear; box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}
/* R-03: 「ここから40年を再生中」吹き出しは廃止。再生直後の軽い強調のみ残す */
.player.cueing .fill { box-shadow: 0 0 0 0 rgba(253, 208, 0, .6); animation: seekGlow 1.1s ease-in-out 3; }
.player.cueing .knob { animation: knobBounce 1.1s ease-in-out 3; }
.player .nav-links { display: flex; gap: 15px; font-size: 13px; }
.player .nav-links a { color: var(--ink-soft); text-decoration: none; white-space: nowrap; transition: color .2s; }
.player .nav-links a:hover, .player .nav-links a.active { color: var(--brand); font-weight: 700; }
.player .nav-links .corp-in-menu { display: none; } /* メニュー内のコーポレート導線はスマホ時のみ表示 */
.player .corp { font-size: 12px; color: #fff; background: var(--brand); border-radius: 7px; padding: 7px 12px; text-decoration: none; white-space: nowrap; }
/* ハンバーガー（スマホ/タブレットで表示） */
.player .nav-toggle { display: none; width: 40px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.player .nav-toggle span { display: block; width: 20px; height: 2px; background: var(--brand); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.player .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.player .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.player .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== ライトボックス（画像＋下部に説明文一言） ===== */
.lightbox { position: fixed; inset: 0; height: 100vh; height: 100dvh; z-index: 200; display: none; align-items: center; justify-content: center; padding: 24px; }
.lightbox.open { display: flex; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(6, 18, 40, .72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s; }
.lightbox.open .lb-backdrop { opacity: 1; }
.lb-inner {
  position: relative; z-index: 2; max-width: 860px; width: 100%; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  background: #fff; border-radius: 18px; overflow: auto; box-shadow: 0 40px 90px rgba(6, 25, 55, .5);
  transform: scale(.94); opacity: 0;
  transition: transform .32s cubic-bezier(.2, .8, .2, 1), opacity .32s;
}
.lightbox.open .lb-inner { transform: none; opacity: 1; }
.lb-close {
  position: absolute; top: 12px; right: 12px; z-index: 4; width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, .9); color: var(--brand); font-size: 22px; line-height: 1; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .2);
}
.lb-close:hover { background: #fff; }
.lb-media {
  position: relative; width: 100%; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #cfe0f5, #e9f2fc); color: rgba(6, 72, 157, .55); font-family: var(--mono); letter-spacing: .12em;
}
.lb-media img { width: 100%; height: 100%; object-fit: cover; }
.lb-media.logo { background: #fff; }
.lb-media .lb-ph b { font-family: var(--en); font-size: clamp(34px, 6vw, 64px); display: block; line-height: 1; text-align: center; }
.lb-media .lb-ph small { display: block; text-align: center; font-size: 12px; letter-spacing: .2em; margin-top: 6px; }
.lb-cap { padding: 16px 22px; font-size: 14.5px; color: #22374f; line-height: 1.7; }
.lb-cap .lb-tmp { margin-left: 8px; }
.lb-logo { max-width: 90%; max-height: 72vh; object-fit: contain; display: block; margin: auto; }

/* ===== R-10：ヒストリー操作ボタン（次へ／始めから・小さめ） ===== */
.hist-nav {
  position: fixed; right: 16px; z-index: 150; display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 255, 255, .92); color: var(--brand); border: 1px solid var(--brand-2); border-radius: 99px;
  padding: 7px 14px; font: 700 12px var(--sans); cursor: pointer; box-shadow: 0 8px 20px rgba(6, 72, 157, .22);
  transition: transform .2s ease, opacity .3s ease;
}
.hist-nav.skip { bottom: 18px; }
.hist-nav.restart { top: 70px; }
.hist-nav:hover { transform: translateY(-2px); background: #fff; }
.hist-nav .ar { color: var(--accent); font-size: 13px; }
.hist-nav.hidden { opacity: 0; pointer-events: none; }

/* ===== 社員コメント全文モーダル（VOICES：ライトボックスと同系） ===== */
/* height に dvh を用い、スマホのアドレスバーを除いた“見えている範囲”の中央に出す */
.vmodal { position: fixed; inset: 0; height: 100vh; height: 100dvh; z-index: 200; display: none; align-items: center; justify-content: center; padding: 24px; }
.vmodal.open { display: flex; }
.vm-bd { position: absolute; inset: 0; background: rgba(6, 18, 40, .72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.vm-in {
  position: relative; z-index: 2; max-width: 560px; width: 100%;
  max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); display: flex; flex-direction: column; /* 長文でもビューポート内に収め中央維持 */
  background: #fff; border-radius: 18px; overflow: hidden;
  box-shadow: 0 40px 90px rgba(6, 25, 55, .5);
}
.vm-hd { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.vm-hd .av { position: relative; width: 46px; height: 46px; border-radius: 50%; overflow: hidden; border: 1px solid var(--line); background: #eef5fc; flex: 0 0 auto; }
.vm-hd .av img { width: 100%; height: 100%; object-fit: cover; }
.vm-hd .av .aibadge { position: absolute; right: -1px; bottom: -1px; background: var(--brand); color: #fff; font-family: var(--en); font-size: 7px; font-weight: 800; padding: 2px 3px; border-radius: 6px 0 11px 0; line-height: 1; }
.vm-hd .who { font-size: 14px; font-weight: 800; color: var(--ink); }
.vm-hd .who small { display: block; font-family: var(--mono); font-size: 11px; color: var(--ink-soft); font-weight: 400; margin-top: 2px; }
.vm-close { margin-left: auto; width: 36px; height: 36px; border: none; border-radius: 50%; cursor: pointer; background: #eef2f8; color: var(--brand); font-size: 20px; line-height: 1; }
.vm-close:hover { background: #e3ebf5; }
.vm-text { padding: 20px 22px; font-size: 14px; line-height: 1.85; color: #22374f; white-space: pre-line; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
