/* 02_text-particles — 架空の催し「川あかりの夕べ」。夜の川と灯籠の色 */
:root {
  --night: #081219;
  --paper: #f3e6cf;
  --paper-dim: rgba(243, 230, 207, .62);
  --amber: #f2b15c;
  --mincho: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", "Noto Serif CJK JP", serif;
  --pad: clamp(22px, 4.4vw, 72px);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font-family: var(--mincho);
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
  line-break: strict;
  overflow: hidden;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
br.sp { display: none; }

.stage {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  touch-action: pinch-zoom;   /* 1本指の動きは粒に渡す。2本指の拡大は止めない */
}
.stage__canvas { position: absolute; inset: 0; transition: opacity .9s ease; }
.stage__canvas.is-dim { opacity: 0; }
.stage__canvas canvas { display: block; width: 100%; height: 100%; }

/* WebGL が使えないときの代替表示（粒の代わりに、同じ言葉を文字で出す） */
.stage__word {
  display: none;
  position: absolute; z-index: 1; left: 0; right: 0; top: 40.5%;
  margin: 0; transform: translateY(-50%);
  text-align: center; white-space: nowrap;
  font-size: min(21vw, 34vh, 300px); font-weight: 600; line-height: 1.1; letter-spacing: .1em; text-indent: .1em;
  color: var(--amber);
  transition: opacity .9s ease;
}
.stage.is-static { background: linear-gradient(180deg, #070f16 0%, #0c1d27 55%, #12303a 64%, #0a1a23 66%, #050b10 100%); }
.stage.is-static .stage__word { display: block; }
.stage.is-static .stage__word.is-dim { opacity: 0; }

.stage__head {
  position: absolute; z-index: 2;
  inset: var(--pad) var(--pad) auto var(--pad);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
  pointer-events: none;
}
.stage__head p, .stage__head h1 { margin: 0; }
.stage__event { font-size: clamp(15px, 1.35vw, 20px); font-weight: 600; letter-spacing: .34em; line-height: 1.6; }
.stage__no { display: block; margin-bottom: 6px; font-size: .62em; font-weight: 300; letter-spacing: .5em; color: var(--amber); }
.stage__date { text-align: right; font-size: clamp(11.5px, .95vw, 14px); font-weight: 300; letter-spacing: .22em; line-height: 2; color: var(--paper-dim); }

.stage__foot {
  position: absolute; z-index: 2;
  inset: auto var(--pad) calc(var(--pad) - 6px) var(--pad);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 24px;
  pointer-events: none;
}
.stage__foot p { margin: 0; }
.stage__lead { grid-column: 2; grid-row: 1; text-align: center; font-size: clamp(13px, 1.1vw, 16px); font-weight: 300; letter-spacing: .3em; line-height: 2.1; color: var(--paper-dim); margin-bottom: 26px !important; }
.stage__steps {
  grid-column: 2; grid-row: 2;
  list-style: none; margin: 0; padding: 0;
  display: flex; justify-content: center; gap: clamp(18px, 2.6vw, 44px);
  font-size: 12px; letter-spacing: .3em;
}
.stage__steps li { position: relative; padding-top: 14px; color: rgba(243, 230, 207, .34); transition: color .8s ease; }
.stage__steps li::before {
  content: ""; position: absolute; left: 50%; top: 0; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%;
  background: currentColor; transition: background .8s ease, box-shadow .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
}
.stage__steps li span { display: block; text-indent: .3em; white-space: nowrap; }
.stage__steps li.is-now { color: var(--paper); }
.stage__steps li.is-now::before { background: var(--amber); box-shadow: 0 0 12px 2px rgba(242, 177, 92, .7); transform: scale(1.3); }
.stage__note { grid-column: 3; grid-row: 2; text-align: right; font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif; font-size: 10.5px; letter-spacing: .12em; color: rgba(243, 230, 207, .68); }

/* 左下は見本帳の案内バーが来る（幅およそ 330px）。中央の並びがそこへ届く幅（〜1060px）では、下を空けて縦に積む */
@media (max-width: 1060px) {
  .stage__foot { grid-template-columns: 1fr; gap: 0; bottom: 74px; }
  .stage__lead, .stage__steps, .stage__note { grid-column: 1; }
  .stage__lead { grid-row: 1; margin-bottom: 22px !important; }
  .stage__steps { grid-row: 2; }
  .stage__note { grid-row: 3; text-align: center; margin-top: 22px !important; }
}
@media (max-width: 700px) {
  br.sp { display: inline; }
  .stage__head { flex-direction: column; gap: 14px; }
  .stage__date { text-align: left; line-height: 1.9; }
  .stage__event { letter-spacing: .28em; }
  .stage__lead { letter-spacing: .24em; }
  .stage__steps { gap: 20px; font-size: 11px; letter-spacing: .2em; }
  .stage__steps li span { text-indent: .2em; }
}
/* 背の低い画面（スマホの横向き等）: 説明文を省き、上下の帯を詰めて、全部を画面内に収める */
@media (max-height: 560px) {
  .stage__lead { display: none; }
}
@media (max-height: 480px) {
  .stage__head { top: 16px; flex-direction: row; gap: 24px; }
  .stage__date { text-align: right; line-height: 1.7; }
  .stage__no { margin-bottom: 2px; }
  /* 案内バー（左下）の上に、1行で並べる */
  .stage__foot { bottom: 62px; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 0 20px; }
  .stage__steps { grid-column: 2; grid-row: 1; }
  .stage__note { grid-column: 3; grid-row: 1; margin-top: 0 !important; text-align: right; }
}
@media (prefers-reduced-motion: reduce) {
  .stage__steps li, .stage__steps li::before { transition-duration: .01ms; }
}
