.masthead#top {
  position: absolute;
  inset: 0 var(--gutter) auto;
  margin: 0;
  border-color: rgb(28 36 42 / .17);
  background: transparent;
}
.masthead .menu-toggle { white-space: nowrap; }
.spatial-story {
  --stage-height: max(560px,100svh);
  --runway: clamp(460px,82svh,970px);
  position: relative;
  height: calc(var(--stage-height) + var(--runway) + 16svh);
}
.gallery-mark {
  position: absolute;
  top: var(--runway);
  width: 1px;
  height: 1px;
  scroll-margin: -30px 0 0;
  pointer-events: none;
}
.gallery-mark:focus { outline: 0; }
.spatial-stage {
  --studio-opacity: 1;
  --projects-opacity: 0;
  --studio-shift: 0px;
  --night: 0%;
  position: sticky;
  top: 0;
  min-height: 0;
  height: var(--stage-height);
  background: #f6f7f6;
}
.spatial-stage .wg-stage {
  background: radial-gradient(ellipse at 65% 35%,
    color-mix(in srgb,#fff,#333c41 var(--night)),
    color-mix(in srgb,#eef1f0,#0b0e11 var(--night)) 90%);
}
.entry-poster, .entry-poster img { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.entry-poster { display: block; z-index: 1; }
.entry-poster img { object-fit: cover; }
.spatial-stage .wg-render { z-index: 2; }
.spatial-stage:is(.wg-ready,.wg-fallback) .entry-poster,
.spatial-story:has(.gallery-mark:target) .entry-poster { visibility: hidden; }
.spatial-stage .wg-plate {
  height: auto;
  transform-origin: center;
  overflow: visible;
}
.spatial-stage .wg-plate > img:first-child { height: auto; aspect-ratio: 1.5; }
.spatial-stage .wg-plate:not([style]) { opacity: 0; }
.spatial-stage .wg-plate[data-cover="kirei-pro"]:not([style]) {
  opacity: 1; z-index: 3; left: 72%; top: 51%; width: 35%;
  transform: translate(-50%,-50%) rotateY(-20deg) rotateZ(-3deg);
  box-shadow: 5px 18px 25px -17px #41505770;
}
.spatial-stage .wg-plate[data-cover="migaki"]:not([style]) {
  opacity: 1; z-index: 2; left: 93%; top: 46%; width: 19%;
  transform: translate(-50%,-50%) rotateY(-42deg) rotateZ(-3deg);
}
.spatial-stage .wg-plate[data-cover="utakarte"]:not([style]) {
  opacity: 1; z-index: 1; left: 55%; top: 47%; width: 16%;
  transform: translate(-50%,-50%) rotateY(42deg) rotateZ(2deg);
}
.spatial-stage .wg-plates::before { opacity: var(--projects-opacity); }
.spatial-stage .wg-plate video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.studio-opening {
  position: absolute;
  z-index: 4;
  inset: 0;
  color: #1b2126;
  pointer-events: none;
  opacity: var(--studio-opacity);
}
.studio-words {
  position: absolute;
  top: 46.5%;
  left: var(--gallery-edge);
  transform: translate(var(--studio-shift),-45%);
}
.studio-kicker {
  margin-bottom: clamp(23px,3.2vh,44px);
  color: #424b50;
  font: 600 11px/1.45 var(--body);
  text-transform: uppercase;
  letter-spacing: .135em;
}
.studio-words h1 {
  margin: 0 0 0 -.035em;
  font: 400 clamp(90px,11.8vw,210px)/.79 var(--display);
  letter-spacing: -.058em;
}
.studio-words h1 em { display: inline-block; margin: .075em 0 0 .52em; font-weight: 400; }
.studio-intro { margin-top: clamp(30px,6vh,76px); }
.studio-intro p { font: 450 clamp(15px,1.14vw,19px)/1.85 var(--body); letter-spacing: .018em; }
.studio-intro p:first-child { font-size: clamp(20px,1.67vw,29px); font-weight: 550; margin-bottom: 6px; }
.studio-bottom {
  position: absolute;
  left: var(--gallery-edge);
  right: var(--gallery-edge);
  bottom: clamp(18px,3.3vh,44px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding-top: 13px;
  border-top: 1px solid rgb(22 32 39 / .22);
}
.studio-opening :is(a,button) { pointer-events: auto; }
.studio-descent, .studio-label, .studio-feature { display: inline-flex; align-items: center; }
.studio-descent, .studio-feature {
  gap: 11px;
  color: inherit;
  font: 600 14px/1.4 var(--body);
  min-height: 44px;
}
.studio-descent > span:first-child {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; color: white; background: #1c252b; font-size: 17px;
  transition: transform .25s ease;
}
.studio-descent:hover > span:first-child { transform: translateY(3px); }
.studio-label { gap: 14px; }
.studio-feature-name { font-weight: 600; }
.studio-action { display: block; margin-top: 2px; font-size: 11px; font-weight: 500; line-height: 1.35; color: #45515b; }
.studio-words { pointer-events: auto; }
.studio-feature:hover .studio-feature-name { text-decoration: underline; text-underline-offset: .25em; }
.studio-motion {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  background: transparent; color: inherit; border-left: 1px solid #a4adb0;
  font-size: 15px; font-weight: 600;
}
.studio-opening :focus-visible { outline-color: #1f383b; }
.spatial-stage :is(.wg-header,.wg-information,.wg-controls) {
  opacity: var(--projects-opacity); transition: none;
}
.spatial-stage:not([data-mode="projects"]) :is(.wg-header,.wg-information,.wg-controls,.wg-frame) { pointer-events: none; }
.spatial-stage:not([data-mode="projects"]) .wg-enter { pointer-events: none; }
.spatial-stage[data-mode="projects"] .studio-opening { visibility: hidden; }
.spatial-stage[data-entering] :is(.wg-information,.wg-controls,.wg-header) { opacity: 0; transition: opacity .22s; }
.spatial-stage[data-mode="studio"] .wg-frame {
  pointer-events: auto; inset: 0; height: 100%; touch-action: pan-y; cursor: default;
}
.spatial-stage[data-mode="studio"] .wg-frame[data-hit="current"] { cursor: pointer; }
.spatial-stage[data-mode="studio"] .wg-cursor { display: none; }
.kirei-processing.original-scene {
  display: flex; flex-direction: column; justify-content: center; align-items: stretch;
  padding: clamp(18px,3.5vw,60px);
  background: #181d24; color: #f8fafb; border: 0;
  --os-ink: #f6f8fa; --os-muted: #d0d8df; --os-line: #626b71;
}
.kirei-art-title { font: italic 400 clamp(54px,6vw,100px)/.95 var(--display); letter-spacing: -.05em; }
.kirei-processing .os-product { align-self: stretch; margin: 0; }
.kirei-processing .os-canvas-space { height: clamp(155px,16vw,270px); }
.kirei-processing .os-caption { min-height: 0; margin-top: 9px; }
.kirei-processing .os-face-icon { color: #1f303b; }
.kirei-processing #os-inner-caption :is(p,small,b) { color: #f3f5f8; }
.work-detail__content > .case > .kirei-processing {
  display: flex; max-width: 850px; margin: 0 auto 45px; aspect-ratio: auto;
}
@media (max-width:760px) {
  .spatial-story { --stage-height: max(585px,100svh); --runway: clamp(370px,68svh,660px); }
  .studio-words { top: max(87px,11.7%); transform: translateX(var(--studio-shift)); }
  .studio-kicker { margin-bottom: 16px; font-size: 10px; }
  .studio-words h1 { font-size: clamp(64px,min(20.5vw,11.7svh),101px); }
  .studio-intro { margin-top: clamp(15px,2.6svh,29px); }
  .studio-intro p { font-size: 15px; line-height: 1.6; }
  .studio-intro p:first-child { font-size: 19px; margin-bottom: 3px; }
  .studio-bottom { bottom: max(13px,env(safe-area-inset-bottom)); padding-top: 6px; }
  .studio-descent,.studio-feature { font-size: 13px; gap: 8px; }
  .studio-label { gap: 5px; }
  .studio-descent > span:first-child { width: 30px; height: 30px; }
  .spatial-stage .wg-plate[data-cover="kirei-pro"]:not([style]) { top: 67%; left: 50%; width: 68%; }
  .spatial-stage .wg-plate[data-cover="migaki"]:not([style]) { top: 61%; left: 89%; width: 33%; }
  .spatial-stage .wg-plate[data-cover="utakarte"]:not([style]) { top: 62%; left: 13%; width: 27%; }
}
@media (max-width:760px) and (max-height:670px) {
  .studio-words { top: 76px; }
  .studio-words h1 { font-size: 59px; }
  .studio-kicker { margin-bottom: 10px; }
  .studio-intro { margin-top: 13px; }
  .studio-intro p { font-size: 14px; }
  .studio-intro p:first-child { font-size: 17px; }
}
@media (min-width:761px) and (max-height:660px) {
  .spatial-story { --stage-height: max(470px,100svh); }
  .studio-words h1 { font-size: min(10vw,17svh); }
  .studio-intro { margin-top: 23px; }
}
