/* 公式キービジュアル（黒・ロイヤルブルー・シルバー）に合わせる。
   --blue 系はテーマのアクセント色で、赤テーマ（[data-theme="red"]）では赤に置き換わる */
:root {
  --ink: #03050c;
  --ink-rgb: 3 5 12;
  --ink-2: #0a1230;
  --blue: #2457ff;
  --blue-hi: #5b8cff;
  --blue-rgb: 36 87 255;
  --blue-hi-rgb: 91 140 255;
  --navy-rgb: 10 30 120;
  --panel: #0b1229;
  --panel-2: var(--panel-2);
  --silver: #c8d0dc;
  --white: #ffffff;
  --dim: #8f9ab3;
  --pi: #1d4ed8;   /* パナソニック */
  --ff: #d4142a;   /* 富士通 */
  --cond: "Barlow Condensed", "Zen Kaku Gothic New", sans-serif;
  --jp: "Zen Kaku Gothic New", system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 80px);
  --cut: 12px; /* 斜めカットの深さ（.btn, .countdown） */
}

/* 赤テーマ。ページを開くたびに青とランダムで切り替える（index.html の head で data-theme を決める） */
:root[data-theme="red"] {
  --ink: #0a0304;
  --ink-rgb: 10 3 4;
  --ink-2: #2a0a10;
  --blue: #e3122d;
  --blue-hi: #ff5c64;
  --blue-rgb: 227 18 45;
  --blue-hi-rgb: 255 92 100;
  --navy-rgb: 110 8 20;
  --panel: #22090d;
  --panel-2: #1a0609;
  --silver: #dccfd0;
  --dim: #b39a9d;
}

*, *::before, *::after { box-sizing: border-box; }
h1, h2, p, ol, ul, dl, dd { margin: 0; }
ol, ul { list-style: none; padding: 0; }
img { display: block; max-width: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--white);
  font-family: var(--jp);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  word-break: auto-phrase; /* 和文を文節で折り返す */
}

a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue-hi); outline-offset: 4px; }

/* 斜めカットの塗りボタン。--cut で角の深さを変える */
.btn {
  display: inline-flex; align-items: center;
  padding: 12px 28px 12px 22px;
  background: var(--blue); color: var(--white); text-decoration: none; font-weight: 700;
  clip-path: polygon(var(--cut) 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%);
}
.btn:hover { background: var(--blue-hi); }

.tag {
  font-family: var(--cond);
  font-weight: 800;
  font-style: italic;
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  letter-spacing: 0.08em;
  color: var(--blue-hi);
}

.section-head { padding: 0 var(--gutter); }
.section-head h2 {
  margin-top: 0.25rem;
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.15;
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.hero__media { position: absolute; inset: 0; z-index: -3; background: var(--ink); }
.hero__poster {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.1);
  transform: scale(1.06);
}

