/* Interlocked source-art composition proof — injected research only (.ensemble-stage.ik, body.ik-plane).
   v5 integrated plane, static: near-black field above; one flat violet shape whose seigaiha crest carries the cast,
   whose stair descends under the type column, and which continues as the LIVE surface. Same 300px (wide) /
   210px (phone) source width for all four figures; the reviewed interlock is translated as one group. */

.ensemble-stage.ik .haze {
  display: none;
}

.ensemble-stage.ik .ens-poster {
  --u: min(calc(100cqw / 1440), 1px);
  --dy: 0px;
  --dt: 0px;
  --off: 0px;
  margin-top: 0;
  min-height: 0;
  /* v3: names moved above the heads, so the plane under the cast carries no labels; the left edge's patterned rows
     end by 415 + 1.5R ≈ 487 < 520 */
  height: max(calc(560 * var(--u)), calc(480 * var(--u) + 80px)); /* v6: lattice raised 58u; front tier 4 rows down, left crest 478 + 1.5R ≈ 550 */
  background: #0d0724;
}

.ensemble-stage.ik .ens-stage-inner {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: calc(1440 * var(--u));
}

.ensemble-stage.ik .ik-scene,
.ensemble-stage.ik .ik-front {
  position: absolute;
  display: block;
  pointer-events: none;
  top: 0;
  left: calc(-600 * var(--u));
  width: calc(2640 * var(--u));
  height: 100%;
}

.ensemble-stage.ik .ik-scene {
  z-index: 1;
}

/* Kept empty for the QA readiness convention; no fan is placed in front of art. */
.ensemble-stage.ik .ik-front {
  z-index: 4;
}

/* ---- the violet plane: every fan is a whole opaque circle in one flat colour ---- */
.ensemble-stage.ik .ik-waves .sg-fill {
  fill: #250d5a; /* owner 2026-09-28: still too bright → deeper violet */
  opacity: 1;
}

.ensemble-stage.ik .ik-waves .sg-arc {
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-linecap: butt;
  stroke-width: 1;
}

.ensemble-stage.ik .ik-waves .sg-arc--outer {
  stroke: #8c6be0;
  stroke-width: 1.5;
}

.ensemble-stage.ik .ik-waves .sg-arc--mid {
  stroke: #6e50c6;
  stroke-width: 1.2;
}

.ensemble-stage.ik .ik-waves .sg-arc--inner {
  stroke: #5a3fb0;
}

.ensemble-stage.ik .ik-waves .ik-d1 .sg-arc--outer {
  stroke: #7757cf;
}

/* ---- type column: one wordmark, lede, actions — on the near-black field above the stair ---- */
/* v4: the column stands on the tide's low end — its actions end ≈ 349, 14u above the row-4 crowns (363.2) under their
   right half and 43u above row 5 (392) under their left half */
.ensemble-stage.ik .wm.s55-mark {
  left: calc(var(--edge) - (100cqw - 1440 * var(--u)) / 2);
  top: calc(58 * var(--u));
  width: calc(334 * var(--u));
}

.ensemble-stage.ik .copy {
  --cy: 186;
  left: calc(var(--edge) - (100cqw - 1440 * var(--u)) / 2);
  right: auto;
  top: calc(var(--cy) * var(--u));
  width: calc(380 * var(--u));
  max-width: none;
  display: block;
  padding: 0;
}

.ensemble-stage.ik .eyebrow {
  display: none;
}

.ensemble-stage.ik .lead {
  margin: 0 0 calc(24 * var(--u));
  font-size: max(13px, calc(15 * var(--u)));
  line-height: 1.75;
  white-space: nowrap;
}

.ensemble-stage.ik .cta {
  flex-wrap: wrap;
  margin: 0;
  gap: calc(12 * var(--u)) calc(22 * var(--u));
}

/* ---- cast: reviewed interlock x kept; each figure's y follows the tide so it stands on the rise, not on a shelf;
   nameplates 12u above each head ---- */
.ensemble-stage.ik .pf {
  --s: 300;
}

