@font-face {
  font-family: "JetBrains Mono";
  src: url("./assets/fonts/jetbrains-mono-400.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@property --focus-x {
  syntax: "<length-percentage>";
  inherits: true;
  initial-value: 75%;
}
@property --focus-y {
  syntax: "<length-percentage>";
  inherits: true;
  initial-value: 75.5%;
}
@property --focus-image-x {
  syntax: "<length-percentage>";
  inherits: true;
  initial-value: 75%;
}
@property --focus-image-y {
  syntax: "<length-percentage>";
  inherits: true;
  initial-value: 75.5%;
}
@property --focus-w {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 19.2%;
}
@property --focus-h {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 12.8%;
}
@property --focus-colour {
  syntax: "<color>";
  inherits: true;
  initial-value: #b783f2;
}

:root {
  --outer: #050606;
  --ink: #f0ebe2;
  --muted: #a19b91;
  --dim: #69645d;
  --line: rgba(245, 238, 225, .14);
  --line-strong: rgba(245, 238, 225, .24);
  --glass: rgba(9, 10, 10, .64);
  --glass-deep: rgba(8, 9, 9, .79);
  --accent: #b783f2;
  --accent-soft: rgba(183, 131, 242, .16);
  --bronze: #c09a68;
  --rail: 306px;
  --gutter: 14px;
  --player-controls-height: 44px;
  --episode-footer-height: 56px;
  --ease-touch: cubic-bezier(.2, .72, .28, 1);
  --ease-glass: cubic-bezier(.22, .74, .24, 1);
  --ease-light: cubic-bezier(.16, .76, .22, 1);
  --motion-touch: 160ms;
  --motion-interface: 380ms;
  --motion-glass: 520ms;
  --motion-light: 720ms;
  --motion-scene: 2800ms;
  --motion-room-arrival: 4400ms;
  --motion-room-resolve: 1400ms;
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; background: var(--outer); color: var(--ink); }
html { overflow: hidden; }
body {
  position: fixed;
  inset: 0;
  overflow: hidden;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.app-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: var(--gutter);
  background:
    radial-gradient(circle at 50% 0%, rgba(140, 108, 182, .07), transparent 36%),
    #050606;
}

.restart-confirmation {
  position: absolute;
  z-index: 80;
  inset: var(--gutter);
  display: grid;
  place-items: center;
  padding: 28px;
  overflow: hidden;
  border-radius: 11px;
  background: rgba(3, 4, 4, 0);
  backdrop-filter: blur(0) saturate(1) brightness(1);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 620ms var(--ease-glass),
    background 760ms var(--ease-glass),
    backdrop-filter 760ms var(--ease-glass),
    visibility 0s linear 780ms;
}
.restart-confirmation.is-open {
  background: rgba(3, 4, 4, .24);
  backdrop-filter: blur(15px) saturate(.68) brightness(.62);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
.restart-confirmation-card {
  width: min(540px, calc(100vw - 72px));
  padding: 42px 44px 38px;
  border: 1px solid rgba(240, 235, 226, .18);
  border-radius: 3px;
  background:
    linear-gradient(145deg, rgba(19, 18, 20, .84), rgba(6, 7, 7, .76));
  box-shadow:
    0 34px 110px rgba(0, 0, 0, .5),
    inset 0 1px rgba(255, 255, 255, .025);
  opacity: 0;
  filter: blur(12px);
  transform: translateY(7px) scale(.985);
  transition:
    opacity 680ms var(--ease-glass),
    filter 760ms var(--ease-glass),
    transform 760ms var(--ease-glass);
}
.restart-confirmation.is-open .restart-confirmation-card {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scale(1);
}
.restart-confirmation-card > span {
  display: block;
  margin-bottom: 22px;
  color: rgba(199, 169, 239, .78);
  font: 400 8px/1 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: .19em;
}
.restart-confirmation-card h2 {
  margin: 0;
  color: rgba(244, 238, 229, .96);
  font: 400 clamp(28px, 2.3vw, 36px)/1.08 Georgia, "Times New Roman", serif;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.restart-confirmation-card p {
  max-width: 430px;
  margin: 18px 0 0;
  color: rgba(218, 211, 201, .68);
  font-size: 12px;
  line-height: 1.65;
  text-wrap: pretty;
}
.restart-confirmation-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 34px;
}
.restart-confirmation-actions button {
  min-width: 132px;
  min-height: 42px;
  padding: 0 17px;
  border: 1px solid rgba(240, 235, 226, .16);
  border-radius: 2px;
  background: rgba(255, 255, 255, .018);
  color: rgba(235, 228, 218, .72);
  font: 400 9px/1 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: .1em;
  cursor: pointer;
  transition:
    color var(--motion-interface) var(--ease-touch),
    border-color var(--motion-interface) var(--ease-touch),
    background var(--motion-interface) var(--ease-touch),
    box-shadow var(--motion-interface) var(--ease-touch),
    transform var(--motion-touch) var(--ease-touch);
}
.restart-confirmation-actions button:hover {
  color: rgba(247, 241, 232, .96);
  border-color: rgba(210, 184, 242, .44);
  background: rgba(196, 164, 241, .045);
}
.restart-confirmation-actions button:active { transform: scale(.985); }
.restart-confirmation-actions .restart-watch {
  border-color: rgba(210, 184, 242, .34);
  color: rgba(239, 229, 249, .9);
}
.shell {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  transition: grid-template-columns 1100ms cubic-bezier(.16, .76, .22, 1);
  grid-template-rows: minmax(0, 1fr);
  width: 100%;
  height: 100%;
  overflow: hidden;
  overflow: clip;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 11px;
  background: #0a0a0a;
  box-shadow:
    0 0 0 1px rgba(0,0,0,.95),
    0 22px 80px rgba(0,0,0,.6),
    inset 0 0 50px rgba(255,255,255,.015);
}
.scene-background {
  position: absolute;
  z-index: -3;
  inset: 0;
  background-image: var(--scene-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.018);
  filter: saturate(.74) brightness(.52);
  transition:
    opacity var(--motion-light) var(--ease-light),
    filter var(--motion-light) var(--ease-light);
}
.scene-transition-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  filter: blur(12px) brightness(.72) saturate(.68);
  transform: scale(1.032);
  will-change: opacity, filter, transform;
  backface-visibility: hidden;
}
.mountain-focus {
  position: absolute;
  inset: 0;
  pointer-events: none;
  --focus-x: 75%;
  --focus-y: 75.5%;
  --focus-image-x: 75%;
  --focus-image-y: 75.5%;
  --focus-w: 19.2%;
  --focus-h: 12.8%;
  --focus-colour: #b783f2;
  transition:
    --focus-x var(--motion-light) var(--ease-light),
    --focus-y var(--motion-light) var(--ease-light),
    --focus-image-x var(--motion-light) var(--ease-light),
    --focus-image-y var(--motion-light) var(--ease-light),
    --focus-w var(--motion-light) var(--ease-light),
    --focus-h var(--motion-light) var(--ease-light),
    --focus-colour 560ms var(--ease-light);
}
.mountain-focus::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(
    ellipse var(--focus-w) var(--focus-h)
    at var(--focus-x) var(--focus-y),
    color-mix(in srgb, var(--focus-colour) 24%, transparent) 0,
    color-mix(in srgb, var(--focus-colour) 9%, transparent) 42%,
    transparent 76%
  );
  mix-blend-mode: screen;
  filter: blur(8px);
  opacity: 0;
  transition: opacity 620ms var(--ease-light);
}
.mountain-focus-image {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: var(--scene-next-image, var(--scene-image));
  background-size: cover;
  background-position: center;
  transform: scale(1.018);
  filter: brightness(1.04) saturate(1.12) contrast(1.02);
  opacity: 0;
  transition:
    opacity 620ms var(--ease-light),
    filter var(--motion-light) var(--ease-light);
  -webkit-mask-image: radial-gradient(
    ellipse var(--focus-w) var(--focus-h) at var(--focus-image-x) var(--focus-image-y),
    #000 0 34%,
    rgba(0,0,0,.76) 58%,
    transparent 82%
  );
  mask-image: radial-gradient(
    ellipse var(--focus-w) var(--focus-h) at var(--focus-image-x) var(--focus-image-y),
    #000 0 34%,
    rgba(0,0,0,.76) 58%,
    transparent 82%
  );
}
.mountain-location {
  position: absolute;
  z-index: 6;
  left: var(--focus-x);
  top: var(--focus-y);
  display: flex;
  align-items: center;
  gap: 11px;
  transform: translate(-5px, -50%);
  filter: blur(4px) drop-shadow(0 2px 12px rgba(0,0,0,.9));
  opacity: 0;
  transition:
    opacity 440ms var(--ease-glass),
    filter 440ms var(--ease-glass),
    transform 440ms var(--ease-glass);
}
.mountain-location.is-changing {
  opacity: .12;
  filter: blur(7px) drop-shadow(0 2px 12px rgba(0,0,0,.9));
  transform: translate(-5px, -50%) scale(.97);
}
.mountain-location i {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--focus-colour);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--focus-colour) 22%, transparent),
    0 0 24px color-mix(in srgb, var(--focus-colour) 84%, transparent);
}
.mountain-location span {
  position: relative;
  display: block;
  margin-left: var(--location-label-offset, 12px);
  padding: 5px 8px 5px 5px;
  background: linear-gradient(90deg, rgba(5,6,7,.68), rgba(5,6,7,.34) 68%, transparent);
  color: rgba(248,243,233,.9);
  font: 600 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 1px 10px rgba(0,0,0,.96);
  transition: margin-left var(--motion-light) var(--ease-light);
}
.mountain-location span::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  width: calc(var(--location-label-offset, 12px) + 5px);
  height: 1px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--focus-colour) 72%, transparent),
    color-mix(in srgb, var(--focus-colour) 22%, transparent));
  transition: width var(--motion-light) var(--ease-light);
}
.shell.is-mountain-focus .scene-background {
  filter: saturate(.58) brightness(.34);
}
.shell.is-mountain-focus .mountain-focus-image,
.shell.is-mountain-focus .mountain-location,
.shell.is-mountain-focus .mountain-focus::after { opacity: 1; }
.shell.is-mountain-focus .mountain-location {
  filter: blur(0) drop-shadow(0 2px 12px rgba(0,0,0,.9));
}
.shell.is-mountain-focus .mountain-location.is-changing {
  opacity: .12;
  filter: blur(7px) drop-shadow(0 2px 12px rgba(0,0,0,.9));
  transform: translate(-5px, -50%) scale(.97);
}
/* Internal cartography instrument. It exists only behind ?tuneMarkers=1. */
.marker-tuner-pins {
  position: absolute;
  z-index: 32;
  inset: 0;
  pointer-events: none;
}
.marker-tuner-pin {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translate(-6px, -50%);
  color: rgba(247,242,233,.76);
  font: 600 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-shadow: 0 2px 12px #000;
  white-space: nowrap;
}
.marker-tuner-pin::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: none;
  border: 2px solid rgba(255,255,255,.92);
  border-radius: 50%;
  background: var(--pin-colour);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--pin-colour) 23%, transparent), 0 0 22px var(--pin-colour);
}
.marker-tuner-pin.is-active { color: #fff; }
.marker-tuner-pin.is-active::before {
  width: 14px;
  height: 14px;
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--pin-colour) 28%, transparent), 0 0 30px var(--pin-colour);
}
.marker-tuner {
  position: absolute;
  z-index: 45;
  top: 22px;
  right: 22px;
  width: min(290px, calc(100% - 44px));
  padding: 22px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(7,8,9,.88);
  color: #d7d1c8;
  box-shadow: 0 24px 70px rgba(0,0,0,.46), inset 0 0 0 1px rgba(255,255,255,.025);
  backdrop-filter: blur(18px);
}
.marker-tuner > span,
.marker-tuner label,
.marker-tuner output {
  display: block;
  color: #a991da;
  font: 7px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.marker-tuner h2 { margin: 10px 0 7px; font: 400 24px/1.08 Georgia, serif; }
.marker-tuner p { margin: 0 0 18px; color: #948e85; font-size: 10px; line-height: 1.55; }
.marker-tuner label { margin-bottom: 7px; color: #777168; }
.marker-tuner select {
  width: 100%;
  min-height: 42px;
  padding: 0 34px 0 12px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 2px;
  appearance: none;
  background: rgba(255,255,255,.045) linear-gradient(45deg, transparent 50%, #aaa 50%) calc(100% - 15px) 17px / 5px 5px no-repeat;
  color: #eee8df;
  font: 11px/1.2 system-ui, sans-serif;
}
.marker-tuner output { min-height: 28px; padding-top: 12px; color: #d5cec4; }
.marker-tuner-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 13px; }
.marker-tuner button,
.marker-tuner a {
  min-height: 38px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 2px;
  background: rgba(255,255,255,.045);
  color: #dcd6cc;
  font: 600 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}
.marker-tuner button:hover,
.marker-tuner button:focus-visible,
.marker-tuner a:hover,
.marker-tuner a:focus-visible { border-color: #a991da; color: #fff; outline: 0; }
.marker-tuner-copy { grid-column: 1 / -1; }
.shell.is-marker-tuning { cursor: crosshair; }
.shell.is-marker-tuning .mountain-overview { opacity: 0; pointer-events: none; }
.shell.is-marker-tuning .rail { opacity: .22; pointer-events: none; }
.shell.is-marker-tuning .scene-background { filter: saturate(.9) brightness(.72); }
.shell.is-marker-tuning .scene-veil { opacity: .14; }
.shell.is-marker-tuning .mountain-location { opacity: 0 !important; }

@media (max-width: 620px) {
  .marker-tuner { top: 10px; right: 10px; padding: 17px; }
  .marker-tuner-pin span { display: none; }
}
.scene-veil {
  position: absolute;
  z-index: -2;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4,5,5,.76) 0%, rgba(4,5,5,.24) 45%, rgba(4,5,5,.56) 100%),
    linear-gradient(180deg, rgba(2,3,3,.38), rgba(2,3,3,.15) 42%, rgba(2,3,3,.62));
  opacity: 1;
  pointer-events: none;
  transition: opacity var(--motion-light) var(--ease-light);
}
.shell.is-room-entering .scene-background {
  filter: saturate(.84) brightness(.61);
}
.shell.is-room-entering .scene-veil {
  opacity: .58;
}

/* ---- the credits take the room ------------------------------------------
   The rail draws back to the left like a curtain, the credits play against
   the full surface, and it comes back when the piece is over. */
.shell.is-cinema { grid-template-columns: 0px minmax(0, 1fr); }
.shell.is-cinema .rail {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}
.rail {
  transition:
    transform 1100ms cubic-bezier(.16, .76, .22, 1),
    opacity 700ms ease;
}
@media (prefers-reduced-motion: reduce) {
  .shell, .rail { transition: none; }
}

.rail {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 25px 20px 18px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(18, 19, 19, .43), rgba(7, 8, 8, .34));
  backdrop-filter: blur(21px) saturate(.9) brightness(1.04);
  box-shadow:
    20px 0 60px rgba(0,0,0,.1),
    inset -1px 0 rgba(255,255,255,.025);
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  height: 46px;
  padding-inline: 5px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  outline: none;
  transition:
    background var(--motion-interface) var(--ease-glass),
    box-shadow var(--motion-interface) var(--ease-glass);
}
.brand:hover { background: rgba(255,255,255,.025); }
.brand:focus-visible {
  background: rgba(196,164,241,.045);
  box-shadow: 0 0 0 1px rgba(196,164,241,.38);
}
.sigil {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 2px;
  font: 17px/1 Georgia, serif;
  color: #d4c0f5;
  overflow: hidden;
  transition:
    border-color var(--motion-interface) var(--ease-glass),
    color var(--motion-interface) var(--ease-glass),
    box-shadow var(--motion-interface) var(--ease-glass);
}
/* The mark carries its own frame in the artwork, so it sits inside the box
   with a little air rather than filling it edge to edge. */
.sigil img {
  display: block;
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.brand:is(:hover, :focus-visible) .sigil {
  border-color: rgba(212,192,245,.62);
  color: #e2d4f7;
  box-shadow: 0 0 24px rgba(196,164,241,.08);
}
.brand > span:last-child { display: grid; gap: 4px; }
.brand b { font-size: 13px; font-weight: 560; letter-spacing: .02em; }
.brand em { color: #8d877f; font-size: 8px; font-style: normal; letter-spacing: .18em; }

.utility {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3px;
  margin: 34px 0 28px;
}
.utility-button {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #a5a098;
  text-align: left;
  cursor: pointer;
  font-size: 11px;
  transition:
    color var(--motion-touch) var(--ease-touch),
    border-color var(--motion-interface) var(--ease-glass),
    background var(--motion-interface) var(--ease-glass),
    box-shadow var(--motion-interface) var(--ease-glass);
}
.utility-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--accent-soft), transparent 72%);
  opacity: 0;
  transform: scaleX(.45);
  transform-origin: left;
  transition:
    opacity var(--motion-interface) var(--ease-glass),
    transform var(--motion-interface) var(--ease-glass);
  pointer-events: none;
}
.utility-button > * {
  position: relative;
  z-index: 1;
}
.utility-button:hover {
  color: var(--ink);
  border-color: rgba(255,255,255,.06);
  background: rgba(255,255,255,.035);
}
.utility-button.is-current {
  color: #e8dafc;
  border-color: rgba(203,178,239,.08);
  background: var(--accent-soft);
  box-shadow: inset 1px 0 0 color-mix(in srgb, var(--accent) 76%, transparent);
}
.utility-button:hover::before,
.utility-button.is-current::before {
  opacity: .58;
  transform: scaleX(1);
}
.utility-button:active {
  background: color-mix(in srgb, var(--accent) 13%, rgba(255,255,255,.025));
}
.utility-icon {
  width: 18px;
  height: 18px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.45;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition:
    transform var(--motion-touch) var(--ease-touch),
    filter var(--motion-interface) var(--ease-glass);
}
.utility-button:hover .utility-icon,
.utility-button.is-current .utility-icon {
  transform: translateX(1px);
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 36%, transparent));
}
.utility-button i {
  color: #7c766e;
  font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  font-style: normal;
  letter-spacing: .06em;
}
.rail-label {
  margin: 0 12px 10px;
  color: #767068;
  font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.episode-list { display: grid; gap: 2px; }
.episode-button {
  position: relative;
  display: grid;
  grid-template-columns: 27px 1fr auto;
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #aaa49c;
  text-align: left;
  cursor: pointer;
  transition:
    opacity var(--motion-interface) var(--ease-glass),
    color var(--motion-touch) var(--ease-touch),
    background var(--motion-interface) var(--ease-glass),
    border-color var(--motion-interface) var(--ease-glass),
    box-shadow var(--motion-interface) var(--ease-glass);
}
.episode-button:hover { background: rgba(255,255,255,.035); color: var(--ink); }
.episode-button.is-current {
  border-color: rgba(255,255,255,.07);
  background: rgba(17,18,18,.54);
  box-shadow: inset 2px 0 0 var(--accent);
  color: var(--ink);
}
.episode-button .code {
  color: #787168;
  font: 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.episode-button.is-current .code { color: var(--accent); }
.episode-button .name {
  display: grid;
  gap: 4px;
  min-width: 0;
  transform: translateX(0);
  transition: transform var(--motion-touch) var(--ease-touch);
}
.episode-button:hover .name,
.episode-button.is-preview .name { transform: translateX(2px); }
.episode-button:active .name { transform: translateX(1px); }
.episode-button .name b {
  overflow: hidden;
  font-size: 11px;
  font-weight: 520;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.episode-button .name span {
  overflow: hidden;
  color: #716c65;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.episode-button .check { color: var(--bronze); font-size: 11px; }
.rail-lower {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  min-width: 0;
  margin-top: auto;
}
.course-progress {
  position: relative;
  margin-top: 0;
  padding: 8px 12px 0;
}
.course-progress::before {
  display: none;
}
.course-progress > div:first-child {
  display: flex;
  justify-content: space-between;
  color: #777168;
  font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.course-progress b { color: #b8b0a6; font-weight: 500; }
.course-progress.is-updated { animation: progress-confirmation 760ms var(--ease-glass) both; }
.progress-track { height: 1px; margin-top: 12px; background: var(--line); }
.progress-track i {
  display: block;
  width: 0;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 9px color-mix(in srgb, var(--accent) 50%, transparent);
  transition: width 620ms var(--ease-light);
}

.main {
  position: relative;
  z-index: 2;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.view-curtain {
  position: absolute;
  z-index: 19;
  inset: 0;
  background: #070808;
  opacity: 0;
  pointer-events: none;
  will-change: opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
}
.view-curtain.is-active { pointer-events: auto; }
.topbar {
  position: relative;
  z-index: 5;
  display: none !important;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 66px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(5,6,6,.2), rgba(5,6,6,.07));
  backdrop-filter: saturate(.88) brightness(.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
  transition:
    background var(--motion-glass) var(--ease-glass),
    backdrop-filter var(--motion-glass) var(--ease-glass);
}
.room-arrival {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 0;
  padding: 40px;
  pointer-events: none;
  text-align: center;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(8px);
}
.room-arrival.is-visible {
  animation: room-arrival var(--motion-room-arrival) var(--ease-light) both;
}
.room-arrival span {
  color: var(--accent);
  font: 600 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .17em;
  text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(0,0,0,.95);
}
.room-arrival h2 {
  margin: 16px 0 0;
  color: rgba(246,241,232,.96);
  font: 400 clamp(30px, 3vw, 52px)/1.08 Georgia, serif;
  letter-spacing: -.025em;
  text-wrap: balance;
  text-shadow: 0 3px 32px rgba(0,0,0,.92);
}
.room-arrival-motto {
  margin: 16px 0 0;
  display: grid;
  color: rgba(226,216,201,.68);
  font: 400 clamp(13px, 1vw, 16px)/1.35 Georgia, "Times New Roman", serif;
  letter-spacing: .045em;
  cursor: default;
  outline: none;
  pointer-events: none;
  text-shadow: 0 2px 22px rgba(0,0,0,.96);
}
.room-arrival.is-visible .room-arrival-motto { pointer-events: auto; }
.room-arrival-motto > span {
  grid-area: 1 / 1;
  min-width: 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-shadow: inherit;
  text-transform: none;
  transition:
    opacity 520ms var(--ease-glass),
    filter 620ms var(--ease-glass),
    transform 620ms var(--ease-glass),
    color 520ms var(--ease-glass);
}
.room-arrival-motto-greek {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}
.room-arrival-motto-english {
  opacity: 0;
  filter: blur(7px);
  transform: translateY(2px);
}
.room-arrival-motto:hover .room-arrival-motto-greek,
.room-arrival-motto:focus-visible .room-arrival-motto-greek {
  opacity: 0;
  filter: blur(7px);
  transform: translateY(-2px);
}
.room-arrival-motto:hover .room-arrival-motto-english,
.room-arrival-motto:focus-visible .room-arrival-motto-english {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}
.room-arrival-motto:focus-visible {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 56%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
}
.crumb {
  display: flex;
  align-items: baseline;
  gap: 13px;
  min-width: 0;
  text-shadow: 0 1px 12px rgba(0,0,0,.92);
}
.crumb.is-changing,
.source-state.is-changing { animation: orientation-resolve 460ms var(--ease-glass) both; }
.crumb span {
  color: var(--accent);
  font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .15em;
}
.crumb b {
  overflow: hidden;
  font-family: Georgia, serif;
  font-size: 15px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.source-state {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8a847b;
  font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .06em;
  text-shadow: 0 1px 10px rgba(0,0,0,.95);
}
.source-state i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--bronze);
  box-shadow: 0 0 0 4px rgba(192,154,104,.08);
  transition:
    background var(--motion-interface) var(--ease-glass),
    box-shadow var(--motion-interface) var(--ease-glass);
}
.source-state.is-reviewed i { background: #87b58e; }
.studio-button {
  justify-self: end;
  min-width: 64px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(5,6,6,.16);
  backdrop-filter: blur(3px);
  color: #a49e95;
  font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  text-shadow: 0 1px 8px rgba(0,0,0,.94);
  transition:
    color var(--motion-touch) var(--ease-touch),
    border-color var(--motion-interface) var(--ease-glass),
    background var(--motion-interface) var(--ease-glass),
    transform var(--motion-touch) var(--ease-touch);
}
.studio-button:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: rgba(15,16,16,.34);
}
.studio-button:active { transform: scale(.98); }

.mountain-overview {
  position: absolute;
  z-index: 7;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(34px, 4.2vw, 68px);
  opacity: 1;
  transition:
    opacity var(--motion-glass) var(--ease-glass),
    filter var(--motion-glass) var(--ease-glass),
    transform var(--motion-glass) var(--ease-glass);
}
.mountain-overview:focus { outline: none; }
.mountain-overview[hidden] { display: none; }
.mountain-copy { width: min(620px, 54vw); }
.mountain-copy > span {
  color: var(--accent);
  font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .2em;
}
.mountain-copy h1 {
  margin: 16px 0 12px;
  font: 400 clamp(38px, 3.5vw, 56px)/.98 Georgia, serif;
  letter-spacing: -.035em;
}
.mountain-copy h1 em { color: var(--accent); font-weight: 400; }
.mountain-copy p { max-width: 62ch; margin: 0; color: #c1bbb1; font-size: 11.5px; line-height: 1.55; }
.mountain-route {
  width: min(780px, 66vw);
  margin-top: 24px;
}
.mountain-table {
  min-width: 0;
  background: rgba(5,6,6,.18);
  border: 1px solid var(--line);
  backdrop-filter: blur(3px);
}
.mountain-table-head {
  display: grid;
  grid-template-columns: minmax(132px, 1.1fr) minmax(140px, 1.2fr) 74px minmax(150px, 1.25fr);
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: #777168;
  font: 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .15em;
}
.mountain-list {
  width: 100%;
}
.mountain-row {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: #d0cac0;
  opacity: .76;
  transition:
    opacity var(--motion-interface) var(--ease-glass),
    background var(--motion-interface) var(--ease-glass),
    color var(--motion-touch) var(--ease-touch),
    box-shadow var(--motion-interface) var(--ease-glass);
}

.mountain-open {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(132px, 1.1fr) minmax(140px, 1.2fr) 74px minmax(150px, 1.25fr);
  align-items: center;
  gap: 14px;
  min-height: 55px;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.mountain-row::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg,
      color-mix(in srgb, var(--row-accent) 13%, transparent),
      color-mix(in srgb, var(--row-accent) 4%, transparent) 58%,
      transparent 86%);
  opacity: 0;
  transform: scaleX(.36);
  transform-origin: left;
  transition:
    opacity 520ms var(--ease-glass),
    transform 620ms var(--ease-light);
}
.mountain-row:hover,
.mountain-row:focus-within,
.mountain-row.is-preview,
.mountain-row.is-expanded {
  background:
    linear-gradient(90deg,
      color-mix(in srgb, var(--row-accent) 13%, rgba(8,9,9,.64)),
      rgba(5,6,6,.38) 72%);
  color: #fff;
  opacity: 1;
  box-shadow:
    inset 3px 0 0 var(--row-accent),
    inset 0 0 0 1px color-mix(in srgb, var(--row-accent) 18%, transparent),
    0 0 24px color-mix(in srgb, var(--row-accent) 8%, transparent);
}
.mountain-row:hover::before,
.mountain-row:focus-within::before,
.mountain-row.is-preview::before,
.mountain-row.is-expanded::before {
  opacity: 1;
  transform: scaleX(1);
}
.mountain-list.is-previewing .mountain-row:not(.is-preview) { opacity: .38; }
.mountain-open:focus-visible {
  outline: 1px solid color-mix(in srgb, var(--row-accent) 76%, #f1ebe2);
  outline-offset: -4px;
}

.mountain-episode {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
}
.mountain-episode b {
  overflow: hidden;
  color: #e4ded4;
  font: 400 15px/1.15 Georgia, serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mountain-purpose,
.mountain-activity > span {
  color: #969087;
  font-size: 10.5px;
  line-height: 1.35;
}
.mountain-map-count { display: grid; gap: 3px; }
.mountain-map-count b {
  color: #d9d2c8;
  font: 400 14px/1 Georgia, serif;
}
.mountain-map-count small {
  color: #787269;
  font: 6.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.mountain-activity {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}
.mountain-disclosure {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.mountain-activity > span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.mountain-activity i {
  color: var(--row-accent);
  font-style: normal;
  transform: translateX(0);
  transition: transform 320ms var(--ease-touch);
}
.mountain-row:hover .mountain-activity i,
.mountain-row:focus-within .mountain-activity i,
.mountain-row.is-preview .mountain-activity i { transform: translateX(4px); }
.mountain-row.is-map-current:not(.is-preview) { opacity: .92; }

.episode-brief {
  --folio-min-height: 410px;
  --folio-max-height: 580px;
  --folio-padding-top: 34px;
  --folio-padding-bottom: 23px;
  position: relative;
  z-index: 7;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "heading"
    "movements"
    "activity"
    "note";
  gap: 0;
  min-height: var(--folio-min-height);
  max-height: var(--folio-max-height);
  padding: var(--folio-padding-top) 30px var(--folio-padding-bottom);
  overflow: hidden;
  border-top: 1px solid color-mix(in srgb, var(--brief-accent) 42%, var(--line));
  background:
    radial-gradient(circle at 5% 0%, color-mix(in srgb, var(--brief-accent) 9%, transparent), transparent 35%),
    linear-gradient(112deg, rgba(5,6,7,.96), rgba(10,11,11,.91) 58%, rgba(5,6,7,.86));
  color: #d6d0c6;
  box-shadow:
    inset 0 1px rgba(255,255,255,.025),
    inset 0 0 0 1px color-mix(in srgb, var(--brief-accent) 8%, transparent),
    inset 0 -34px 70px rgba(0,0,0,.2);
  transform-origin: top;
  animation: episode-folio-open 1120ms cubic-bezier(.16, 1, .3, 1) both;
}
.episode-brief::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(255,255,255,.025);
  pointer-events: none;
}
.episode-brief.is-closing {
  pointer-events: none;
  animation: episode-folio-close 560ms cubic-bezier(.4, 0, .6, 1) both;
}
@keyframes episode-folio-open {
  0% {
    min-height: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    filter: blur(7px);
    clip-path: inset(0 0 100% 0);
    transform: translateY(-7px);
  }
  100% {
    min-height: var(--folio-min-height);
    max-height: var(--folio-max-height);
    padding-top: var(--folio-padding-top);
    padding-bottom: var(--folio-padding-bottom);
    opacity: 1;
    filter: blur(0);
    clip-path: inset(0);
    transform: translateY(0);
  }
}
@keyframes episode-folio-close {
  0% {
    min-height: var(--folio-min-height);
    max-height: var(--folio-max-height);
    padding-top: var(--folio-padding-top);
    padding-bottom: var(--folio-padding-bottom);
    opacity: 1;
    filter: blur(0);
    clip-path: inset(0);
    transform: translateY(0);
  }
  100% {
    min-height: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    filter: blur(5px);
    clip-path: inset(0 0 100% 0);
    transform: translateY(-5px);
  }
}
.episode-brief-heading {
  grid-area: heading;
  display: grid;
  grid-template-columns: minmax(135px, 160px) minmax(0, 1fr);
  align-items: start;
  gap: 30px;
  padding: 0 0 27px;
}
.episode-brief-heading span,
.episode-brief-label,
.episode-brief-activity > span,
.episode-brief-note {
  color: var(--brief-accent);
  font: 7px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.episode-brief-question {
  align-self: start;
  margin: -5px 0 0;
  max-width: 33ch;
  color: #c7c0b5;
  font: italic 400 21px/1.45 Georgia, serif;
  text-wrap: balance;
}
.episode-brief-section {
  grid-area: movements;
  padding: 24px 0 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.episode-brief-label { display: flex; justify-content: space-between; gap: 12px; }
.episode-brief-label small { color: #716b63; font: inherit; }
.episode-brief ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 19px 28px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: movement;
}
.episode-brief li {
  position: relative;
  break-inside: avoid;
  min-height: 34px;
  padding: 0 0 0 22px;
  color: #b7b0a6;
  font-size: 11px;
  line-height: 1.5;
  counter-increment: movement;
}
.episode-brief li::before {
  content: counter(movement, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 4px;
  color: color-mix(in srgb, var(--brief-accent) 72%, #6f6961);
  font: 6.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.episode-brief-activity {
  grid-area: activity;
  display: grid;
  grid-template-columns: minmax(120px, 150px) minmax(0, 1fr) minmax(170px, 205px);
  align-items: center;
  gap: 28px;
  padding: 23px 0 0;
  border: 0;
  background: transparent;
}
.episode-brief-activity b { color: #e7e1d8; font: 400 18px/1.3 Georgia, serif; }
.episode-brief-enter {
  min-height: 42px;
  margin-top: 0;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--brief-accent) 48%, var(--line));
  border-radius: 2px;
  background: color-mix(in srgb, var(--brief-accent) 10%, rgba(7,8,9,.68));
  color: #eee8df;
  font: 600 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background var(--motion-touch) var(--ease-touch),
    border-color var(--motion-touch) var(--ease-touch),
    transform var(--motion-touch) var(--ease-touch);
}
.episode-brief-enter:hover,
.episode-brief-enter:focus-visible {
  border-color: var(--brief-accent);
  background: color-mix(in srgb, var(--brief-accent) 18%, rgba(7,8,9,.76));
}
.episode-brief-enter:focus-visible { outline: 1px solid #f2ece3; outline-offset: 2px; }
.episode-brief-enter:active { transform: translateY(1px); }
.episode-brief-enter i { color: var(--brief-accent); font-style: normal; font-size: 12px; }
.episode-brief-note {
  grid-area: note;
  display: block;
  align-self: end;
  margin-top: 20px;
  color: #655f58;
}

/* The credits sit in the rail from day one, sealed. Seeing a locked door is
   the point: it says there is an ending, and you have not reached it. */
/* The credits row is one of the list, set apart only by a rule above it and
   by being quiet until it is earned. */
.episode-button.is-credits {
  /* The separation is margin and a drawn rule, not padding. Padding pushed the
     row's contents down inside their own box and broke the centring. */
  margin-top: 22px;
}
.episode-button.is-credits::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: -11px;
  height: 1px;
  background: var(--line);
}
/* Selected, this row wants no outline. It already sits alone under a rule, so
   the usual box reads as a floating panel rather than a selection. */
.episode-button.is-credits.is-current {
  border-color: transparent;
  background: rgba(255, 255, 255, .028);
}
.episode-button.is-credits.is-sealed {
  opacity: .34;
}
.episode-button.is-credits.is-sealed:hover {
  opacity: .58;
}
.episode-button.is-credits.is-sealed .check {
  color: var(--bronze, #b08a4a);
  opacity: .85;
}

.credits-sealed {
  display: grid;
  place-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 40px;
}
.credits-sealed span {
  font: 400 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .28em;
  color: #6b665f;
}
.credits-sealed h2 {
  margin-top: 26px;
  font: 400 44px/1 Georgia, serif;
  letter-spacing: -.02em;
}
.credits-sealed p {
  margin: 22px auto 0;
  max-width: 34ch;
  color: #99938a;
  font-size: 12.5px;
  line-height: 1.7;
}

.credits-poster {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  padding: 40px;
  background: #08080a;
}

.credits-poster span {
  font: 400 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .28em;
  color: #6b665f;
}
.credits-poster h2 {
  margin-top: 26px;
  font: 400 44px/1 Georgia, serif;
  letter-spacing: -.02em;
}
.credits-poster p {
  margin-top: 20px;
  color: #99938a;
  font-size: 12.5px;
}
.credits-poster button {
  margin-top: 44px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 14px 30px;
  border: 1px solid rgba(239, 234, 244, .16);
  background: none;
  color: #cfc9bf;
  font: 400 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 260ms var(--ease-glass), border-color 260ms var(--ease-glass);
}
.credits-poster button:hover {
  color: #fff;
  border-color: var(--accent);
}
.credits-poster button i { font-style: normal; font-size: 11px; }

.activity-shell {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}
.activity-picker {
  overflow-y: auto;
  border-right: 1px solid var(--line);
  padding: 26px 0;
}
.activity-picker button {
  display: block;
  width: 100%;
  padding: 15px 22px;
  border: 0;
  border-left: 2px solid transparent;
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
  opacity: .48;
  transition: opacity .3s, border-color .3s, background .3s;
}
.activity-picker button:hover { opacity: .78; }
.activity-picker button.is-current {
  opacity: 1;
  border-left-color: var(--accent);
  background: rgba(255, 255, 255, .022);
}
.activity-picker span {
  display: block;
  font: 400 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .16em;
  color: #6b665f;
}
.activity-picker b {
  display: block;
  margin-top: 8px;
  font: 400 15px/1.2 Georgia, serif;
}
.activity-picker i {
  display: block;
  margin-top: 7px;
  font: normal 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: .8;
}
.activity-stage { position: relative; }
.activity-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #08080a;
}

.credits-shell {
  position: absolute;
  inset: 0;
}
.credits-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
  opacity: 0;
  transition: opacity 700ms var(--ease-glass);
}
.credits-shell.is-rolling .credits-frame { opacity: 1; }
.credits-shell.is-rolling .credits-poster {
  opacity: 0;
  transition: opacity 500ms var(--ease-glass);
  pointer-events: none;
}

.plate-sub {
  display: block;
  max-width: 58ch;
  margin-top: 12px;
  color: #99938a;
  font: italic 400 12.5px/1.6 Georgia, serif;
}
.plate-sub[hidden] { display: none; }


.mountain-row .mountain-code {
  color: var(--row-accent);
  font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.mountain-row .mountain-start-label {
  color: color-mix(in srgb, var(--row-accent) 76%, #d8d0c5);
  font: 7px/1 "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .14em;
  white-space: nowrap;
}
.mountain-row.is-start-here {
  opacity: .96;
  background:
    linear-gradient(90deg,
      color-mix(in srgb, var(--row-accent) 11%, rgba(7,8,8,.34)),
      rgba(7,8,8,.18) 76%);
  box-shadow:
    inset 2px 0 0 color-mix(in srgb, var(--row-accent) 76%, transparent),
    0 0 34px color-mix(in srgb, var(--row-accent) 10%, transparent);
  animation: arrival-guide-breathe 4200ms ease-in-out infinite;
}
.mountain-row.is-start-here::before {
  opacity: .62;
  transform: scaleX(1);
}
.ambient-audio-control {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  width: calc(100% - 24px);
  height: 0;
  margin: 0 12px;
  padding: 0 8px;
  overflow: hidden;
  border: 0;
  border-top: 1px solid transparent;
  background: transparent;
  color: rgba(239,232,220,.58);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition:
    opacity 520ms var(--ease-glass),
    transform 520ms var(--ease-glass),
    height 520ms var(--ease-glass),
    border-color 520ms var(--ease-glass),
    color var(--motion-touch) var(--ease-touch),
    background var(--motion-interface) var(--ease-glass);
}
.ambient-audio-control.is-visible {
  height: 38px;
  border-top-color: rgba(239,232,220,.08);
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.ambient-audio-control:is(:hover, :focus-visible) {
  color: #f4ede3;
  border-color: rgba(203,178,239,.2);
  background: rgba(255,255,255,.025);
}
.ambient-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 15px;
  height: 14px;
}
.ambient-wave i {
  display: block;
  width: 1px;
  height: 12px;
  border-radius: 1px;
  background: currentColor;
  transform: scaleY(.28);
  transform-origin: center;
}
.ambient-audio-control.is-playing .ambient-wave i {
  animation: ambient-wave 920ms ease-in-out infinite alternate;
}
.ambient-audio-control.is-playing .ambient-wave i:nth-child(2) { animation-delay: -680ms; }
.ambient-audio-control.is-playing .ambient-wave i:nth-child(3) { animation-delay: -360ms; }
.ambient-audio-control.is-playing .ambient-wave i:nth-child(4) { animation-delay: -790ms; }
.ambient-audio-control.is-playing .ambient-wave i:nth-child(5) { animation-delay: -210ms; }
.ambient-audio-control.is-paused .ambient-wave i {
  transform: scaleY(.22);
}
.ambient-track {
  display: grid;
  min-width: 0;
  gap: 3px;
  text-align: left;
}
.ambient-track b,
.ambient-track em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ambient-track b {
  color: inherit;
  font: 500 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ambient-track em {
  color: #68635d;
  font: 500 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  font-style: normal;
  letter-spacing: .1em;
  text-transform: uppercase;
}

@keyframes arrival-guide-breathe {
  0%, 100% {
    box-shadow:
      inset 2px 0 0 color-mix(in srgb, var(--row-accent) 70%, transparent),
      0 0 22px color-mix(in srgb, var(--row-accent) 6%, transparent);
  }
  50% {
    box-shadow:
      inset 2px 0 0 color-mix(in srgb, var(--row-accent) 86%, transparent),
      0 0 42px color-mix(in srgb, var(--row-accent) 13%, transparent);
  }
}
@keyframes ambient-wave {
  0% { transform: scaleY(.24); }
  100% { transform: scaleY(1); }
}

.episode-list.is-previewing .episode-button:not(.is-preview) { opacity: .36; }
.episode-button.is-preview {
  color: var(--ink);
  background: rgba(255,255,255,.045);
}

.episode-stage {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(290px, 340px);
  gap: clamp(20px, 2.6vw, 42px);
  min-height: 0;
  padding: clamp(24px, 3.2vw, 52px);
}
.episode-stage[hidden] { display: none; }
.film-column {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows:
    minmax(0, 1fr)
    var(--player-controls-height)
    var(--episode-footer-height);
  transition:
    opacity var(--motion-room-resolve) var(--ease-glass),
    filter var(--motion-room-resolve) var(--ease-glass),
    transform var(--motion-room-resolve) var(--ease-glass);
}
.chapter-spine {
  transition:
    opacity var(--motion-room-resolve) var(--ease-glass) 160ms,
    filter var(--motion-room-resolve) var(--ease-glass) 160ms,
    transform var(--motion-room-resolve) var(--ease-glass) 160ms;
}
.episode-stage.is-entering .film-column,
.episode-stage.is-entering .chapter-spine {
  opacity: 0;
  filter: blur(13px);
  transform: translateY(9px) scale(.994);
  pointer-events: none;
  transition-delay: 0s;
  transition-duration: .18s;
}
.episode-stage.is-entering .chapter-spine {
  transform: translateY(13px) scale(.994);
}
.film {
  position: relative;
  align-self: center;
  width: 100%;
  max-height: calc(100vh - 230px);
  overflow: hidden;
  aspect-ratio: 16/9;
  border: 1px solid rgba(255,255,255,.17);
  background: #0b0c0c;
  box-shadow: 0 28px 70px rgba(0,0,0,.38);
}
.film::before {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  box-shadow: inset 0 0 45px rgba(0,0,0,.32);
  pointer-events: none;
}
.film img, .film video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.film img {
  filter: brightness(.73) saturate(.78);
  transform: scale(1);
  opacity: 1;
  transition:
    opacity var(--motion-glass) var(--ease-glass),
    filter var(--motion-glass) var(--ease-glass),
    transform var(--motion-light) var(--ease-light);
}
.film.is-poster-loading:not(.has-video) img {
  opacity: 0;
  filter: brightness(.62) saturate(.68) blur(7px);
  transform: scale(1.012);
}
.film video { display: none; background: #000; }
.film.has-video video { display: block; }
.film.has-video img { display: none; }
.film-wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4,5,5,.68), transparent 62%),
    linear-gradient(0deg, rgba(3,4,4,.58), transparent 54%);
  pointer-events: none;
}
.film-identity {
  position: absolute;
  z-index: 4;
  left: 26px;
  top: 24px;
  display: grid;
  gap: 10px;
  max-width: 68%;
  text-shadow: 0 2px 20px rgba(0,0,0,.8);
}
.film-identity span {
  color: rgba(255,255,255,.7);
  font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .16em;
}
.film-identity strong {
  font: 400 clamp(20px, 1.8vw, 30px)/1.12 Georgia, serif;
  letter-spacing: -.015em;
}
.play-button {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: 64px;
  height: 64px;
  /* The circle is centred geometrically; the triangle inside it has to be
     centred optically. A right-pointing triangle carries its weight behind the
     tip, so measured dead-centre reads as leaning left. This lands the ink
     about a pixel right of centre, which is where the eye expects it. */
  padding-left: 8px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255,255,255,.64);
  border-radius: 50%;
  background: rgba(5,6,6,.38);
  backdrop-filter: blur(10px);
  font-size: 15px;
  cursor: pointer;
  transition:
    transform var(--motion-touch) var(--ease-touch),
    background var(--motion-interface) var(--ease-glass),
    border-color var(--motion-interface) var(--ease-glass),
    box-shadow var(--motion-interface) var(--ease-glass);
}
.play-button:hover {
  transform: translate(-50%, -50%) scale(1.035);
  border-color: rgba(255,255,255,.86);
  background: rgba(5,6,6,.64);
  box-shadow: 0 0 0 6px rgba(255,255,255,.035), 0 12px 32px rgba(0,0,0,.28);
}
.play-button:active { transform: translate(-50%, -50%) scale(.985); }
.play-button.is-playing {
  border-color: color-mix(in srgb, var(--accent) 74%, #fff);
  box-shadow: 0 0 0 6px var(--accent-soft), 0 0 30px var(--accent-soft);
}
.prototype-note {
  position: absolute;
  z-index: 4;
  left: 25px;
  bottom: 20px;
  color: rgba(255,255,255,.62);
  font: 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .15em;
}
.player-controls {
  display: grid;
  grid-template-columns: 24px 40px 1fr 40px auto;
  gap: 9px;
  align-items: center;
  height: var(--player-controls-height);
  color: #a29c93;
}
.player-controls button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 10px;
  transition:
    color var(--motion-touch) var(--ease-touch),
    transform var(--motion-touch) var(--ease-touch),
    text-shadow var(--motion-interface) var(--ease-glass);
}
.player-controls button:hover {
  color: var(--ink);
  text-shadow: 0 0 12px var(--accent-soft);
}
.player-controls button:active { transform: scale(.96); }
.player-controls span { font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.player-controls input { width: 100%; height: 2px; accent-color: var(--accent); cursor: pointer; }
.bookmark-button { min-width: 100px; color: var(--bronze); text-align: right; }
.bookmark-button.is-saved {
  color: #d7c39f;
  animation: saved-confirmation 720ms var(--ease-glass) both;
}
.episode-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--episode-footer-height);
  border-top: 1px solid var(--line);
}
.episode-footer > div { display: grid; gap: 5px; }
.episode-footer span { color: #bbb4aa; font-size: 9px; }
.episode-footer b { color: #817b73; font-size: 8px; font-weight: 400; }
.episode-footer button {
  height: 31px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(6,7,7,.18);
  color: #746e67;
  font-size: 9px;
  transition:
    color var(--motion-touch) var(--ease-touch),
    border-color var(--motion-interface) var(--ease-glass),
    background var(--motion-interface) var(--ease-glass),
    transform var(--motion-touch) var(--ease-touch);
}
.episode-footer button:not(:disabled) {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  cursor: pointer;
}
.episode-footer button:not(:disabled):hover {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 66%, transparent);
}
.episode-footer button:not(:disabled):active { transform: scale(.98); }

.chapter-spine {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr) auto;
  overflow: hidden;
  padding: 22px 22px 18px;
  border: 1px solid var(--line);
  background: rgba(7,8,8,.5);
  backdrop-filter: blur(22px) saturate(.8);
  box-shadow: 0 24px 70px rgba(0,0,0,.16);
}
.chapter-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.chapter-heading > div { display: grid; gap: 6px; }
.chapter-heading span {
  color: #918b82;
  font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .15em;
}
.chapter-heading b { font: 400 15px/1 Georgia, serif; }
.chapter-heading > i {
  color: var(--bronze);
  font: 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  font-style: normal;
  letter-spacing: .12em;
}
.chapters { min-height: 0; overflow: auto; scrollbar-width: none; }
.chapters::-webkit-scrollbar { display: none; }
.chapter {
  position: relative;
  isolation: isolate;
  width: 100%;
  display: grid;
  grid-template-columns: 31px minmax(0,1fr) auto;
  gap: 9px;
  align-items: start;
  min-height: 66px;
  padding: 14px 0 14px 16px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: #827c74;
  text-align: left;
  cursor: pointer;
  transition:
    color var(--motion-touch) var(--ease-touch),
    background var(--motion-interface) var(--ease-glass),
    box-shadow var(--motion-interface) var(--ease-glass);
}
.chapter::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 -8px;
  background: linear-gradient(90deg, var(--accent-soft), transparent 72%);
  opacity: 0;
  transform: scaleX(.48);
  transform-origin: left;
  transition:
    opacity var(--motion-interface) var(--ease-glass),
    transform var(--motion-interface) var(--ease-glass);
}
.chapter:last-child { border-bottom: 1px solid var(--line); }
.chapter:hover { color: #bbb4aa; }
.chapter:hover::before { opacity: .38; transform: scaleX(1); }
.chapter.is-current {
  color: var(--ink);
  box-shadow: inset 1px 0 0 var(--accent);
}
.chapter.is-current::before { opacity: .62; transform: scaleX(1); }
.chapter.is-arriving { animation: chapter-arrival 420ms var(--ease-glass) both; }
.chapter .number {
  color: #766f67;
  font: 8px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.chapter.is-current .number { color: var(--accent); }
.chapter-copy { display: grid; gap: 7px; min-width: 0; }
.chapter-copy b {
  font-size: 11px;
  line-height: 1.35;
  font-weight: 480;
  transform: translateX(0);
  transition: transform var(--motion-touch) var(--ease-touch);
}
.chapter:hover .chapter-copy b,
.chapter.is-current .chapter-copy b { transform: translateX(2px); }
.chapter-progress { height: 1px; background: rgba(255,255,255,.07); }
.chapter-progress i {
  display: block;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 7px color-mix(in srgb, var(--accent) 44%, transparent);
  transition: width 460ms var(--ease-touch);
}
.chapter time {
  color: #706a62;
  font: 7px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.chapter-resource {
  margin-top: 18px;
  padding: 14px 15px;
  border-left: 1px solid rgba(192,154,104,.5);
  background: rgba(192,154,104,.07);
  display: grid;
  gap: 5px;
}
.chapter-resource.is-updating { animation: resource-resolve 420ms var(--ease-glass) both; }
.chapter-resource span {
  color: var(--bronze);
  font: 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.chapter-resource b { color: #bdb0a0; font-size: 9px; font-weight: 450; }

/* --- Plates ---------------------------------------------------------------
   A sorter grid: every plate for a conversation visible at once, so Sean can
   see how many he has before an activity and a learner can see the shape of
   what is coming. */

.plates-collection { padding-bottom: clamp(48px, 6vw, 96px); }
.plate-group { margin-top: 40px; }
.plate-group:first-of-type { margin-top: 0; }
.plate-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.plate-group-head b { font: 400 19px/1.2 Georgia, serif; color: #e4ded4; }
.plate-group-head span {
  color: var(--bronze);
  font: 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.plate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}
.plate {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border: 1px solid var(--line);
  background: rgba(8,9,9,.48);
  color: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform var(--motion-touch) var(--ease-touch),
    border-color var(--motion-interface) var(--ease-glass),
    box-shadow var(--motion-interface) var(--ease-glass);
}
.plate:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  box-shadow: 0 18px 44px rgba(0,0,0,.28);
}
.plate:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.plate img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #0b0c0c;
}
.plate-index {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 3px 7px;
  background: rgba(6,7,7,.78);
  backdrop-filter: blur(8px);
  color: #b7b0a6;
  font: 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .1em;
}
.plate-title {
  padding: 11px 13px 13px;
  color: #b2aba1;
  font-size: 11px;
  line-height: 1.45;
}
/* An activity plate is a stop, not a slide. It should be findable at a glance
   in a grid of forty. */
.plate.is-activity { border-color: color-mix(in srgb, var(--accent) 46%, var(--line)); }
.plate.is-activity .plate-index { color: var(--accent); }
.plate.is-activity .plate-title { color: #ded6ea; }
.plate.is-activity::after {
  content: "ACTIVITY";
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 3px 7px;
  background: color-mix(in srgb, var(--accent) 82%, #0b0713);
  color: #150c22;
  font: 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .11em;
}

.plates-hint { margin-bottom: 34px; font-size: 15px; max-width: 62ch; }
.plates-hint code {
  font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--bronze);
}

.plate-group-meta { display: flex; align-items: center; gap: 14px; }
.plate-save-order {
  border: 1px solid color-mix(in srgb, var(--accent) 46%, var(--line));
  background: transparent;
  color: var(--accent);
  padding: 6px 13px;
  font: 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .13em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--motion-interface) var(--ease-glass);
}
.plate-save-order:hover { background: color-mix(in srgb, var(--accent) 13%, transparent); }
.plate-save-order:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.plate-slot { position: relative; display: flex; cursor: grab; }
.plate-slot.is-own { cursor: grab; }
.plate-slot.is-dragging { opacity: .4; cursor: grabbing; }
.plate-slot > .plate { flex: 1; }

/* Without this the browser drags a ghost of the picture, which looks like a
   reorder that never happens. The slot owns dragging; the image never does. */
.plate img, .plate {
  -webkit-user-drag: none;
  user-select: none;
}
.plate-slot .plate,
.plate-slot .plate img { cursor: grab; }

/* A plate you added is visibly yours: dashed edge, and it never claims to be
   part of the published course. */
.plate.is-own { border-style: dashed; }
.plate.is-own .plate-index { color: #8fb6a8; }
.plate-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  background: rgba(6,7,7,.78);
  backdrop-filter: blur(8px);
  color: #837c73;
  font: 400 14px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--motion-interface) var(--ease-glass),
    color var(--motion-interface) var(--ease-glass);
}
.plate-slot:hover .plate-remove,
.plate-slot:focus-within .plate-remove { opacity: 1; }
.plate-remove:hover { color: #e0c9c4; border-color: color-mix(in srgb, #c9736a 46%, var(--line)); }
.plate-remove:focus-visible { opacity: 1; outline: 2px solid var(--accent); outline-offset: 2px; }

.plate-drop {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  min-height: 148px;
  padding: 18px;
  border: 1px dashed var(--line);
  background: transparent;
  color: #7d766d;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--motion-interface) var(--ease-glass),
    color var(--motion-interface) var(--ease-glass),
    background var(--motion-interface) var(--ease-glass);
}
.plate-drop b {
  font: 400 13px/1.2 Georgia, serif;
  color: #a49d94;
}
.plate-drop span { font-size: 10.5px; line-height: 1.45; }
.plate-drop:hover, .plate-drop:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  color: #a9a29a;
  outline: none;
}
.plate-grid.is-receiving .plate-drop {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  color: #ded6ea;
}

.plate-viewer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: clamp(20px, 4vw, 54px);
  background: rgba(4,5,5,.93);
  backdrop-filter: blur(22px);
}
.plate-viewer.is-open { display: flex; }
.plate-stage {
  margin: 0;
  max-width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.plate-stage:fullscreen { background: #050606; padding: 2vmin; }
.plate-stage:fullscreen figcaption { display: none; }
.plate-stage img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border: 1px solid var(--line);
}
.plate-stage:fullscreen img { max-height: 96vh; border: 0; }
.plate-stage figcaption {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
}
.plate-stage figcaption b { font: 400 18px/1.25 Georgia, serif; color: #e9e2d8; }
.plate-position {
  color: var(--bronze);
  font: 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.plate-viewer.is-activity .plate-position { color: var(--accent); }

/* ---- the recording card ------------------------------------------------
   Above the frame, outside the shot. Four words, a mark, and the order it
   goes in. Notes for the person talking, never for the learner. */
.plate-column { --cue-room: 0px; }
/* The cards sit in a fixed band at the top. The picture stays centred but is
   capped so it can never grow up into them. */
/* 30px above the cards, their measured height, then 40px of air before the
   picture starts, and the same again at the bottom so it stays centred. */
.plate-viewer.has-cue .plate-stage img {
  max-height: calc(100vh - (var(--cue-room, 40px) * 2) - 140px);
}

.plate-column .plate-stage { min-height: 0; max-height: 100%; }
.plate-column .plate-stage img { max-height: 100%; object-fit: contain; }

.plate-column {
  position: relative;
  display: flex;
  /* Room reserved for the recording card. border-box is what makes the
     picture give up that height rather than the column growing past the
     screen and pushing the card off the top. */
  box-sizing: border-box;
  padding-top: var(--cue-room, 0px);
  min-width: 0;
  max-width: min(1500px, 100%);
  max-height: 100%;
}
.plate-cues {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: calc(100vw - 160px);
}
.plate-cues[hidden] { display: none; }

/* The legend answers one question - what does this colour mean - so it comes
   when that question is being asked, which is while a pill is under the
   cursor, and goes again after. */
/* What this beat actually asks Sean to do, in plain words, on hover. */
.plate-cue-how {
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  transform: translateX(-50%) translateY(-3px);
  z-index: 4;
  width: max-content;
  max-width: 270px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-top: 1px solid var(--cue-accent);
  border-radius: 3px;
  background: rgba(10, 10, 13, .97);
  box-shadow: 0 18px 44px -20px rgba(0,0,0,.9);
  font: 400 11.5px/1.55 Inter, ui-sans-serif, -apple-system, sans-serif;
  color: #cfc9bf;
  text-align: left;
  white-space: normal;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms var(--ease-glass), transform 200ms var(--ease-glass);
}
.plate-cue-how em {
  display: block;
  margin-bottom: 7px;
  font: 400 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-style: normal;
  color: var(--cue-accent);
}
.plate-cue:hover .plate-cue-how { opacity: 1; transform: translateX(-50%); }

/* The legend lives at the foot of the screen. Under the pills it collided
   with the tooltip, and the two answer different questions anyway - the
   legend is the key, the tooltip is the instruction. */
.plate-legend {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 20px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(10, 10, 13, .92);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms var(--ease-glass);
}
.plate-legend[hidden] { display: none; }
.plate-cues:hover ~ .plate-legend,
.plate-cues:focus-within ~ .plate-legend { opacity: 1; }
.plate-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
  font: 400 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #6b665f;
}
.plate-legend i {
  display: grid;
  place-items: center;
  width: 12px;
  height: 12px;
}
.plate-legend svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--cue-accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.plate-cue {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 30px 9px 12px;
  border: 1px solid color-mix(in srgb, var(--cue-accent) 34%, transparent);
  border-radius: 3px;
  background: rgba(10, 10, 13, .82);
  backdrop-filter: blur(6px);
}
.plate-cue[hidden] { display: none; }
.plate-cue-mark {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
}
.plate-cue-mark svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--cue-accent);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.plate-cue b {
  /* Serif at this size is work to read at a glance, and a glance is all it
     ever gets while Sean is talking. */
  font: 500 11.5px/1.2 Inter, ui-sans-serif, -apple-system, sans-serif;
  letter-spacing: .005em;
  color: #efe9e0;
  white-space: nowrap;
}
.plate-cue-seq {
  position: absolute;
  right: 9px;
  bottom: 5px;
  font: normal 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .1em;
  color: var(--cue-accent);
  opacity: .7;
}

.plate-position {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  font: normal 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .14em;
  color: #6b665f;
}

.plate-step, .plate-close {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(10,11,11,.6);
  color: #cfc8be;
  font: 400 20px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  cursor: pointer;
  transition: border-color var(--motion-interface) var(--ease-glass),
    color var(--motion-interface) var(--ease-glass);
}
.plate-step:hover:not(:disabled), .plate-close:hover {
  border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
  color: #f0eae0;
}
.plate-step:disabled { opacity: .28; cursor: default; }
.plate-step:focus-visible, .plate-close:focus-visible,
.plate-tools button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.plate-close { position: absolute; top: 20px; right: 20px; }
.plate-tools {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 9px;
}
.plate-tools button {
  border: 1px solid var(--line);
  background: rgba(10,11,11,.6);
  color: #b7b0a6;
  padding: 9px 16px;
  font: 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .13em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color var(--motion-interface) var(--ease-glass),
    color var(--motion-interface) var(--ease-glass);
}
.plate-tools button:hover {
  border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
  color: #efe9df;
}

@media (max-width: 720px) {
  .plate-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .plate-step { width: 38px; height: 38px; }
}

/* Scrolling stays; the bar goes. Nothing here is a long document where a
   position indicator earns its place, and the rooms read as spaces rather
   than as pages when nothing frames them. Wheel, trackpad, keyboard and
   touch are all untouched. */
.scroll-thread {
  position: fixed;
  width: 1px;
  z-index: 90;
  pointer-events: none;
  background: var(--thread-ink, rgba(255, 255, 255, .55));
  opacity: 0;
  transition: opacity 450ms ease;
}
.scroll-thread.is-live { opacity: 1; transition: opacity 120ms ease; }
@media (prefers-reduced-motion: reduce) { .scroll-thread { transition: none; } }

/* width:0 alone still leaves WebKit room to paint a track in some builds, so
   the scrollbar is switched off outright, on every element and the document. */
html, body, * { scrollbar-width: none !important; -ms-overflow-style: none !important; }
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar { width: 0 !important; height: 0 !important; display: none !important; }

/* The way back replaces the count, which means nothing while you are inside
   one of them. */
.utility-button.is-inside i {
  color: var(--accent);
  font-style: normal;
  letter-spacing: 0;
}

/* A product you do not own is not broken, so it is not greyed. It is quieter,
   and its art stays in colour — you should want it. Only the action tells you
   where you stand. */
.resource-card.is-store { opacity: .82; }
.resource-card.is-store .resource-art img { filter: saturate(.82) brightness(.78); }
.resource-card.is-store .resource-meta small { color: var(--bronze); }
.resource-card.is-store:hover { opacity: 1; }
.resource-card.is-store:hover .resource-art img { filter: none; }
.resource-card.is-owned .resource-meta small { color: var(--accent); }

/* Authoring only — mounted on local addresses and nowhere else. */
.walkin-toggle {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 130;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8d877e;
  cursor: pointer;
  opacity: .4;
  transition: opacity var(--motion-interface) var(--ease-glass),
    color var(--motion-interface) var(--ease-glass);
}
.walkin-toggle:hover { opacity: 1; color: #d9d2c8; }
.walkin-toggle:focus-visible { opacity: 1; outline: 2px solid var(--accent); outline-offset: 2px; }
.walkin-toggle[data-state="locked"] { color: var(--accent); opacity: .75; }

/* --- Walk-in doors --------------------------------------------------------
   A door names what is behind it. It is never a greyed control — someone
   should read an offer, not hit a wall. */

/* The door replaces the film's own titling rather than sitting on top of it —
   two headlines in one frame is worse than either alone. */
.film:has(.episode-door) .film-identity,
.film:has(.episode-door) .prototype-note { display: none; }
.episode-door {
  position: absolute;
  z-index: 5;
  inset: auto 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(24px, 4vw, 46px);
  background: linear-gradient(to top, rgba(4,5,5,.94) 38%, rgba(4,5,5,.62) 76%, transparent);
}
.episode-door > span {
  color: var(--accent);
  font: 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.episode-door > b { font: 400 clamp(22px,2.6vw,30px)/1.15 Georgia, serif; color: #f1ece3; }
.episode-door > p { margin: 0; max-width: 46ch; color: #a8a199; font-size: 13.5px; line-height: 1.6; }
.episode-door button {
  align-self: flex-start;
  margin-top: 6px;
  border: 1px solid color-mix(in srgb, var(--accent) 56%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: #f2ece3;
  padding: 12px 22px;
  font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--motion-interface) var(--ease-glass);
}
.episode-door button:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.episode-door small { color: #7d766d; font-size: 11px; }

.resource-card.is-door { cursor: pointer; opacity: .88; }
.resource-card.is-door .resource-art img { filter: grayscale(.35) brightness(.72); }
.resource-card.is-door .resource-meta small { color: var(--resource-accent, var(--accent)); }

.course-offer {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: none;
  place-items: center;
  padding: 26px;
  background: rgba(4,5,5,.86);
  backdrop-filter: blur(20px);
}
.course-offer.is-visible { display: grid; }
.course-offer-card {
  position: relative;
  max-width: 520px;
  padding: 42px 44px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  background: rgba(12,13,14,.97);
}
.course-offer-card > span {
  color: var(--accent);
  font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .16em;
}
.course-offer-card h2 { margin: 0; font: 400 30px/1.15 Georgia, serif; text-wrap: balance; }
.course-offer-card p { margin: 0; color: #a8a199; font-size: 14.5px; line-height: 1.65; }
.course-offer-note { color: #7d766d !important; font-size: 12px !important; font-style: italic; }
.course-offer-close {
  position: absolute; top: 16px; right: 16px;
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 0; background: transparent; color: #7d766d; font-size: 19px; cursor: pointer;
}
.course-offer-back {
  align-self: flex-start; margin-top: 8px;
  border: 1px solid var(--line); background: transparent; color: #b2aba1;
  padding: 10px 18px; cursor: pointer;
  font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .14em; text-transform: uppercase;
}

/* Asked once, at the moment a guest first makes something. Sits low and to the
   side so it never blocks the work that prompted it. */
.keep-prompt {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 95;
  max-width: 330px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  background: rgba(10,11,11,.94);
  backdrop-filter: blur(20px);
  box-shadow: 0 26px 60px rgba(0,0,0,.42);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 320ms var(--ease-glass), transform 320ms var(--ease-glass);
}
.keep-prompt.is-visible { opacity: 1; transform: translateY(0); }
.keep-prompt b { color: #efe9e0; font: 400 17px/1.25 Georgia, serif; }
.keep-prompt p { margin: 0; color: #9a948b; font-size: 12.5px; line-height: 1.55; }
.keep-prompt-actions { display: flex; gap: 9px; margin-top: 4px; }
.keep-prompt-actions button {
  border: 1px solid var(--line);
  background: transparent;
  color: #b2aba1;
  padding: 9px 15px;
  font: 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .13em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color var(--motion-interface) var(--ease-glass),
    color var(--motion-interface) var(--ease-glass);
}
.keep-prompt-actions button[data-keep] {
  border-color: color-mix(in srgb, var(--accent) 52%, transparent);
  color: var(--accent);
}
.keep-prompt-actions button:hover { color: #efe9e0; }
.keep-prompt-actions button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .keep-prompt { transition: none; } }

/* The movement holding the checkpoint carries a quiet mark, so the learner can
   see one coming rather than stumbling into it. */
.chapter-checkpoint {
  display: block;
  margin-top: 4px;
  color: var(--accent);
  font: 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.chapter.checkpoint-done .chapter-checkpoint { color: #7d8f86; }
.chapter.has-checkpoint .number { color: var(--accent); }

/* A checkpoint is the one place in an episode that asks the learner to act, so
   it carries the accent and more room than a passive reference. Completing it
   quietens it rather than removing it — a done checkpoint is still a record. */
/* Sits directly under its movement, indented to read as belonging to it. */
.checkpoint-card {
  margin: 2px 0 10px 30px;
  padding: 15px 16px;
  display: grid;
  gap: 9px;
  border-left: 1px solid color-mix(in srgb, var(--accent) 62%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}
.checkpoint-card > span {
  color: var(--accent);
  font: 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.checkpoint-card > b {
  color: #efe9e0;
  font: 400 15px/1.25 Georgia, serif;
}
.checkpoint-card.is-done {
  border-left-color: color-mix(in srgb, var(--accent) 30%, transparent);
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}
.checkpoint-card.is-done > b { color: #b8b1a8; }
.checkpoint-instruction {
  margin: 0;
  color: #a9a299;
  font-size: 11px;
  line-height: 1.6;
}
.checkpoint-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 3px; }
.checkpoint-actions button {
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  background: transparent;
  color: #d9d2c8;
  padding: 8px 14px;
  font: 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .13em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    border-color var(--motion-interface) var(--ease-glass),
    color var(--motion-interface) var(--ease-glass),
    background var(--motion-interface) var(--ease-glass);
}
.checkpoint-actions button:first-child {
  border-color: color-mix(in srgb, var(--accent) 58%, transparent);
  color: var(--accent);
}
.checkpoint-actions button:hover {
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  color: #f2ece3;
}
.checkpoint-actions button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.checkpoint-note {
  color: #837c73;
  font: 7px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .09em;
  text-transform: none;
}
.chapter-resource.is-checkpoint.is-done {
  border-left-color: color-mix(in srgb, var(--accent) 30%, transparent);
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}
.chapter-resource.is-checkpoint.is-done b { color: #b8b1a8; }

.panel-view {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: none;
  background: rgba(7,8,8,.36);
  backdrop-filter: blur(16px);
}
.panel-view.is-open {
  display: block;
}
#panelBody {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
#panelBody::-webkit-scrollbar { display: none; }
.main.is-whiteboard .topbar { display: none; }
.main.is-whiteboard .panel-view { inset: 0; background: #090a0a; backdrop-filter: none; }
.main.is-whiteboard #panelBody { overflow: hidden; }
/* The board keeps the room it had; the transfer rail is a thin strip beneath
   it rather than an overlay that would sit on the learner's work. */
.board-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.whiteboard-frame {
  display: block;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  border: 0;
  background: #0d0e0e;
}
/* A thin rail. The padding is equal above and below the buttons, so the
   buttons — the tallest thing in it — set the height rather than fighting it. */
/* Scoped to the shell so it outranks .collection-foot, which is declared
   later and would otherwise keep its own generous padding-top. */
.board-shell .board-foot {
  flex: none;
  margin-top: 0;
  padding: 9px clamp(18px, 3vw, 34px);
  gap: 24px;
  background: rgba(9,10,10,.9);
  backdrop-filter: blur(18px);
}
.board-foot p {
  max-width: none;
  font-size: 11.5px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.board-foot .collection-actions button { padding: 8px 15px; }
/* Below the width where the sentence can hold one line, let it wrap rather
   than truncate — a clipped instruction is worse than a taller rail. */
@media (max-width: 720px) {
  .board-foot { flex-wrap: wrap; }
  .board-foot p { white-space: normal; }
}
.board-foot [data-restore-board] {
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  background: transparent;
  color: var(--accent);
  padding: 9px 17px;
  font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
}
.collection {
  min-height: 100%;
  padding: clamp(42px, 6vw, 90px);
}
.collection-head { margin-bottom: 34px; }
/* One line explaining what a plate is, because the learner sees this panel
   too and the word is doing real work. */
.collection-note {
  max-width: 54ch;
  margin-top: 18px;
  color: #99938a;
  font-size: 12.5px;
  line-height: 1.7;
}
.collection-head span {
  color: var(--accent);
  font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .16em;
}
.collection-head h2 {
  margin: 12px 0 0;
  font: 400 clamp(34px, 4vw, 58px)/1 Georgia, serif;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.memory-card {
  min-height: 142px;
  padding: 20px;
  border: 1px solid var(--line);
  background: rgba(8,9,9,.48);
  backdrop-filter: blur(18px);
  display: grid;
  align-content: start;
  gap: 9px;
  color: inherit;
  text-align: left;
  text-decoration: none;
  transition:
    transform var(--motion-touch) var(--ease-touch),
    border-color var(--motion-interface) var(--ease-glass),
    background var(--motion-interface) var(--ease-glass),
    box-shadow var(--motion-interface) var(--ease-glass);
}
.memory-card { cursor: pointer; }
.memory-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line));
  background: rgba(12,13,13,.59);
  box-shadow: 0 18px 44px rgba(0,0,0,.2);
}
.memory-card:active { transform: translateY(0); }
.memory-card span {
  color: var(--bronze);
  font: 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.memory-card b { font: 400 17px/1.2 Georgia, serif; }
.memory-card p {
  margin: 0;
  color: #9f998f;
  font-size: 10px;
  line-height: 1.5;
}

/* The remove control sits over its card and stays quiet until the card is
   approached, so the shelf reads as saved places rather than a delete list. */
.memory-card-shell { position: relative; display: grid; }
.memory-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  background: transparent;
  color: #6f6a62;
  font: 400 15px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  cursor: pointer;
  opacity: 0;
  transition:
    opacity var(--motion-interface) var(--ease-glass),
    color var(--motion-interface) var(--ease-glass),
    border-color var(--motion-interface) var(--ease-glass);
}
.memory-card-shell:hover .memory-remove,
.memory-card-shell:focus-within .memory-remove { opacity: 1; }
.memory-remove:hover {
  color: #e0c9c4;
  border-color: color-mix(in srgb, #c9736a 46%, var(--line));
}
.memory-remove:focus-visible {
  opacity: 1;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.moment-undo {
  margin-bottom: 20px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  background: rgba(8,9,9,.48);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  gap: 16px;
  color: #b2aba1;
  font-size: 13px;
}
.moment-undo button {
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  background: transparent;
  color: var(--accent);
  padding: 6px 15px;
  font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--motion-interface) var(--ease-glass);
}
.moment-undo button:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }

.collection-foot {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.collection-foot p {
  margin: 0;
  max-width: 46ch;
  color: #8d877e;
  font-size: 12px;
  line-height: 1.6;
}
.collection-foot p.is-error { color: #d29a92; }
.collection-actions { display: flex; gap: 10px; }
.collection-actions button {
  border: 1px solid var(--line);
  background: transparent;
  color: #b2aba1;
  padding: 9px 17px;
  font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    border-color var(--motion-interface) var(--ease-glass),
    color var(--motion-interface) var(--ease-glass);
}
.collection-actions button:hover {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  color: #e6e0d6;
}
.collection-actions button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.resource-collection {
  padding-bottom: clamp(72px, 9vw, 140px);
}
/* The header used to sit clamp(58px,7vw,104px) clear of the first group,
   which on a wide screen read as a loading state rather than a pause. */
.resource-head {
  margin-bottom: clamp(34px, 4vw, 56px);
}
.resource-head p {
  max-width: 52ch;
  margin: 20px 0 0;
  color: #9e978d;
  font-size: 12px;
  line-height: 1.7;
}
.resource-group + .resource-group {
  margin-top: clamp(72px, 9vw, 136px);
}
.resource-group-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 22px;
}
.resource-group-head span {
  color: #8e8274;
  font: 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .14em;
}
.resource-group-head h3 {
  margin: 10px 0 0;
  font: 400 clamp(24px, 2.1vw, 34px)/1.08 Georgia, serif;
}
.resource-group-head p {
  max-width: 46ch;
  margin: 0;
  color: #817b72;
  font: 8px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .03em;
  text-align: right;
}
/* Columns are added as the screen widens rather than the same three cards
   inflating. At three fixed columns a 27-inch monitor gave 530px-wide cards,
   where the art swallowed the words underneath it. */
.resource-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.resource-product-gallery {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
}
.resource-card {
  appearance: none;
  min-width: 0;
  padding: 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 8, 8, .62);
  color: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition:
    background 480ms var(--ease-glass),
    box-shadow 480ms var(--ease-glass),
    opacity 600ms var(--ease-glass);
}
.resource-card:disabled { cursor: default; }
.resource-card.is-preparing { opacity: .5; }
.resource-card.is-store { opacity: .58; }
.resource-card.is-owned { opacity: .72; }
.resource-art {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #090a09;
}
.resource-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 52%, rgba(3, 4, 4, .48)),
    radial-gradient(120% 90% at 50% 0, transparent 45%, rgba(0, 0, 0, .2));
  pointer-events: none;
}
.resource-monogram {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: color-mix(in srgb, var(--resource-accent) 84%, #f0eadf);
  background:
    radial-gradient(circle at 72% 22%, color-mix(in srgb, var(--resource-accent) 16%, transparent), transparent 30%),
    linear-gradient(145deg, color-mix(in srgb, var(--resource-accent) 10%, #0a0a0a), #080909 72%);
  font: 400 clamp(28px, 3vw, 46px)/1 Georgia, serif;
  letter-spacing: -.04em;
}
.resource-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.8) brightness(.72);
  transform: scale(1.015);
  transition:
    transform 1200ms cubic-bezier(.16, 1, .3, 1),
    filter 900ms var(--ease-glass);
}
.resource-art i {
  position: absolute;
  z-index: 1;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(244, 239, 230, .2);
  background: rgba(5, 6, 6, .46);
  color: #eee8dd;
  font: normal 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 380ms var(--ease-glass),
    transform 500ms cubic-bezier(.16, 1, .3, 1);
}
.resource-copy {
  display: block;
  min-height: 148px;
  padding: 18px 20px 22px;
}
.resource-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.resource-meta em,
.resource-meta small {
  font: normal 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.resource-meta em { color: var(--resource-accent); }
.resource-meta small {
  color: #746f67;
  opacity: 0;
  transition: opacity 380ms var(--ease-glass);
}
.resource-card b {
  display: block;
  margin-top: 17px;
  font: 400 18px/1.16 Georgia, serif;
}
.resource-card p {
  max-width: 34ch;
  margin: 8px 0 0;
  color: #99938a;
  font-size: 10px;
  line-height: 1.55;
}
.resource-when {
  display: block;
  margin-top: 16px;
  color: #6b665f;
  font: normal 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.resource-card:hover,
.resource-card:focus-visible {
  outline: none;
  background: rgba(14, 15, 14, .82);
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--resource-accent) 55%, transparent);
}
.resource-card.is-store:hover,
.resource-card.is-store:focus-visible,
.resource-card.is-owned:hover,
.resource-card.is-owned:focus-visible {
  opacity: .92;
}
.resource-card.is-preparing:hover {
  background: rgba(7, 8, 8, .62);
  box-shadow: none;
}
.resource-card.is-preparing:hover .resource-art img {
  filter: saturate(.8) brightness(.72);
  transform: scale(1.015);
}
.resource-card.is-preparing .resource-meta small,
.resource-card.is-store .resource-meta small,
.resource-card.is-owned .resource-meta small {
  opacity: 1;
}
.resource-card:hover .resource-art img,
.resource-card:focus-visible .resource-art img {
  filter: saturate(.98) brightness(.9);
  transform: scale(1.055);
}
.resource-card:hover .resource-art i,
.resource-card:focus-visible .resource-art i,
.resource-card:hover .resource-meta small,
.resource-card:focus-visible .resource-meta small {
  opacity: 1;
  transform: none;
}
.resource-viewer {
  position: absolute;
  inset: 0;
  min-height: 0;
  background: #090a0a;
}
.resource-frame-wrap {
  position: relative;
  height: 100%;
  min-height: 0;
}
.resource-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #736e66;
  font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.resource-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #090a0a;
  opacity: 0;
  transition: opacity 700ms var(--ease-glass);
}
.resource-frame.is-ready { opacity: 1; }
.empty-state { color: #b2aba1; font: 400 18px/1.4 Georgia, serif; }

@media (max-width: 1180px) {
  .resource-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .resource-gallery { grid-template-columns: 1fr; }
  .resource-copy { min-height: 132px; }
  .resource-group-head { align-items: start; flex-direction: column; gap: 12px; }
  .resource-group-head p { text-align: left; }
}

.entry-screen {
  position: absolute;
  z-index: 30;
  inset: 0;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #030404;
  opacity: 1;
  transition:
    opacity 1600ms linear,
    visibility 1600ms linear;
}
.entry-screen::before,
.entry-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.entry-screen::before {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(3,4,4,.42), rgba(3,4,4,.12), rgba(3,4,4,.36)),
    linear-gradient(0deg, rgba(3,4,4,.52), rgba(3,4,4,.05) 58%, rgba(3,4,4,.32)),
    url("./building-study-v48/assets/living-mountain-arrivals-hall-global-cohort-candidate-v38.webp") center/cover;
  filter: blur(0) brightness(1);
  transform: scale(1);
  transition:
    opacity 2200ms linear,
    filter 2200ms var(--ease-light),
    transform 2200ms var(--ease-light);
}
.entry-screen::after {
  z-index: -1;
  background: #030404;
  opacity: 0;
  transition: opacity 2200ms linear;
}
.entry-screen.is-threshold::before {
  opacity: 0;
  filter: blur(12px) brightness(.12);
  transform: scale(1.012);
}
.entry-screen.is-threshold::after { opacity: 1; }
.entry-screen.is-world-reveal {
  background: transparent;
}
.entry-screen.is-world-reveal::after {
  opacity: 0;
  transition-duration: 2200ms;
}
.entry-screen.is-cleared,
.is-restoring .mountain-overview,
.is-restoring .episode-stage { visibility: hidden; }

.entry-screen.is-bypassed,
.is-returning .entry-screen {
  visibility: hidden;
  pointer-events: none;
}
/* A returning visitor is bypassed before the first paint, so this must be
   instant. Inheriting the 1600ms leaving fade left the entry screen sitting
   fully visible for a second and a half on every single load, which reads as
   the page glitching rather than as a transition. */
.entry-screen.is-bypassed { transition: none; }
.entry-screen.is-leaving {
  opacity: 0;
  visibility: hidden;
  filter: blur(5px);
  pointer-events: none;
}
.entry-copy {
  position: relative;
  z-index: 1;
  width: min(800px, 82vw);
  text-align: center;
  text-shadow: 0 2px 26px rgba(0,0,0,.7);
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
  transition:
    opacity 1800ms linear;
}
.entry-screen.is-threshold .entry-copy {
  opacity: 0;
  pointer-events: none;
}
.entry-copy > span {
  color: #d9c6f4;
  font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .22em;
}
.entry-copy h1 {
  margin: 28px 0 24px;
  font: 400 clamp(52px, 6.4vw, 100px)/.92 Georgia, serif;
  letter-spacing: -.045em;
}
.entry-copy h1 em { color: #c4a4f1; font-weight: 400; }
.entry-copy p { margin: 0 0 36px; color: #ded7cc; font-size: 13px; }
.entry-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.entry-copy #enterButton {
  width: 170px;
  height: 52px;
  border: 1px solid rgba(255,255,255,.42);
  background: rgba(5,6,6,.45);
  backdrop-filter: blur(16px);
  font: 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .24em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    color var(--motion-touch) var(--ease-touch),
    border-color var(--motion-interface) var(--ease-glass),
    background var(--motion-interface) var(--ease-glass),
    box-shadow var(--motion-interface) var(--ease-glass),
    transform var(--motion-touch) var(--ease-touch);
}
.entry-copy #enterButton:hover {
  background: rgba(22,18,28,.68);
  border-color: #c9b0ed;
  box-shadow: 0 0 0 5px rgba(196,164,241,.055), 0 18px 52px rgba(0,0,0,.28);
}
.entry-copy #enterButton:active { transform: scale(.985); }
.entry-copy #enterButton:focus-visible,
.entry-copy .entry-skip:focus-visible {
  outline: 1px solid rgba(217,198,244,.9);
  outline-offset: 5px;
}
.entry-copy .entry-skip {
  min-width: 128px;
  min-height: 32px;
  margin-top: 10px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: rgba(222,215,204,.48);
  font: 400 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    color var(--motion-interface) var(--ease-glass),
    letter-spacing var(--motion-interface) var(--ease-glass);
}
.entry-copy .entry-skip:hover {
  color: rgba(236,228,216,.82);
  letter-spacing: .16em;
}
.entry-copy .entry-skip:active { color: #d9c6f4; }
.entry-invocation {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
  display: grid;
  place-items: center;
  color: rgba(229, 220, 207, .72);
  font: 400 clamp(15px, .9vw, 17px)/1.65 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: .075em;
  text-align: center;
  opacity: 0;
  transition: opacity 2200ms linear;
}
.entry-screen.is-invocation .entry-invocation { opacity: 1; }
.entry-invocation-card {
  position: absolute;
  width: min(620px, 76vw);
  opacity: 0;
  transition: opacity 2800ms linear;
}
.entry-invocation-card.is-current {
  opacity: 1;
}
.entry-invocation-card.is-leaving {
  opacity: 0;
  transition-duration: 1800ms;
}
.entry-invocation-card b,
.entry-invocation-card span,
.entry-invocation-card p {
  display: block;
  margin: 0;
  font: inherit;
}
.entry-invocation-card b {
  margin-bottom: 7px;
  color: rgba(216, 197, 237, .78);
  letter-spacing: .18em;
}
.entry-invocation-card span {
  color: rgba(229, 220, 207, .43);
  letter-spacing: .04em;
}
.entry-invocation-card span + p {
  margin-top: 8px;
  color: rgba(229, 220, 207, .72);
}

.entry-film {
  position: absolute;
  z-index: 3;
  inset: 0;
  overflow: hidden;
  background: #030404;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 1600ms linear,
    visibility 1600ms linear;
}
.entry-screen.is-film .entry-film {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.entry-film-stage,
.entry-film-slide,
.entry-film-slide img,
.entry-film-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.entry-film-stage {
  overflow: hidden;
  background: #030404;
}
.entry-film-slide {
  margin: 0;
  overflow: hidden;
  opacity: 0;
  contain: paint;
  will-change: opacity;
  transition: opacity 2800ms linear;
}
.entry-film-slide.is-opening {
  transition-duration: 5200ms;
}
.entry-film-slide.is-visible { opacity: 1; }
.entry-film-slide img {
  object-fit: cover;
  image-rendering: auto;
  transform: scale(1.006);
  will-change: transform;
}
.entry-film-shade {
  background:
    radial-gradient(circle at center, rgba(3,4,4,0) 30%, rgba(3,4,4,.13) 100%),
    linear-gradient(180deg, rgba(3,4,4,.08), rgba(3,4,4,.03) 48%, rgba(3,4,4,.12));
  pointer-events: none;
}
.entry-film-caption {
  position: absolute;
  z-index: 2;
  width: min(560px, 42vw);
  margin: 0;
  padding-top: 20px;
  color: rgba(247, 240, 231, .96);
  font: 400 clamp(32px, 3vw, 52px)/1.02 Georgia, "Times New Roman", serif;
  letter-spacing: -.025em;
  text-align: left;
  text-wrap: balance;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, .66),
    0 5px 18px rgba(0, 0, 0, .34);
  opacity: 0;
  transition: opacity 900ms linear;
}
.entry-film-caption::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 58px;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(183, 131, 242, .34);
}
.entry-film-caption[data-position="top-left"],
.entry-film-caption[data-position="bottom-left"] {
  left: clamp(38px, 5vw, 88px);
  right: auto;
}
.entry-film-caption[data-position="top-right"],
.entry-film-caption[data-position="bottom-right"] {
  left: auto;
  right: clamp(38px, 5vw, 88px);
  text-align: right;
}
.entry-film-caption[data-position="top-right"]::before,
.entry-film-caption[data-position="bottom-right"]::before {
  left: auto;
  right: 0;
}
.entry-film-caption[data-position="top-left"],
.entry-film-caption[data-position="top-right"] {
  top: clamp(54px, 8vh, 112px);
  bottom: auto;
}
.entry-film-caption[data-position="bottom-left"],
.entry-film-caption[data-position="bottom-right"] {
  top: auto;
  bottom: clamp(60px, 8vh, 108px);
}
.entry-film-caption[data-position="center"] {
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  text-align: center;
  transform: translate(-50%, -50%);
}
.entry-film-caption[data-position="center"]::before {
  left: 50%;
  transform: translateX(-50%);
}
.entry-film-caption[data-position="final"] {
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  width: auto;
  max-width: calc(100vw - 96px);
  padding-top: 0;
  color: rgba(235, 227, 216, .82);
  font-size: clamp(20px, 2vw, 32px);
  letter-spacing: -.018em;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  transition-duration: 2200ms;
}
.entry-film-caption[data-position="final"]::before {
  display: none;
}
.entry-film-caption[data-position="final"].is-visible {
  transition-duration: 2800ms;
}
.entry-film-caption.is-visible {
  opacity: 1;
  transition-duration: 1600ms;
}
.entry-film-controls {
  position: absolute;
  z-index: 3;
  left: 24px;
  right: 24px;
  bottom: 20px;
  display: flex;
  justify-content: flex-start;
  pointer-events: none;
}
.entry-film-controls button {
  min-height: 30px;
  padding: 0 9px;
  border: 0;
  background: transparent;
  color: rgba(236, 228, 216, .46);
  font: 400 8px/1 "JetBrains Mono", ui-monospace, monospace;
  letter-spacing: .13em;
  cursor: pointer;
  pointer-events: auto;
  transition: color 240ms var(--ease-touch);
}
.entry-film-controls button:hover,
.entry-film-controls button:focus-visible { color: rgba(244, 239, 231, .92); }
.entry-film-controls button:active { color: var(--accent); }
.entry-film audio { display: none; }

.entry-screen.is-film .entry-invocation,
.entry-screen.is-film .entry-copy {
  opacity: 0;
}

.shell.is-first-entry .scene-background {
  filter: saturate(.3) brightness(.08);
  transform: scale(1.045);
  transition:
    filter 2600ms var(--ease-light),
    transform 2600ms var(--ease-light);
}
.shell.is-first-entry .scene-veil {
  opacity: .92;
  transition: opacity 2600ms var(--ease-light);
}
.shell.is-first-entry.is-world-awake .scene-background {
  filter: saturate(.74) brightness(.52);
  transform: scale(1.018);
}
.shell.is-first-entry.is-world-awake .scene-veil { opacity: 1; }
.shell.is-first-entry .topbar,
.shell.is-first-entry .mountain-copy,
.shell.is-first-entry .mountain-list,
.shell.is-first-entry .brand,
.shell.is-first-entry .utility,
.shell.is-first-entry .rail-label,
.shell.is-first-entry .episode-list,
.shell.is-first-entry .cloud-account,
.shell.is-first-entry .course-progress {
  opacity: 0;
  filter: blur(10px);
  pointer-events: none;
}
.shell.is-first-entry .topbar,
.shell.is-first-entry .mountain-copy,
.shell.is-first-entry .mountain-list {
  transform: translateY(7px);
}
.shell.is-first-entry .brand,
.shell.is-first-entry .utility,
.shell.is-first-entry .rail-label,
.shell.is-first-entry .episode-list,
.shell.is-first-entry .cloud-account,
.shell.is-first-entry .course-progress {
  transform: translateX(-8px);
}
.shell.is-first-entry .topbar,
.shell.is-first-entry .mountain-copy,
.shell.is-first-entry .mountain-list,
.shell.is-first-entry .brand,
.shell.is-first-entry .utility,
.shell.is-first-entry .rail-label,
.shell.is-first-entry .episode-list,
.shell.is-first-entry .cloud-account,
.shell.is-first-entry .course-progress {
  transition:
    opacity 820ms var(--ease-glass),
    filter 820ms var(--ease-glass),
    transform 820ms var(--ease-glass);
}
.shell.is-first-entry .rail {
  border-right-color: transparent;
  background: rgba(7,8,8,0);
  backdrop-filter: blur(0) saturate(.9) brightness(1);
  box-shadow: none;
  transition:
    border-color 1000ms var(--ease-glass),
    background 1000ms var(--ease-glass),
    backdrop-filter 1000ms var(--ease-glass),
    box-shadow 1000ms var(--ease-glass);
}
.shell.is-first-entry.is-title-built .mountain-copy,
.shell.is-first-entry.is-chrome-built .topbar,
.shell.is-first-entry.is-chrome-built .brand,
.shell.is-first-entry.is-tools-built .utility,
.shell.is-first-entry.is-sections-built .rail-label,
.shell.is-first-entry.is-sections-built .episode-list,
.shell.is-first-entry.is-sections-built .mountain-list,
.shell.is-first-entry.is-progress-built .cloud-account,
.shell.is-first-entry.is-progress-built .course-progress {
  opacity: 1;
  filter: blur(0);
  transform: translate(0);
  pointer-events: auto;
}
.shell.is-first-entry.is-rail-built .rail {
  border-right-color: var(--line);
  background:
    linear-gradient(180deg, rgba(18, 19, 19, .43), rgba(7, 8, 8, .34));
  backdrop-filter: blur(21px) saturate(.9) brightness(1.04);
  box-shadow:
    20px 0 60px rgba(0,0,0,.1),
    inset -1px 0 rgba(255,255,255,.025);
}
.shell.is-first-entry.is-sections-built .episode-button,
.shell.is-first-entry.is-sections-built .mountain-row {
  animation: entrance-row-build 720ms var(--ease-glass) both;
}
.shell.is-first-entry.is-sections-built :is(.episode-button, .mountain-row):nth-child(2) { animation-delay: 90ms; }
.shell.is-first-entry.is-sections-built :is(.episode-button, .mountain-row):nth-child(3) { animation-delay: 180ms; }
.shell.is-first-entry.is-sections-built :is(.episode-button, .mountain-row):nth-child(4) { animation-delay: 270ms; }
.shell.is-first-entry.is-sections-built :is(.episode-button, .mountain-row):nth-child(5) { animation-delay: 360ms; }
.shell.is-first-entry.is-sections-built :is(.episode-button, .mountain-row):nth-child(6) { animation-delay: 450ms; }
.shell.is-first-entry.is-sections-built :is(.episode-button, .mountain-row):nth-child(7) { animation-delay: 540ms; }

.drawer-scrim {
  position: fixed;
  z-index: 39;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(0);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity var(--motion-interface) var(--ease-glass),
    backdrop-filter var(--motion-glass) var(--ease-glass);
}
.drawer-scrim.is-open {
  opacity: 1;
  backdrop-filter: blur(4px);
  pointer-events: auto;
}
.studio-drawer {
  position: fixed;
  z-index: 40;
  right: var(--gutter);
  top: var(--gutter);
  bottom: var(--gutter);
  width: min(460px, calc(100vw - 2 * var(--gutter)));
  padding: 0 28px 30px;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 0 9px 9px 0;
  background: rgba(12,13,13,.94);
  backdrop-filter: blur(28px);
  box-shadow: -30px 0 80px rgba(0,0,0,.52);
  transform: translateX(calc(100% + var(--gutter)));
  filter: blur(7px);
  opacity: .68;
  transition:
    transform 460ms var(--ease-glass),
    filter 460ms var(--ease-glass),
    opacity 360ms var(--ease-glass);
}
.studio-drawer.is-open {
  transform: translateX(0);
  filter: blur(0);
  opacity: 1;
}
.studio-drawer.is-open > * { animation: drawer-content-in 520ms var(--ease-glass) 80ms both; }
.studio-drawer header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
  border-bottom: 1px solid var(--line);
  background: rgba(12,13,13,.96);
}
.studio-drawer header > div { display: grid; gap: 5px; }
.studio-drawer header span, .studio-intro > span, .ingest-step > span, .analysis-result > span {
  color: var(--accent);
  font: 7px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .15em;
}
.studio-drawer h2 { margin: 0; font: 400 22px/1 Georgia, serif; }
.studio-drawer header button {
  border: 0;
  background: transparent;
  color: #a49e95;
  font-size: 9px;
  cursor: pointer;
  transition:
    color var(--motion-touch) var(--ease-touch),
    transform var(--motion-touch) var(--ease-touch);
}
.studio-drawer header button:hover { color: var(--ink); }
.studio-drawer header button:active { transform: scale(.97); }
.studio-intro { padding: 26px 0 20px; }
.studio-intro p, .truth-note, .analysis-result p {
  margin: 8px 0 0;
  color: #9e988f;
  font-size: 10px;
  line-height: 1.55;
}
.ingest-step { padding: 20px 0; border-top: 1px solid var(--line); }
.file-control {
  position: relative;
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  background: rgba(255,255,255,.018);
  cursor: pointer;
  transition:
    border-color var(--motion-interface) var(--ease-glass),
    background var(--motion-interface) var(--ease-glass),
    transform var(--motion-touch) var(--ease-touch);
}
.file-control:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.file-control:active { transform: scale(.995); }
.file-control b { font-size: 11px; font-weight: 480; }
.file-control em { color: #777168; font-size: 8px; font-style: normal; }
.file-control input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-control.compact { padding: 14px 16px; }
.analysis-button {
  width: 100%;
  height: 42px;
  margin-top: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
  background: var(--accent-soft);
  color: #eadff8;
  font-size: 10px;
  cursor: pointer;
  transition:
    color var(--motion-touch) var(--ease-touch),
    border-color var(--motion-interface) var(--ease-glass),
    background var(--motion-interface) var(--ease-glass),
    transform var(--motion-touch) var(--ease-touch);
}
.analysis-button:disabled {
  border-color: var(--line);
  background: transparent;
  color: #736d65;
  cursor: not-allowed;
}
.analysis-button:not(:disabled):hover {
  border-color: color-mix(in srgb, var(--accent) 68%, transparent);
  background: color-mix(in srgb, var(--accent) 22%, transparent);
}
.analysis-button:not(:disabled):active { transform: scale(.99); }
.analysis-result {
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  display: grid;
  gap: 7px;
}
.analysis-result b { font: 400 17px/1.2 Georgia, serif; }

@keyframes orientation-resolve {
  0% { opacity: .2; filter: blur(5px); transform: translateY(2px); }
  100% { opacity: 1; filter: blur(0); transform: translateY(0); }
}
@keyframes room-arrival {
  0% {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(8px);
  }
  18%, 72% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    filter: blur(7px);
    transform: translateY(-5px);
  }
}
@keyframes threshold-word {
  0% {
    opacity: 0;
    filter: blur(7px);
    transform: translateY(3px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}
@keyframes entrance-row-build {
  0% {
    opacity: 0;
    filter: blur(6px);
    transform: translateY(5px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}
@keyframes chapter-arrival {
  0% { filter: brightness(.76); }
  45% { filter: brightness(1.18); }
  100% { filter: brightness(1); }
}
@keyframes resource-resolve {
  0% { opacity: .28; filter: blur(4px); transform: translateY(2px); }
  100% { opacity: 1; filter: blur(0); transform: translateY(0); }
}
@keyframes saved-confirmation {
  0% { opacity: .65; filter: blur(2px); }
  38% { opacity: 1; filter: blur(0); text-shadow: 0 0 12px rgba(192,154,104,.28); }
  100% { opacity: 1; filter: blur(0); text-shadow: none; }
}
@keyframes progress-confirmation {
  0% { filter: brightness(.72); }
  42% { filter: brightness(1.34); }
  100% { filter: brightness(1); }
}
@keyframes drawer-content-in {
  0% { opacity: 0; transform: translateX(8px); }
  100% { opacity: 1; transform: translateX(0); }
}

@media (max-width: 1180px) {
  :root { --rail: 72px; --gutter: 10px; }
  .rail { padding-inline: 10px; }
  .brand { justify-content: center; padding: 0; }
  .brand > span:last-child, .rail-label, .episode-button .name,
  .episode-button .check, .course-progress { display: none; }
  .utility-button { grid-template-columns: 1fr; place-items: center; padding: 0; }
  .utility-button > span, .utility-button i { display: none; }
  .episode-button { grid-template-columns: 1fr; padding: 0; text-align: center; }
  .episode-button .code { font-size: 8px; }
  .mountain-location span { display: none; }
  .mountain-overview { padding: 46px; }
  .mountain-copy { width: min(620px, 64vw); }
  .mountain-route { width: min(740px, 76vw); }
  .mountain-table-head,
  .mountain-open {
    grid-template-columns: minmax(120px, 1fr) minmax(120px, 1.05fr) 66px minmax(135px, 1.1fr);
    gap: 11px;
  }
  .episode-stage { grid-template-columns: minmax(440px, 1fr) minmax(250px, 290px); gap: 20px; padding: 26px; }
}

@media (max-width: 900px) {
  html, body { overflow: hidden; }
  .app-frame { height: 100%; min-height: 0; }
  .shell { height: 100%; min-height: 0; }
  .main { height: 100%; min-height: 0; overflow: hidden; }
  .mountain-overview {
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    justify-content: flex-start;
    padding: 42px 32px;
  }
  .mountain-overview::-webkit-scrollbar { display: none; }
  .mountain-copy { padding-top: 0; }
  .mountain-copy, .mountain-list { width: 100%; }
  .mountain-copy h1 { font-size: clamp(38px, 8vw, 54px); }
  .mountain-route { width: 100%; }
  .episode-brief {
    --folio-min-height: 500px;
    --folio-max-height: 760px;
    --folio-padding-top: 32px;
    --folio-padding-bottom: 26px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "heading" "movements" "activity" "note";
    padding: 28px 25px 22px;
  }
  .episode-brief ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .episode-stage {
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    grid-template-columns: minmax(0, 1fr);
  }
  .episode-stage::-webkit-scrollbar { display: none; }
  .film-column {
    grid-template-rows:
      auto
      var(--player-controls-height)
      var(--episode-footer-height);
  }
  .chapter-spine { min-height: 430px; }
  .source-state { display: none; }
  .topbar { grid-template-columns: 1fr auto; }
  .panel-view { position: fixed; left: calc(var(--gutter) + var(--rail)); top: var(--gutter); right: var(--gutter); bottom: var(--gutter); }
}

@media (max-width: 620px) {
  :root { --gutter: 6px; }
  .restart-confirmation { padding: 16px; }
  .restart-confirmation-card {
    width: min(100%, 440px);
    padding: 34px 28px 28px;
  }
  .restart-confirmation-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }
  .restart-confirmation-actions button { width: 100%; }
  .topbar, .episode-stage { padding-inline: 17px; }
  .mountain-overview { padding: 30px 18px; }
  .mountain-copy h1 { font-size: clamp(34px, 10vw, 46px); }
  .mountain-copy p { max-width: 45ch; }
  .mountain-route { margin-top: 20px; }
  .mountain-table-head { display: none; }
  .mountain-open {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "episode map"
      "purpose purpose"
      "activity activity";
    gap: 8px 12px;
    padding: 13px 14px;
  }
  .mountain-episode { grid-area: episode; }
  .mountain-purpose { grid-area: purpose; }
  .mountain-map-count { grid-area: map; text-align: right; }
  .mountain-activity { grid-area: activity; padding-top: 7px; border-top: 1px solid var(--line); }
  .episode-brief {
    --folio-min-height: 800px;
    --folio-max-height: 1080px;
    --folio-padding-top: 25px;
    --folio-padding-bottom: 21px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "heading"
      "question"
      "movements"
      "activity"
      "note";
    gap: 17px;
    padding: 25px 20px 21px;
  }
  .episode-brief-heading { grid-template-columns: minmax(0, 1fr); gap: 20px; padding-bottom: 25px; }
  .episode-brief-question { margin: 0; max-width: 26ch; font-size: 19px; }
  .episode-brief-section { padding: 22px 0; }
  .episode-brief ol { grid-template-columns: minmax(0, 1fr); }
  .episode-brief-activity { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .episode-brief-enter { width: 100%; }
  .crumb b { display: none; }
  .film-identity { left: 16px; top: 15px; max-width: 80%; }
  .film-identity strong { font-size: 17px; }
  .prototype-note { left: 15px; bottom: 13px; }
  .player-controls { grid-template-columns: 22px 34px 1fr 34px; }
  .bookmark-button { grid-column: 1 / -1; justify-self: end; min-height: 26px; }
  .entry-copy h1 { font-size: 46px; }
  .entry-invocation { font-size: 14px; }
  .entry-film-caption {
    width: min(340px, 78vw);
    padding-top: 14px;
    font-size: clamp(24px, 7vw, 34px);
  }
  .entry-film-caption[data-position="top-left"],
  .entry-film-caption[data-position="bottom-left"] {
    left: 22px;
  }
  .entry-film-caption[data-position="top-right"],
  .entry-film-caption[data-position="bottom-right"] {
    right: 22px;
  }
  .entry-film-caption[data-position="top-left"],
  .entry-film-caption[data-position="top-right"] {
    top: 42px;
  }
  .entry-film-caption[data-position="bottom-left"],
  .entry-film-caption[data-position="bottom-right"] {
    bottom: 48px;
  }
  .entry-film-caption[data-position="final"] {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    max-width: calc(100vw - 32px);
    font-size: clamp(12px, 3.5vw, 18px);
  }
  .entry-film-controls { left: 10px; right: 10px; bottom: 8px; }
  .collection { padding: 28px 20px; }
}

.cloud-account{
  display:flex;
  width:calc(100% - 24px);
  min-height:34px;
  margin:0 12px 8px;
  padding:0 12px;
  align-items:center;
  gap:10px;
  border:0;
  background:transparent;
  color:rgba(227,222,213,.46);
  font:500 8px/1.2 "JetBrains Mono",ui-monospace,monospace;
  letter-spacing:.12em;
  text-transform:uppercase;
  cursor:pointer;
  transition:color .35s ease,background .35s ease;
}
.cloud-account:hover{background:rgba(255,255,255,.025);color:rgba(237,232,223,.72)}
.cloud-account i{
  width:6px;
  height:6px;
  flex:0 0 auto;
  border-radius:50%;
  background:#d99b4f;
  box-shadow:0 0 12px rgba(217,155,79,.18);
}
.cloud-account[data-state=saved] i{background:#74ab8f;box-shadow:0 0 12px rgba(116,171,143,.22)}
.cloud-account[data-state=locked] i{background:#cf6767;box-shadow:0 0 12px rgba(207,103,103,.18)}
.cloud-access{
  position:fixed;
  inset:0;
  z-index:5000;
  display:grid;
  place-items:center;
  padding:24px;
  background:rgba(5,5,5,.58);
  backdrop-filter:blur(0);
  opacity:0;
  visibility:hidden;
  transition:opacity .7s ease,backdrop-filter .9s ease,visibility 0s linear .9s;
}
.cloud-access.is-visible{
  opacity:1;
  visibility:visible;
  backdrop-filter:blur(22px);
  transition-delay:0s;
}
.cloud-access-card{
  position:relative;
  box-sizing:border-box;
  width:min(430px,calc(100vw - 48px));
  padding:48px;
  border:1px solid rgba(230,224,215,.15);
  background:rgba(13,13,13,.92);
  box-shadow:0 35px 120px rgba(0,0,0,.42);
  color:#e8e2d8;
  transform:translateY(10px) scale(.985);
  transition:transform .85s cubic-bezier(.2,.8,.2,1);
}
.cloud-access.is-visible .cloud-access-card{transform:none}
.cloud-access-card>span,.cloud-access-card label{
  display:block;
  color:#ad96d7;
  font:500 8px/1.3 "JetBrains Mono",ui-monospace,monospace;
  letter-spacing:.2em;
  text-transform:uppercase;
}
.cloud-access-card h2{margin:15px 0 12px;font:400 32px/1.06 Georgia,serif}
.cloud-access-card p{margin:0;color:rgba(232,226,216,.58);font:400 13px/1.65 system-ui,sans-serif}
.cloud-access-card form{margin-top:28px}
.cloud-access-card input{
  box-sizing:border-box;
  width:100%;
  margin:9px 0 12px;
  padding:13px 14px;
  border:1px solid rgba(230,224,215,.17);
  outline:0;
  background:rgba(255,255,255,.025);
  color:#eee8de;
  font:400 13px system-ui,sans-serif;
}
.cloud-access-card input:focus{border-color:rgba(177,148,226,.58)}
.cloud-access-card form button{
  width:100%;
  padding:13px;
  border:1px solid rgba(177,148,226,.48);
  background:rgba(164,128,222,.1);
  color:#e7ddf7;
  font:500 9px "JetBrains Mono",ui-monospace,monospace;
  letter-spacing:.13em;
  text-transform:uppercase;
  cursor:pointer;
}
.cloud-access-status{min-height:22px!important;margin-top:14px!important}
.cloud-access-guest,.cloud-access-signout{
  display:block;
  margin:14px auto 0;
  border:0;
  background:none;
  color:rgba(232,226,216,.48);
  font:500 8px "JetBrains Mono",ui-monospace,monospace;
  letter-spacing:.12em;
  text-transform:uppercase;
  cursor:pointer;
}
.cloud-access-signout[hidden]{display:none!important}
.cloud-access-close{
  position:absolute;
  top:15px;
  right:17px;
  border:0;
  background:none;
  color:rgba(232,226,216,.46);
  font:300 18px/1 system-ui,sans-serif;
  cursor:pointer;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
  .room-arrival { display: none; }
}
