/* The type follows the depth of the camera. All controls remain in native
   document flow, and the same position produces the same composition on return. */
#practice-editorial {
  --margin:max(clamp(1.25rem,5.2vw,7rem),env(safe-area-inset-left));
  position:absolute;
  top:var(--editorial-top,300svh);
  inset-inline:0;
  overflow-x:clip;
  z-index:1;
  pointer-events:none;
  mask-image:linear-gradient(to bottom,
    transparent calc(var(--rail-view-top) + clamp(52px,6svh,66px)),
    #000 calc(var(--rail-view-top) + clamp(83px,11svh,108px)),
    #000 calc(var(--rail-view-top) + 100dvh - clamp(77px,9svh,102px)),
    transparent calc(var(--rail-view-top) + 100dvh - clamp(52px,6svh,70px)));
}
#practice-editorial article {
  --local:var(--chapter-local,0);
  --ink:#fbefdb;
  color:var(--ink);
  position:relative;
  display:grid;
  align-items:center;
  padding:clamp(3rem,8svh,6.5rem) var(--margin);
  min-height:88svh;
}
#practice-editorial :is(h2,p) {margin:0;}
#practice-editorial h2:focus {outline:none;}
.practice-spread {min-width:0;}
.practice-marginal {
  font-weight:500;
  font-size:clamp(.875rem,1.1vw,1.08rem);
  letter-spacing:.18em;
  line-height:1.4;
}
.practice-notes {
  position:relative;
  font-weight:400;
  font-size:clamp(1rem,1.23vw,1.27rem);
  line-height:1.46;
}
.practice-modality {text-wrap:pretty;}
.practice-actions {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:.1rem clamp(1.1rem,1.7vw,2.6rem);
  margin-top:clamp(.35rem,1.2svh,1rem);
}
.practice-actions button {
  pointer-events:auto;
  font:500 clamp(.875rem,1vw,1rem)/1.35 Manrope,sans-serif;
  min-height:44px;
  color:inherit;
  text-align:left;
}
.practice-actions [data-practice] {position:relative;display:inline-flex;align-items:center;gap:.62em;}
.practice-actions [data-practice]::before {
  content:'';
  box-sizing:border-box;
  width:1.59em;
  aspect-ratio:1;
  flex:none;
  border:1px solid currentColor;
  border-radius:50%;
}
.practice-actions [data-practice]::after {
  content:'';
  position:absolute;
  inset-inline-start:.67em;
  border-block:.23em solid transparent;
  border-inline-start:.36em solid currentColor;
}
.practice-actions [data-optics] {
  text-decoration:underline;
  text-decoration-color:color-mix(in srgb,currentColor 65%,transparent);
  text-underline-offset:.35em;
  text-decoration-thickness:1px;
}
.practice-actions button:hover {text-decoration-color:currentColor;}
.practice-actions button:focus-visible {outline:1px solid currentColor;outline-offset:3px;}
.practice-actions [data-practice]:hover::before {background:color-mix(in srgb,currentColor 15%,transparent);}
body.with-session #practice-editorial {visibility:hidden;}
body.with-session .session.on {background:transparent;}
body.with-session .session-wash {background:linear-gradient(90deg,#21180fd9,#292013a6 52%,#271d133e);}

/* Screen-space controls and photographic-space type move at different rates. */
#practice-editorial article {
  --contact:var(--optic-touch,0);
  --hand-x:var(--optic-x,0);
  --hand-y:var(--optic-y,0);
  --approach:clamp(0,var(--local),1);
  --depart:clamp(0,calc(-1 * var(--local)),1);
}
.practice-marginal {font-weight:400;letter-spacing:.4em;font-size:.81rem;}
.practice-notes {font-weight:400;line-height:1.5;}
.practice-actions {column-gap:clamp(1rem,2vw,2rem);}
#practice-editorial :is(.movement-name,.breath-line,.sound-rest,.stillness-line,.restore-name) {
  font-weight:200;
  letter-spacing:-.065em;
}
/* The name sits against the back wall. The near caption passes the camera
   sooner, keeping the mats between them open and unlettered. */
