/* NICO HUA Process Layout, 2026-11-07 r3 — approved variant B. */
/* Preserve the existing choreography. */
@media (min-width: 1000px) {
  html:root body .score-shell[data-page="prozess"] .pe-hero-art {
    max-width: 1040px;
    justify-self: center;
    height: clamp(360px, calc(100svh - 310px), 680px);
  }
  html:root body .score-shell[data-page="prozess"] .pe-hero .pe-assembly--hero {
    contain: layout style;
    scale: 1 !important;
  }
  html:root body .score-shell[data-page="prozess"] .pe-hero .pe-model {
    top: 48%;
    width: min(75%, 720px, calc((100svh - 310px) * 1.05));
    max-width: 720px;
  }
}

/* Expand to the right. The left rail retains its existing x-position and width. */
@media (min-width: 1808px) {
  html:root body .score-shell[data-page="prozess"] .process-edition .pe-journey-grid {
    --nh-pe-reading-width: clamp(460px, calc(460px + (100vw - 1808px) / 2), 720px);
    width: calc(1220px + var(--nh-pe-reading-width)) !important;
    max-width: none !important;
    margin-left: calc((100% - 1680px) / 2) !important;
    margin-right: 0 !important;
    grid-template-columns: 1164px var(--nh-pe-reading-width) !important;
    column-gap: 56px !important;
  }
  html:root body .score-shell[data-page="prozess"] .process-edition .pe-chapters {
    max-width: none;
  }
  html:root body .score-shell[data-page="prozess"] .process-edition .pe-chapter-copy {
    max-width: 60ch;
  }
  html:root body .score-shell[data-page="prozess"] .process-edition .pe-result {
    max-width: 100%;
  }
  html:root body .score-shell[data-page="prozess"] .process-edition .pe-result p {
    max-width: 60ch;
  }
}
html:root body .score-shell[data-page="prozess"] .pe-live-stage > .pe-assembly {
  container-type: inline-size;
  --nh-pe-model-width: 57%;
  --nh-pe-tablet-width: min(24cqw, calc((var(--pe-stage-height) - 80px) * .75));
  --nh-pe-phone-width: min(15cqw, calc((var(--pe-stage-height) - 80px) * .461538));
}
@media (min-width: 701px) and (max-width: 999px) {
  html:root body .score-shell[data-page="prozess"] .pe-live-stage > .pe-assembly {
    --nh-pe-model-width: 42%;
  }
}
@media (min-width: 1000px) {
  html:root body .score-shell[data-page="prozess"] .pe-live-stage > .pe-assembly {
    --nh-pe-model-width: 56%;
    --nh-pe-tablet-width: 20cqw;
    --nh-pe-phone-width: 12.5cqw;
  }
}
html:root body .score-shell[data-page="prozess"] .pe-live-stage > .pe-assembly .pe-device {
  top: 49% !important;
  height: auto !important;
  margin: 0;
  transform: translate3d(0, calc(-50% + 28px * (1 - var(--release, 0))), 0) !important;
}
html:root body .score-shell[data-page="prozess"] .pe-live-stage > .pe-assembly .pe-device--tablet {
  width: var(--nh-pe-tablet-width) !important;
  height: calc(var(--nh-pe-tablet-width) / .75) !important;
  min-height: 0;
  aspect-ratio: 3 / 4;
  right: auto !important;
}
html:root body .score-shell[data-page="prozess"] .pe-live-stage > .pe-assembly .pe-device--phone {
  width: var(--nh-pe-phone-width) !important;
  height: calc(var(--nh-pe-phone-width) * 2.1666667) !important;
  min-height: 0;
  aspect-ratio: 9 / 19.5;
}

/* B: desktop independent, tablet and phone form an overlapping group. */
html:root body .score-shell[data-page="prozess"] .pe-live-stage > .pe-assembly {
  --nh-pe-phone-width: min(11cqw, calc((var(--pe-stage-height) - 80px) * .36));
}
@media (min-width: 1000px) {
  html:root body .score-shell[data-page="prozess"] .pe-live-stage > .pe-assembly {
    --nh-pe-tablet-width: 24cqw;
    --nh-pe-phone-width: 11cqw;
  }
}
html:root body .score-shell[data-page="prozess"] .pe-live-stage > .pe-assembly .pe-model {
  left: calc(50% - 16% * var(--release, 0)) !important;
}
html:root body .score-shell[data-page="prozess"] .pe-live-stage > .pe-assembly .pe-device--tablet {
  left: calc(39% + var(--nh-pe-model-width) * .395) !important;
}
html:root body .score-shell[data-page="prozess"] .pe-live-stage > .pe-assembly .pe-device--phone {
  left: calc(39% + var(--nh-pe-model-width) * .395 + var(--nh-pe-tablet-width) * .84) !important;
  right: auto !important;
  margin-top: calc(var(--nh-pe-tablet-width) * .666667 - var(--nh-pe-phone-width) * 1.083333);
}

