/* Video player with synced layer list. Loaded only on pages that embed it. */
.vp { margin: 0; }
.vp__frame { position: relative; aspect-ratio: 16 / 9; background: #efe9e0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.vp__video { display: block; width: 100%; height: 100%; object-fit: cover; background: #efe9e0; cursor: pointer; }
.vp__play { position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 0.45rem; min-height: 44px; min-width: 44px; padding: 0 0.95rem 0 0.75rem; border: 1px solid rgba(32, 32, 32, 0.18); border-radius: 999px; background: rgba(243, 239, 229, 0.92); color: var(--ink); font-family: var(--sans); font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: background 0.2s ease, opacity 0.3s ease; }
.vp__play[hidden] { display: none; }
.vp__play:hover, .vp__play:focus-visible { background: var(--paper); }
.vp__play:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vp__play svg { width: 18px; height: 18px; fill: currentColor; }
.vp__icon-pause, .vp__icon-replay { display: none; }
.vp.is-playing .vp__icon-play { display: none; }
.vp.is-playing .vp__icon-pause { display: block; }
.vp.is-ended .vp__icon-play { display: none; }
.vp.is-ended .vp__icon-replay { display: block; }
.vp.is-playing .vp__play { opacity: 0.6; }
.vp.is-playing .vp__play:hover, .vp.is-playing .vp__play:focus-visible { opacity: 1; }
.vp__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(32, 32, 32, 0.08); }
.vp__progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.25s linear; }

/* Desktop: five columns, each layer with its text */
.vp__steps { list-style: none; margin: 1.1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.6rem; }
.vp__steps li { margin: 0; }
.vp__step { width: 100%; height: 100%; display: flex; gap: 0.65rem; align-items: flex-start; text-align: left; padding: 0.85rem 0.85rem 0.95rem; min-height: 44px; border: 1px solid var(--line-faint); border-radius: var(--radius); background: transparent; color: var(--ink-soft); font: inherit; cursor: pointer; transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease; }
.vp__step:hover { border-color: var(--line); }
.vp__step:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vp__step.is-active { border-color: var(--ink); background: var(--paper); color: var(--ink); }
.vp__num { flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 1px solid currentColor; display: inline-flex; align-items: center; justify-content: center; font-family: var(--sans); font-size: 0.75rem; font-weight: 600; }
.vp__step.is-active .vp__num { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.vp__body { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.vp__level { font-family: var(--sans); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600; color: var(--accent); }
.vp__name { font-family: var(--serif); font-size: 1.12rem; line-height: 1.15; color: var(--ink); }
.vp__text { font-family: var(--sans); font-size: 0.78rem; line-height: 1.5; }
.vp__now { display: none; }
.vp__caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Tablets and phones: compact numbered chips, and the current layer explained below */
@media (max-width: 900px) {
  .vp__steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.4rem; margin-top: 0.8rem; }
  .vp__step { flex-direction: column; align-items: center; gap: 0.35rem; padding: 0.6rem 0.25rem 0.55rem; text-align: center; }
  .vp__level, .vp__text { display: none; }
  .vp__name { font-family: var(--sans); font-size: 0.7rem; font-weight: 600; line-height: 1.25; }
  .vp__now { display: block; margin: 0.9rem 0 0; padding: 0.9rem 1rem; border-left: 2px solid var(--ink); background: var(--paper); font-size: 0.92rem; line-height: 1.55; color: var(--ink-soft); min-height: 4.6em; }
  .vp__now-name { display: block; font-family: var(--serif); font-size: 1.1rem; color: var(--ink); margin-bottom: 0.15rem; }
}
@media (max-width: 400px) {
  .vp__name { font-size: 0.62rem; }
  .vp__num { width: 1.45rem; height: 1.45rem; }
}
@media (max-width: 560px) {
  .vp__play { right: 10px; bottom: 10px; padding: 0; justify-content: center; width: 44px; }
  .vp__play .vp__label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .vp__progress span, .vp__step, .vp__play { transition: none; }
}
