@font-face{font-family:Zain;src:url("./assets/zain-regular.woff2") format("woff2"),url("./assets/zain-regular.ttf") format("truetype");font-weight:400;font-display:swap}
@font-face{font-family:Zain;src:url("./assets/zain-bold.woff2") format("woff2"),url("./assets/zain-bold.ttf") format("truetype");font-weight:700;font-display:swap}
@font-face{font-family:Zain;src:url("./assets/zain-extrabold.woff2") format("woff2"),url("./assets/zain-extrabold.ttf") format("truetype");font-weight:800;font-display:swap}
@font-face{font-family:"SF Pro";src:local("SF Pro Text"),local("SF Pro");font-weight:400}
@font-face{font-family:"SF Pro";src:local("SF Pro Text Bold"),local("SF Pro Bold");font-weight:700}
@font-face{font-family:Aalto;src:local("Aalto");font-weight:400}

:root {
  color-scheme: dark;
  --ink:#160f16;
  --ivory:#fff4ed;
  --text:#f1ddd7;
  --muted:#d3bab8;
  --accent:#f5bcab;
  --line:rgb(250 217 211 / .22);
  --glass:rgb(31 19 27 / .73);
  --ease-out:cubic-bezier(.23,1,.32,1);
  --gutter:clamp(1.25rem,4.2vw,4.75rem);
  font:400 1rem/1.45 Zain,"SF Pro",Arial,sans-serif;
  color:var(--ivory);
  background:var(--ink);
  -webkit-tap-highlight-color:transparent;
  -webkit-text-size-adjust:100%;
}
*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;min-width:0;overscroll-behavior:none}
body{min-height:100vh;min-height:100dvh}
button,a{touch-action:manipulation}
button{font:inherit;color:inherit;cursor:pointer;user-select:none;-webkit-user-select:none}
a{color:inherit}
button:disabled{opacity:.35;cursor:default}
:focus-visible{outline:2px solid var(--accent);outline-offset:5px}
[hidden]{display:none!important}
p,h1,h2,h3,ol,ul{margin:0}
svg.icon{width:1.15rem;height:1.15rem;flex:none;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.symbols{position:absolute;width:0;height:0;pointer-events:none}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.noscript{position:fixed;bottom:1rem;right:1rem;z-index:10;background:var(--ink);padding:.75rem 1rem}

.scenery,.scene-halo{position:fixed;inset:0;pointer-events:none}
.scenery {
  background:
    linear-gradient(0deg,#130d14 0%,rgb(20 13 20 / .8) 12%,rgb(25 15 24 / .32) 50%,rgb(23 14 22 / .34) 75%,#140e15 100%),
    url("./assets/seminar-backdrop.webp") center 67%/cover no-repeat;
}
.scene-halo {
  background:radial-gradient(ellipse at 47% 41%,rgb(172 82 97 / .24),transparent 53%);
}
.app {
  position:relative;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  min-height:100vh;
  min-height:100dvh;
  padding:env(safe-area-inset-top,0px) calc(var(--gutter) + env(safe-area-inset-right,0px)) env(safe-area-inset-bottom,0px) calc(var(--gutter) + env(safe-area-inset-left,0px));
}
.masthead {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;
  min-height:5.4rem;
  border-bottom:1px solid var(--line);
}
.brand,.masthead-end,.university,.top-nav,.install{display:flex;align-items:center}
.brand{gap:.8rem}
.brand img{display:block;width:7.65rem;height:auto}
.brand span,.university span{font-size:1rem;color:var(--text);white-space:nowrap}
.top-nav {
  padding:.24rem;
  gap:.15rem;
  background:rgb(255 224 215 / .065);
  border:1px solid var(--line);
  border-radius:99rem;
}
.top-nav button,.install,.quiet,.reset {
  border:0;
  background:transparent;
}
.top-nav button {
  padding:.28rem 1.09rem;
  border-radius:99rem;
  min-height:2.1rem;
  white-space:nowrap;
}
.top-nav .current{background:var(--ivory);color:#27202a;font-weight:700}
.masthead-end{justify-content:flex-end;gap:1.1rem}
.university {
  gap:.55rem;
  border-inline-start:1px solid var(--line);
  padding-inline-start:1.1rem;
}
.university img{width:2rem;height:auto;display:block;border-radius:2px}
.install {
  display:inline-flex;
  gap:.42rem;
  padding:.25rem .38rem;
  min-height:2.75rem;
  color:var(--text);
  white-space:nowrap;
}

.stage {
  position:relative;
  min-width:0;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:minmax(24rem,1fr) auto;
}
.chapter-rail {
  top:clamp(2rem,6.1vh,4.7rem);
  inset-inline-start:0;
  width:min(13.75rem,20vw);
  position:absolute;
  z-index:2;
}
.rail-title {
  font-size:.94rem;
  color:var(--accent);
  margin-bottom:.72rem;
}
.chapter-rail ol,.chapter-menu,.source-list{list-style:none;padding:0}
.chapter-rail button {
  display:flex;
  text-align:start;
  align-items:center;
  width:100%;
  gap:.65rem;
  background:transparent;
  color:var(--muted);
  border:0;
  border-inline-start:1px solid var(--line);
  min-height:2.06rem;
  padding:.18rem .75rem .18rem .1rem;
  transition:color 140ms,background 140ms;
}
.chapter-rail button[aria-current="step"] {
  color:var(--ivory);
  font-weight:700;
  border-inline-start-color:var(--accent);
  background:linear-gradient(270deg,rgb(244 176 164 / .15),transparent);
}
.rail-number,.exhibit-counter,.estimate,.progress-group {
  font-variant-numeric:tabular-nums;
}
.rail-number{color:var(--accent);font-size:.83rem;display:inline-block;width:1.32rem;flex:none}

.exhibit {
  isolation:isolate;
  position:relative;
  justify-self:center;
  align-self:center;
  display:grid;
  grid-template-rows:auto auto auto;
  justify-items:center;
  gap:.68rem;
  padding:1rem 0;
  margin-inline-start:4rem;
}
.exhibit-counter{display:flex;align-items:center;gap:.75rem;color:var(--text);font-size:.94rem}
.exhibit-counter b{font-weight:700;color:var(--accent)}
.little-line{display:block;width:1.65rem;height:1px;background:var(--line)}
.orbit-lines {
  z-index:-1;
  position:absolute;
  width:min(68vw,47rem);
  aspect-ratio:2.3;
  inset:50% auto auto 50%;
  transform:translate(-50%,-50%) rotate(-13deg);
  border:1px solid rgb(255 215 209 / .14);
  border-radius:50%;
  pointer-events:none;
}
.orbit-lines::after {
  content:"";
  position:absolute;
  inset:-11% -5%;
  border:1px solid rgb(255 215 209 / .09);
  border-radius:50%;
}
.portal {
  display:block;
  position:relative;
  width:clamp(13.75rem,min(26vw,36.3vh),23.5rem);
  aspect-ratio: .98;
  background:none;
  border:none;
  border-radius:26%;
  padding:0;
  transform:perspective(850px) rotateX(0) rotateY(0);
  will-change:transform;
  transition:transform 220ms var(--ease-out);
}
.portal-window {
  display:grid;
  place-items:center;
  width:100%;
  height:100%;
  overflow:hidden;
  border-radius:inherit;
  border:1px solid rgb(255 218 202 / .45);
  background:radial-gradient(circle at 50% 49%,#b47375 0%,#784a58 44%,#3e2737 81%);
  box-shadow:0 0 2.8rem rgb(255 158 148 / .14),inset 0 0 2.2rem rgb(239 163 149 / .23);
}
.portal-window::after {
  position:absolute;
  inset:.43rem;
  border-radius:inherit;
  border:1px solid rgb(255 215 204 / .19);
  content:"";
  pointer-events:none;
}
.portal img {
  display:block;
  width:93%;
  height:93%;
  object-fit:contain;
  filter:drop-shadow(0 0 1.15rem rgb(255 188 162 / .32));
  pointer-events:none;
}
.portal-grip {
  position:absolute;
  inset:auto 50% -.45rem auto;
  transform:translateX(50%);
  display:grid;
  place-items:center;
  width:2.14rem;
  height:2.14rem;
  border-radius:50%;
  background:#21131f;
  border:1px solid rgb(255 218 202 / .65);
  color:var(--accent);
}
.destination {
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:2.75rem;
  margin-top:.22rem;
  gap:.6rem;
  padding:.22rem .82rem;
  color:var(--ivory);
  background:var(--glass);
  border:1px solid var(--line);
  border-radius:99rem;
}
.destination span{font-size:.94rem;color:var(--muted)}
.destination strong{font-size:1.04rem;font-weight:700}

.chapter-copy {
  padding:.35rem 0 1.8rem;
  display:grid;
  grid-template-columns:minmax(0,1.6fr) minmax(16.5rem,.75fr);
  gap:2.5rem;
  align-items:end;
}
.chapter-kicker {color:var(--accent);display:flex;align-items:center;gap:.65rem;font-size:1.15rem;margin-bottom:.58rem}
.chapter-kicker::before{content:"";display:block;height:1px;width:1.75rem;background:var(--accent)}
h1 {
  font-family:Aalto,Zain,"SF Pro",Arial,sans-serif;
  font-size:clamp(3.55rem,6.95vw,7.1rem);
  line-height:.94;
  font-weight:800;
  padding-block-end:.07em;
}
h1 .line{display:block;overflow-wrap:break-word}
h1 .line+.line{color:var(--accent)}
h1 .word{display:inline-block}
h1[data-long]{font-size:clamp(3.35rem,6.45vw,6.3rem)}
.chapter-summary{padding-bottom:.2rem}
.chapter-summary>p {
  font-size:clamp(1.19rem,1.7vw,1.6rem);
  line-height:1.35;
  color:var(--text);
  min-height:3.3rem;
  padding:.68rem 0 .95rem;
  border-top:1px solid var(--line);
}
.summary-actions{display:flex;align-items:center;flex-wrap:wrap;gap:.55rem 1rem}
.solid,.file-link {
  display:inline-flex;
  align-items:center;
  gap:.6rem;
  text-decoration:none;
  background:var(--ivory);
  color:#291923;
  border:1px solid transparent;
  border-radius:99rem;
  padding:.53rem 1.06rem;
  min-height:2.75rem;
  font-weight:700;
  white-space:nowrap;
}
.estimate{font-size:1rem;color:var(--muted)}

.control-bar {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;
  gap:1rem;
  min-height:4.7rem;
  border-top:1px solid var(--line);
}
.progress-group {display:flex;align-items:center;gap:.8rem;color:var(--text);white-space:nowrap}
.progress-bars{display:flex;gap:4px}
.progress-bars span{display:block;width:12px;height:2px;background:rgb(255 223 211 / .25)}
.progress-bars .done{background:#a27676}
.progress-bars .active{background:var(--accent)}
.credits {font-size:.92rem;color:var(--muted);text-align:center}
.credits span{color:var(--text);margin-inline-start:.28rem}
.control-actions {display:flex;align-items:center;justify-content:flex-end;gap:.42rem}
.icon-button,.reset {
  display:grid;
  place-items:center;
  width:2.75rem;
  height:2.75rem;
  border:1px solid var(--line);
  border-radius:50%;
  background:rgb(255 221 218 / .055);
  padding:0;
}
.mobile-list{display:none}
[data-arrival] .chapter-heading,[data-arrival] .chapter-summary {
  animation:arrive 300ms var(--ease-out) both;
}
[data-arrival] .chapter-summary{animation-delay:45ms}
@keyframes arrive{from{opacity:.48;transform:translateY(.48rem)}to{opacity:1;transform:none}}

.sheet {
  position:fixed;
  inset:0 0 0 auto;
  margin:0;
  width:min(40rem,100%);
  height:100%;
  height:100dvh;
  max-width:none;
  max-height:none;
  padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) 0;
  border:0;
  border-left:1px solid var(--line);
  color:var(--ivory);
  background:#20151e;
  box-shadow:-1.5rem 0 5rem rgb(8 4 8 / .48);
}
.sheet[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto;animation:sheet-in 230ms var(--ease-out) both}
.sheet.compact{width:min(33rem,100%);grid-template-rows:auto minmax(0,1fr)}
.sheet::backdrop{background:rgb(13 8 13 / .67)}
@keyframes sheet-in{from{transform:translateX(2.4rem);opacity:.55}to{transform:none;opacity:1}}
.sheet-top,.sheet-bottom{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1.25rem clamp(1.15rem,4.5vw,2.5rem);border-bottom:1px solid var(--line)}
.sheet-top h2{font-size:clamp(2.1rem,5vw,3.2rem);font-weight:800;line-height:1}
.overline{color:var(--accent);font-size:1rem;margin-bottom:.32rem}
.sheet-content {
  overflow:auto;
  overscroll-behavior:contain;
  padding:1.55rem clamp(1.15rem,4.5vw,2.5rem) 2rem;
  color:var(--text);
  font-size:1.24rem;
  line-height:1.57;
}
.sheet-content p+p{margin-top:.74rem}
.guide-script {
  background:#2f1d29;
  border:1px solid var(--line);
  border-inline-start:3px solid var(--accent);
  border-radius:.8rem;
  padding:1rem clamp(.8rem,3vw,1.4rem);
  color:var(--ivory);
}
.sheet-content h3{font-size:1.14rem;color:var(--accent);margin-bottom:.35rem}
.guide-block{padding-top:1rem;margin-top:1.1rem;border-top:1px solid var(--line)}
.guide-block ul{padding-inline-start:1.3rem}
.guide-block li+li{margin-top:.24rem}
.guide-block a{display:inline-block;margin-top:.35rem;color:var(--accent)}
.sheet-bottom{border-bottom:0;border-top:1px solid var(--line);padding-block:.7rem}
.timer{display:flex;gap:.55rem;align-items:center}
.timer output{min-width:3.25rem;color:var(--accent);font-size:1.18rem;font-variant-numeric:tabular-nums}
.quiet{padding:.23rem .38rem;min-height:2.75rem;text-decoration:underline;text-underline-offset:3px}
.reset{width:2.4rem;height:2.4rem;background:none}
.chapter-menu button,.source-list a {
  min-height:3.1rem;
  width:100%;
  display:flex;
  gap:.8rem;
  align-items:center;
  text-align:start;
  padding:.4rem .56rem;
  border:0;
  border-bottom:1px solid var(--line);
  background:none;
  text-decoration:none;
}
.chapter-menu button[aria-current="step"]{background:rgb(245 188 171 / .11);color:var(--accent)}
.file-link{border-radius:.9rem;width:100%;padding:.7rem .85rem}
.file-link span{display:grid}
.file-link small{font-size:1rem;font-weight:400}
.sources-credits{margin:1.1rem 0 .65rem}
#offline-message{border:1px solid var(--line);padding:.75rem 1rem;border-radius:.75rem;color:var(--accent);margin-bottom:1rem}

@media(hover:hover) and (pointer:fine) {
  .chapter-rail button:not([aria-current]):hover,.chapter-menu button:hover,.source-list a:hover{background:rgb(245 188 171 / .09);color:var(--ivory)}
  .top-nav button:not(.current):hover,.destination:hover,.icon-button:not(:disabled):hover,.reset:hover{background:rgb(255 220 215 / .15)}
  .solid:hover,.file-link:hover{background:#f6c4b5}
  .install:hover,.quiet:hover{color:var(--accent)}
}
@media(max-width:70rem){
  .brand span,.university span{display:none}
  .stage{grid-template-rows:minmax(21.5rem,1fr) auto}
  .chapter-rail{top:1.75rem}
}
@media(min-width:51.01rem) and (max-height:48rem) {
  .masthead{min-height:4.4rem}
  .control-bar{min-height:3.9rem}
  .chapter-copy{padding-bottom:1.15rem}
  .stage{grid-template-rows:minmax(19.8rem,1fr) auto}
  .chapter-rail{top:1.2rem}
  .chapter-rail button{min-height:1.91rem}
  .exhibit{padding:.45rem 0;gap:.48rem}
  h1{font-size:clamp(3.8rem,10.7vh,6.3rem)}
  h1[data-long]{font-size:clamp(3.5rem,9.9vh,5.9rem)}
}
@media(max-width:51rem){
  .masthead{min-height:4.5rem}
  .chapter-rail{display:none}
  .exhibit{margin-inline-start:0}
  .stage{grid-template-rows:minmax(20rem,1fr) auto}
  .portal{width:clamp(13.5rem,min(43vw,39vh),19rem)}
  .chapter-copy{gap:1.2rem;grid-template-columns:1.25fr 1fr}
  h1,h1[data-long]{font-size:clamp(3.04rem,8vw,5rem)}
  .mobile-list{display:grid}
}
@media(max-width:36rem){
  :root{--gutter:1.1rem}
  .masthead{min-height:4.15rem;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:.25rem}
  .brand img{width:clamp(3.6rem,18vw,5.7rem)}
  .top-nav{padding:.14rem;gap:0}
  .top-nav button{padding:.17rem .48rem;font-size:.91rem;min-height:2rem}
  .top-nav .open-chapters{display:none}
  .masthead-end{gap:.18rem}
  .university{padding-inline-start:.35rem}
  .university img{width:1.55rem}
  .install{padding:.3rem;min-width:2.45rem;justify-content:center}
  .install span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  .exhibit{padding:.6rem 0;gap:.5rem}
  .portal{width:clamp(10.6rem,min(49vw,27vh),15rem)}
  .destination{margin-top:.24rem;padding:.16rem .64rem;min-height:2.4rem}
  .orbit-lines{width:83vw}
  .stage{grid-template-rows:minmax(14.8rem,1fr) auto}
  .chapter-copy{display:block;padding:.5rem 0 .9rem}
  .chapter-kicker{font-size:1rem;margin-bottom:.33rem}
  h1,h1[data-long]{font-size:clamp(2.65rem,10.5vw,4.2rem);line-height:.93}
  .chapter-summary{padding:0}
  .chapter-summary>p{font-size:1.13rem;min-height:0;margin-top:.62rem;padding:.43rem 0 .55rem}
  .summary-actions{gap:.5rem .8rem}
  .solid{min-height:2.6rem;padding:.39rem .68rem}
  .control-bar{display:flex;flex-wrap:wrap;justify-content:space-between;gap:0 .5rem;padding:.47rem 0 .48rem;min-height:3.3rem}
  .control-actions{gap:.28rem}
  .control-bar .icon-button{height:2.55rem;width:2.55rem}
  .control-bar .credits{order:3;width:100%;padding-top:.28rem;text-align:start;font-size:.87rem}
  .progress-group{gap:.44rem}
  .progress-bars{gap:2px}
  .progress-bars span{width:6px}
  .fullscreen{display:none}
  .sheet{border:0}
  .sheet-bottom{gap:.5rem}
  .timer{gap:.18rem}
  .timer output{min-width:2.55rem}
}
@media(max-width:22rem){
  :root{--gutter:.75rem}
  .top-nav button{padding-inline:.34rem}
  h1[data-long]{font-size:clamp(2.2rem,11.4vw,2.58rem)}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}
}

:root{--chapter-light:#a45d70;--chapter-shadow:#513247}
.scene-halo {
  background:
    radial-gradient(ellipse at 47% 41%,color-mix(in srgb,var(--chapter-light) 46%,transparent),transparent 53%),
    radial-gradient(ellipse at 70% 64%,color-mix(in srgb,var(--chapter-shadow) 46%,transparent),transparent 67%);
}
.chapter-atmosphere {
  position:fixed;
  inset:0;
  background-repeat:no-repeat;
  background-size:min(69vw,52rem) auto;
  background-position:50% 42%;
  filter:blur(3.3rem);
  opacity:.16;
  mix-blend-mode:screen;
  pointer-events:none;
}
.portal-window {
  background:radial-gradient(circle at 50% 49%,color-mix(in srgb,var(--chapter-light) 84%,#ebb5ac) 0%,var(--chapter-light) 44%,var(--chapter-shadow) 81%);
}
.script-head{display:flex;align-items:center;justify-content:space-between;gap:.52rem;flex-wrap:wrap;margin-bottom:.65rem}
.script-head h3{margin:0}
.script-languages{display:flex;align-items:center;gap:.12rem;padding:.17rem;border:1px solid var(--line);border-radius:99rem}
.script-languages button{background:none;border:0;border-radius:99rem;padding:.14rem .65rem;font-size:1rem;color:var(--text);min-height:2.2rem}
.script-languages button[aria-pressed="true"]{background:var(--ivory);font-weight:700;color:#291923}
#script[lang="en"]{font:400 1.03rem/1.63 "SF Pro",Arial,sans-serif;text-align:start}
.english-title{font-size:1.23rem;line-height:1.3;margin:0 0 .65rem;color:var(--accent)}
.navigation-hint{font-size:1.06rem;line-height:1.35;margin-bottom:.7rem;color:var(--muted)}
@media(hover:hover) and (pointer:fine){
  .script-languages button[aria-pressed="false"]:hover{background:rgb(255 220 215 / .15)}
}
@media(min-width:51.01rem){
  h1[data-long]{font-size:clamp(3.05rem,min(5.8vw,10vh),5.4rem)}
}
@media(max-width:36rem) and (max-height:45rem){
  .masthead{min-height:3.6rem}
  .stage{grid-template-rows:minmax(12.1rem,1fr) auto}
  .exhibit{gap:.34rem;padding:.32rem 0}
  .portal{width:clamp(8.4rem,min(43vw,23vh),10.1rem)}
  .destination{min-height:2.21rem}
  h1,h1[data-long]{font-size:clamp(2.23rem,9.7vw,2.75rem)}
  .chapter-copy{padding:.28rem 0 .57rem}
  .chapter-summary>p{margin-top:.52rem;font-size:1.05rem}
  .control-bar .credits{font-size:.81rem;padding-top:.16rem}
}
@media(pointer:coarse){
  .fits-screen .portal{touch-action:pan-x pinch-zoom}
}

.file-link + .file-link{margin-top:.65rem}

.chapter-rail {
  width:min(15.5rem,23.5vw);
  top:clamp(1.15rem,4.5vh,3.3rem);
}
.rail-title{padding-inline:.55rem;margin-bottom:.7rem}
.chapter-rail ol{display:grid;gap:.25rem}
.chapter-rail button {
  display:grid;
  grid-template-columns:1.58rem minmax(0,1fr) auto;
  gap:.51rem;
  min-height:2.05rem;
  padding:.17rem .41rem;
  border:1px solid transparent;
  border-radius:99rem;
  line-height:1.06;
}
.chapter-rail button[aria-current="step"] {
  border-color:rgb(255 209 195 / .48);
  background:linear-gradient(100deg,rgb(50 29 39 / .89),rgb(122 75 77 / .57));
  box-shadow:0 0 1.5rem rgb(245 181 158 / .09),inset 0 1px rgb(255 242 230 / .08);
}
.chapter-bubble {
  display:block;
  width:1.58rem;
  height:1.58rem;
  aspect-ratio:1;
  border-radius:50%;
  border:1px solid rgb(255 213 196 / .3);
  background-image:url("./assets/chapter-bubbles.webp");
  background-size:100% 900%;
  background-repeat:no-repeat;
  opacity:.76;
}
button[aria-current="step"] .chapter-bubble {
  border-color:#ffd5bd;
  box-shadow:0 0 .55rem rgb(255 176 150 / .38);
  opacity:1;
}
.rail-label{min-width:0}
.chapter-rail .rail-number{font-size:.85rem;text-align:center;width:auto;min-width:1.25rem}
.chapter-menu button{gap:.72rem;border-radius:.55rem}
.chapter-menu .chapter-bubble{width:2.28rem;height:2.28rem;flex:none}
.chapter-menu .rail-label{flex:1}

.bubble-field{position:absolute;inset:0;z-index:-1;pointer-events:none}
.bubble-field i {
  position:absolute;
  width:var(--size);
  aspect-ratio:1;
  inset:var(--top) auto auto var(--left);
  border-radius:50%;
  border:1px solid rgb(255 221 204 / .23);
  background:radial-gradient(circle at 27% 23%,rgb(255 213 193 / .32),transparent 28%),
    radial-gradient(circle at 74% 79%,color-mix(in srgb,var(--chapter-light) 50%,transparent),transparent 65%);
  box-shadow:inset -.14rem -.16rem .5rem rgb(255 173 151 / .12),0 0 1.05rem rgb(255 168 154 / .1);
}
.bubble-field i:nth-child(1){--size:clamp(2rem,5vw,4.2rem);--top:20%;--left:-31%}
.bubble-field i:nth-child(2){--size:clamp(.75rem,1.45vw,1.3rem);--top:30%;--left:-39%;opacity:.72}
.bubble-field i:nth-child(3){--size:clamp(1.6rem,3.6vw,3.1rem);--top:62%;--left:122%}
.bubble-field i:nth-child(4){--size:.72rem;--top:72%;--left:116%;opacity:.66}
@media(max-width:36rem){
  .stage{overflow-x:clip}
  .bubble-field i:nth-child(1){--left:-8%}
  .bubble-field i:nth-child(2){--left:-11%;--top:38%}
  .bubble-field i:nth-child(3){--left:93%}
  .bubble-field i:nth-child(4){--left:97%;--top:80%}
  .chapter-atmosphere{background-size:95vw auto;filter:blur(2.2rem)}
}
@media(min-width:51.01rem) and (max-height:47rem){
  .chapter-rail ol{gap:.13rem}
  .chapter-rail button{min-height:1.87rem;font-size:.94rem}
  .chapter-rail .chapter-bubble{height:1.42rem;width:1.42rem}
}

/* Very small phones (iPhone SE 1st gen and similar) */
@media(max-width:36rem) and (max-height:37rem){
  .masthead{min-height:3.3rem}
  .stage{grid-template-rows:minmax(10.5rem,1fr) auto}
  .exhibit{gap:.25rem;padding:.2rem 0}
  .exhibit-counter{font-size:.85rem}
  .portal{width:clamp(7.4rem,min(40vw,21vh),9rem)}
  .destination{min-height:2.1rem;margin-top:.1rem}
  h1,h1[data-long]{font-size:clamp(2rem,9.4vw,2.4rem)}
  .chapter-kicker{margin-bottom:.2rem}
  .chapter-summary>p{font-size:1rem;margin-top:.4rem;padding:.35rem 0 .45rem}
  .solid{min-height:2.45rem}
  .control-bar{padding:.3rem 0}
}

/* Phones held sideways: artwork beside the text so everything fits on one screen */
@media(orientation:landscape) and (max-height:32rem){
  :root{--gutter:max(1rem,env(safe-area-inset-left,0px))}
  .masthead{min-height:3.3rem;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:.5rem}
  .brand img{width:5.2rem}
  .brand span,.university span,.install span{display:none}
  .top-nav button{min-height:2rem;padding:.15rem .8rem}
  .chapter-rail{display:none}
  .mobile-list{display:grid}
  .stage{
    grid-template-columns:auto minmax(0,1fr);
    grid-template-rows:minmax(0,1fr);
    align-items:center;
    column-gap:clamp(1.25rem,4vw,3rem);
    overflow-x:clip;
  }
  .exhibit{margin:0;padding:.4rem 0;gap:.3rem}
  .exhibit-counter{font-size:.85rem}
  .portal{width:clamp(7rem,40vh,12.5rem)}
  .destination{min-height:2.2rem;margin-top:.15rem;padding:.12rem .7rem}
  .destination span{font-size:.85rem}
  .destination strong{font-size:.95rem}
  .orbit-lines{width:min(46vw,26rem)}
  .chapter-copy{display:block;padding:.4rem 0}
  .chapter-kicker{font-size:.95rem;margin-bottom:.25rem}
  h1,h1[data-long]{font-size:clamp(1.9rem,11.5vh,3rem);line-height:.95}
  .chapter-summary>p{font-size:clamp(.98rem,4.2vh,1.12rem);min-height:0;margin-top:.45rem;padding:.4rem 0 .55rem}
  .solid{min-height:2.4rem;padding:.3rem .8rem}
  .control-bar{min-height:3.1rem;gap:.75rem}
  .control-bar .icon-button{width:2.45rem;height:2.45rem}
  .credits{font-size:.82rem}
  .sheet-top{padding-block:.7rem}
  .sheet-top h2{font-size:1.9rem}
}
@media(max-width:36rem) and (max-height:41rem){
  .chapter-copy{padding-bottom:.4rem}
  .control-bar .credits{padding-top:.1rem}
  .exhibit{padding-block:.15rem}
}

/* ---------- Motion system ---------- */
:root{
  --ease-out-expo:cubic-bezier(.16,1,.3,1);
  font-kerning:normal;
  text-rendering:optimizeLegibility;
}
h1{text-wrap:balance}
.chapter-summary>p,.sheet-content p,.navigation-hint{text-wrap:pretty}

/* First paint stays hidden only until the intro starts (with a no-JS safety net) */
.intro .exhibit,.intro .chapter-copy,.intro .masthead,.intro .control-bar{opacity:0;animation:intro-safety 0s 2.4s forwards}
@keyframes intro-safety{to{opacity:1}}

/* Zoom-through layer: one composited element, transform + opacity only */
.travel{
  position:fixed;
  inset:auto;
  z-index:5;
  display:grid;
  place-items:center;
  overflow:hidden;
  pointer-events:none;
  border-radius:26%;
  background:radial-gradient(circle at 50% 49%,color-mix(in srgb,var(--chapter-light) 84%,#ebb5ac) 0%,var(--chapter-light) 44%,var(--chapter-shadow) 81%);
  transform-origin:50% 50%;
  will-change:transform,opacity;
  backface-visibility:hidden;
}
.travel img{width:93%;height:93%;object-fit:contain}

.chapter-kicker::before{transform-origin:right center}
.exhibit,.chapter-copy{will-change:auto}
.app.pulling .exhibit,.app.pulling .chapter-copy{will-change:transform,opacity}

/* Tactile press feedback */
.solid,.icon-button,.destination,.top-nav button,.install,.file-link,.script-languages button,.chapter-menu button,.chapter-rail button{
  transition:transform 160ms var(--ease-out),background-color 200ms,color 200ms,border-color 200ms,box-shadow 200ms;
}
.solid:active,.icon-button:not(:disabled):active,.destination:active,.top-nav button:active,.install:active,.file-link:active,.script-languages button:active{transform:scale(.96)}
.chapter-menu button:active,.chapter-rail button:active{transform:scale(.985)}

.progress-bars span{transition:background-color 500ms var(--ease-out),transform 500ms var(--ease-out);transform-origin:center}
.progress-bars .active{transform:scaleY(1.9)}

/* Calm ambient life — composited transforms only */
@media(prefers-reduced-motion:no-preference){
  .bubble-field i{animation:bubble-drift var(--drift,9s) ease-in-out infinite alternate}
  .bubble-field i:nth-child(2){--drift:7s;animation-delay:-2s}
  .bubble-field i:nth-child(3){--drift:11s;animation-delay:-5s}
  .bubble-field i:nth-child(4){--drift:8s;animation-delay:-1s}
  .orbit-lines{animation:orbit-sway 16s ease-in-out infinite alternate}
}
@keyframes portal-float{0%,100%{transform:translate3d(0,0,0)}50%{transform:translate3d(0,-6px,0)}}
@keyframes bubble-drift{from{transform:translate3d(0,0,0)}to{transform:translate3d(4px,-16px,0)}}
@keyframes orbit-sway{from{transform:translate(-50%,-50%) rotate(-15deg)}to{transform:translate(-50%,-50%) rotate(-9deg)}}
@keyframes grip-nudge{0%,70%,100%{transform:translateX(50%)}82%{transform:translateX(calc(50% - 4px))}}
/* Motion offsets never create scrollbars */
.app{overflow:clip}

/* ---------- Stability ---------- */
html{overflow-x:clip}
.chapter-heading{display:flex;flex-direction:column;justify-content:flex-end}
.destination{flex:none}
.exhibit-counter b,#chapter-count,.estimate{font-variant-numeric:tabular-nums}
img{-webkit-user-drag:none}
button,.portal img,.file-link{-webkit-touch-callout:none}
.portal img{user-select:none;-webkit-user-select:none}

/* ---------- Panels: slide in and out instead of popping ---------- */
.sheet{
  transform:translateX(100%);
  transition:transform 260ms cubic-bezier(.55,0,.7,.2),overlay 260ms allow-discrete,display 260ms allow-discrete;
}
.sheet[open]{
  animation:none;
  transform:none;
  transition:transform 480ms var(--ease-out-expo),overlay 480ms allow-discrete,display 480ms allow-discrete;
}
@starting-style{.sheet[open]{transform:translateX(100%)}}
.sheet::backdrop{background:rgb(13 8 13 / 0);transition:background-color 300ms,overlay 300ms allow-discrete,display 300ms allow-discrete}
.sheet[open]::backdrop{background:rgb(13 8 13 / .67)}
@starting-style{.sheet[open]::backdrop{background:rgb(13 8 13 / 0)}}
@media(prefers-reduced-motion:reduce){
  .sheet,.sheet[open],.sheet::backdrop{transition:none}
}

.gesture-hint{
  position:fixed;
  z-index:4;
  left:50%;
  transform:translate(-50%,0);
  margin:0;
  max-width:calc(100vw - 2rem);
  padding:.32rem .95rem;
  border:1px solid var(--line);
  border-radius:99rem;
  background:rgb(31 19 27 / .88);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  color:var(--ivory);
  font-size:.9rem;
  line-height:1.3;
  white-space:nowrap;
  pointer-events:none;
  box-shadow:0 .6rem 2rem rgb(8 4 8 / .4);
}
@media(orientation:landscape) and (max-height:24.5rem){
  .masthead{min-height:3rem}
  .control-bar{min-height:2.9rem}
  h1,h1[data-long]{font-size:clamp(1.65rem,9.6vh,2.3rem)}
  .chapter-kicker{font-size:.88rem;margin-bottom:.15rem}
  .chapter-summary>p{font-size:.95rem;margin-top:.3rem;padding:.3rem 0 .4rem}
  .solid{min-height:2.25rem;padding-block:.2rem}
  .portal{width:clamp(6.5rem,36vh,10rem)}
}
/* Text columns never resize with the chapter's content */
@media(min-width:36.01rem){
  .chapter-copy{grid-template-columns:minmax(0,1.6fr) minmax(19.5rem,.75fr)}
  .summary-actions{flex-wrap:nowrap}
}
@media(min-width:36.01rem) and (max-width:51rem){
  .chapter-copy{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)}
  .summary-actions{flex-wrap:wrap}
}
/* Laptops and landscape tablets: size the art and title by height too */
@media(min-width:51.01rem) and (min-height:32.01rem){
  .portal{width:clamp(13.75rem,min(26vw,32vh),23.5rem)}
}
@media(min-width:51.01rem) and (min-height:32.01rem) and (max-height:50rem){
  h1{font-size:clamp(3.3rem,min(6.95vw,9.4vh),6.3rem)}
  h1[data-long]{font-size:clamp(3rem,min(5.8vw,8.8vh),5.4rem)}
}