/* Keep the complete stack inside the mobile hero's existing artwork space. */
@media (max-width: 999px) {
  html:root body .score-shell[data-page="prozess"] .pe-hero .pe-assembly--hero {
    contain: layout style;
    scale: .84 !important;
    transform-origin: 50% 50%;
  }
  html:root body .score-shell[data-page="prozess"] .pe-hero .pe-model {
    top: 45%;
    width: min(75%, 450px);
    max-width: 450px;
  }
}
@media (max-width: 700px) {
  html:root body .score-shell[data-page="prozess"] .pe-hero .pe-assembly--hero {
    scale: .82 !important;
  }
  html:root body .score-shell[data-page="prozess"] .pe-hero .pe-model {
    width: min(75%, 270px);
  }
}
@media (max-width: 999px) and (max-height: 660px) {
  html:root body .score-shell[data-page="prozess"] .pe-hero .pe-assembly--hero {
    scale: .82 !important;
  }
  html:root body .score-shell[data-page="prozess"] .pe-hero .pe-model {
    width: min(75%, 240px);
  }
}
@media (max-width: 420px) and (max-height: 660px) {
  html:root body .score-shell[data-page="prozess"] .pe-hero .pe-assembly--hero {
    scale: .68 !important;
  }
  html:root body .score-shell[data-page="prozess"] .pe-hero .pe-model {
    width: min(75%, 225px);
  }
}

/* Bound the released desktop card by the compact stage height. */
@media (max-width: 700px) {
  html:root body .score-shell[data-page="prozess"] .pe-live-stage > .pe-assembly {
    --nh-pe-model-width: min(57%, calc((var(--pe-stage-height) - 80px) * 2.12));
  }
  html:root body .score-shell[data-page="prozess"] .pe-live-stage > .pe-assembly .pe-model {
    width: calc(57% * (1 - var(--release, 0)) + var(--nh-pe-model-width) * var(--release, 0)) !important;
  }
}

/* Widen the process artwork into the left margin while retaining the text track. */
@media (min-width: 1808px) {
  html:root body .score-shell[data-page="prozess"] .process-edition .pe-journey-grid {
    --nh-pe-wide-extra: clamp(0px, calc((100vw - 1808px) * .32), 1200px);
    width: calc(1220px + var(--nh-pe-reading-width) + var(--nh-pe-wide-extra)) !important;
    margin-left: calc((100% - 1680px) / 2 - var(--nh-pe-wide-extra)) !important;
    grid-template-columns: calc(1164px + var(--nh-pe-wide-extra)) var(--nh-pe-reading-width) !important;
  }
  html:root body .score-shell[data-page="prozess"] .pe-live-stage > .pe-assembly {
    max-width: min(1800px, calc((100svh - 300px) * 1.8)) !important;
  }
  html:root body .score-shell[data-page="prozess"] .pe-live-stage > .pe-assembly .pe-model {
    width: 56% !important;
    max-width: none !important;
  }
}

/* Smaller captions in the decorative device mockups; keep the footer geometry. */
html:root body .score-shell[data-page="prozess"] .pe-live-stage .pe-device .pe-surface-foot > span {
  display: block;
  font-size: min(6cqw, max(3px, 4.5cqw), 18px);
  letter-spacing: .16em;
  line-height: 1;
  white-space: nowrap;
}
/* The entire mockup is already aria-hidden; the shorter phone caption is visual. */
html:root body .score-shell[data-page="prozess"] .pe-live-stage .pe-device--phone .pe-surface-foot > span {
  font-size: 0;
  letter-spacing: 0;
}
html:root body .score-shell[data-page="prozess"] .pe-live-stage .pe-device--phone .pe-surface-foot > span::after {
  content: "DEINE WELT.";
  font-size: min(6cqw, max(2px, 4.5cqw), 12px);
  letter-spacing: .16em;
  line-height: 1;
}
