@font-face {
  font-family: "Director";
  src: url("/vendor/Director-Regular.woff2") format("woff2"), url("/vendor/Director-Regular.woff") format("woff");
  font-display: swap;
}
html, body {
  margin: 0;
  height: 100%;
  background: #000;
  color: #fff;
  overflow: hidden;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  overscroll-behavior: none;
  font: 17px/1.45 "Director", serif;
  text-align: center;
  -webkit-text-size-adjust: 100%;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

h1 {
  font: 400 clamp(34px, 11vw, 64px)/1 "Director", serif;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0 auto;
  max-width: 30em;
}

.mono {
  font: 400 12px/1.3 "Director", serif;
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  opacity: 0.7;
}

#screen {
  position: fixed;
  inset: 0;
  background: #000;
  overflow: hidden;
  transition: background-color 1200ms ease;
  filter: hue-rotate(var(--hue, 0deg));
  touch-action: pinch-zoom;
  -webkit-touch-callout: none;
}

#pic {
  position: absolute;
  inset: 0;
  will-change: transform;
  transform: translate3d(calc(var(--tx, 0) * 5vmin), calc(var(--ty, 0) * 5vmin), 0);
}

.phone-picture {
  position: absolute;
  inset: 0;
  isolation: isolate;
}

.phone-media {
  position: absolute;
  inset: -5vmin;
  opacity: 0;
  transition: opacity 1200ms ease;
}

.phone-media.on {
  opacity: 1;
}

.phone-media > * {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: var(--media-opacity, 1);
}

.phone-media.contain {
  inset: 5vmin;
}
.phone-media.contain > * {
  object-fit: contain;
}

.phone-media > .phone-tile {
  position: absolute;
  inset: calc(-1 * var(--tile-size));
  width: auto;
  height: auto;
  background-repeat: repeat;
  background-size: var(--tile-size) auto;
}

.phone-media .m-drift {
  animation: phone-drift 60s ease-in-out infinite alternate;
}

.phone-media .m-zoom {
  animation: phone-zoom 45s ease-in-out infinite alternate;
}

.phone-media .m-pan {
  animation: phone-pan 50s ease-in-out infinite alternate;
}

.phone-media .phone-tile.m-pan {
  animation: phone-pan-tile 40s linear infinite;
}

.phone-media .m-pulse {
  animation: phone-pulse 6s ease-in-out infinite;
}

@keyframes phone-drift {
  from {
    transform: scale(1.12) translate(-2.5%, -1.5%);
  }
  to {
    transform: scale(1.12) translate(2.5%, 1.5%);
  }
}
@keyframes phone-zoom {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.35);
  }
}
@keyframes phone-pan {
  from {
    transform: scale(1.25) translateX(-8%);
  }
  to {
    transform: scale(1.25) translateX(8%);
  }
}
@keyframes phone-pan-tile {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translateX(var(--tile-size));
  }
}
@keyframes phone-pulse {
  50% {
    opacity: calc(var(--media-opacity, 1) * 0.55);
  }
}
#pic.ripple {
  filter: url(#ripple);
}

#ripple-filter {
  position: absolute;
  width: 0;
  height: 0;
}

#screen::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 26vmin 1vmin #000;
}

#screen.embed {
  filter: none;
}

#screen.embed::after {
  display: none;
}

.phone-embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}

#words {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  padding: 8vw;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 400 clamp(28px, 9vw, 56px)/1.1 "Director", serif;
  color: #fff;
  text-align: center;
  text-wrap: balance;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: difference;
}
#words.bottom {
  align-items: flex-end;
  padding-bottom: 18vh;
}

#flash {
  position: fixed;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: #fff;
}

#touch-trails {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
#touch-trails i {
  position: absolute;
  display: block;
  top: 0;
  left: 0;
  border-radius: 999px;
  opacity: 0;
}
#touch-trails .touch-line {
  height: 3px;
  margin-top: -1.5px;
  background: #fff;
  transform-origin: center left;
}
#touch-trails .touch-ring {
  width: 16px;
  height: 16px;
  margin: -8px;
  border: 3px solid #fff;
}

@font-face {
  font-family: "Art Company Mono";
  src: url("/vendor/ArtCompanyMono-Regular.woff2") format("woff2"), url("/vendor/ArtCompanyMono-Regular.woff") format("woff");
  font-display: swap;
}
#now {
  position: fixed;
  z-index: 56;
  left: 16px;
  right: 16px;
  bottom: calc(9vh + env(safe-area-inset-bottom));
  font: 22px/2.3 "Art Company Mono", ui-monospace, monospace;
  text-align: center;
  text-wrap: balance;
  pointer-events: none;
}

#now .line {
  padding: 0.25em 0.55em;
  color: #222;
  background: #fff;
  border-radius: 7px;
  box-shadow: 0 0 10px 3px #fff;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

#now .line, #now .word {
  opacity: 0;
  animation: now-in 0.6s ease forwards;
  animation-delay: calc(var(--i) * 0.16s + var(--l) * 0.5s);
}

@keyframes now-in {
  to {
    opacity: 1;
  }
}
#piece {
  position: fixed;
  z-index: 55;
  left: 56px;
  right: 56px;
  top: calc(16px + env(safe-area-inset-top));
  font: 14px/2.3 "Art Company Mono", ui-monospace, monospace;
  text-align: center;
  text-wrap: balance;
  pointer-events: none;
}