#practice-editorial #chapter-movement {min-height:100svh;}
.movement-room {display:contents;}
.movement-on-wall {
  position:absolute;
  left:36%;
  top:16%;
  color:#fbebd2;
  transform-origin:0 70%;
  transform:
    translate3d(calc(var(--local) * -9vw + var(--hand-x) * -.85vw),calc(var(--local) * 34svh - var(--hand-y) * .64svh),0)
    perspective(1100px) rotateY(calc(-8deg + var(--local) * 6deg + var(--hand-x) * 2deg));
}
.movement-name {
  font-size:clamp(4.15rem,min(8.9vw,13.5svh),13rem);
  font-weight:200;
  letter-spacing:-.075em;
  line-height:1.06;
}
.movement-on-wall .practice-modality {
  margin-block-start:.35em;
  margin-inline-start:.23em;
  font:400 clamp(.94rem,1.17vw,1.33rem)/1.4 Manrope,sans-serif;
  letter-spacing:-.018em;
}
.movement-foot {
  position:absolute;
  left:var(--margin);
  bottom:clamp(4.85rem,12%,10rem);
  isolation:isolate;
}
.movement-foot::before {
  content:"";
  position:absolute;
  inset:-10svh -9vw -15svh calc(-1 * var(--margin) - 12vw);
  pointer-events:none;
  z-index:-1;
  background:radial-gradient(ellipse at center,#221a11bb 3%,#2c211573 37%,transparent 71%);
}
.movement-line,.restore-line {
  font-size:clamp(1.6rem,min(3.4vw,5.3svh),4rem);
  letter-spacing:-.043em;
  line-height:1.1;
  font-weight:300;
}
.movement-line {font-size:clamp(1.5rem,2.35vw,3.2rem);transform:translateX(calc(var(--local) * -3vw));}
.movement-foot .practice-actions {margin-top:clamp(.25rem,1.15svh,1rem);}
/* The clearing between the phrases is a real part of the composition. Holding
   a breath widens it. Reading and guided practice stay anchored at the foot. */
#practice-editorial #chapter-breath {min-height:97svh;}
#chapter-breath .practice-spread {display:contents;}
#chapter-breath .practice-marginal {position:absolute;left:var(--margin);top:19%;}
.breath-line {
  position:absolute;
  inset:33% var(--margin) auto;
  font-size:clamp(3.5rem,min(8.75vw,15svh),11.2rem);
  line-height:.99;
}
.breath-line>span {
  display:block;
  width:fit-content;
  max-width:100%;
}
.breath-line>span:first-child {
  transform:translate3d(calc(var(--local) * 6vw - var(--contact) * 1.4vw),calc(var(--local) * 4svh - var(--contact) * 1.6svh),0);
}
.breath-line>span+span {
  margin-left:clamp(1.2rem,13vw,14rem);
  transform:translate3d(calc(var(--local) * -8vw + var(--contact) * 1.4vw),calc(var(--local) * -3svh + var(--contact) * 1.6svh),0);
}
.breath-last {white-space:nowrap;}
#chapter-breath .practice-notes {position:absolute;left:var(--margin);bottom:12%;}
#chapter-breath::before, #chapter-stillness::before {
  content:"";
  position:absolute;
  pointer-events:none;
  z-index:-1;
}
#chapter-breath::before {
  inset:0;
  background:radial-gradient(ellipse 85% 52% at 20% 58%,#251b12b5 0%,#251b1288 45%,transparent 100%);
}

/* The room belongs to the instrument. Read down the near margin while
   the photographed bowl and striker remain in view on the opposite side. */
#practice-editorial #chapter-sound {min-height:102svh;}
.sound-room {display:contents;}
#chapter-sound::before {
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:radial-gradient(ellipse 53% 68% at 0% 45%,#18120bb0 0%,#21170d74 43%,transparent 100%);
}
.sound-listening {
  position:absolute;
  left:var(--margin);
  top:29%;
  transform:translate3d(0,calc(var(--local) * 21svh),0);
}
.sound-name {
  font-size:clamp(.94rem,1.22vw,1.4rem);
  font-weight:400;
  letter-spacing:.12em;
  line-height:1.35;
}
#chapter-sound .sound-rest {
  margin-top:clamp(.8rem,2.6svh,2.2rem);
  font-size:clamp(2.45rem,min(4.6vw,8.8svh),6rem);
  font-weight:200;
  letter-spacing:-.057em;
  line-height:1.015;
}
.sound-rest span {display:block;}
#chapter-sound .practice-notes {
  position:absolute;
  left:var(--margin);
  bottom:clamp(5rem,17%,13rem);
}
#chapter-sound .practice-actions {margin-top:.26em;}
#chapter-sound [data-optics] {
  display:inline-flex;
  align-items:center;
  gap:.65em;
  text-decoration:none;
}
#chapter-sound [data-optics]::before {
  content:"";
  width:1.55em;
  height:.68em;
  border:1px solid currentColor;
  border-radius:50%;
  box-shadow:0 .17em 0 -.09em currentColor;
  transform:scale(calc(1 + var(--contact) * .15));
}
#chapter-sound [data-optics]:is(:hover,:focus-visible) {text-decoration:underline;}
/* The pace of the print drops here. The title and controls stay small,
   leaving the amber light above the phrases to occupy the whole screen. */
