/*
  参加者インタビュー動画の札（src/components/インタビュー動画.astro）と /voices/ のページ（2026-09-28 Opus の骨組み）。
  色と余白は tokens.css の名前だけ（hex を書かない）。見た目の磨きは Codex Astra に渡す。
  守ること：縦 9:16 の枠は先に高さを取る（読み込み中にずれない）／動きは transform と opacity だけ／reduce では動かさない。
*/

/* ---------- 札の列 ---------- */
.iv-list {
  --iv-w: min(64vw, 260px);
  list-style: none;
  margin: 0;
  padding: var(--s-2) var(--s-4) var(--s-6);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--iv-w);
  gap: var(--s-5);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--s-4);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.iv-list::-webkit-scrollbar { display: none; }

@media (min-width: 900px) {
  .iv-list {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    overflow: visible;
    padding-inline: 0;
    gap: var(--s-8) var(--s-6);
  }
}

.iv-card {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  min-width: 0;
  --iv-accent: var(--kh);
}
.iv-th { --iv-accent: var(--th); }
.iv-vn { --iv-accent: var(--vn-deep); }

/* ---------- 表紙と再生 ---------- */
.iv-player {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  border-radius: 6px;
  overflow: hidden;
  background: var(--cinema);
  color: var(--paper);
  text-decoration: none;
  box-shadow: 0 18px 40px -24px var(--ticket-shadow);
}
.iv-player img,
.iv-player video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.iv-player img { transition: transform var(--t-2) var(--ease-out); }
.iv-player::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, color-mix(in srgb, var(--cinema) 78%, transparent) 0%, transparent 42%);
  pointer-events: none;
}
.iv-player.is-playing::after { display: none; }

.iv-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  z-index: 1;
  transition: transform var(--t-1) var(--ease-out);
}
.iv-play i {
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent var(--iv-accent);
}
.iv-length {
  position: absolute;
  top: var(--s-3);
  right: var(--s-3);
  z-index: 1;
  font: 600 12px/1 var(--sans);
  letter-spacing: .04em;
  padding: 6px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--cinema) 60%, transparent);
}
.iv-title {
  position: absolute;
  left: var(--s-4);
  right: var(--s-4);
  bottom: var(--s-4);
  z-index: 1;
  font: 700 17px/1.45 var(--serif);
  text-wrap: balance;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .iv-player:hover img { transform: scale(1.03); }
  .iv-player:hover .iv-play { transform: scale(1.08); }
}
.iv-player:focus-visible { outline: 3px solid var(--iv-accent); outline-offset: 3px; }

/* ---------- 言葉と名前 ---------- */
.iv-quote { margin: 0; }
.iv-quote p {
  margin: 0;
  font: 600 16px/1.75 var(--serif);
  color: var(--ink);
}
.iv-quote p::before { content: '「'; margin-left: -.5em; }
.iv-quote p::after { content: '」'; }
.iv-by {
  margin: 0;
  font: 700 14px/1.5 var(--sans);
  color: var(--ink);
}
.iv-by span {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}
.iv-more {
  margin-top: auto;
  font: 600 13px/1.5 var(--sans);
  color: var(--iv-accent);
  text-decoration: none;
}
.iv-more:hover { text-decoration: underline; }

/* ---------- /voices/ の一覧と 1人のページ ---------- */
.voices-page { background: var(--paper); color: var(--ink); font-family: var(--sans); }
.vp-shell { width: min(1120px, 100% - var(--s-8)); margin-inline: auto; }
.vp-hero { padding: var(--s-32) 0 var(--s-12); }
.vp-label { margin: 0 0 var(--s-3); font: 700 12px/1.4 var(--sans); letter-spacing: .14em; color: var(--kh); }
.vp-hero h1 { margin: 0; font: 700 clamp(30px, 6vw, 46px)/1.35 var(--serif); }
.vp-hero h1 .heading-line { display: block; }
.vp-lead { margin: var(--s-5) 0 0; max-width: 36em; font-size: 15px; line-height: 1.9; color: var(--muted); }
.vp-list { padding-bottom: var(--s-20); }
@media (max-width: 899px) { .vp-list .iv-list { margin-inline: calc(var(--s-4) * -1); } }

