/**
 * WDHC Film Mode · cinema recorder shell
 * On-brand dark gold, mobile-first, full-bleed stage
 */

.page-film {
  background: #050505;
  color: var(--wdhc-text, #f2f2f2);
  min-height: 100dvh;
}

.page-film .film-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 16px 96px;
  box-sizing: border-box;
}

/* ── Hero intro ── */
.film-hero {
  text-align: center;
  margin: 8px 0 22px;
}

.film-hero__eyebrow {
  margin: 0 0 8px;
  font-family: var(--wdhc-font-ui, 'Rajdhani', sans-serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--wdhc-bronze, #cd7f32);
}

.film-hero__title {
  margin: 0 0 10px;
  font-family: var(--wdhc-font-head, 'Oswald', sans-serif);
  font-size: clamp(2rem, 7vw, 3.1rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 0.95;
  color: #fff;
}

.film-hero__title-accent {
  color: var(--wdhc-gold, #d4af37);
  text-shadow: 0 0 28px rgba(212, 175, 55, 0.35);
}

.film-hero__lead {
  margin: 0 auto;
  max-width: 36rem;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--wdhc-muted, #b5b5b5);
}

.film-hero__lead strong {
  color: #e8e8e8;
  font-weight: 600;
}

.film-hero__alt {
  margin: 10px auto 0;
  font-size: 0.92rem;
  color: #888;
}

.film-hero__alt a {
  color: var(--wdhc-gold, #d4af37);
}

/* ── Steps ── */
.film-steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.film-steps__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 12, 12, 0.85);
  font-family: var(--wdhc-font-ui, 'Rajdhani', sans-serif);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #777;
}

.film-steps__item.is-active {
  color: #111;
  border-color: rgba(212, 175, 55, 0.55);
  background: linear-gradient(135deg, #ffe566, #d4af37 55%, #e87820);
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.28);
}

.film-steps__item.is-done {
  color: #c8c8c8;
  border-color: rgba(212, 175, 55, 0.28);
  background: rgba(212, 175, 55, 0.08);
}

.film-steps__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.72rem;
}

.film-steps__item.is-active .film-steps__num {
  background: rgba(0, 0, 0, 0.18);
  color: #000;
}

/* ── Phone shell (desktop / tablet). On a real phone the device is the chrome. ── */
.film-phone {
  --film-bezel: 11px;
  --film-radius: 44px;
  --film-screen-radius: 32px;
  position: relative;
  width: min(100%, calc((min(82dvh, 840px)) * 9 / 16 + var(--film-bezel) * 2));
  margin: 0 auto 8px;
}

.film-phone__shell {
  position: relative;
  padding: var(--film-bezel);
  border-radius: var(--film-radius);
  background:
    linear-gradient(165deg, #3a3a3c 0%, #1c1c1e 22%, #0b0b0c 100%);
  box-shadow:
    0 0 0 1px #2a2a2c,
    0 0 0 3px #050505,
    0 28px 70px rgba(0, 0, 0, 0.62);
}

.film-phone__island {
  position: absolute;
  top: calc(var(--film-bezel) + 9px);
  left: 50%;
  z-index: 8;
  width: 92px;
  height: 26px;
  transform: translateX(-50%);
  background: #050505;
  border-radius: 20px;
  box-shadow: inset 0 0 0 1px #1a1a1a;
  pointer-events: none;
}

.film-phone__island::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: radial-gradient(circle at 35% 35%, #3a5a7a, #0a1020 70%);
}

.film-phone__home {
  position: absolute;
  left: 50%;
  bottom: calc(var(--film-bezel) + 8px);
  z-index: 8;
  width: 108px;
  height: 4px;
  border-radius: 4px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.42);
  pointer-events: none;
}

.film-phone__btn {
  position: absolute;
  width: 3px;
  background: #1a1a1c;
  pointer-events: none;
}

.film-phone__btn--silent {
  top: 14%;
  left: -3px;
  height: 22px;
  border-radius: 2px 0 0 2px;
}

.film-phone__btn--vol {
  top: 20%;
  left: -3px;
  height: 78px;
  border-radius: 2px 0 0 2px;
}

.film-phone__btn--pwr {
  top: 24%;
  right: -3px;
  height: 54px;
  border-radius: 0 2px 2px 0;
}

/* ── Stage: 9:16 camera screen ── */
.film-stage {
  position: relative;
  border-radius: var(--film-screen-radius);
  overflow: hidden;
  background: #000;
  border: 0;
  aspect-ratio: 9 / 16;
  width: 100%;
  height: auto;
  margin: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

@media (min-width: 900px) {
  .film-phone {
    width: min(100%, calc(430px + var(--film-bezel) * 2));
  }
}

.film-stage__viewport {
  position: absolute;
  inset: 0;
  background: #000;
  overflow: hidden; /* digital zoom crop */
}

.film-stage__video,
.film-stage__canvas,
.film-stage__review {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.film-stage__video {
  transform: none;
  z-index: 2;
  transform-origin: center center;
}

/* Mirror only when not using inline zoom transform (JS composes both) */
.film-stage__video.is-mirror:not([style*='scale(']) {
  transform: scaleX(-1);
}

.film-stage__canvas {
  opacity: 0.02;
  pointer-events: none;
  z-index: 1;
}

/* WYSIWYG: show the 9:16 composite (what gets saved). Hidden <video> still feeds drawImage. */
.film-stage.is-live-composite:not(.is-review) .film-stage__canvas {
  opacity: 1;
  z-index: 2;
}
.film-stage.is-live-composite:not(.is-review) .film-stage__video {
  opacity: 0;
  z-index: 1;
}
.film-stage.is-review .film-stage__review {
  z-index: 4;
}

.film-stage__review {
  display: none;
  object-fit: contain;
  background: #050505;
}

.film-stage.is-review .film-stage__review {
  display: block;
}

.film-stage.is-review .film-stage__video {
  display: none;
}

/* Framing brackets */
.film-frame {
  position: absolute;
  inset: 14px;
  pointer-events: none;
  z-index: 3;
  border-radius: 10px;
}

.film-frame::before,
.film-frame::after {
  content: none;
}

.film-frame::before {
  top: 0;
  left: 0;
  border-width: 2px 0 0 2px;
  border-radius: 4px 0 0 0;
}

.film-frame::after {
  top: 0;
  right: 0;
  border-width: 2px 2px 0 0;
  border-radius: 0 4px 0 0;
}

.film-frame__br,
.film-frame__bl {
  display: none;
}

.film-frame__bl {
  bottom: 0;
  left: 0;
  border-width: 0 0 2px 2px;
  border-radius: 0 0 0 4px;
}

.film-frame__br {
  bottom: 0;
  right: 0;
  border-width: 0 2px 2px 0;
  border-radius: 0 0 4px 0;
}

/* ── Pose framing guides: always on while live (body in the dotted frame) ── */
.film-pose {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.film-stage.is-review .film-pose,
.film-stage.is-review .film-frame__guide {
  display: none;
}
.film-pose__label {
  display: none;
}
.film-pose__bar-zone,
.film-pose__feet-zone {
  display: none;
}
.film-pose__midline {
  position: absolute;
  left: 50%;
  top: 8%;
  bottom: 8%;
  width: 0;
  border-left: 1px dashed rgba(255, 255, 255, 0.22);
  transform: translateX(-50%);
}
.film-pose__feet-zone {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 6%;
  height: 14%;
  border: 1.5px dashed rgba(125, 211, 252, 0.45);
  border-radius: 10px;
  background: linear-gradient(0deg, rgba(125, 211, 252, 0.08), transparent);
}
.film-pose__label {
  position: absolute;
  font-family: var(--wdhc-font-ui, 'Rajdhani', sans-serif);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
}
.film-pose__label--bar {
  top: 7.5%;
  left: 10%;
  color: #d4af37;
}
.film-pose__label--feet {
  bottom: 7.5%;
  left: 14%;
  color: #7dd3fc;
}

/* ── Device level / horizon ── */
.film-level {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  width: min(78%, 280px);
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.film-level[hidden] { display: none !important; }
.film-level__horizon {
  position: absolute;
  left: -8%;
  right: -8%;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.85), transparent);
  transform-origin: center center;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.45);
  transition: background 0.15s ease;
}
.film-level.is-level .film-level__horizon {
  background: linear-gradient(90deg, transparent, rgba(34, 197, 94, 0.95), transparent);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.5);
}
.film-level__bubble-track {
  position: relative;
  height: 28px;
  margin: 0 auto;
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.film-level__bubble-track::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 4px;
  bottom: 4px;
  width: 36px;
  margin-left: -18px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.55);
  box-sizing: border-box;
}
.film-level__bubble {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-left: -10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff7d6, #d4af37 55%, #8a6a18);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.55);
  transition: left 0.08s linear, background 0.15s ease;
}
.film-level.is-level .film-level__bubble {
  background: radial-gradient(circle at 35% 30%, #e8ffe8, #22c55e 55%, #166534);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.55);
}
.film-level__readout {
  margin: 8px 0 0;
  text-align: center;
  font-family: var(--wdhc-font-ui, 'Rajdhani', sans-serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}
.film-level.is-level .film-level__readout {
  color: #86efac;
}
.film-btn.is-level-active {
  border-color: rgba(212, 175, 55, 0.7) !important;
  color: #d4af37 !important;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.25);
}

/* Live HUD (UI only · burn-in is on canvas) */
.film-hud {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 42px 14px 16px;
}

.film-hud__top {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
}

.film-hud__brand {
  display: none;
}

.film-hud__rec {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(204, 0, 0, 0.45);
  font-family: var(--wdhc-font-ui, 'Rajdhani', sans-serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #fff;
}

.film-stage.is-recording .film-hud__rec {
  display: inline-flex;
}

.film-hud__rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff2a2a;
  box-shadow: 0 0 10px rgba(255, 42, 42, 0.85);
  animation: filmRecPulse 1s ease-in-out infinite;
}

@keyframes filmRecPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

/* Live HUD timer is hidden: the burned-in left clock is the only timer. */
.film-hud__timer {
  display: none !important;
}

.film-hud__timer-label {
  display: none; /* hang: digits only; prep shows via JS when bar proof */
  font-family: var(--wdhc-font-ui, 'Rajdhani', sans-serif);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(212, 175, 55, 0.9);
  margin-bottom: 1px;
  line-height: 1.15;
  white-space: nowrap;
}
.film-stage.is-prep .film-hud__timer-label {
  display: block;
}

.film-hud__timer-value {
  display: block;
  font-family: var(--wdhc-font-head, 'Oswald', sans-serif);
  font-size: clamp(1.28rem, 5.1vw, 1.7rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 14px rgba(212, 175, 55, 0.3);
  white-space: nowrap;
  text-align: center;
  /* Oswald sits high in the em box; small optical nudge down in the plate */
  transform: translateY(0.06em);
}

.film-stage.is-recording .film-hud__timer {
  border-color: rgba(255, 80, 80, 0.45);
}

.film-stage.is-recording .film-hud__timer-value {
  color: #ffe566;
}

/* Idle / error overlays */
.film-gate {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px 22px;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 50% at 50% 40%, rgba(212, 175, 55, 0.1), transparent 60%),
    rgba(5, 5, 5, 0.92);
}

.film-gate[hidden] {
  display: none !important;
}

.film-gate__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.08);
  color: var(--wdhc-gold, #d4af37);
  font-size: 1.4rem;
}

.film-gate__title {
  margin: 0;
  font-family: var(--wdhc-font-head, 'Oswald', sans-serif);
  font-size: 1.45rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}

.film-gate__copy {
  margin: 0;
  max-width: 16rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: #b0b0b0;
}

.film-countdown {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  font-family: var(--wdhc-font-head, 'Oswald', sans-serif);
  font-size: clamp(5rem, 22vw, 8rem);
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 40px rgba(212, 175, 55, 0.55);
  letter-spacing: 0.04em;
}

.film-stage.is-countdown .film-countdown {
  display: flex;
}

/* ── Controls (below stage; not overlapping the frame) ── */
.film-controls {
  margin: 28px auto 0;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  z-index: 20;
}

.film-controls__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.film-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  font-family: var(--wdhc-font-ui, 'Rajdhani', sans-serif);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

.film-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.film-btn:not(:disabled):active {
  transform: scale(0.97);
}

.film-btn--primary {
  min-width: 11rem;
  padding: 16px 28px;
  font-size: 1.05rem;
  color: #111;
  background: linear-gradient(135deg, #ffe566 0%, #d4af37 42%, #e87820 100%);
  box-shadow: 0 8px 28px rgba(212, 175, 55, 0.35);
}

.film-btn--primary:not(:disabled):hover {
  filter: brightness(1.06);
  box-shadow: 0 10px 32px rgba(212, 175, 55, 0.45);
}

.film-btn--danger {
  min-width: 11rem;
  padding: 16px 28px;
  font-size: 1.05rem;
  color: #fff;
  background: linear-gradient(135deg, #e04040, #a01010);
  box-shadow: 0 8px 28px rgba(180, 30, 30, 0.4);
}

.film-btn--ghost {
  padding: 12px 18px;
  font-size: 0.88rem;
  color: #ddd;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.film-btn--ghost:not(:disabled):hover {
  border-color: rgba(212, 175, 55, 0.4);
  color: #fff;
}

.film-btn--text {
  padding: 8px 12px;
  font-size: 0.82rem;
  color: #999;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.film-btn--download {
  min-width: 11rem;
  padding: 16px 24px;
  font-size: 1.02rem;
  color: #ffe566;
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid #d4af37;
  box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.2);
}
.film-btn--download:not(:disabled):hover {
  background: rgba(212, 175, 55, 0.12);
  color: #fff;
}
.film-btn--download.is-urgent {
  animation: film-download-pulse 1.4s ease-in-out infinite;
  border-color: #ffe566;
  box-shadow: 0 0 0 4px rgba(255, 229, 102, 0.18);
}
@keyframes film-download-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}
.film-keep-copy {
  margin: 2px 0 0;
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #e8d9a0;
}

.film-status {
  text-align: center;
  min-height: 1.35em;
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: #a0a0a0;
}

.film-status.is-err {
  color: #ff8a8a;
}

.film-status.is-ok {
  color: #9fd39f;
}

.film-simple {
  margin: 18px auto 0;
  max-width: 420px;
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #9a9a9a;
}

/* Review summary card */
.film-review-card {
  margin: 16px auto 0;
  max-width: 420px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  background: linear-gradient(165deg, rgba(24, 20, 12, 0.9), rgba(10, 10, 10, 0.95));
  text-align: center;
}

.film-review-card[hidden] {
  display: none !important;
}

.film-review-card__label {
  margin: 0 0 4px;
  font-family: var(--wdhc-font-ui, 'Rajdhani', sans-serif);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #888;
}

.film-review-card__time {
  margin: 0 0 8px;
  font-family: var(--wdhc-font-ui, 'Rajdhani', sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: #d4d4d4;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.film-review-card__meta {
  margin: 0;
  font-size: 0.88rem;
  color: #aaa;
}

/* Safe area for home indicator */
@supports (padding: max(0px)) {
  .page-film .film-main {
    padding-bottom: max(96px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .film-hud__rec-dot {
    animation: none;
  }
  .film-btn {
    transition: none;
  }
}

/* ── Options strip (hang type + verified) ── */
.film-options {
  max-width: 720px;
  margin: 0 auto 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  background:
    radial-gradient(ellipse 80% 60% at 0% 0%, rgba(212, 175, 55, 0.1), transparent 55%),
    linear-gradient(165deg, rgba(18, 16, 12, 0.9), rgba(8, 8, 10, 0.85));
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}
.film-options__row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: flex-end;
}
.film-field {
  flex: 1 1 200px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.film-field__label {
  font-family: var(--wdhc-font-ui, Rajdhani, sans-serif);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #d4af37;
}
.film-field__control {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.45);
  color: #f2f2f2;
  font-family: var(--wdhc-font-body, "Source Sans 3", sans-serif);
  font-size: 0.95rem;
}
.film-check {
  flex: 1 1 220px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.28);
  cursor: pointer;
  font-size: 0.9rem;
  color: #ddd;
  line-height: 1.35;
}
.film-check input {
  margin-top: 3px;
  accent-color: #d4af37;
}
.film-check strong {
  display: block;
  color: #f0d78c;
  font-size: 0.92rem;
}
.film-check__opt {
  color: #9a9a9a;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: none;
}
.film-check__hint {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  color: #999;
}
.film-options__coach {
  margin: 12px 0 0;
  font-size: 0.88rem;
  color: #b0b0b0;
  line-height: 1.45;
}
.film-options__coach strong { color: #f0d78c; }

.film-frame__guide {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 8%;
  bottom: 8%;
  width: auto;
  height: auto;
  transform: none;
  border: 1.5px dashed rgba(212, 175, 55, 0.55);
  border-radius: 4px;
  pointer-events: none;
}
.film-stage:has(#filmGate:not([hidden])) .film-pose,
.film-stage:has(#filmGate:not([hidden])) .film-frame__guide {
  display: none;
}
.film-stage.is-prep {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(60, 140, 255, 0.12);
  border-color: rgba(80, 160, 255, 0.35);
}
.film-stage.is-prep .film-hud__rec {
  display: inline-flex;
  border-color: rgba(80, 160, 255, 0.5);
}
.film-stage.is-prep .film-hud__rec-dot {
  background: #4da3ff;
  box-shadow: 0 0 10px rgba(80, 160, 255, 0.85);
}
.film-stage.is-prep .film-hud__timer {
  border-color: rgba(80, 160, 255, 0.5);
}
.film-stage.is-prep .film-hud__timer-value {
  color: #9fd0ff;
  text-shadow: 0 0 18px rgba(80, 160, 255, 0.4);
}
.film-stage.is-hanging .film-hud__timer-value {
  color: #ffe566;
}

/* ── Zoom strip (on the viewfinder, like a phone camera) ── */
.film-zoom {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 5;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0;
  padding: 4px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: auto;
}
.film-stage.is-review .film-zoom {
  display: none !important;
}
.film-zoom[hidden] {
  display: none !important;
}
.film-zoom__label {
  font-family: Rajdhani, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #888;
  margin-right: 2px;
}
.film-zoom__btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.45);
  color: #ddd;
  border-radius: 999px;
  min-width: 3.1rem;
  min-height: 40px;
  padding: 8px 12px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.film-zoom__btn.is-active {
  color: #111;
  border-color: rgba(212, 175, 55, 0.65);
  background: linear-gradient(135deg, #ffe566, #d4af37 55%, #e87820);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.28);
}

/* Live preview zoom (preview only; recorded pixels use drawCompositeFrame crop) */
.film-stage__video.is-zoom {
  transform-origin: center center;
}
.film-stage__video.is-mirror.is-zoom {
  /* mirror + zoom composed via JS CSS vars if needed */
}

/* Prior takes: below controls, compact, review-only (JS hides during live/retake) */
.film-takes {
  max-width: 520px;
  margin: 10px auto 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 12, 0.85);
}
.film-takes[hidden] {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
.film-takes__label {
  margin: 0 0 6px;
  font-family: Rajdhani, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #888;
}
.film-takes__list {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.film-takes__item {
  appearance: none;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.08);
  color: #eee;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 5.5rem;
  flex: 0 0 auto;
  font-family: Rajdhani, sans-serif;
}
.film-takes__time {
  font-family: Oswald, sans-serif;
  font-size: 1.05rem;
  color: #f0d78c;
}
.film-takes__use {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #aaa;
}

/* Mobile: taller portrait stage; controls sit clearly under the frame (not over it) */
@media (max-width: 720px) {
  .page-film .film-main {
    padding: 12px 12px calc(28px + env(safe-area-inset-bottom, 0px));
  }
  .film-hero {
    margin: 4px 0 12px;
  }
  .film-steps {
    margin-bottom: 12px;
  }
  .film-phone {
    width: min(100%, calc((min(78dvh, 720px)) * 9 / 16));
    margin-bottom: 4px;
  }
  .film-phone__shell {
    padding: 0;
    border-radius: 16px;
    background: #000;
    box-shadow: none;
  }
  .film-phone__island,
  .film-phone__home,
  .film-phone__btn {
    display: none;
  }
  .film-stage {
    width: 100%;
    max-height: min(78dvh, 720px);
    margin-bottom: 0;
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.22);
  }
  .film-hud {
    padding-top: 14px;
  }
  @media (orientation: landscape) {
    .film-stage:not(.is-portrait-lock) {
      width: min(100%, 96vw);
      max-height: min(62dvh, 420px);
      aspect-ratio: 16 / 9;
    }
  }
  .film-controls {
    position: relative;
    bottom: auto;
    z-index: 30;
    margin-top: 22px;
    padding: 14px 8px calc(16px + env(safe-area-inset-bottom, 0px));
    background: transparent;
  }
  .film-controls__row--primary .film-btn--primary,
  .film-controls__row--primary .film-btn--danger {
    min-height: 52px;
    font-size: 1.05rem;
  }
}

.film-preflight {
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}
.film-preflight__title {
  margin: 0 0 6px;
  font-family: Rajdhani, sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #d4af37;
}
.film-preflight ul {
  margin: 0;
  padding-left: 1.1rem;
  color: #b8b8b8;
  font-size: 0.86rem;
  line-height: 1.45;
}
.film-verified-note {
  margin: 10px auto 0;
  max-width: 520px;
  font-size: 0.86rem;
  line-height: 1.45;
  color: #a8c4e0;
  text-align: center;
}
.film-controls__row--primary {
  gap: 12px;
}
.page-film .film-main {
  padding-bottom: max(48px, env(safe-area-inset-bottom));
}
.page-film {
  background:
    radial-gradient(ellipse 90% 40% at 50% -10%, rgba(212, 175, 55, 0.08), transparent 50%),
    #050505;
}

/* takes2 */

/* filmzoom1 */

.film-already {
  margin: 16px auto 0;
  max-width: 36rem;
  text-align: left;
  border: 1px solid rgba(212,175,55,.28);
  border-radius: 10px;
  background: rgba(212,175,55,.05);
  padding: 4px 14px 8px;
}
.film-already summary {
  cursor: pointer;
  font-family: Oswald, sans-serif;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #D4AF37;
  padding: 10px 0;
  list-style: none;
}
.film-already summary::-webkit-details-marker { display: none; }
.film-already__body { color: #ccc; font-size: .95rem; line-height: 1.5; padding-bottom: 10px; }
.film-already__link {
  display: inline-block;
  margin-top: 8px;
  color: #050505;
  background: #D4AF37;
  font-family: Oswald, sans-serif;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 6px;
}