#piece > * {
  padding: 0.25em 0.55em;
  color: #222;
  background: #fff;
  border-radius: 7px;
  box-shadow: 0 0 10px 3px #fff;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  pointer-events: auto;
}

#piece a {
  text-decoration: underline;
}

#dot {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top));
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  outline: 1px solid #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  opacity: 0;
}

body.offline #dot {
  opacity: 1;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 10px 26px;
  min-height: 48px;
}

button:active {
  background: #fff;
  color: #000;
}

.sheet {
  position: fixed;
  inset: 0;
  background: #000;
  color: #fff;
  padding: calc(28px + env(safe-area-inset-top)) 22px calc(28px + env(safe-area-inset-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  user-select: text;
  -webkit-user-select: text;
}

.sheet[hidden] {
  display: none;
}

#enter {
  font-size: 20px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
  #pic {
    transform: none;
  }
  .phone-media > * {
    animation: none !important;
  }
}
#script-open {
  position: fixed;
  z-index: 60;
  left: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  background: #000;
  padding: 8px 16px;
}

#script-reader {
  --reader-edge: clamp(16px, 4vw, 24px);
  --reader-left: max(var(--reader-edge), env(safe-area-inset-left));
  --reader-right: max(var(--reader-edge), env(safe-area-inset-right));
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: #000;
  color: #fff;
  font-family: "Director", serif;
  text-align: left;
  user-select: text;
  -webkit-user-select: text;
}
#script-reader .script-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(8px + env(safe-area-inset-top)) var(--reader-right) 8px var(--reader-left);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}
#script-reader .script-heading h2 {
  margin: 0;
  flex: 1;
  min-width: 0;
  font: 400 18px/1.3 "Director", serif;
  overflow-wrap: anywhere;
}
#script-reader #script-close {
  flex: none;
  padding: 0;
  width: 44px;
  min-height: 44px;
}
#script-reader .script-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px var(--reader-right) calc(8px + env(safe-area-inset-bottom)) var(--reader-left);
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}
#script-reader .script-nav button {
  padding: 6px 12px;
  min-width: 44px;
  min-height: 44px;
}
#script-reader button:disabled {
  opacity: 0.3;
}
#script-reader button:focus-visible, #script-reader a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

#script-pages {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  touch-action: pan-y pinch-zoom;
  -webkit-overflow-scrolling: touch;
}

.script-passage {
  min-height: 100%;
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 24px var(--reader-right) 24px var(--reader-left);
  font-size: 20px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.script-passage h2 {
  margin: 0 0 24px;
  font: 400 28px/1.2 "Director", serif;
}
.script-passage p, .script-passage blockquote {
  margin: 0 0 24px;
  max-width: none;
  white-space: pre-wrap;
}
.script-passage blockquote {
  border-left: 1px solid rgba(255, 255, 255, 0.5);
  padding-left: 18px;
}
.script-passage cite, .script-passage ul {
  font-size: 15px;
  line-height: 1.5;
}
.script-passage cite {
  display: block;
  font-style: normal;
}
.script-passage ul {
  padding-left: 20px;
}
.script-passage li + li {
  margin-top: 12px;
}
.script-passage a {
  color: inherit;
  text-underline-offset: 3px;
}
.script-passage.script-question {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 20px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.script-passage.script-question .script-question-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 16px 0;
  text-align: center;
}
.script-passage.script-question h2, .script-passage.script-question .script-body, .script-passage.script-question cite, .script-passage.script-question ul {
  margin-top: 0;
  margin-bottom: 0;
}
.script-passage .script-choices {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  margin: 0;
}
.script-passage .script-choices .script-choice-prompt {
  margin: 0 0 4px;
  font: 400 13px/1.4 "Director", serif;
  text-align: center;
  opacity: 0.7;
}
.script-passage .script-choices button {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  font: 400 17px/1.4 "Director", serif;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
.script-passage .script-choices button[aria-pressed=true] {
  background: #fff;
  color: #000;
  opacity: 1;
}

#script-count {
  flex: 1;
  text-align: center;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

#script-reader[hidden], #script-open[hidden], #script-latest[hidden] {
  display: none;
}

#gate, #about {
  z-index: 100;
}

.script-body {
  margin-bottom: 24px;
  white-space: pre-wrap;
  line-height: 1.8;
  --script-paper: #fff;
  --script-type: #000;
}
.script-body > :last-child {
  margin-bottom: 0;
}
.script-body .say {
  color: var(--script-type);
  background: var(--script-paper);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  box-shadow: 0 0 12px var(--script-paper), 0 0 12px var(--script-paper);
  filter: drop-shadow(0 0 1px var(--script-paper)) drop-shadow(0 0 1px var(--script-paper));
}
.script-body mark {
  color: #000;
  background: #fff2b2;
  padding: 0 0.08em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  box-shadow: 0 0 12px #fff2b2, 0 0 12px #fff2b2;
}
.script-body img {
  max-width: 100%;
  height: auto;
}

.script-passage.emphasized .script-body {
  --script-paper: #fff2b2;
}