.ensemble-stage.ik .p-hk {
  --x: 490;
  --y: 133;
  --z: 4;
  --lx: 189;
  --ly: -24;
  --la: -50%;
}

.ensemble-stage.ik .p-ns {
  --x: 691;
  --y: 128;
  --z: 5;
  --lx: 190;
  --ly: -17;
  --la: -50%;
}

.ensemble-stage.ik .p-rk {
  --x: 935;
  --y: 86;
  --z: 6;
  --lx: 142;
  --ly: -9;
  --la: -50%;
}

.ensemble-stage.ik .p-so {
  --x: 1138;
  --y: 75;
  --z: 3;
  --lx: 155;
  --ly: -1;
  --la: -50%;
}

.ensemble-stage.ik .tag {
  z-index: 20;
  font: 700 max(13px, calc(14 * var(--u))) / 1.15 var(--f-jp, "Zen Kaku Gothic New", sans-serif);
}

/* nameplate: one row — name, arrow, state — no rule under it */
.ensemble-stage.ik .tag a {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  background: transparent;
  border-bottom: 0;
}

/* ---- LIVE continues the same violet (surface colours only; markup, data and state untouched) ---- */
body.ik-plane:has(.ensemble-stage.ik) #main > .edition-live-wrap::before {
  background: #120a2c; /* LIVE now sits on the dark front tier */
}

body.ik-plane:has(.ensemble-stage.ik) #on-air .v8-live-group,
body.ik-plane:has(.ensemble-stage.ik) #on-air > #v8-live-content > .v8-live-empty,
body.ik-plane:has(.ensemble-stage.ik) #on-air:has(> #v8-live-content > .v8-live-empty) > .v8-live-foot {
  background: #1d1142;
}

@container (max-width: 560px) {
  .ensemble-stage.ik .ens-poster {
    --u: min(calc(100cqw / 390), 1px);
    --off: calc(100cqw - 390 * var(--u));
    margin-top: 0;
    height: max(calc(665 * var(--u)), calc(540 * var(--u) + 145px));
    background: #0d0724;
  }

  .ensemble-stage.ik .ens-stage-inner {
    left: auto;
    right: 0;
    transform: none;
    width: calc(390 * var(--u));
  }

  .ensemble-stage.ik .ik-scene,
  .ensemble-stage.ik .ik-front {
    left: calc(-200 * var(--u));
    width: calc(790 * var(--u));
  }

  .ensemble-stage.ik .wm.s55-mark {
    left: calc(16 * var(--u));
    top: calc(16 * var(--u));
    width: calc(190 * var(--u));
  }

  .ensemble-stage.ik .pf {
    --s: 210;
  }

  .ensemble-stage.ik .p-hk {
    --x: 9;
    --y: 132;
    --z: 4;
    --lx: 11;
    --ly: -40;
    --la: 0;
  }

  .ensemble-stage.ik .p-ns {
    --x: 116;
    --y: 120;
    --z: 5;
    --lx: 138;
    --ly: -30;
    --la: 0;
  }

  .ensemble-stage.ik .p-rk {
    --x: 24;
    --y: 275;
    --z: 6;
    --lx: 100;
    --ly: 215;
    --la: -50%;
  }

  .ensemble-stage.ik .p-so {
    --x: 180;
    --y: 253;
    --z: 3;
    --lx: 99;
    --ly: 237;
    --la: -50%;
  }

  /* copy after the cast, on the solid violet below the crest */
  .ensemble-stage.ik .copy {
    left: calc(20 * var(--u));
    right: calc(20 * var(--u));
    width: auto;
    top: max(calc(560 * var(--u)), calc(490 * var(--u) + 70px));
    padding-bottom: calc(24 * var(--u));
  }

  .ensemble-stage.ik .lead {
    font-size: max(12px, calc(13 * var(--u)));
    margin-bottom: calc(12 * var(--u));
  }

  .ensemble-stage.ik .cta {
    gap: calc(12 * var(--u)) calc(16 * var(--u));
  }
}