#practice-editorial #chapter-stillness {min-height:89svh;text-align:center;}
#chapter-stillness .practice-spread {width:100%;position:relative;margin-top:8svh;}
#chapter-stillness .practice-marginal {margin-bottom:clamp(1.2rem,4.3svh,3.75rem);}
#chapter-stillness::before {
  inset:0;
  background:radial-gradient(ellipse 60% 46% at 50% 57%,#2c1f10b5 5%,#2c1f10a1 30%,#30201641 63%,transparent);
}
.stillness-line {font-size:clamp(2.2rem,min(4.8vw,8.2svh),5.4rem);line-height:1.06;}
.stillness-line span {display:block;}
.stillness-line span:first-child {transform:translateY(calc(var(--local) * 4.2svh - var(--contact) * .2em));}
.stillness-line span+span {transform:translateY(calc(var(--local) * -4.2svh + var(--contact) * .2em));}
#chapter-stillness .practice-notes {margin:clamp(1.65rem,5.5svh,3.9rem) auto 0;}
#chapter-stillness .practice-actions {justify-content:center;}

/* The word lowers towards the actual horizon. The print below its baseline
   is a compressed reflection, broken by the photographed surface. */
#practice-editorial #chapter-restore {min-height:99svh;--ink:#312317;}
#chapter-restore .practice-spread {display:contents;}
.restore-name {
  position:absolute;
  left:var(--margin);
  top:44%;
  transform:translateY(-50%);
  width:fit-content;
  font-size:clamp(6.2rem,min(19vw,29svh),23.8rem);
  line-height:.82;
}
.restore-name>span:first-child {
  display:block;
  transform:translate3d(calc(var(--hand-x) * .65vw),calc(var(--local) * 3.7svh - var(--contact) * .02em),0);
}
.restore-echo {
  position:absolute;
  inset:100% 0 auto;
  transform-origin:50% 0;
  transform:translate3d(calc(var(--local) * 1.9vw + var(--hand-x) * -1.15vw),calc(.48em + var(--local) * 3.7svh),0)
    scaleY(-.59) skewX(calc(-5deg - var(--hand-x) * 5deg));
  opacity:calc(.21 + var(--contact) * .18);
  mask-image:linear-gradient(transparent 7%,#0004 29%,#000 96%);
  filter:blur(.9px);
  pointer-events:none;
}
#chapter-restore .restore-line {position:absolute;top:20%;right:var(--margin);text-align:right;}
.restore-line span {display:block;}
#chapter-restore .practice-notes {position:absolute;left:var(--margin);bottom:12%;}
#chapter-restore .practice-notes::before {
  content:"";position:absolute;pointer-events:none;z-index:-1;
  inset:-12svh -15vw -11svh calc(-1 * var(--margin) - 10vw);
  background:radial-gradient(ellipse 50% 50% at center,#ebca9766,#e7c89f2e 50%,transparent 100%);
}
@media (max-width:740px) {
  #practice-editorial {--margin:max(5.6vw,env(safe-area-inset-left),1.25rem);}
  .movement-line,.restore-line {font-size:clamp(1.6rem,4.7vw,2.6rem);}
  .breath-line {font-size:clamp(3.35rem,8.65vw,6.3rem);}
  .breath-line>span+span {margin-left:4vw;}
  #chapter-stillness::before {background:radial-gradient(ellipse 86% 47% at 50% 56%,#2c1f10b5 5%,#2c1f10a1 32%,#30201641 67%,transparent);}
  .restore-name {font-size:22.4vw;}
}
@media (max-width:520px) {
  .practice-actions {row-gap:0;column-gap:.9rem;}
  #chapter-breath .practice-marginal {top:18%;}
  .breath-line {top:31%;font-size:clamp(2.9rem,12.25vw,4.48rem);}
  .breath-line>span+span {margin-top:.08em;margin-left:9vw;}
  .breath-last {display:block;}
  #chapter-breath .practice-notes {bottom:13%;}
  #chapter-breath::before {background:radial-gradient(ellipse 94% 55% at 31% 53%,#251b12a8 2%,#281f168a 40%,transparent);}
  #chapter-stillness .practice-spread {margin-top:4svh;}
  .stillness-line {font-size:clamp(2.1rem,9vw,3.2rem);}
  #chapter-stillness .practice-marginal {margin-bottom:2.25rem;}
  #chapter-stillness .practice-notes {margin-top:2.4rem;}
  #chapter-restore .restore-line {top:19.5%;font-size:clamp(1.6rem,6vw,2rem);}
  .restore-name {top:47%;font-size:25.8vw;}
  #chapter-restore .practice-notes {right:var(--margin);bottom:12%;}
}
@media (max-height:520px) and (orientation:landscape) {
  #practice-editorial article {min-height:103svh;}
  .movement-line,.restore-line {font-size:clamp(1rem,min(3vw,6.5svh),1.8rem);}
  #chapter-breath .practice-marginal {top:19%;}
  .breath-line {top:31%;font-size:min(6.5vw,12svh);}
  .breath-line>span,.breath-last {display:inline;}
  .breath-line>span+span {margin:0;}
  #chapter-breath .practice-notes {bottom:clamp(74px,20svh,94px);}
  #chapter-stillness .practice-spread {margin-top:5svh;}
  #chapter-stillness .practice-marginal {margin-bottom:.4rem;}
  .stillness-line {font-size:min(4.5vw,8svh);}
  #chapter-stillness .practice-notes {margin-top:.55rem;}
  .restore-name {font-size:min(17vw,24svh);}
  #chapter-restore .restore-line {top:16%;}
  #chapter-restore .practice-notes {bottom:clamp(74px,20svh,94px);left:auto;right:var(--margin);text-align:right;}
  #chapter-restore .practice-actions {justify-content:flex-end;}
}
@media (max-width:820px) and (orientation:portrait) {
  .movement-on-wall {left:var(--margin);right:var(--margin);top:19%;}
  .movement-name {font-size:clamp(3.8rem,13.5vw,6.8rem);}
  .movement-line {font-size:clamp(1.45rem,4.25vw,2rem);}
  .movement-foot {right:var(--margin);bottom:clamp(5.1rem,12%,7.75rem);}
  #chapter-sound::before {display:none;}
  .sound-listening {top:17%;}
  #chapter-sound .sound-rest {font-size:clamp(2.4rem,8.5vw,3.6rem);margin-top:.3em;}
  #chapter-sound .practice-notes {right:var(--margin);bottom:clamp(5.2rem,12.5%,8rem);}
}
@media (max-width:350px) and (orientation:portrait) {
  #chapter-sound .practice-actions,.movement-foot .practice-actions {gap:0 .65rem;}
  .movement-foot .practice-actions button,#chapter-sound .practice-actions button {font-size:.84rem;}
}
@media (max-height:520px) and (orientation:landscape) {
  .movement-on-wall {left:40%;top:24%;}
  .movement-name {font-size:clamp(2.3rem,10svh,3.65rem);}
  .movement-on-wall .practice-modality {font-size:.9rem;}
  .movement-foot {bottom:clamp(63px,16%,78px);}
  .movement-line {font-size:clamp(1.22rem,5.2svh,1.65rem);}
  .movement-foot .practice-actions {margin-top:0;}
  .sound-listening {top:23%;}
  #chapter-sound .sound-rest {font-size:clamp(1.72rem,7svh,2.55rem);margin-top:.18em;}
  #chapter-sound .practice-notes {bottom:clamp(64px,17%,79px);}
  #chapter-sound .practice-actions {margin-top:0;}
}
@media (prefers-reduced-motion:reduce) {
  #practice-editorial article {--local:0;--contact:0;--hand-x:0;--hand-y:0;}
}
html.quiet #practice-editorial article {--local:0;--contact:0;--hand-x:0;--hand-y:0;}
@media (forced-colors:active) {
  .restore-echo {display:none;}
}
