/* ============ VOICES: the phone feed ============ */
/* The gate's daylight room continues: one voice at a time, full screen.
   The tape stays mounted (a single fixed video on a black slab, the
   channel changes); under it, the comment's full transcript follows the
   voice — the read sentence carries the stance's ink, the rest waits in
   half-light. The pane follows on its own; swipes belong to the feed.
   Phones only. */

:root { --vf-top: calc(58px + env(safe-area-inset-top)); }

.vf { position: fixed; inset: 0; z-index: 120; background: #fff; color: #131711; }
.vf[hidden] { display: none; }
html.vf-open, html.vf-open body { overflow: hidden; height: 100%; }

.vf-scroll {
  position: absolute; inset: 0;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.vf-scroll::-webkit-scrollbar { display: none; }

.vf-panel {
  height: 100dvh;
  scroll-snap-align: start; scroll-snap-stop: always;
  position: relative;
  display: flex; flex-direction: column;
  padding: calc(var(--vf-top) + 56.25vw + 16px) 24px calc(24px + env(safe-area-inset-bottom));
}

/* the tape's slab holds the slot black while the video crossfades */
.vf-slab {
  position: fixed; top: var(--vf-top); left: 0;
  width: 100vw; height: 56.25vw; background: #000; z-index: 0;
}
/* the mounted tape: fixed at every panel's video slot, crossfades on change */
.vf-video {
  position: fixed; top: var(--vf-top); left: 0;
  width: 100vw; height: 56.25vw;
  background: #000; object-fit: contain;
  opacity: 0; transition: opacity 0.24s ease;
  z-index: 1; pointer-events: none;
}

.vf-bar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--vf-top);
  z-index: 5;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 0 6px 6px 22px;
}
.vf-count {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em;
  color: rgba(19, 23, 17, 0.6); padding-bottom: 13px;
}
.vf-x {
  width: 44px; height: 44px; flex: none;
  background: none; border: 0; color: #131711; cursor: pointer;
  display: grid; place-items: center;
}
.vf-x svg { width: 19px; height: 19px; display: block; }

/* name above the words (the house rule) — the desktop card's ident line:
   stance-colored name, then plain ink place and date, one line, ellipsis */
.vf-line {
  margin-top: 4px;
  font-family: "Forma DJR Text", "Switzer", var(--display);
  font-size: 17.5px; font-weight: 400; line-height: 1.3;
  letter-spacing: 0.002em; color: #131711;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vf-name {
  background: none; border: 0; padding: 0; text-align: left; cursor: pointer;
  font: inherit; font-size: 19px; font-weight: 560;  /* stance ink, set inline */
}

/* the transcript pane: follows the voice on its own clock, and a tap on
   any sentence moves the tape to that line (the desktop theater's
   gesture) — swipes stay the feed's */
.vf-tr {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  margin-top: 16px;
}
.vf-p {
  margin: 0 0 13px;
  font-family: "Forma DJR Text", "Switzer", var(--display);
  font-weight: 500; font-size: 21px; line-height: 1.52;
  letter-spacing: 0.002em;
  color: rgba(19, 23, 17, 0.5);
}
.vf-s { border-radius: 4px; padding: 1px 2px; transition: color 140ms ease, background 140ms ease; }
.vf-s.on {
  color: #131711;
  font-weight: 560;
  background: rgba(19, 23, 17, 0.08);
  background: color-mix(in srgb, var(--vf-accent, #131711) 13%, transparent);
}
.vf-hint {
  position: absolute; left: 0; right: 0;
  bottom: calc(6px + env(safe-area-inset-bottom));
  text-align: center;
  font-family: var(--mono); font-size: 14px; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: rgba(19, 23, 17, 0.58);
}

.vf-loading {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.16em;
  text-transform: uppercase; color: rgba(19, 23, 17, 0.55);
}

/* the closing panel: the count, and the door to the record */
.vf-end { justify-content: center; align-items: flex-start; padding-top: 0; }
.vf-end-line {
  font-family: "Forma DJR Text", "Switzer", var(--display);
  font-weight: 500; font-size: 28px; line-height: 1.38; margin: 0 0 30px;
}
.vf-end button {
  font-family: "Forma DJR Text", "Switzer", var(--display);
  font-size: 18px; font-weight: 650;
  background: #131711; color: #fff; border: 0; border-radius: 4px;
  padding: 14px 40px; min-height: 50px; cursor: pointer;
}

/* the center play control: shows only while the tape waits — a rolling
   tape carries nothing over the speaker's face (a tap on the picture
   pauses, and the play comes back) */
.tape-ctl {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 64px; height: 64px; border-radius: 50%;
  border: 0; padding: 0; cursor: pointer;
  background: rgba(0, 0, 0, 0.52); color: #fff;
  display: grid; place-items: center; z-index: 3;
}
.tape-ctl svg { width: 26px; height: 26px; display: block; margin-left: 2px; }
.tape-ctl.playing { display: none; }
.tape-ctl[hidden] { display: none; }
/* the feed's copy sits over its fixed tape */
.vf .vf-ctl {
  position: fixed;
  left: 50vw; top: calc(var(--vf-top) + 56.25vw / 2);
  z-index: 4;
}