/* YouTube を背景動画として cover で敷く */
.hero__video {
  position: absolute; top: 50%; left: 50%;
  width: max(100vw, 177.78svh);
  height: max(56.25vw, 100svh);
  transform: translate(-50%, -50%) scale(1.18);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero__video.is-playing { opacity: 1; }
.hero__video iframe { width: 100%; height: 100%; border: 0; }

.hero__shade {
  position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(to top, var(--ink) 4%, rgb(var(--ink-rgb) / 0.55) 40%, rgb(var(--ink-rgb) / 0.25) 70%, rgb(var(--ink-rgb) / 0.6) 100%),
    linear-gradient(100deg, rgb(var(--navy-rgb) / 0.55), transparent 60%);
}

/* キービジュアルの斜めの光 */
.hero__slash {
  position: absolute; z-index: -1;
  right: -12%; top: -20%;
  width: 60%; height: 120%;
  background: linear-gradient(115deg, transparent 0 46%, rgb(var(--blue-rgb) / 0.55) 46% 49%, transparent 49% 53%, rgb(var(--blue-hi-rgb) / 0.25) 53% 54%, transparent 54%);
  mix-blend-mode: screen;
}

/* エンブレムが主役。左右対称なので、文字もすべて中心軸にそろえて下に積む。
   日時とカウントダウンは 1 段にまとめて横に並べる */
.hero__body {
  padding: 12vh var(--gutter) clamp(32px, 6vh, 64px);
  display: grid;
  justify-items: center;
  text-align: center;
}

.hero__logo {
  /* 横長のエンブレム（1600×1028）。文字の段が下に入るよう、高さは画面の半分ほどに抑える */
  width: min(100%, 64svh, 860px);
  margin-bottom: clamp(16px, 3vh, 28px);
}
.hero__logo img { display: block; width: 100%; height: auto; filter: drop-shadow(0 10px 40px rgb(var(--blue-rgb) / 0.5)); }

.hero__official {
  font-weight: 700;
  font-size: clamp(0.85rem, 1.4vw, 1.1rem);
  letter-spacing: 0.06em;
  color: var(--silver);
  word-break: keep-all; /* 空白の位置でだけ折り返す */
}

.hero__copy {
  margin-top: clamp(12px, 2vh, 24px);
  font-weight: 900;
  font-size: clamp(1.6rem, 4.4vw, 3.6rem);
  line-height: 1.2;
  letter-spacing: 0.04em;
  font-style: italic;
  transform: skewX(-6deg);
}

.hero__meta {
  margin-top: clamp(16px, 3vh, 36px);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 16px clamp(24px, 3vw, 48px);
}
.hero__meta .hero__when { margin-top: 0; justify-content: center; }
/* .hero__when と .hero__official はチケットページの見出しでも使う（左寄せ） */
.hero__when {
  margin-top: clamp(20px, 4vh, 40px);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25em 1.25em;
  font-family: var(--cond);
  font-weight: 800;
  font-style: italic;
}
.hero__date { font-size: clamp(2.8rem, min(8vw, 9svh), 6rem); line-height: 0.9; }
.hero__y { font-size: 0.42em; margin-right: 0.2em; color: var(--silver); }
.hero__dow { font-size: 0.42em; margin-left: 0.3em; color: var(--blue-hi); }
.hero__venue { font-size: clamp(1.4rem, 3vw, 2.4rem); letter-spacing: 0.04em; }
.hero__venue span { margin-left: 0.6em; font-family: var(--jp); font-style: normal; font-size: 0.5em; color: var(--dim); }

.countdown {
  padding: 12px 22px 12px 26px;
  background: var(--blue);
  clip-path: polygon(var(--cut) 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%);
  font-family: var(--cond);
  font-style: italic;
  text-align: right;
}
.countdown__days { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.countdown__n { font-weight: 900; font-size: clamp(2.6rem, 6vw, 4.5rem); line-height: 1; }
.countdown__u { font-weight: 800; font-size: 0.95rem; line-height: 1; letter-spacing: 0.06em; text-align: left; }
.countdown__clock {
  margin-top: 4px;
  font-weight: 800;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.hero__scroll {
  position: absolute; right: var(--gutter); top: 50%;
  writing-mode: vertical-rl;
  font-family: var(--cond); font-weight: 800; letter-spacing: 0.3em; font-size: 0.8rem;
  text-decoration: none; color: var(--silver);
}
.hero__scroll::after {
  content: ""; display: block; width: 1px; height: 64px; margin: 12px auto 0;
  background: linear-gradient(var(--silver), transparent);
}

/* --- 登場: ロゴが叩きつけられる（1 回だけ） --- */
@media (prefers-reduced-motion: no-preference) {
  .hero__logo img { animation: slam 0.9s cubic-bezier(0.2, 1.4, 0.4, 1) 0.2s both; }
  /* transform ではなく translate を動かし、.hero__copy の skewX を上書きしない */
  .hero__official, .hero__copy, .hero__when, .countdown { animation: rise 0.7s ease-out both; }
  .hero__official { animation-delay: 0.9s; }
  .hero__copy { animation-delay: 1.05s; }
  .hero__when { animation-delay: 1.2s; }
  .countdown { animation-delay: 1.35s; }
  .hero::after {
    content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background: var(--white);
    animation: flash 0.6s ease-out 0.55s both;
  }
}
@keyframes slam {
  0% { opacity: 0; transform: scale(1.8) skewX(-12deg); filter: blur(14px); }
  60% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: none; }
}
@keyframes pop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }
@keyframes flash { 0% { opacity: 0; } 15% { opacity: 0.45; } 100% { opacity: 0; } }

/* =========================================================
   ROAD TO TOKYO DOME
   ========================================================= */

.road {
  padding: clamp(80px, 14vh, 160px) 0;
  background:
    radial-gradient(70% 50% at 80% 0%, rgb(var(--blue-rgb) / 0.18), transparent 70%),
    var(--ink);
}

.road__lead { margin-top: 1rem; max-width: 44em; color: var(--silver); }
.road__asof { margin-top: 0.25rem; font-size: 0.8rem; color: var(--dim); }
.road__chart { margin: 2.5rem var(--gutter) 0; overflow-x: auto; }
.road__note { margin: 1.25rem var(--gutter) 0; max-width: 56em; font-size: 0.8rem; color: var(--dim); }

/* --- バンプチャート（線の色は各チームの --c） --- */
.bump { display: block; width: 100%; min-width: 720px; height: auto; }
.bump__zone { fill: rgb(var(--blue-rgb) / 0.09); }
.bump__byeline { stroke: rgb(255 255 255 / 0.25); stroke-dasharray: 4 6; }
.bump__zonelabel {
  fill: var(--blue-hi); font-size: 13px; font-weight: 700;
  paint-order: stroke; stroke: var(--ink); stroke-width: 4px; pointer-events: none;
}
.bump__zonelabel--bye { fill: var(--silver); }
.bump__round { fill: var(--dim); font-family: var(--cond); font-weight: 800; font-size: 15px; }
.bump__rank { fill: var(--dim); font-family: var(--cond); font-weight: 900; font-style: italic; font-size: 18px; }

.bump__team { cursor: pointer; outline: none; transition: opacity 0.2s; }
.bump__line { fill: none; stroke: var(--c); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; transition: stroke-width 0.2s; }
.bump__dot { fill: var(--ink); stroke: var(--c); stroke-width: 2.5; }
.bump__badge { fill: var(--white); stroke: var(--c); stroke-width: 3; }
.bump__label { fill: var(--white); font-size: 15px; font-weight: 700; }
/* 圏外のチームは少し沈めて、進出争いを前に出す */
.bump__team:is(.is-chase, .is-out) { opacity: 0.55; }

/* エンブレムは自分の線（offset-path）の終点＝最新節の位置に置く */
.bump__rider { offset-distance: 100%; offset-rotate: 0deg; }

/* :has() で、触れている 1 チーム以外を沈める */
.bump:has(.bump__team:is(:hover, :focus-visible)) .bump__team:not(:hover, :focus-visible) { opacity: 0.12; }
.bump__team:is(:hover, :focus-visible) { opacity: 1; }
.bump__team:is(:hover, :focus-visible) .bump__line { stroke-width: 7; }

/* スクロール連動アニメーション: チャート全体の見え方（--bump）に合わせて、エンブレムが第1節から線を引きながら進む。
   各要素自身の view() だと、動くエンブレムの位置でタイムラインがずれるので、チャートの箱を基準にする */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .road__chart { view-timeline: --bump block; }
    .bump__line, .bump__rider, .bump__dot, .bump__label {
      animation-timeline: --bump;
      animation-range: entry 10% cover 50%;
      animation-timing-function: linear;
      animation-fill-mode: both;
    }
    .bump__line { stroke-dasharray: 1; animation-name: draw; }
    .bump__rider { animation-name: ride; }
    .bump__dot, .bump__label { animation-name: fade-in; animation-range: cover 40% cover 50%; }
  }
}
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes ride { from { offset-distance: 0%; } to { offset-distance: 100%; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.emblem {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: 0 0 0 3px var(--c, transparent);
  overflow: hidden;
}
.emblem img { width: 78%; height: 78%; object-fit: contain; }

.form {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 22px; padding: 0 4px;
  font-family: var(--cond); font-style: normal; font-weight: 800; font-size: 0.85rem;
  background: rgb(255 255 255 / 0.1); color: var(--silver);
}
.form--W { background: var(--blue); color: var(--white); }
.form--T { background: #5b6478; color: var(--white); }

/* --- チームカード（Popover） --- */
.teampop {
  width: min(560px, calc(100vw - 32px));
  max-height: min(80vh, 640px);
  overflow: auto;
  padding: 20px;
  border: 0;
  border-top: 4px solid var(--c, var(--blue));
  background: var(--panel);
  color: var(--white);
  box-shadow: 0 30px 80px rgb(0 0 0 / 0.6);
  opacity: 1;
  transform: none;
  transition: opacity 0.2s, transform 0.2s, overlay 0.2s allow-discrete, display 0.2s allow-discrete;
}
.teampop:not(:popover-open) { opacity: 0; transform: translateY(8px); }
@starting-style { .teampop:popover-open { opacity: 0; transform: translateY(8px); } }
.teampop::backdrop { background: rgb(0 0 0 / 0.45); }

.teampop__head { display: flex; align-items: center; gap: 14px; padding-right: 32px; }
.teampop__name { font-weight: 900; font-size: 1.2rem; }
.teampop__rec { color: var(--silver); font-size: 0.85rem; }
.teampop__status { margin-top: 12px; display: inline-block; padding: 2px 10px; font-size: 0.8rem; font-weight: 700; background: rgb(255 255 255 / 0.08); }
.teampop__status:is(.is-bye, .is-clinched) { background: var(--blue); }
.teampop__cols { margin-top: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.teampop__h { font-weight: 700; font-size: 0.8rem; color: var(--blue-hi); margin-bottom: 6px; }
.teampop__cols ol { list-style: none; padding: 0; display: grid; gap: 4px; font-size: 0.85rem; }
.teampop__cols li { display: grid; grid-template-columns: 3.4em minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.teampop__date { color: var(--dim); font-family: var(--cond); font-weight: 800; }
.teampop__none { color: var(--dim); font-size: 0.85rem; }
@media (max-width: 560px) {
  .teampop__cols { grid-template-columns: minmax(0, 1fr); }
}
.teampop__close {
  position: absolute; top: 10px; right: 12px;
  width: 32px; height: 32px;
  border: 0; background: none; color: var(--silver);
  font-size: 1.4rem; line-height: 1; cursor: pointer;
}

/* =========================================================
   MEMORIAL WALL
   ========================================================= */

.wall {
  position: relative;
  height: 170vh;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  place-items: center;
}

.wall__grid {
  position: absolute; inset: -30% -20%;
  z-index: -1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  transform: rotate(-9deg);
}

.wall__col { display: grid; gap: 14px; align-content: start; will-change: transform; }
.wall__col:nth-child(even) { margin-top: -18vh; }
.wall__col img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  filter: grayscale(1) contrast(1.15) brightness(0.55);
}
/* 何枚かだけカラーで残す */
.wall__col:nth-child(1) img:nth-child(3),
.wall__col:nth-child(3) img:nth-child(5),
.wall__col:nth-child(4) img:nth-child(2) { filter: none; }

.wall::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 45% at 50% 50%, rgb(var(--ink-rgb) / 0.85), transparent 100%),
    linear-gradient(var(--ink), transparent 18%, transparent 82%, var(--ink)),
    rgb(var(--blue-rgb) / 0.28);
}

.wall__text { text-align: center; padding: 0 var(--gutter); position: sticky; top: 30vh; }
.wall__years {
  font-family: var(--cond);
  font-weight: 900;
  font-style: italic;
  font-size: clamp(3.5rem, 13vw, 12rem);
  line-height: 0.85;
  letter-spacing: -0.01em;
  color: transparent;
  -webkit-text-stroke: 2px var(--white);
}
.wall__years span { margin: 0 0.1em; -webkit-text-stroke: 0; color: var(--blue-hi); }
.wall__title {
  margin-top: 1.5rem;
  font-weight: 900;
  font-size: clamp(1.5rem, 3.6vw, 3rem);
  line-height: 1.35;
  text-shadow: 0 4px 30px rgb(0 0 0 / 0.8);
}

/* =========================================================
   LAST TIME
   ========================================================= */

.last {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  min-height: 100svh;
  background: var(--ink);
}

.last__photo { position: relative; overflow: hidden; clip-path: polygon(0 0, 100% 0, 86% 100%, 0 100%); }
.last__photo img { width: 100%; height: 100%; object-fit: cover; }

.last__body { padding: clamp(48px, 10vh, 120px) var(--gutter) clamp(48px, 10vh, 120px) clamp(24px, 3vw, 48px); align-self: center; }
.last__title { margin-top: 0.5rem; font-weight: 900; font-size: clamp(1.8rem, 3.4vw, 3rem); line-height: 1.3; }

.linescore {
  margin-top: 2rem;
  font-family: var(--cond);
  font-weight: 800;
  border-top: 2px solid var(--white);
}
.linescore__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(4, 2.2em) 3em;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgb(255 255 255 / 0.18);
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  text-align: center;
}
.linescore__row > :first-child { text-align: left; }
.linescore__row:not(.linescore__head) > :first-child { font-family: var(--jp); font-weight: 700; font-size: 0.8em; }
.linescore__row:not(.linescore__head) > :last-child { font-size: 1.5em; font-style: italic; }
.linescore__head { color: var(--dim); font-size: 0.95rem; }
.linescore__row.is-win > :last-child { color: var(--blue-hi); }

.stats {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 32px;
}
.stats b {
  font-family: var(--cond);
  font-weight: 900;
  font-style: italic;
  font-size: clamp(3rem, 5.5vw, 4.75rem);
  line-height: 0.9;
}
.stats span { margin-left: 0.4em; font-family: var(--cond); font-weight: 800; font-style: italic; color: var(--blue-hi); font-size: 1.2rem; }
.stats p { margin-top: 0.4rem; color: var(--dim); font-size: 0.875rem; }

.link-pdf {
  display: inline-block;
  margin-top: 2.5rem;
  padding: 0.85em 1.6em;
  border: 2px solid var(--white);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.link-pdf:hover { background: var(--white); color: var(--ink); }

/* =========================================================
   CHAMPIONS
   ========================================================= */

.champs { padding: clamp(80px, 14vh, 160px) 0; background: linear-gradient(var(--ink), var(--ink-2)); }

.champs__list {
  margin-top: 2.5rem;
  padding: 0 var(--gutter) 16px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(270px, 1fr);
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
}

.champ {
  --team: var(--pi);
  position: relative;
  scroll-snap-align: start;
  padding: 24px 22px 22px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--team) 70%, black) 0%, var(--panel-2) 70%);
  border-top: 6px solid var(--team);
  overflow: hidden;
}
.champ--ff { --team: var(--ff); }

