:root { --gap: 10px; }
body { margin:0; font-family:system-ui, -apple-system, Segoe UI, Roboto, sans-serif; background:#0b0b0b; color:#fff; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 12px; }

.stage {
  position: relative;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  height: min(70vh, 680px);
  transform: translateZ(0);
}

.stage.split {
  display: grid;
  grid-template-columns: var(--left, 70fr) var(--right, 30fr);
  gap: var(--gap);
  padding: var(--gap);
  box-sizing: border-box;
}

.panel {
  position: relative;
  background: #111;
  border-radius: 12px;
  overflow: hidden;
  min-width: 0;
}

video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.stage.overlay { padding: 0; }
.stage.overlay .panel { position: absolute; inset: 0; border-radius: 0; }
.stage.overlay .panel.secondary {
  inset: auto 14px 14px auto;
  width: min(34vw, 360px);
  height: min(19vw, 200px);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 34px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.12);
}

.banner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  margin-bottom: 10px;
  background: rgba(255,255,255,0.06);
  border-radius: 14px;

  img {
    max-height: 150px;
    object-fit: contain;
  }

}
.banner + .stage { margin-top: 0; }
.stage + .banner { margin-top: 10px; margin-bottom: 10px; }
.banner img {
  max-height: 48px;
  width: auto;
  object-fit: contain;
}

.captions {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  max-width: min(92%, 980px);
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(0,0,0,0.62);
  font-size: clamp(14px, 2.2vw, 22px);
  line-height: 1.25;
  text-align: center;
  z-index: 20;
  pointer-events: none;
  white-space: pre-wrap;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.controls {
  margin-top: 12px;
  display: grid;
  grid-template-columns: auto auto auto 1fr auto;
  gap: 10px;
  align-items: center;
  background: rgba(255,255,255,0.06);
  padding: 12px;
  border-radius: 14px;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-weight: 650;
  cursor: pointer;
}
button:active { transform: scale(0.98); }

input[type="range"] { width: 100%; }
.time { font-variant-numeric: tabular-nums; opacity: 0.9; }
.hint { margin-top: 8px; opacity: .75; font-size: 13px; }

.gate {
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  z-index: 50;
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,0.08), rgba(0,0,0,0.65));
}
.gateCard {
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 16px 18px;
  border-radius: 14px;
  text-align:center;
  width: min(92%, 420px);
}
.gateCard h2 { margin: 0 0 8px 0; font-size: 18px; }
.gateCard p { margin: 0 0 12px 0; opacity: .85; }

.fs-controls {
  position: absolute;
  top: 14px;
  right: 14px;
  display: none;
  gap: 8px;
  z-index: 30;
  align-items: center;
}

.stage:fullscreen .fs-controls,
.stage:-webkit-full-screen .fs-controls {
  display: flex;
}

.fs-controls input[type="range"] {
  width: 120px;
  accent-color: #fff;
  opacity: 0.85;
}
.fs-controls input[type="range"]:hover { opacity: 1; }

.stage.overlay .fs-controls input[type="range"] {
  display: none;
}

.stage:fullscreen,
.stage:-webkit-full-screen {
  height: 100vh;
  border-radius: 0;
}

.fs-controls button {
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 18px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.fs-controls button:hover { background: rgba(255,255,255,0.15); }
