/* The viewer and its transport share a single beveled enclosure. */
html { scroll-padding-block-start: calc(var(--mast-height, 3.75rem) + .4rem) }
.mast {
  isolation: isolate; position: sticky; top: 0; z-index: 5;
  background: linear-gradient(175deg,#2c2d30,#222326 62%,#252629);
  box-shadow: inset 0 1px #ffffff0e,inset 0 -1px #141417;
}
.mast::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("medios/grano.png"); mix-blend-mode: soft-light; opacity: .11;
}
.mast-inner { width: min(91%, 94rem) }
.mast-tools { display: flex; align-items: center; gap: clamp(.6rem,1.7vw,1.75rem) }
.mast .brand { white-space: nowrap }
.mast nav a {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; white-space: nowrap;
}
.mast nav a::before, .mast nav a::after {
  content: ""; position: absolute; left: 50%; bottom: .26rem; transform: translateX(-50%);
  height: 3px; border-radius: 1px; pointer-events: none;
}
.mast nav a::before {
  width: .45rem;
  background: #55594f; box-shadow: inset 0 1px #383b34,0 0 0 1px #151619,0 1px 0 1px #ffffff12;
}
.mast nav a[aria-current="location"] { --pilot-on: 1; color: #e9f4c0 }
.mast nav a::after {
  width: .78rem; background: #e3f599;
  box-shadow: inset 0 1px #f7ffd2,0 0 0 1px #20251c,0 0 5px #d7f27b62;
  opacity: var(--pilot-level, var(--pilot-on, 0));
}
.mast nav a:is(:hover,:focus-visible) { color: #fffef3; text-decoration: none }
.mast nav a:focus-visible { outline: 2px solid var(--signal); outline-offset: 1px; border-radius: 2px }
.sound-switch {
  position: relative; display: grid; place-items: center; flex: none;
  width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: 4px;
  background: transparent;
}
.sound-switch::before {
  content: ""; position: absolute; left: -.2rem; top: 30%; bottom: 30%;
  width: 1px; background: #434446;
}
.sound-cap {
  display: grid; place-items: center; width: 2.25rem; height: 1.85rem; border-radius: 4px;
  border: 1px solid #44444a; color: #dbdad3;
  background: linear-gradient(#45464a,#323337 75%);
  box-shadow: 0 0 0 1px #141417,inset 0 1px #ffffff29,0 2px 1px #111114;
}
.sound-cap svg { display: block; width: 1.45rem; height: auto }
.sound-switch[aria-pressed="true"] .sound-cap {
  color: #e9f6ac; border-color: #414739;
  background: linear-gradient(#292e26,#30362c);
  box-shadow: 0 0 0 1px #131512,inset 0 2px 2px #171c15,0 1px #ffffff16;
}
.sound-switch[aria-pressed="true"] .sound-mute,
.sound-switch[aria-pressed="false"] .sound-waves { display: none }
.sound-switch:is(:hover,:focus-visible) .sound-cap { border-color: #84877d }
.sound-switch:active .sound-cap { transform: translateY(1px) }
.sound-switch:focus-visible { outline: 2px solid var(--signal); outline-offset: -2px }
@media (prefers-reduced-motion: no-preference) {
  .sound-cap { transition: transform 80ms ease-out,border-color 120ms ease-out }
  html.mast-travel { scroll-behavior: smooth }
  .mast nav a::after { transition: opacity 140ms ease-out }
  .mast-travel .mast nav a::after { transition: none }
}
@media (forced-colors: active) {
  .mast nav a::before { forced-color-adjust: none; background: Canvas; box-shadow: 0 0 0 1px GrayText }
  .mast nav a::after { forced-color-adjust: none; background: LinkText; box-shadow: 0 0 0 1px Canvas }
  .mast .brand-mark { filter: none }
  .mast .brand-mark use { fill: LinkText }
  .sound-cap { color: ButtonText; border-color: ButtonText }
  .sound-switch[aria-pressed="true"] .sound-cap { color: ButtonText; border-color: Highlight }
}
@media (max-width: 32rem) {
  .mast-inner { width: 95%; gap: .4rem }
  .mast-tools { gap: .45rem }
  .mast nav { gap: clamp(.5rem,2.7vw,.9rem) }
}
@media (max-width: 23rem) {
  .mast-inner { flex-wrap: wrap; gap: 0 .12rem }
  .mast .brand { gap: .22rem }
  .mast-tools { gap: 0; margin-left: auto }
  .mast nav { gap: .3rem }
  .sound-switch::before { display: none }
}
@media (max-width: 22rem) {
  .mast-inner { width: calc(100% - .625rem) }
  .mast .brand { gap: .19rem; font-size: .9rem }
  .mast nav a { font-size: .875rem; letter-spacing: -.025em }
}
.bench {
  --rim: clamp(.48rem, 1.4vw, 1.7rem);
  padding: 0 var(--rim) var(--rim);
  background: #161619;
}
.set {
  position: relative;
  isolation: isolate;
  max-width: 108rem;
  margin: auto;
  border: 1px solid #121216;
  border-radius: 12px 12px 4px 4px;
  box-shadow: 0 1px 0 #64636a;
}
.set::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse at 71% 39%, rgb(255 252 241 / 34%), transparent 44%),
    linear-gradient(115deg, rgb(255 255 255 / 11%), transparent 38%, rgb(29 19 39 / 8%));
  box-shadow: inset 0 1px 1px rgb(255 255 255 / 50%), inset 0 -1px 3px rgb(26 24 36 / 16%);
}
.set::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .046;
  background-image: url("medios/grano.png");
  mix-blend-mode: multiply;
}
.stage {
  width: 94%; min-height: clamp(25rem, min(42vw, 67svh), 47rem);
  grid-template-columns: minmax(0,37fr) minmax(0,63fr);
}
.stage .reel { margin: 0 -2.5% 0 0 }
.stage .film-window { top: 1%; height: 93% }
.stage .reel-shadow {
  left: 10%; right: 8%; top: 83%; height: 6%; opacity: .85;
  transform: rotate(-2deg); filter: blur(6px);
}
/* The captured frames and the live ribbon share an optical center and scale. */
.film-leader { filter: blur(1.3px) }
.film-pilot {
  position: absolute; bottom: 5%; left: 50%; width: 2.35rem; height: .55rem;
  transform: translateX(-50%); border: 1px solid #44354c; border-radius: 2px;
  background: #302936; box-shadow: inset 0 1px 2px #18151e, 0 1px #ffffff52;
  pointer-events: none; opacity: 0;
}
.film-pilot::after {
  content: ""; position: absolute; inset: 2px 3px; border-radius: 1px;
  background: repeating-linear-gradient(90deg,#e7deab 0 3px,transparent 3px 7px);
}
.reel:is(.warming,.loading-film):not(.rendered) .drag-caption { visibility: hidden }
@media (scripting: none) { .transport[inert] { display: none } }
@media (scripting: enabled) {
  .reel:is(:not(.ready),.warming,.loading-film):not(.rendered) .film-pilot {
    animation: film-pilot-on 120ms ease-out 240ms both;
  }
  @keyframes film-pilot-on { from { opacity: 0 } to { opacity: 1 } }
}
@media (prefers-reduced-motion: no-preference) {
  .film-still { transition: opacity 230ms ease-out }
  .reel.exposed .film-leader { transition: visibility 0s 230ms }
  .reel.rendered .film-canvas { transition: opacity 220ms ease-out }
  .reel.rendered .film-still, .reel.rendered .film-leader { transition: visibility 0s 220ms }
  .reel:is(:not(.ready),.warming,.loading-film):not(.rendered) .film-pilot::after { animation: film-feed 750ms linear infinite }
  @keyframes film-feed { to { background-position: 7px 0 } }
}
@media (min-width: 48rem) {
  .stage .copy { container-type: inline-size }
  .stage .display { font-size: clamp(4.25rem,min(37cqw,22svh),14rem) }
  .stage .scene-note .display { font-size: clamp(3.1rem,min(23cqw,16svh),9.1rem) }
  .stage .scene-interview .display { font-size: clamp(3.7rem,min(30cqw,19svh),11.3rem) }
  .stage .scene-dance .display { font-size: clamp(3.25rem,min(26cqw,17svh),10rem) }
}
.stage .display { letter-spacing: -.045em }
.drag-caption {
  bottom: 4.7%; font-family: var(--sans); letter-spacing: .01em; font-size: .84rem;
}
.grip { opacity: .66 }
.transport { max-width: 108rem; margin: 4px auto 0; color: #faf9ef }
.deck-shell {
  --alloy: #2d2e31;
  position: relative;
  isolation: isolate;
  background: linear-gradient(164deg,#3a3a3d 0%,var(--alloy) 37%,#232426 75%,#303133 100%);
  border: 1px solid #49494d; border-bottom-color: #111113;
  border-radius: 4px 4px 12px 12px;
  box-shadow: inset 0 1px rgb(255 255 255 / 14%), inset 0 -2px #1e1e21, 0 2px 2px rgb(0 0 0 / 38%);
}
.deck-shell::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  background: url("medios/grano.png"); opacity: .065; mix-blend-mode: screen; pointer-events: none;
}
.transport-grid {
  width: 94%; margin-inline: auto; padding-block: clamp(.8rem,1.1vw,1.3rem);
  display: grid; grid-template-columns: clamp(6.25rem,8.6vw,8.5rem) minmax(0,1fr);
  align-items: center; gap: clamp(1.15rem,2vw,2.4rem);
}
.deck-control {
  --jog-size: clamp(4.6rem,6.9vw,6.8rem);
  position: relative; align-self: stretch; display: grid; justify-items: center;
  align-content: center; gap: clamp(.2rem,.55vw,.55rem);
}
.deck-control::after {
  content: ""; position: absolute; top: .16rem; bottom: .16rem; right: clamp(-1.2rem,-1vw,-.575rem);
  width: 1px; background: #161618; box-shadow: 1px 0 #ffffff15;
}
.count {
  display: inline-flex; align-items: baseline; gap: .22rem; white-space: nowrap;
  color: #afb5a8; font: .72rem/1 var(--mono); font-variant-numeric: tabular-nums;
  padding: .34rem .38rem; border: 1px solid #111310; border-radius: 3px;
  background: linear-gradient(145deg,#121410,#242821); box-shadow: inset 0 1px 3px #0a0c09,0 1px #ffffff1c;
}
.counter-window { display: inline-grid; align-items: center; overflow: hidden }
.counter-window > b { grid-area: 1 / 1; font: 550 .98rem/1 var(--mono); color: #e4f787 }
.transport-start { border: 0; padding: 0; display: grid; place-items: center; background: transparent }
.transport-start { width: var(--jog-size); min-height: 2.75rem; border-radius: 5px }
.play {
  display: grid; place-items: center; width: 96%; height: clamp(1.7rem,2.1vw,2.15rem);
  color: #293014; border: 1px solid #bdcc71; border-radius: 4px;
  background: linear-gradient(#eef99a,#d6e87f 75%,#c0d268);
  box-shadow: inset 0 1px #fcffcf, inset 0 -2px #8d9d4f, 0 0 0 2px #171918, 0 3px 3px #0e100c;
}
.play-icon { width: .72rem; height: .8rem; background: currentColor; clip-path: polygon(7% 0,100% 50%,7% 100%) }
.transport-start[aria-pressed="true"] .play-icon {
  clip-path: polygon(0 0,34% 0,34% 100%,0 100%,0 0,66% 0,100% 0,100% 100%,66% 100%,66% 0);
}
.transport-start:hover .play { background: linear-gradient(#f6ffaa,#dee983) }
.transport-start:active .play { transform: translateY(1.5px); box-shadow: inset 0 1px #f4fbb5, inset 0 -1px #8d9d4f, 0 0 0 2px #171918 }
.edit-track {
  min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin;
  scrollbar-color: #6a6b6c #17181a; background: #18191b; border: 1px solid #121215;
  border-radius: 5px; box-shadow: inset 0 2px 5px #08080b, 0 1px #ffffff2e;
}
.track-well { padding: 0 4px 4px }
.ruler {
  position: relative; height: 1.65rem;
  background:
    repeating-linear-gradient(90deg,#858688 0 1px,transparent 1px 12.5%) left bottom 3px/100% 9px no-repeat,
    repeating-linear-gradient(90deg,#5a5c5e 0 1px,transparent 1px 3.125%) left bottom 3px/100% 6px no-repeat,
    repeating-linear-gradient(90deg,#38393d 0 1px,transparent 1px .78125%) left bottom 3px/100% 3px no-repeat;
}
.spine { position: absolute; inset: 0 12.5%; pointer-events: none }
.head {
  position: absolute; z-index: 1; left: 0; top: 3px; bottom: 0; width: 1px;
  background: var(--signal); box-shadow: 0 0 2px #cde38566; transform: translateX(-50%);
}
.head::before {
  content: ""; position: absolute; left: -4px; top: 0; width: 9px; height: 10px;
  background: var(--signal); clip-path: polygon(0 0,100% 0,100% 54%,50% 100%,0 54%);
}
.ruler input {
  position: absolute; inset-block: 0; left: calc(12.5% - 10px); width: calc(75% + 20px);
  height: 100%; margin: 0; appearance: none; background: transparent; cursor: ew-resize;
}
.ruler input::-webkit-slider-runnable-track { height: 100%; background: transparent }
.ruler input::-webkit-slider-thumb { appearance: none; width: 20px; height: 100%; background: transparent }
.ruler input::-moz-range-track { height: 100%; background: transparent }
.ruler input::-moz-range-thumb { width: 20px; height: 100%; border: 0; background: transparent }
.chapters { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 3px }
.chapters > :is(a,button) {
  --clip: var(--lilac); position: relative; display: grid; min-width: 0; padding: 0;
  border: 0; border-radius: 2px; overflow: hidden; background: #2a2b2e; color: #e5e5de;
  font: 500 clamp(.85rem,.85vw,.97rem)/1.15 var(--sans); text-align: start;
}
.chapters > :nth-child(2) { --clip: #efc86b }
.chapters > :nth-child(3) { --clip: #9bb0ef }
.chapters > :nth-child(4) { --clip: #cea4be }
.thumb { display: block; aspect-ratio: 2.06; width: 100%; overflow: hidden; background: #242527 }
.thumb img {
  width: 100%; height: 100%; object-fit: cover; object-position: 57% 0%;
  filter: saturate(.85) brightness(.96);
}
.chapters > :nth-child(2) img { object-position: 47% 11% }
.chapters > :nth-child(3) img { object-position: 48% 38% }
.chapters > :nth-child(4) img { object-position: 52% 57% }
.cue-name {
  display: flex; align-items: center; gap: .45rem; padding: .38rem .55rem;
  border-top: 1px solid #0005; letter-spacing: -.012em;
}
.cue-name::before { content: ""; width: 3px; height: .76em; border-radius: 1px; background: var(--clip) }
.chapters > [data-current] { background: #35392e; color: #ecf8ad }
.chapters > [data-current]::after {
  content: ""; position: absolute; inset: 0; border: 1px solid #d9e99b;
  border-radius: inherit; pointer-events: none;
}
.chapters > :is(:hover,[data-current]) img { filter: none }
.edit-track :focus-visible { outline: 2px solid var(--signal); outline-offset: -2px }
.deck-control :focus-visible { outline: 2px solid var(--signal); outline-offset: 2px }
.footer-inner nav a,.ink-link { position: relative }
.footer-inner nav a::after {
  content: ""; position: absolute; bottom: .22em; left: 0; right: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
}
.footer-inner nav a:is(:hover,:focus-visible) { text-decoration: none }
.footer-inner nav a:is(:hover,:focus-visible)::after {
  transform: scaleX(1); transform-origin: left;
}
@media (prefers-reduced-motion: no-preference) {
  .thumb img { transition: filter 260ms, opacity 260ms, transform 360ms cubic-bezier(.2,.6,.3,1) }
  .chapters > :is(a, button):hover img { transform: scale(1.018) }
  .play { transition: transform 110ms ease-out, box-shadow 110ms ease-out }
  .footer-inner nav a::after { transition: transform 160ms ease-out }
}
@media (max-width: 47.99rem) {
  .stage { min-height: 0; width: min(89%,37rem); grid-template-columns: minmax(0,1fr) }
  .set { border-radius: 8px 8px 3px 3px }
  .stage .copy { padding-top: 1.4rem; min-height: 10rem }
  .stage .scene-interview .display { font-size: clamp(2.7rem,12.35vw,5.1rem) }
  .stage .reel { margin: 0 -4%; height: clamp(13rem,62vw,23rem) }
  .stage .film-window { top: 0; height: calc(100% - 1.65rem) }
  .drag-caption { bottom: 3%; font-size: .8rem }
  .transport-grid { width: 95%; grid-template-columns: 5.45rem minmax(0,1fr); gap: .85rem; padding-block: .55rem }
  .deck-control { --jog-size: 4.35rem; gap: .08rem }
  .deck-control::after { right: -.43rem }
  .count { font-size: .65rem; gap: .08rem; padding: .23rem .26rem }
  .counter-window > b { font-size: .85rem }
  .track-well { min-width: 34rem }
  .thumb { aspect-ratio: 1.65 }
  .cue-name { padding: .38rem .4rem; gap: .3rem }
  .deck-shell { border-radius: 3px 3px 8px 8px }
}