.champ__no {
  position: absolute; right: -8px; top: -18px;
  font-family: var(--cond); font-weight: 900; font-style: italic;
  font-size: 9rem; line-height: 1;
  color: rgb(255 255 255 / 0.1);
}
.champ__date { font-family: var(--cond); font-weight: 800; font-size: 1.1rem; color: var(--silver); }
.champ__winner { margin-top: 0.75rem; font-weight: 900; font-size: 1.45rem; line-height: 1.25; }
.champ__score {
  margin-top: 0.5rem;
  font-family: var(--cond); font-weight: 900; font-style: italic;
  font-size: 4.25rem; line-height: 1;
}
.champ__score i { margin: 0 0.12em; color: var(--silver); }
.champ__loser { color: var(--silver); font-size: 0.9rem; }
.champ__meta { margin-top: 1rem; display: grid; gap: 2px; font-size: 0.875rem; }
.champ__meta div { display: flex; gap: 0.75em; }
.champ__meta dt { font-family: var(--cond); font-weight: 800; color: var(--silver); min-width: 2.6em; }
.champ__links { margin-top: 1.25rem; display: flex; gap: 16px; font-size: 0.875rem; font-weight: 700; }

/* =========================================================
   HISTORY
   ========================================================= */

.history { padding: clamp(80px, 14vh, 160px) 0; background: var(--ink-2); }

