/* Stage and read column. */

.read-view {
  position: relative;
  overflow: hidden;
}

.stage {
  --ink: #ffffff;
  --paper: #000000;
  --ink-72: rgba(255, 255, 255, 0.72);
  --ink-78: rgba(255, 255, 255, 0.78);
  --ink-45: rgba(255, 255, 255, 0.45);
  --ink-22: rgba(255, 255, 255, 0.22);
  --veil: rgba(0, 0, 0, 0.72);
  --fs: 56pt;
  --lh: 1.35;
  --mpct: 8;
  --pad: 40vh;
  --tick-y: 40vh;
  --pf: var(--font-sans);

  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  touch-action: none;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: default;
}

.flip {
  position: absolute;
  inset: 0;
  transform-origin: 50% 50%;
}

.column {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding-top: var(--pad);
  padding-bottom: var(--pad);
  padding-left: max(var(--safe-l), calc(var(--mpct) * 1%));
  padding-right: max(var(--safe-r), calc(var(--mpct) * 1%));
  font-family: var(--pf);
  font-size: var(--fs);
  line-height: var(--lh);
  color: var(--ink);
  text-align: left;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  contain: layout style;
}

.column[data-align='center'] {
  text-align: center;
}

.column[data-align='right'] {
  text-align: right;
}

.blk {
  margin: 0 0 calc(var(--fs) * 0.6);
  white-space: pre-wrap;
  overflow-wrap: break-word;
  font-weight: 400;
}

.blk:last-child {
  margin-bottom: 0;
}

.blk.a-center {
  text-align: center;
}

.blk.a-right {
  text-align: right;
}

.blk.r-heading {
  font-weight: 700;
}

.blk.r-character {
  font-weight: 600;
}

.blk.r-parenthetical {
  font-style: italic;
  color: var(--ink-72);
}

.blk.r-scene {
  font-weight: 700;
  color: var(--ink-78);
}

.blk.r-transition {
  color: var(--ink-78);
}

.blk b {
  font-weight: 700;
}

.blk i {
  font-style: italic;
}

.blk u {
  text-decoration: underline;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.12em;
}

.blk mark {
  background: var(--ink-22);
  color: inherit;
}

.empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0 calc(var(--s5) + var(--safe-r)) 0 calc(var(--s5) + var(--safe-l));
  color: var(--ink-45);
  font-family: var(--font-ui);
  font-size: 22px;
  line-height: 1.4;
  text-align: center;
}

.ticks .tick {
  position: absolute;
  top: calc(var(--tick-y) - 1px);
  width: 26px;
  height: 2px;
  background: var(--ink-45);
}

.ticks .tick-l {
  left: var(--safe-l);
}

.ticks .tick-r {
  right: var(--safe-r);
}

.stage.no-marks .ticks {
  display: none;
}

.countdown {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  background: var(--veil);
  color: var(--ink);
}

.countdown span {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: min(48vh, 60vw);
  line-height: 1;
}

.flash {
  position: absolute;
  left: 0;
  right: 0;
  top: 18%;
  z-index: 2;
  text-align: center;
  color: var(--ink);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: clamp(32px, 7vw, 72px);
  letter-spacing: var(--track);
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease-out;
}

.flash.on {
  opacity: 1;
}

/* iPhone: no element full screen; hide chrome in a fixed full-height layout. */
.app.immersive.pseudo-fs {
  position: fixed;
  inset: 0;
  height: 100dvh;
}