/* ---- tablet exploration (copy of the phone block) ---- */
@container (min-width: 561px) and (max-width: 999px) {
  .ensemble-stage.ik .ens-poster {
    --u: min(calc(100cqw / 390), 1.35px);
    --off: calc(100cqw - 390 * var(--u));
    margin-top: 0;
    height: max(calc(665 * var(--u)), calc(540 * var(--u) + 145px));
    background: #0d0724;
  }

  .ensemble-stage.ik .ens-stage-inner {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: calc(390 * var(--u));
  }

  .ensemble-stage.ik .ik-scene,
  .ensemble-stage.ik .ik-front {
    left: calc(-200 * var(--u));
    width: calc(790 * var(--u));
  }

  .ensemble-stage.ik .wm.s55-mark {
    left: calc(16 * var(--u));
    top: calc(16 * var(--u));
    width: calc(190 * var(--u));
  }

  .ensemble-stage.ik .pf {
    --s: 210;
  }

  .ensemble-stage.ik .p-hk {
    --x: 9;
    --y: 132;
    --z: 4;
    --lx: 11;
    --ly: -40;
    --la: 0;
  }

  .ensemble-stage.ik .p-ns {
    --x: 116;
    --y: 120;
    --z: 5;
    --lx: 138;
    --ly: -30;
    --la: 0;
  }

  .ensemble-stage.ik .p-rk {
    --x: 24;
    --y: 275;
    --z: 6;
    --lx: 100;
    --ly: 215;
    --la: -50%;
  }

  .ensemble-stage.ik .p-so {
    --x: 180;
    --y: 253;
    --z: 3;
    --lx: 99;
    --ly: 237;
    --la: -50%;
  }

  /* copy after the cast, on the solid violet below the crest */
  .ensemble-stage.ik .copy {
    left: calc(20 * var(--u));
    right: calc(20 * var(--u));
    width: auto;
    top: max(calc(560 * var(--u)), calc(490 * var(--u) + 70px));
    padding-bottom: calc(24 * var(--u));
  }

  .ensemble-stage.ik .lead {
    font-size: max(12px, calc(13 * var(--u)));
    margin-bottom: calc(12 * var(--u));
  }

  .ensemble-stage.ik .cta {
    gap: calc(12 * var(--u)) calc(16 * var(--u));
  }
}

/* tablet 561–999: the phone composition, centred, scaled up to 1.35 with text capped so labels never balloon */
@container (min-width: 561px) and (max-width: 999px) {
  .ensemble-stage.ik .tag {
    font-size: min(17px, max(13px, calc(14 * var(--u))));
  }

  .ensemble-stage.ik .lead {
    font-size: min(16px, max(12px, calc(13 * var(--u))));
  }

  .ensemble-stage.ik .u {
    font-size: min(14px, max(11px, calc(13 * var(--u))));
  }
}
/* ---- v5 front tier: a second, darker wave on the same lattice (OFFSET rows below the violet crest) ---- */
.ensemble-stage.ik .ik-waves .ik-front-tier .sg-fill {
  fill: #120a2c;
}

.ensemble-stage.ik .ik-waves .ik-front-tier .sg-arc--outer {
  stroke: #45328c;
}

.ensemble-stage.ik .ik-waves .ik-front-tier.ik-e1 .sg-arc--outer {
  stroke: #3a2a78;
}

.ensemble-stage.ik .ik-waves .ik-front-tier .sg-arc--mid {
  stroke: #33246c;
}

.ensemble-stage.ik .ik-waves .ik-front-tier .sg-arc--inner {
  stroke: #2a1d5c;
}
/* ---- v6: the cast stands BETWEEN the waves (owner: 「波と波の間にキャラをおけばいいのでは？」) — the violet tier passes
   behind their bodies, the dark front tier crosses in front of their feet. Phone/tablet keep it behind (steep tide). ---- */
.ensemble-stage.ik .ik-wave-front {
  z-index: 7;
}

@container (max-width: 999px) {
  .ensemble-stage.ik .ik-wave-front {
    z-index: 1;
  }
}