.history__list { margin-top: 2.5rem; padding: 0 var(--gutter); }
.history__list li {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  align-items: center;
  gap: clamp(16px, 4vw, 64px);
  padding: 12px 0;
  border-top: 1px solid rgb(255 255 255 / 0.12);
}
.history__list b {
  font-family: var(--cond); font-weight: 900; font-style: italic;
  font-size: clamp(4rem, 12vw, 10rem);
  line-height: 0.95;
  color: transparent;
  -webkit-text-stroke: 1.5px rgb(255 255 255 / 0.7);
}
.history__list .is-now b { color: var(--blue); -webkit-text-stroke: 0; }
.history__list p { max-width: 32em; color: var(--silver); }
.history__list strong { display: block; color: var(--white); font-size: 1.25rem; font-weight: 900; }

/* =========================================================
   VIDEOS
   ========================================================= */

.videos { padding: clamp(80px, 14vh, 160px) 0; }
.videos__list {
  margin-top: 2.5rem;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.videos__list li:first-child { grid-column: span 2; grid-row: span 2; }

.yt {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  background: #000;
  color: var(--white);
  cursor: pointer;
  overflow: hidden;
  font: inherit;
  text-align: left;
}
.yt img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.yt:hover img { transform: scale(1.04); }
.yt::before {
  content: ""; position: absolute; left: 50%; top: 50%; z-index: 1;
  width: 64px; height: 64px; margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: rgb(var(--blue-rgb) / 0.9) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 28px no-repeat;
}
.yt__label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px 14px 10px;
  background: linear-gradient(transparent, rgb(0 0 0 / 0.85));
  font-weight: 700; font-size: 0.9rem;
}
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* =========================================================
   NEXT
   ========================================================= */