.vp-person { padding: var(--s-24) 0 var(--s-20); }
.vp-person-grid { display: grid; gap: var(--s-10); }
@media (min-width: 900px) { .vp-person-grid { grid-template-columns: 340px 1fr; gap: var(--s-16); align-items: start; } .vp-person-film { position: sticky; top: var(--s-24); } }
.vp-person-film .iv-player { width: 100%; max-width: 340px; margin-inline: auto; }
/* 1人のページでは、一言と名前は右の見出しにあるので札の下に出さない */
.vp-person-film .iv-quote,
.vp-person-film .iv-by,
.vp-person-film .iv-title { display: none; }
@media (max-width: 899px) { .vp-person-film .iv-player { max-width: min(340px, 40vh); } }
.vp-person-film .iv-list { padding: 0; overflow: visible; grid-auto-columns: 100%; }
.vp-person h1 { margin: 0; font: 700 clamp(26px, 5vw, 38px)/1.4 var(--serif); }
.vp-person .vp-by { margin: var(--s-3) 0 0; font-size: 14px; color: var(--muted); }
.vp-said { margin: var(--s-10) 0 0; padding: 0; list-style: none; display: grid; gap: var(--s-8); }
.vp-said li { border-top: 1px solid var(--line); padding-top: var(--s-5); }
.vp-said-q { margin: 0; font: 700 13px/1.5 var(--sans); color: var(--kh); }
.vp-said-q small { margin-left: var(--s-2); font-weight: 400; color: var(--muted); }
.vp-said blockquote { margin: var(--s-2) 0 0; font: 500 17px/1.95 var(--serif); }
.vp-note { margin: var(--s-8) 0 0; font-size: 12px; line-height: 1.7; color: var(--muted); }
.vp-next { margin-top: var(--s-12); display: flex; flex-wrap: wrap; gap: var(--s-3); }
.vp-button {
  display: inline-flex; align-items: center; gap: var(--s-2);
  padding: 14px 22px; border-radius: 999px;
  font: 700 15px/1 var(--sans); text-decoration: none;
  background: var(--blue); color: var(--paper);
}
.vp-button-line { background: var(--green); box-shadow: 0 3px 0 var(--line-shadow); }
.vp-others { padding: var(--s-16) 0 var(--s-24); border-top: 1px solid var(--line); }
.vp-others h2 { margin: 0 0 var(--s-6); font: 700 22px/1.5 var(--serif); }
@media (max-width: 899px) { .vp-others .iv-list { margin-inline: calc(var(--s-4) * -1); } }

/* ---------- ほかのページの中に置くとき ---------- */
.iv-block { margin-top: var(--s-12); min-width: 0; }  /* 親が grid（/parents/ の .p-sec）でも、横に送る列が箱を押し広げない */
.iv-block-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-4); }
.iv-block-title { margin: 0; font: 700 clamp(20px, 3.4vw, 26px)/1.5 var(--serif); color: var(--ink); }
.iv-block-all { flex: none; font: 600 13px/1.5 var(--sans); color: var(--kh); text-decoration: none; }
/* スマホでは列を画面の端まで出す。親の左右の余白（既定 16px。/parents/ は 20px）だけ外へ */
@media (max-width: 899px) { .iv-block .iv-list { margin-inline: calc(var(--iv-gutter, var(--s-4)) * -1); padding-inline: var(--iv-gutter, var(--s-4)); scroll-padding-inline: var(--iv-gutter, var(--s-4)); } }
.p-sec { --iv-gutter: var(--s-5); }
.vp-back { color: inherit; text-decoration: none; }