.next { position: relative; isolation: isolate; padding: clamp(96px, 18vh, 200px) var(--gutter); overflow: hidden; }
.next__bg { position: absolute; inset: 0; z-index: -1; }
.next__bg img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(0.35); }
.next__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(var(--navy-rgb) / 0.92) 0%, rgb(var(--navy-rgb) / 0.55) 60%, rgb(var(--ink-rgb) / 0.4)); }
.next h2 { margin-top: 0.25rem; font-weight: 900; font-size: clamp(2.2rem, 6vw, 5rem); line-height: 1.1; }
.next__info { margin-top: 2.5rem; max-width: 40rem; }
.next__info div {
  display: grid; grid-template-columns: 6em minmax(0, 1fr); gap: 1em;
  padding: 0.9rem 0;
  border-top: 1px solid rgb(255 255 255 / 0.3);
  font-size: 1.05rem;
}
.next__info dt { font-weight: 700; color: var(--silver); }
.next__info dd { font-weight: 700; }
.next__info small { display: block; font-weight: 500; font-size: 0.8rem; color: var(--silver); }
.next__ticket { display: flex; width: fit-content; margin-top: 0.75rem; font-size: 0.95rem; }

/* =========================================================
   TICKET STUB: 右下に浮くチケット半券。ヒーローを過ぎたら滑り込み、ゆっくり上下する
   ========================================================= */

.stub {
  --stub: #ff8a1f; /* テーマの青・赤どちらでも目立つよう、半券だけオレンジで固定 */
  position: fixed; right: 20px; bottom: 20px; z-index: 5;
  display: flex; align-items: center;
  background: var(--stub); color: var(--white); text-decoration: none;
  clip-path: polygon(var(--cut) 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%);
  /* 半券のミシン目: TICKET と本文の境に上下から切り欠きを入れる */
  --notch: 120px;
  mask:
    radial-gradient(circle at var(--notch) 0, transparent 7px, #000 7.5px),
    radial-gradient(circle at var(--notch) 100%, transparent 7px, #000 7.5px);
  mask-composite: intersect;
  -webkit-mask-composite: source-in;
  box-shadow: 0 12px 32px rgb(var(--ink-rgb) / 0.6);
  transform: translateX(140%) rotate(-4deg);
  transition: transform 0.6s cubic-bezier(0.2, 1.2, 0.3, 1);
}
.stub.is-visible { transform: translateX(0) rotate(-4deg); }
.stub.is-visible:hover, .stub.is-visible:focus-visible { transform: translateX(0) rotate(0) scale(1.04); }
.stub__tag {
  padding: 26px 30px 26px 42px;
  border-right: 2px dashed rgb(255 255 255 / 0.65);
  font-family: var(--cond); font-style: italic; font-weight: 900; font-size: 2.6rem; letter-spacing: 0.06em; line-height: 1;
}
.stub__text { padding: 26px 46px 26px 28px; font-weight: 700; font-size: 1.55rem; }

@media (prefers-reduced-motion: no-preference) {
  .stub.is-visible { animation: bob 3.2s ease-in-out 0.6s infinite; }
  .stub.is-visible:hover, .stub.is-visible:focus-visible { animation: none; }
  @keyframes bob {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -6px; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .stub { transition: none; }
}
@media (max-width: 820px) {
  .stub { right: 12px; bottom: 12px; --notch: 86px; }
  .stub__tag { padding: 18px 20px 18px 30px; font-size: 1.8rem; }
  .stub__text { padding: 18px 30px 18px 18px; font-size: 1.25rem; }
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer { padding: 56px var(--gutter) 160px; /* 下は右下の半券（.stub）に隠れない分 */ display: grid; gap: 16px; font-size: 0.8rem; color: var(--dim); }
.footer__logo { width: 180px; height: auto; }
.footer__links { display: flex; flex-wrap: wrap; gap: 20px; color: var(--silver); }

/* =========================================================
   small screens
   ========================================================= */

@media (max-width: 820px) {
  .hero__body {
    padding-top: 10vh;
  }
  .hero__scroll { display: none; }
  .wall { height: 130vh; }
  .wall__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); inset: -20% -40%; }
  .wall__col:nth-child(n + 4) { display: none; }
  .last { grid-template-columns: minmax(0, 1fr); }
  .last__photo { height: 56vh; clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%); }
  .last__body { padding: 32px var(--gutter) 72px; }
  .videos__list { grid-template-columns: minmax(0, 1fr); }
  .videos__list li:first-child { grid-column: auto; grid-row: auto; }
  .history__list li { grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 20px 0; }
}
